Massive reworking of wxMediaCtrl code - backend everything, search for backends via RTTI lookup, and more
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30527 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
6f4a67aca8
commit
ff4aedc554
28
Makefile.in
28
Makefile.in
@ -891,7 +891,7 @@ MEDIADLL_CXXFLAGS = $(__mediadll_PCH_INC) -D__WX$(TOOLKIT)__ \
|
||||
$(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \
|
||||
-DWXUSINGDLL -DWXMAKINGDLL_MEDIA $(PIC_FLAG) $(CPPFLAGS) $(CXXFLAGS)
|
||||
MEDIADLL_OBJECTS = \
|
||||
mediadll_emptydmy.o \
|
||||
mediadll_mediactrlcmn.o \
|
||||
$(__MEDIA_PLATFORM_SRC_OBJECTS_2)
|
||||
MEDIADLL_ODEP = $(___pch_wxprec_mediadll_wx_wxprec_h_gch___depname)
|
||||
MEDIALIB_CXXFLAGS = $(__medialib_PCH_INC) -D__WX$(TOOLKIT)__ \
|
||||
@ -899,7 +899,7 @@ MEDIALIB_CXXFLAGS = $(__medialib_PCH_INC) -D__WX$(TOOLKIT)__ \
|
||||
$(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \
|
||||
$(CPPFLAGS) $(CXXFLAGS)
|
||||
MEDIALIB_OBJECTS = \
|
||||
medialib_emptydmy.o \
|
||||
medialib_mediactrlcmn.o \
|
||||
$(__MEDIA_PLATFORM_SRC_OBJECTS_3)
|
||||
MEDIALIB_ODEP = $(___pch_wxprec_medialib_wx_wxprec_h_gch___depname)
|
||||
ODBCDLL_CXXFLAGS = $(__odbcdll_PCH_INC) -D__WX$(TOOLKIT)__ \
|
||||
@ -2077,11 +2077,11 @@ COND_TOOLKIT_MAC_ADVANCED_PLATFORM_HDR = \
|
||||
@COND_TOOLKIT_X11@ wx/unix/joystick.h wx/unix/sound.h wx/unix/taskbarx11.h
|
||||
@COND_TOOLKIT_COCOA@MEDIA_PLATFORM_HDR =
|
||||
@COND_TOOLKIT_GTK@MEDIA_PLATFORM_HDR =
|
||||
@COND_TOOLKIT_MAC@MEDIA_PLATFORM_HDR = wx/mac/carbon/mediactrl.h
|
||||
@COND_TOOLKIT_MAC@MEDIA_PLATFORM_HDR =
|
||||
@COND_TOOLKIT_MOTIF@MEDIA_PLATFORM_HDR =
|
||||
@COND_TOOLKIT_MSW@MEDIA_PLATFORM_HDR = wx/msw/mediactrl.h
|
||||
@COND_TOOLKIT_MSW@MEDIA_PLATFORM_HDR =
|
||||
@COND_TOOLKIT_PM@MEDIA_PLATFORM_HDR =
|
||||
@COND_TOOLKIT_WINCE@MEDIA_PLATFORM_HDR = wx/msw/mediactrl.h
|
||||
@COND_TOOLKIT_WINCE@MEDIA_PLATFORM_HDR =
|
||||
@COND_TOOLKIT_X11@MEDIA_PLATFORM_HDR =
|
||||
@COND_USE_GUI_1_WXUNIV_0@GUI_CORE_HEADERS = $(GUI_HDR)
|
||||
COND_USE_GUI_1_WXUNIV_1_GUI_CORE_HEADERS = \
|
||||
@ -2571,7 +2571,7 @@ COND_USE_GUI_1___MONOLIB_GUI_SRC_OBJECTS = \
|
||||
monodll_tipdlg.o \
|
||||
monodll_wizard.o \
|
||||
$(__ADVANCED_PLATFORM_SRC_OBJECTS) \
|
||||
monodll_emptydmy.o \
|
||||
monodll_mediactrlcmn.o \
|
||||
$(__MEDIA_PLATFORM_SRC_OBJECTS) \
|
||||
$(__HTML_SRC_PLATFORM_OBJECTS) \
|
||||
monodll_helpctrl.o \
|
||||
@ -4006,7 +4006,7 @@ COND_USE_GUI_1___MONOLIB_GUI_SRC_OBJECTS_1 = \
|
||||
monolib_tipdlg.o \
|
||||
monolib_wizard.o \
|
||||
$(__ADVANCED_PLATFORM_SRC_OBJECTS_1) \
|
||||
monolib_emptydmy.o \
|
||||
monolib_mediactrlcmn.o \
|
||||
$(__MEDIA_PLATFORM_SRC_OBJECTS_1) \
|
||||
$(__HTML_SRC_PLATFORM_OBJECTS_1) \
|
||||
monolib_helpctrl.o \
|
||||
@ -10050,7 +10050,7 @@ monodll_wizard.o: $(srcdir)/src/generic/wizard.cpp $(MONODLL_ODEP)
|
||||
monodll_eggtrayicon.o: $(srcdir)/src/gtk/eggtrayicon.c $(MONODLL_ODEP)
|
||||
$(CCC) -c -o $@ $(MONODLL_CFLAGS) $<
|
||||
|
||||
monodll_emptydmy.o: $(srcdir)/src/common/emptydmy.cpp $(MONODLL_ODEP)
|
||||
monodll_mediactrlcmn.o: $(srcdir)/src/common/mediactrlcmn.cpp $(MONODLL_ODEP)
|
||||
$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $<
|
||||
|
||||
monodll_helpbest.o: $(srcdir)/src/msw/helpbest.cpp $(MONODLL_ODEP)
|
||||
@ -13368,7 +13368,7 @@ monolib_wizard.o: $(srcdir)/src/generic/wizard.cpp $(MONOLIB_ODEP)
|
||||
monolib_eggtrayicon.o: $(srcdir)/src/gtk/eggtrayicon.c $(MONOLIB_ODEP)
|
||||
$(CCC) -c -o $@ $(MONOLIB_CFLAGS) $<
|
||||
|
||||
monolib_emptydmy.o: $(srcdir)/src/common/emptydmy.cpp $(MONOLIB_ODEP)
|
||||
monolib_mediactrlcmn.o: $(srcdir)/src/common/mediactrlcmn.cpp $(MONOLIB_ODEP)
|
||||
$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $<
|
||||
|
||||
monolib_helpbest.o: $(srcdir)/src/msw/helpbest.cpp $(MONOLIB_ODEP)
|
||||
@ -22494,7 +22494,7 @@ advlib_gprint.o: $(srcdir)/src/gtk/gnome/gprint.cpp $(ADVLIB_ODEP)
|
||||
@COND_TOOLKIT_X11@advlib_taskbarx11.o: $(srcdir)/src/unix/taskbarx11.cpp $(ADVLIB_ODEP)
|
||||
@COND_TOOLKIT_X11@ $(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $<
|
||||
|
||||
mediadll_emptydmy.o: $(srcdir)/src/common/emptydmy.cpp $(MEDIADLL_ODEP)
|
||||
mediadll_mediactrlcmn.o: $(srcdir)/src/common/mediactrlcmn.cpp $(MEDIADLL_ODEP)
|
||||
$(CXXC) -c -o $@ $(MEDIADLL_CXXFLAGS) $<
|
||||
|
||||
@COND_TOOLKIT_MSW@mediadll_mediactrl.o: $(srcdir)/src/msw/mediactrl.cpp $(MEDIADLL_ODEP)
|
||||
@ -22506,7 +22506,7 @@ mediadll_emptydmy.o: $(srcdir)/src/common/emptydmy.cpp $(MEDIADLL_ODEP)
|
||||
@COND_TOOLKIT_MAC@mediadll_mediactrl.o: $(srcdir)/src/mac/carbon/mediactrl.cpp $(MEDIADLL_ODEP)
|
||||
@COND_TOOLKIT_MAC@ $(CXXC) -c -o $@ $(MEDIADLL_CXXFLAGS) $<
|
||||
|
||||
medialib_emptydmy.o: $(srcdir)/src/common/emptydmy.cpp $(MEDIALIB_ODEP)
|
||||
medialib_mediactrlcmn.o: $(srcdir)/src/common/mediactrlcmn.cpp $(MEDIALIB_ODEP)
|
||||
$(CXXC) -c -o $@ $(MEDIALIB_CXXFLAGS) $<
|
||||
|
||||
@COND_TOOLKIT_MSW@medialib_mediactrl.o: $(srcdir)/src/msw/mediactrl.cpp $(MEDIALIB_ODEP)
|
||||
@ -23665,6 +23665,12 @@ SAMPLES_DIST: ALL_GUI_DIST
|
||||
cp $(SAMPDIR)/mdi/*.xpm $(DISTDIR)/samples/mdi
|
||||
cp $(SAMPDIR)/mdi/bitmaps/*.xpm $(DISTDIR)/samples/mdi/bitmaps
|
||||
|
||||
mkdir $(DISTDIR)/samples/mediaplayer
|
||||
cp $(SAMPDIR)/mediaplayer/Makefile.in $(DISTDIR)/samples/mediaplayer
|
||||
cp $(SAMPDIR)/mediaplayer/makefile.unx $(DISTDIR)/samples/mediaplayer
|
||||
cp $(SAMPDIR)/mediaplayer/*.cpp $(DISTDIR)/samples/mediaplayer
|
||||
cp $(SAMPDIR)/mediaplayer/*.xpm $(DISTDIR)/samples/mediaplayer
|
||||
|
||||
mkdir $(DISTDIR)/samples/memcheck
|
||||
cp $(SAMPDIR)/memcheck/Makefile.in $(DISTDIR)/samples/memcheck
|
||||
cp $(SAMPDIR)/memcheck/makefile.unx $(DISTDIR)/samples/memcheck
|
||||
|
@ -2343,7 +2343,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<set var="MEDIA_CMN_SRC" hints="files">
|
||||
src/common/emptydmy.cpp
|
||||
src/common/mediactrlcmn.cpp
|
||||
</set>
|
||||
|
||||
<set var="MEDIA_CMN_HDR" hints="files">
|
||||
@ -2354,7 +2354,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
||||
src/msw/mediactrl.cpp
|
||||
</set>
|
||||
<set var="MEDIA_MSW_HDR" hints="files">
|
||||
wx/msw/mediactrl.h
|
||||
</set>
|
||||
<!-- not built on WindowsCE: -->
|
||||
<set var="MEDIA_MSW_ONLY_SRC" hints="files">
|
||||
@ -2366,7 +2365,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
||||
src/mac/carbon/mediactrl.cpp
|
||||
</set>
|
||||
<set var="MEDIA_MAC_HDR" hints="files">
|
||||
wx/mac/carbon/mediactrl.h
|
||||
</set>
|
||||
|
||||
<set var="MEDIA_COCOA_SRC" hints="files">
|
||||
|
@ -254,6 +254,7 @@ MONODLL_OBJECTS = \
|
||||
$(OBJS)\monodll_regconf.obj \
|
||||
$(OBJS)\monodll_registry.obj \
|
||||
$(OBJS)\monodll_snglinst.obj \
|
||||
$(OBJS)\monodll_stdpaths.obj \
|
||||
$(OBJS)\monodll_thread.obj \
|
||||
$(OBJS)\monodll_utils.obj \
|
||||
$(OBJS)\monodll_utilsexc.obj \
|
||||
@ -355,6 +356,7 @@ MONOLIB_OBJECTS = \
|
||||
$(OBJS)\monolib_regconf.obj \
|
||||
$(OBJS)\monolib_registry.obj \
|
||||
$(OBJS)\monolib_snglinst.obj \
|
||||
$(OBJS)\monolib_stdpaths.obj \
|
||||
$(OBJS)\monolib_thread.obj \
|
||||
$(OBJS)\monolib_utils.obj \
|
||||
$(OBJS)\monolib_utilsexc.obj \
|
||||
@ -457,6 +459,7 @@ BASEDLL_OBJECTS = \
|
||||
$(OBJS)\basedll_regconf.obj \
|
||||
$(OBJS)\basedll_registry.obj \
|
||||
$(OBJS)\basedll_snglinst.obj \
|
||||
$(OBJS)\basedll_stdpaths.obj \
|
||||
$(OBJS)\basedll_thread.obj \
|
||||
$(OBJS)\basedll_utils.obj \
|
||||
$(OBJS)\basedll_utilsexc.obj \
|
||||
@ -543,6 +546,7 @@ BASELIB_OBJECTS = \
|
||||
$(OBJS)\baselib_regconf.obj \
|
||||
$(OBJS)\baselib_registry.obj \
|
||||
$(OBJS)\baselib_snglinst.obj \
|
||||
$(OBJS)\baselib_stdpaths.obj \
|
||||
$(OBJS)\baselib_thread.obj \
|
||||
$(OBJS)\baselib_utils.obj \
|
||||
$(OBJS)\baselib_utilsexc.obj \
|
||||
@ -677,6 +681,7 @@ MEDIADLL_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \
|
||||
-H=$(OBJS)\wxprec_mediadll.csm $(CPPFLAGS) $(CXXFLAGS)
|
||||
MEDIADLL_OBJECTS = \
|
||||
$(OBJS)\mediadll_dummy.obj \
|
||||
$(OBJS)\mediadll_mediactrlcmn.obj \
|
||||
$(OBJS)\mediadll_mediactrl.obj
|
||||
MEDIALIB_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \
|
||||
$(__OPTIMIZEFLAG) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
|
||||
@ -686,6 +691,7 @@ MEDIALIB_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \
|
||||
$(CXXFLAGS)
|
||||
MEDIALIB_OBJECTS = \
|
||||
$(OBJS)\medialib_dummy.obj \
|
||||
$(OBJS)\medialib_mediactrlcmn.obj \
|
||||
$(OBJS)\medialib_mediactrl.obj
|
||||
ODBCDLL_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \
|
||||
$(__OPTIMIZEFLAG) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
|
||||
@ -990,6 +996,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_OBJECTS = \
|
||||
$(OBJS)\monodll_sound.obj \
|
||||
$(OBJS)\monodll_taskbar.obj \
|
||||
$(OBJS)\monodll_joystick.obj \
|
||||
$(OBJS)\monodll_mediactrlcmn.obj \
|
||||
$(OBJS)\monodll_mediactrl.obj \
|
||||
$(OBJS)\monodll_helpbest.obj \
|
||||
$(OBJS)\monodll_helpctrl.obj \
|
||||
@ -1096,7 +1103,6 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
|
||||
$(OBJS)\monodll_region.obj \
|
||||
$(OBJS)\monodll_renderer.obj \
|
||||
$(OBJS)\monodll_settings.obj \
|
||||
$(OBJS)\monodll_stdpaths.obj \
|
||||
$(OBJS)\monodll_timer.obj \
|
||||
$(OBJS)\monodll_tooltip.obj \
|
||||
$(OBJS)\monodll_toplevel.obj \
|
||||
@ -1292,7 +1298,6 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
|
||||
$(OBJS)\monodll_region.obj \
|
||||
$(OBJS)\monodll_renderer.obj \
|
||||
$(OBJS)\monodll_settings.obj \
|
||||
$(OBJS)\monodll_stdpaths.obj \
|
||||
$(OBJS)\monodll_timer.obj \
|
||||
$(OBJS)\monodll_tooltip.obj \
|
||||
$(OBJS)\monodll_toplevel.obj \
|
||||
@ -1470,6 +1475,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS = \
|
||||
$(OBJS)\monolib_sound.obj \
|
||||
$(OBJS)\monolib_taskbar.obj \
|
||||
$(OBJS)\monolib_joystick.obj \
|
||||
$(OBJS)\monolib_mediactrlcmn.obj \
|
||||
$(OBJS)\monolib_mediactrl.obj \
|
||||
$(OBJS)\monolib_helpbest.obj \
|
||||
$(OBJS)\monolib_helpctrl.obj \
|
||||
@ -1576,7 +1582,6 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
|
||||
$(OBJS)\monolib_region.obj \
|
||||
$(OBJS)\monolib_renderer.obj \
|
||||
$(OBJS)\monolib_settings.obj \
|
||||
$(OBJS)\monolib_stdpaths.obj \
|
||||
$(OBJS)\monolib_timer.obj \
|
||||
$(OBJS)\monolib_tooltip.obj \
|
||||
$(OBJS)\monolib_toplevel.obj \
|
||||
@ -1772,7 +1777,6 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
|
||||
$(OBJS)\monolib_region.obj \
|
||||
$(OBJS)\monolib_renderer.obj \
|
||||
$(OBJS)\monolib_settings.obj \
|
||||
$(OBJS)\monolib_stdpaths.obj \
|
||||
$(OBJS)\monolib_timer.obj \
|
||||
$(OBJS)\monolib_tooltip.obj \
|
||||
$(OBJS)\monolib_toplevel.obj \
|
||||
@ -1989,7 +1993,6 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
|
||||
$(OBJS)\coredll_region.obj \
|
||||
$(OBJS)\coredll_renderer.obj \
|
||||
$(OBJS)\coredll_settings.obj \
|
||||
$(OBJS)\coredll_stdpaths.obj \
|
||||
$(OBJS)\coredll_timer.obj \
|
||||
$(OBJS)\coredll_tooltip.obj \
|
||||
$(OBJS)\coredll_toplevel.obj \
|
||||
@ -2185,7 +2188,6 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
|
||||
$(OBJS)\coredll_region.obj \
|
||||
$(OBJS)\coredll_renderer.obj \
|
||||
$(OBJS)\coredll_settings.obj \
|
||||
$(OBJS)\coredll_stdpaths.obj \
|
||||
$(OBJS)\coredll_timer.obj \
|
||||
$(OBJS)\coredll_tooltip.obj \
|
||||
$(OBJS)\coredll_toplevel.obj \
|
||||
@ -2386,7 +2388,6 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
|
||||
$(OBJS)\corelib_region.obj \
|
||||
$(OBJS)\corelib_renderer.obj \
|
||||
$(OBJS)\corelib_settings.obj \
|
||||
$(OBJS)\corelib_stdpaths.obj \
|
||||
$(OBJS)\corelib_timer.obj \
|
||||
$(OBJS)\corelib_tooltip.obj \
|
||||
$(OBJS)\corelib_toplevel.obj \
|
||||
@ -2582,7 +2583,6 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
|
||||
$(OBJS)\corelib_region.obj \
|
||||
$(OBJS)\corelib_renderer.obj \
|
||||
$(OBJS)\corelib_settings.obj \
|
||||
$(OBJS)\corelib_stdpaths.obj \
|
||||
$(OBJS)\corelib_timer.obj \
|
||||
$(OBJS)\corelib_tooltip.obj \
|
||||
$(OBJS)\corelib_toplevel.obj \
|
||||
@ -3824,6 +3824,9 @@ $(OBJS)\monodll_registry.obj: ..\..\src\msw\registry.cpp
|
||||
$(OBJS)\monodll_snglinst.obj: ..\..\src\msw\snglinst.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\monodll_stdpaths.obj: ..\..\src\msw\stdpaths.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\monodll_thread.obj: ..\..\src\msw\thread.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) $**
|
||||
|
||||
@ -4067,6 +4070,9 @@ $(OBJS)\monodll_taskbar.obj: ..\..\src\msw\taskbar.cpp
|
||||
$(OBJS)\monodll_joystick.obj: ..\..\src\msw\joystick.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\monodll_mediactrlcmn.obj: ..\..\src\common\mediactrlcmn.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\monodll_mediactrl.obj: ..\..\src\msw\mediactrl.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) $**
|
||||
|
||||
@ -4458,11 +4464,6 @@ $(OBJS)\monodll_settings.obj: ..\..\src\msw\settings.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) $**
|
||||
!endif
|
||||
|
||||
!if "$(USE_GUI)" == "1"
|
||||
$(OBJS)\monodll_stdpaths.obj: ..\..\src\msw\stdpaths.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) $**
|
||||
!endif
|
||||
|
||||
!if "$(USE_GUI)" == "1"
|
||||
$(OBJS)\monodll_timer.obj: ..\..\src\msw\timer.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) $**
|
||||
@ -5440,6 +5441,9 @@ $(OBJS)\monolib_registry.obj: ..\..\src\msw\registry.cpp
|
||||
$(OBJS)\monolib_snglinst.obj: ..\..\src\msw\snglinst.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\monolib_stdpaths.obj: ..\..\src\msw\stdpaths.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\monolib_thread.obj: ..\..\src\msw\thread.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) $**
|
||||
|
||||
@ -5683,6 +5687,9 @@ $(OBJS)\monolib_taskbar.obj: ..\..\src\msw\taskbar.cpp
|
||||
$(OBJS)\monolib_joystick.obj: ..\..\src\msw\joystick.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\monolib_mediactrlcmn.obj: ..\..\src\common\mediactrlcmn.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\monolib_mediactrl.obj: ..\..\src\msw\mediactrl.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) $**
|
||||
|
||||
@ -6074,11 +6081,6 @@ $(OBJS)\monolib_settings.obj: ..\..\src\msw\settings.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) $**
|
||||
!endif
|
||||
|
||||
!if "$(USE_GUI)" == "1"
|
||||
$(OBJS)\monolib_stdpaths.obj: ..\..\src\msw\stdpaths.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) $**
|
||||
!endif
|
||||
|
||||
!if "$(USE_GUI)" == "1"
|
||||
$(OBJS)\monolib_timer.obj: ..\..\src\msw\timer.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) $**
|
||||
@ -7056,6 +7058,9 @@ $(OBJS)\basedll_registry.obj: ..\..\src\msw\registry.cpp
|
||||
$(OBJS)\basedll_snglinst.obj: ..\..\src\msw\snglinst.cpp
|
||||
$(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\basedll_stdpaths.obj: ..\..\src\msw\stdpaths.cpp
|
||||
$(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\basedll_thread.obj: ..\..\src\msw\thread.cpp
|
||||
$(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) $**
|
||||
|
||||
@ -7278,6 +7283,9 @@ $(OBJS)\baselib_registry.obj: ..\..\src\msw\registry.cpp
|
||||
$(OBJS)\baselib_snglinst.obj: ..\..\src\msw\snglinst.cpp
|
||||
$(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\baselib_stdpaths.obj: ..\..\src\msw\stdpaths.cpp
|
||||
$(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\baselib_thread.obj: ..\..\src\msw\thread.cpp
|
||||
$(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) $**
|
||||
|
||||
@ -7735,11 +7743,6 @@ $(OBJS)\coredll_settings.obj: ..\..\src\msw\settings.cpp
|
||||
$(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) $**
|
||||
!endif
|
||||
|
||||
!if "$(USE_GUI)" == "1"
|
||||
$(OBJS)\coredll_stdpaths.obj: ..\..\src\msw\stdpaths.cpp
|
||||
$(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) $**
|
||||
!endif
|
||||
|
||||
!if "$(USE_GUI)" == "1"
|
||||
$(OBJS)\coredll_timer.obj: ..\..\src\msw\timer.cpp
|
||||
$(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) $**
|
||||
@ -8874,11 +8877,6 @@ $(OBJS)\corelib_settings.obj: ..\..\src\msw\settings.cpp
|
||||
$(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) $**
|
||||
!endif
|
||||
|
||||
!if "$(USE_GUI)" == "1"
|
||||
$(OBJS)\corelib_stdpaths.obj: ..\..\src\msw\stdpaths.cpp
|
||||
$(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) $**
|
||||
!endif
|
||||
|
||||
!if "$(USE_GUI)" == "1"
|
||||
$(OBJS)\corelib_timer.obj: ..\..\src\msw\timer.cpp
|
||||
$(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) $**
|
||||
@ -9757,12 +9755,18 @@ $(OBJS)\advlib_joystick.obj: ..\..\src\msw\joystick.cpp
|
||||
$(OBJS)\mediadll_dummy.obj: ..\..\src\msw\dummy.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MEDIADLL_CXXFLAGS) -H $**
|
||||
|
||||
$(OBJS)\mediadll_mediactrlcmn.obj: ..\..\src\common\mediactrlcmn.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MEDIADLL_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\mediadll_mediactrl.obj: ..\..\src\msw\mediactrl.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MEDIADLL_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\medialib_dummy.obj: ..\..\src\msw\dummy.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MEDIALIB_CXXFLAGS) -H $**
|
||||
|
||||
$(OBJS)\medialib_mediactrlcmn.obj: ..\..\src\common\mediactrlcmn.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MEDIALIB_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\medialib_mediactrl.obj: ..\..\src\msw\mediactrl.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MEDIALIB_CXXFLAGS) $**
|
||||
|
||||
|
@ -239,6 +239,7 @@ MONODLL_OBJECTS = \
|
||||
$(OBJS)\monodll_regconf.o \
|
||||
$(OBJS)\monodll_registry.o \
|
||||
$(OBJS)\monodll_snglinst.o \
|
||||
$(OBJS)\monodll_stdpaths.o \
|
||||
$(OBJS)\monodll_thread.o \
|
||||
$(OBJS)\monodll_utils.o \
|
||||
$(OBJS)\monodll_utilsexc.o \
|
||||
@ -340,6 +341,7 @@ MONOLIB_OBJECTS = \
|
||||
$(OBJS)\monolib_regconf.o \
|
||||
$(OBJS)\monolib_registry.o \
|
||||
$(OBJS)\monolib_snglinst.o \
|
||||
$(OBJS)\monolib_stdpaths.o \
|
||||
$(OBJS)\monolib_thread.o \
|
||||
$(OBJS)\monolib_utils.o \
|
||||
$(OBJS)\monolib_utilsexc.o \
|
||||
@ -441,6 +443,7 @@ BASEDLL_OBJECTS = \
|
||||
$(OBJS)\basedll_regconf.o \
|
||||
$(OBJS)\basedll_registry.o \
|
||||
$(OBJS)\basedll_snglinst.o \
|
||||
$(OBJS)\basedll_stdpaths.o \
|
||||
$(OBJS)\basedll_thread.o \
|
||||
$(OBJS)\basedll_utils.o \
|
||||
$(OBJS)\basedll_utilsexc.o \
|
||||
@ -527,6 +530,7 @@ BASELIB_OBJECTS = \
|
||||
$(OBJS)\baselib_regconf.o \
|
||||
$(OBJS)\baselib_registry.o \
|
||||
$(OBJS)\baselib_snglinst.o \
|
||||
$(OBJS)\baselib_stdpaths.o \
|
||||
$(OBJS)\baselib_thread.o \
|
||||
$(OBJS)\baselib_utils.o \
|
||||
$(OBJS)\baselib_utilsexc.o \
|
||||
@ -660,6 +664,7 @@ MEDIADLL_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(GCCFLAGS) \
|
||||
$(__EXCEPTIONSFLAG_14) $(CPPFLAGS) $(CXXFLAGS)
|
||||
MEDIADLL_OBJECTS = \
|
||||
$(OBJS)\mediadll_dummy.o \
|
||||
$(OBJS)\mediadll_mediactrlcmn.o \
|
||||
$(OBJS)\mediadll_mediactrl.o
|
||||
MEDIALIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(GCCFLAGS) \
|
||||
-DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
|
||||
@ -669,6 +674,7 @@ MEDIALIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(GCCFLAGS) \
|
||||
$(CPPFLAGS) $(CXXFLAGS)
|
||||
MEDIALIB_OBJECTS = \
|
||||
$(OBJS)\medialib_dummy.o \
|
||||
$(OBJS)\medialib_mediactrlcmn.o \
|
||||
$(OBJS)\medialib_mediactrl.o
|
||||
ODBCDLL_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(GCCFLAGS) -DHAVE_W32API_H \
|
||||
-D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) \
|
||||
@ -977,6 +983,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_OBJECTS = \
|
||||
$(OBJS)\monodll_sound.o \
|
||||
$(OBJS)\monodll_taskbar.o \
|
||||
$(OBJS)\monodll_joystick.o \
|
||||
$(OBJS)\monodll_mediactrlcmn.o \
|
||||
$(OBJS)\monodll_mediactrl.o \
|
||||
$(OBJS)\monodll_helpbest.o \
|
||||
$(OBJS)\monodll_helpctrl.o \
|
||||
@ -1084,7 +1091,6 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
|
||||
$(OBJS)\monodll_region.o \
|
||||
$(OBJS)\monodll_renderer.o \
|
||||
$(OBJS)\monodll_settings.o \
|
||||
$(OBJS)\monodll_stdpaths.o \
|
||||
$(OBJS)\monodll_timer.o \
|
||||
$(OBJS)\monodll_tooltip.o \
|
||||
$(OBJS)\monodll_toplevel.o \
|
||||
@ -1282,7 +1288,6 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
|
||||
$(OBJS)\monodll_region.o \
|
||||
$(OBJS)\monodll_renderer.o \
|
||||
$(OBJS)\monodll_settings.o \
|
||||
$(OBJS)\monodll_stdpaths.o \
|
||||
$(OBJS)\monodll_timer.o \
|
||||
$(OBJS)\monodll_tooltip.o \
|
||||
$(OBJS)\monodll_toplevel.o \
|
||||
@ -1463,6 +1468,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS = \
|
||||
$(OBJS)\monolib_sound.o \
|
||||
$(OBJS)\monolib_taskbar.o \
|
||||
$(OBJS)\monolib_joystick.o \
|
||||
$(OBJS)\monolib_mediactrlcmn.o \
|
||||
$(OBJS)\monolib_mediactrl.o \
|
||||
$(OBJS)\monolib_helpbest.o \
|
||||
$(OBJS)\monolib_helpctrl.o \
|
||||
@ -1570,7 +1576,6 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
|
||||
$(OBJS)\monolib_region.o \
|
||||
$(OBJS)\monolib_renderer.o \
|
||||
$(OBJS)\monolib_settings.o \
|
||||
$(OBJS)\monolib_stdpaths.o \
|
||||
$(OBJS)\monolib_timer.o \
|
||||
$(OBJS)\monolib_tooltip.o \
|
||||
$(OBJS)\monolib_toplevel.o \
|
||||
@ -1768,7 +1773,6 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
|
||||
$(OBJS)\monolib_region.o \
|
||||
$(OBJS)\monolib_renderer.o \
|
||||
$(OBJS)\monolib_settings.o \
|
||||
$(OBJS)\monolib_stdpaths.o \
|
||||
$(OBJS)\monolib_timer.o \
|
||||
$(OBJS)\monolib_tooltip.o \
|
||||
$(OBJS)\monolib_toplevel.o \
|
||||
@ -1999,7 +2003,6 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
|
||||
$(OBJS)\coredll_region.o \
|
||||
$(OBJS)\coredll_renderer.o \
|
||||
$(OBJS)\coredll_settings.o \
|
||||
$(OBJS)\coredll_stdpaths.o \
|
||||
$(OBJS)\coredll_timer.o \
|
||||
$(OBJS)\coredll_tooltip.o \
|
||||
$(OBJS)\coredll_toplevel.o \
|
||||
@ -2197,7 +2200,6 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
|
||||
$(OBJS)\coredll_region.o \
|
||||
$(OBJS)\coredll_renderer.o \
|
||||
$(OBJS)\coredll_settings.o \
|
||||
$(OBJS)\coredll_stdpaths.o \
|
||||
$(OBJS)\coredll_timer.o \
|
||||
$(OBJS)\coredll_tooltip.o \
|
||||
$(OBJS)\coredll_toplevel.o \
|
||||
@ -2404,7 +2406,6 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
|
||||
$(OBJS)\corelib_region.o \
|
||||
$(OBJS)\corelib_renderer.o \
|
||||
$(OBJS)\corelib_settings.o \
|
||||
$(OBJS)\corelib_stdpaths.o \
|
||||
$(OBJS)\corelib_timer.o \
|
||||
$(OBJS)\corelib_tooltip.o \
|
||||
$(OBJS)\corelib_toplevel.o \
|
||||
@ -2602,7 +2603,6 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
|
||||
$(OBJS)\corelib_region.o \
|
||||
$(OBJS)\corelib_renderer.o \
|
||||
$(OBJS)\corelib_settings.o \
|
||||
$(OBJS)\corelib_stdpaths.o \
|
||||
$(OBJS)\corelib_timer.o \
|
||||
$(OBJS)\corelib_tooltip.o \
|
||||
$(OBJS)\corelib_toplevel.o \
|
||||
@ -3878,6 +3878,9 @@ $(OBJS)\monodll_registry.o: ../../src/msw/registry.cpp
|
||||
$(OBJS)\monodll_snglinst.o: ../../src/msw/snglinst.cpp
|
||||
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\monodll_stdpaths.o: ../../src/msw/stdpaths.cpp
|
||||
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\monodll_thread.o: ../../src/msw/thread.cpp
|
||||
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $<
|
||||
|
||||
@ -4121,6 +4124,9 @@ $(OBJS)\monodll_taskbar.o: ../../src/msw/taskbar.cpp
|
||||
$(OBJS)\monodll_joystick.o: ../../src/msw/joystick.cpp
|
||||
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\monodll_mediactrlcmn.o: ../../src/common/mediactrlcmn.cpp
|
||||
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\monodll_mediactrl.o: ../../src/msw/mediactrl.cpp
|
||||
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $<
|
||||
|
||||
@ -4512,11 +4518,6 @@ $(OBJS)\monodll_settings.o: ../../src/msw/settings.cpp
|
||||
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $<
|
||||
endif
|
||||
|
||||
ifeq ($(USE_GUI),1)
|
||||
$(OBJS)\monodll_stdpaths.o: ../../src/msw/stdpaths.cpp
|
||||
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $<
|
||||
endif
|
||||
|
||||
ifeq ($(USE_GUI),1)
|
||||
$(OBJS)\monodll_timer.o: ../../src/msw/timer.cpp
|
||||
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $<
|
||||
@ -5594,6 +5595,9 @@ $(OBJS)\monolib_registry.o: ../../src/msw/registry.cpp
|
||||
$(OBJS)\monolib_snglinst.o: ../../src/msw/snglinst.cpp
|
||||
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\monolib_stdpaths.o: ../../src/msw/stdpaths.cpp
|
||||
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\monolib_thread.o: ../../src/msw/thread.cpp
|
||||
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $<
|
||||
|
||||
@ -5837,6 +5841,9 @@ $(OBJS)\monolib_taskbar.o: ../../src/msw/taskbar.cpp
|
||||
$(OBJS)\monolib_joystick.o: ../../src/msw/joystick.cpp
|
||||
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\monolib_mediactrlcmn.o: ../../src/common/mediactrlcmn.cpp
|
||||
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\monolib_mediactrl.o: ../../src/msw/mediactrl.cpp
|
||||
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $<
|
||||
|
||||
@ -6228,11 +6235,6 @@ $(OBJS)\monolib_settings.o: ../../src/msw/settings.cpp
|
||||
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $<
|
||||
endif
|
||||
|
||||
ifeq ($(USE_GUI),1)
|
||||
$(OBJS)\monolib_stdpaths.o: ../../src/msw/stdpaths.cpp
|
||||
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $<
|
||||
endif
|
||||
|
||||
ifeq ($(USE_GUI),1)
|
||||
$(OBJS)\monolib_timer.o: ../../src/msw/timer.cpp
|
||||
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $<
|
||||
@ -7310,6 +7312,9 @@ $(OBJS)\basedll_registry.o: ../../src/msw/registry.cpp
|
||||
$(OBJS)\basedll_snglinst.o: ../../src/msw/snglinst.cpp
|
||||
$(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\basedll_stdpaths.o: ../../src/msw/stdpaths.cpp
|
||||
$(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\basedll_thread.o: ../../src/msw/thread.cpp
|
||||
$(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $<
|
||||
|
||||
@ -7532,6 +7537,9 @@ $(OBJS)\baselib_registry.o: ../../src/msw/registry.cpp
|
||||
$(OBJS)\baselib_snglinst.o: ../../src/msw/snglinst.cpp
|
||||
$(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\baselib_stdpaths.o: ../../src/msw/stdpaths.cpp
|
||||
$(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\baselib_thread.o: ../../src/msw/thread.cpp
|
||||
$(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $<
|
||||
|
||||
@ -7989,11 +7997,6 @@ $(OBJS)\coredll_settings.o: ../../src/msw/settings.cpp
|
||||
$(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $<
|
||||
endif
|
||||
|
||||
ifeq ($(USE_GUI),1)
|
||||
$(OBJS)\coredll_stdpaths.o: ../../src/msw/stdpaths.cpp
|
||||
$(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $<
|
||||
endif
|
||||
|
||||
ifeq ($(USE_GUI),1)
|
||||
$(OBJS)\coredll_timer.o: ../../src/msw/timer.cpp
|
||||
$(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $<
|
||||
@ -9228,11 +9231,6 @@ $(OBJS)\corelib_settings.o: ../../src/msw/settings.cpp
|
||||
$(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $<
|
||||
endif
|
||||
|
||||
ifeq ($(USE_GUI),1)
|
||||
$(OBJS)\corelib_stdpaths.o: ../../src/msw/stdpaths.cpp
|
||||
$(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $<
|
||||
endif
|
||||
|
||||
ifeq ($(USE_GUI),1)
|
||||
$(OBJS)\corelib_timer.o: ../../src/msw/timer.cpp
|
||||
$(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $<
|
||||
@ -10211,12 +10209,18 @@ $(OBJS)\advlib_joystick.o: ../../src/msw/joystick.cpp
|
||||
$(OBJS)\mediadll_dummy.o: ../../src/msw/dummy.cpp
|
||||
$(CXX) -c -o $@ $(MEDIADLL_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\mediadll_mediactrlcmn.o: ../../src/common/mediactrlcmn.cpp
|
||||
$(CXX) -c -o $@ $(MEDIADLL_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\mediadll_mediactrl.o: ../../src/msw/mediactrl.cpp
|
||||
$(CXX) -c -o $@ $(MEDIADLL_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\medialib_dummy.o: ../../src/msw/dummy.cpp
|
||||
$(CXX) -c -o $@ $(MEDIALIB_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\medialib_mediactrlcmn.o: ../../src/common/mediactrlcmn.cpp
|
||||
$(CXX) -c -o $@ $(MEDIALIB_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\medialib_mediactrl.o: ../../src/msw/mediactrl.cpp
|
||||
$(CXX) -c -o $@ $(MEDIALIB_CXXFLAGS) $<
|
||||
|
||||
|
@ -255,6 +255,7 @@ MONODLL_OBJECTS = \
|
||||
$(OBJS)\monodll_regconf.obj \
|
||||
$(OBJS)\monodll_registry.obj \
|
||||
$(OBJS)\monodll_snglinst.obj \
|
||||
$(OBJS)\monodll_stdpaths.obj \
|
||||
$(OBJS)\monodll_thread.obj \
|
||||
$(OBJS)\monodll_utils.obj \
|
||||
$(OBJS)\monodll_utilsexc.obj \
|
||||
@ -362,6 +363,7 @@ MONOLIB_OBJECTS = \
|
||||
$(OBJS)\monolib_regconf.obj \
|
||||
$(OBJS)\monolib_registry.obj \
|
||||
$(OBJS)\monolib_snglinst.obj \
|
||||
$(OBJS)\monolib_stdpaths.obj \
|
||||
$(OBJS)\monolib_thread.obj \
|
||||
$(OBJS)\monolib_utils.obj \
|
||||
$(OBJS)\monolib_utilsexc.obj \
|
||||
@ -470,6 +472,7 @@ BASEDLL_OBJECTS = \
|
||||
$(OBJS)\basedll_regconf.obj \
|
||||
$(OBJS)\basedll_registry.obj \
|
||||
$(OBJS)\basedll_snglinst.obj \
|
||||
$(OBJS)\basedll_stdpaths.obj \
|
||||
$(OBJS)\basedll_thread.obj \
|
||||
$(OBJS)\basedll_utils.obj \
|
||||
$(OBJS)\basedll_utilsexc.obj \
|
||||
@ -562,6 +565,7 @@ BASELIB_OBJECTS = \
|
||||
$(OBJS)\baselib_regconf.obj \
|
||||
$(OBJS)\baselib_registry.obj \
|
||||
$(OBJS)\baselib_snglinst.obj \
|
||||
$(OBJS)\baselib_stdpaths.obj \
|
||||
$(OBJS)\baselib_thread.obj \
|
||||
$(OBJS)\baselib_utils.obj \
|
||||
$(OBJS)\baselib_utilsexc.obj \
|
||||
@ -719,6 +723,7 @@ MEDIADLL_CXXFLAGS = /M$(__RUNTIME_LIBS)$(__DEBUGRUNTIME_201) /DWIN32 \
|
||||
/Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_mediadll.pch" $(CPPFLAGS) $(CXXFLAGS)
|
||||
MEDIADLL_OBJECTS = \
|
||||
$(OBJS)\mediadll_dummy.obj \
|
||||
$(OBJS)\mediadll_mediactrlcmn.obj \
|
||||
$(OBJS)\mediadll_mediactrl.obj
|
||||
MEDIALIB_CXXFLAGS = /M$(__RUNTIME_LIBS)$(__DEBUGRUNTIME_213) /DWIN32 \
|
||||
$(__DEBUGINFO) \
|
||||
@ -731,6 +736,7 @@ MEDIALIB_CXXFLAGS = /M$(__RUNTIME_LIBS)$(__DEBUGRUNTIME_213) /DWIN32 \
|
||||
/Fp"$(OBJS)\wxprec_medialib.pch" $(CPPFLAGS) $(CXXFLAGS)
|
||||
MEDIALIB_OBJECTS = \
|
||||
$(OBJS)\medialib_dummy.obj \
|
||||
$(OBJS)\medialib_mediactrlcmn.obj \
|
||||
$(OBJS)\medialib_mediactrl.obj
|
||||
ODBCDLL_CXXFLAGS = /M$(__RUNTIME_LIBS)$(__DEBUGRUNTIME_226) /DWIN32 \
|
||||
$(__DEBUGINFO) \
|
||||
@ -1199,6 +1205,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_OBJECTS = \
|
||||
$(OBJS)\monodll_sound.obj \
|
||||
$(OBJS)\monodll_taskbar.obj \
|
||||
$(OBJS)\monodll_joystick.obj \
|
||||
$(OBJS)\monodll_mediactrlcmn.obj \
|
||||
$(OBJS)\monodll_mediactrl.obj \
|
||||
$(OBJS)\monodll_helpbest.obj \
|
||||
$(OBJS)\monodll_helpctrl.obj \
|
||||
@ -1305,7 +1312,6 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
|
||||
$(OBJS)\monodll_region.obj \
|
||||
$(OBJS)\monodll_renderer.obj \
|
||||
$(OBJS)\monodll_settings.obj \
|
||||
$(OBJS)\monodll_stdpaths.obj \
|
||||
$(OBJS)\monodll_timer.obj \
|
||||
$(OBJS)\monodll_tooltip.obj \
|
||||
$(OBJS)\monodll_toplevel.obj \
|
||||
@ -1501,7 +1507,6 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
|
||||
$(OBJS)\monodll_region.obj \
|
||||
$(OBJS)\monodll_renderer.obj \
|
||||
$(OBJS)\monodll_settings.obj \
|
||||
$(OBJS)\monodll_stdpaths.obj \
|
||||
$(OBJS)\monodll_timer.obj \
|
||||
$(OBJS)\monodll_tooltip.obj \
|
||||
$(OBJS)\monodll_toplevel.obj \
|
||||
@ -1697,6 +1702,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS = \
|
||||
$(OBJS)\monolib_sound.obj \
|
||||
$(OBJS)\monolib_taskbar.obj \
|
||||
$(OBJS)\monolib_joystick.obj \
|
||||
$(OBJS)\monolib_mediactrlcmn.obj \
|
||||
$(OBJS)\monolib_mediactrl.obj \
|
||||
$(OBJS)\monolib_helpbest.obj \
|
||||
$(OBJS)\monolib_helpctrl.obj \
|
||||
@ -1803,7 +1809,6 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
|
||||
$(OBJS)\monolib_region.obj \
|
||||
$(OBJS)\monolib_renderer.obj \
|
||||
$(OBJS)\monolib_settings.obj \
|
||||
$(OBJS)\monolib_stdpaths.obj \
|
||||
$(OBJS)\monolib_timer.obj \
|
||||
$(OBJS)\monolib_tooltip.obj \
|
||||
$(OBJS)\monolib_toplevel.obj \
|
||||
@ -1999,7 +2004,6 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
|
||||
$(OBJS)\monolib_region.obj \
|
||||
$(OBJS)\monolib_renderer.obj \
|
||||
$(OBJS)\monolib_settings.obj \
|
||||
$(OBJS)\monolib_stdpaths.obj \
|
||||
$(OBJS)\monolib_timer.obj \
|
||||
$(OBJS)\monolib_tooltip.obj \
|
||||
$(OBJS)\monolib_toplevel.obj \
|
||||
@ -2306,7 +2310,6 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
|
||||
$(OBJS)\coredll_region.obj \
|
||||
$(OBJS)\coredll_renderer.obj \
|
||||
$(OBJS)\coredll_settings.obj \
|
||||
$(OBJS)\coredll_stdpaths.obj \
|
||||
$(OBJS)\coredll_timer.obj \
|
||||
$(OBJS)\coredll_tooltip.obj \
|
||||
$(OBJS)\coredll_toplevel.obj \
|
||||
@ -2502,7 +2505,6 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
|
||||
$(OBJS)\coredll_region.obj \
|
||||
$(OBJS)\coredll_renderer.obj \
|
||||
$(OBJS)\coredll_settings.obj \
|
||||
$(OBJS)\coredll_stdpaths.obj \
|
||||
$(OBJS)\coredll_timer.obj \
|
||||
$(OBJS)\coredll_tooltip.obj \
|
||||
$(OBJS)\coredll_toplevel.obj \
|
||||
@ -2721,7 +2723,6 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
|
||||
$(OBJS)\corelib_region.obj \
|
||||
$(OBJS)\corelib_renderer.obj \
|
||||
$(OBJS)\corelib_settings.obj \
|
||||
$(OBJS)\corelib_stdpaths.obj \
|
||||
$(OBJS)\corelib_timer.obj \
|
||||
$(OBJS)\corelib_tooltip.obj \
|
||||
$(OBJS)\corelib_toplevel.obj \
|
||||
@ -2917,7 +2918,6 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
|
||||
$(OBJS)\corelib_region.obj \
|
||||
$(OBJS)\corelib_renderer.obj \
|
||||
$(OBJS)\corelib_settings.obj \
|
||||
$(OBJS)\corelib_stdpaths.obj \
|
||||
$(OBJS)\corelib_timer.obj \
|
||||
$(OBJS)\corelib_tooltip.obj \
|
||||
$(OBJS)\corelib_toplevel.obj \
|
||||
@ -4445,6 +4445,9 @@ $(OBJS)\monodll_registry.obj: ..\..\src\msw\registry.cpp
|
||||
$(OBJS)\monodll_snglinst.obj: ..\..\src\msw\snglinst.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\monodll_stdpaths.obj: ..\..\src\msw\stdpaths.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\monodll_thread.obj: ..\..\src\msw\thread.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) $**
|
||||
|
||||
@ -4688,6 +4691,9 @@ $(OBJS)\monodll_taskbar.obj: ..\..\src\msw\taskbar.cpp
|
||||
$(OBJS)\monodll_joystick.obj: ..\..\src\msw\joystick.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\monodll_mediactrlcmn.obj: ..\..\src\common\mediactrlcmn.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\monodll_mediactrl.obj: ..\..\src\msw\mediactrl.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) $**
|
||||
|
||||
@ -5079,11 +5085,6 @@ $(OBJS)\monodll_settings.obj: ..\..\src\msw\settings.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) $**
|
||||
!endif
|
||||
|
||||
!if "$(USE_GUI)" == "1"
|
||||
$(OBJS)\monodll_stdpaths.obj: ..\..\src\msw\stdpaths.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) $**
|
||||
!endif
|
||||
|
||||
!if "$(USE_GUI)" == "1"
|
||||
$(OBJS)\monodll_timer.obj: ..\..\src\msw\timer.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) $**
|
||||
@ -6061,6 +6062,9 @@ $(OBJS)\monolib_registry.obj: ..\..\src\msw\registry.cpp
|
||||
$(OBJS)\monolib_snglinst.obj: ..\..\src\msw\snglinst.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\monolib_stdpaths.obj: ..\..\src\msw\stdpaths.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\monolib_thread.obj: ..\..\src\msw\thread.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) $**
|
||||
|
||||
@ -6304,6 +6308,9 @@ $(OBJS)\monolib_taskbar.obj: ..\..\src\msw\taskbar.cpp
|
||||
$(OBJS)\monolib_joystick.obj: ..\..\src\msw\joystick.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\monolib_mediactrlcmn.obj: ..\..\src\common\mediactrlcmn.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\monolib_mediactrl.obj: ..\..\src\msw\mediactrl.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) $**
|
||||
|
||||
@ -6695,11 +6702,6 @@ $(OBJS)\monolib_settings.obj: ..\..\src\msw\settings.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) $**
|
||||
!endif
|
||||
|
||||
!if "$(USE_GUI)" == "1"
|
||||
$(OBJS)\monolib_stdpaths.obj: ..\..\src\msw\stdpaths.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) $**
|
||||
!endif
|
||||
|
||||
!if "$(USE_GUI)" == "1"
|
||||
$(OBJS)\monolib_timer.obj: ..\..\src\msw\timer.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) $**
|
||||
@ -7677,6 +7679,9 @@ $(OBJS)\basedll_registry.obj: ..\..\src\msw\registry.cpp
|
||||
$(OBJS)\basedll_snglinst.obj: ..\..\src\msw\snglinst.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\basedll_stdpaths.obj: ..\..\src\msw\stdpaths.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\basedll_thread.obj: ..\..\src\msw\thread.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) $**
|
||||
|
||||
@ -7899,6 +7904,9 @@ $(OBJS)\baselib_registry.obj: ..\..\src\msw\registry.cpp
|
||||
$(OBJS)\baselib_snglinst.obj: ..\..\src\msw\snglinst.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\baselib_stdpaths.obj: ..\..\src\msw\stdpaths.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\baselib_thread.obj: ..\..\src\msw\thread.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) $**
|
||||
|
||||
@ -8356,11 +8364,6 @@ $(OBJS)\coredll_settings.obj: ..\..\src\msw\settings.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) $**
|
||||
!endif
|
||||
|
||||
!if "$(USE_GUI)" == "1"
|
||||
$(OBJS)\coredll_stdpaths.obj: ..\..\src\msw\stdpaths.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) $**
|
||||
!endif
|
||||
|
||||
!if "$(USE_GUI)" == "1"
|
||||
$(OBJS)\coredll_timer.obj: ..\..\src\msw\timer.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) $**
|
||||
@ -9495,11 +9498,6 @@ $(OBJS)\corelib_settings.obj: ..\..\src\msw\settings.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) $**
|
||||
!endif
|
||||
|
||||
!if "$(USE_GUI)" == "1"
|
||||
$(OBJS)\corelib_stdpaths.obj: ..\..\src\msw\stdpaths.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) $**
|
||||
!endif
|
||||
|
||||
!if "$(USE_GUI)" == "1"
|
||||
$(OBJS)\corelib_timer.obj: ..\..\src\msw\timer.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) $**
|
||||
@ -10378,12 +10376,18 @@ $(OBJS)\advlib_joystick.obj: ..\..\src\msw\joystick.cpp
|
||||
$(OBJS)\mediadll_dummy.obj: ..\..\src\msw\dummy.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MEDIADLL_CXXFLAGS) /Ycwx/wxprec.h $**
|
||||
|
||||
$(OBJS)\mediadll_mediactrlcmn.obj: ..\..\src\common\mediactrlcmn.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MEDIADLL_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\mediadll_mediactrl.obj: ..\..\src\msw\mediactrl.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MEDIADLL_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\medialib_dummy.obj: ..\..\src\msw\dummy.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MEDIALIB_CXXFLAGS) /Ycwx/wxprec.h $**
|
||||
|
||||
$(OBJS)\medialib_mediactrlcmn.obj: ..\..\src\common\mediactrlcmn.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MEDIALIB_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\medialib_mediactrl.obj: ..\..\src\msw\mediactrl.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MEDIALIB_CXXFLAGS) $**
|
||||
|
||||
|
@ -113,6 +113,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_OBJECTS = &
|
||||
$(OBJS)\monodll_sound.obj &
|
||||
$(OBJS)\monodll_taskbar.obj &
|
||||
$(OBJS)\monodll_joystick.obj &
|
||||
$(OBJS)\monodll_mediactrlcmn.obj &
|
||||
$(OBJS)\monodll_mediactrl.obj &
|
||||
$(OBJS)\monodll_helpbest.obj &
|
||||
$(OBJS)\monodll_helpctrl.obj &
|
||||
@ -221,7 +222,6 @@ ____CORE_SRC_FILENAMES_OBJECTS = &
|
||||
$(OBJS)\monodll_region.obj &
|
||||
$(OBJS)\monodll_renderer.obj &
|
||||
$(OBJS)\monodll_settings.obj &
|
||||
$(OBJS)\monodll_stdpaths.obj &
|
||||
$(OBJS)\monodll_timer.obj &
|
||||
$(OBJS)\monodll_tooltip.obj &
|
||||
$(OBJS)\monodll_toplevel.obj &
|
||||
@ -419,7 +419,6 @@ ____CORE_SRC_FILENAMES_OBJECTS = &
|
||||
$(OBJS)\monodll_region.obj &
|
||||
$(OBJS)\monodll_renderer.obj &
|
||||
$(OBJS)\monodll_settings.obj &
|
||||
$(OBJS)\monodll_stdpaths.obj &
|
||||
$(OBJS)\monodll_timer.obj &
|
||||
$(OBJS)\monodll_tooltip.obj &
|
||||
$(OBJS)\monodll_toplevel.obj &
|
||||
@ -602,6 +601,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS = &
|
||||
$(OBJS)\monolib_sound.obj &
|
||||
$(OBJS)\monolib_taskbar.obj &
|
||||
$(OBJS)\monolib_joystick.obj &
|
||||
$(OBJS)\monolib_mediactrlcmn.obj &
|
||||
$(OBJS)\monolib_mediactrl.obj &
|
||||
$(OBJS)\monolib_helpbest.obj &
|
||||
$(OBJS)\monolib_helpctrl.obj &
|
||||
@ -710,7 +710,6 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = &
|
||||
$(OBJS)\monolib_region.obj &
|
||||
$(OBJS)\monolib_renderer.obj &
|
||||
$(OBJS)\monolib_settings.obj &
|
||||
$(OBJS)\monolib_stdpaths.obj &
|
||||
$(OBJS)\monolib_timer.obj &
|
||||
$(OBJS)\monolib_tooltip.obj &
|
||||
$(OBJS)\monolib_toplevel.obj &
|
||||
@ -908,7 +907,6 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = &
|
||||
$(OBJS)\monolib_region.obj &
|
||||
$(OBJS)\monolib_renderer.obj &
|
||||
$(OBJS)\monolib_settings.obj &
|
||||
$(OBJS)\monolib_stdpaths.obj &
|
||||
$(OBJS)\monolib_timer.obj &
|
||||
$(OBJS)\monolib_tooltip.obj &
|
||||
$(OBJS)\monolib_toplevel.obj &
|
||||
@ -1145,7 +1143,6 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = &
|
||||
$(OBJS)\coredll_region.obj &
|
||||
$(OBJS)\coredll_renderer.obj &
|
||||
$(OBJS)\coredll_settings.obj &
|
||||
$(OBJS)\coredll_stdpaths.obj &
|
||||
$(OBJS)\coredll_timer.obj &
|
||||
$(OBJS)\coredll_tooltip.obj &
|
||||
$(OBJS)\coredll_toplevel.obj &
|
||||
@ -1343,7 +1340,6 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = &
|
||||
$(OBJS)\coredll_region.obj &
|
||||
$(OBJS)\coredll_renderer.obj &
|
||||
$(OBJS)\coredll_settings.obj &
|
||||
$(OBJS)\coredll_stdpaths.obj &
|
||||
$(OBJS)\coredll_timer.obj &
|
||||
$(OBJS)\coredll_tooltip.obj &
|
||||
$(OBJS)\coredll_toplevel.obj &
|
||||
@ -1552,7 +1548,6 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = &
|
||||
$(OBJS)\corelib_region.obj &
|
||||
$(OBJS)\corelib_renderer.obj &
|
||||
$(OBJS)\corelib_settings.obj &
|
||||
$(OBJS)\corelib_stdpaths.obj &
|
||||
$(OBJS)\corelib_timer.obj &
|
||||
$(OBJS)\corelib_tooltip.obj &
|
||||
$(OBJS)\corelib_toplevel.obj &
|
||||
@ -1750,7 +1745,6 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = &
|
||||
$(OBJS)\corelib_region.obj &
|
||||
$(OBJS)\corelib_renderer.obj &
|
||||
$(OBJS)\corelib_settings.obj &
|
||||
$(OBJS)\corelib_stdpaths.obj &
|
||||
$(OBJS)\corelib_timer.obj &
|
||||
$(OBJS)\corelib_tooltip.obj &
|
||||
$(OBJS)\corelib_toplevel.obj &
|
||||
@ -2396,6 +2390,7 @@ MONODLL_OBJECTS = &
|
||||
$(OBJS)\monodll_regconf.obj &
|
||||
$(OBJS)\monodll_registry.obj &
|
||||
$(OBJS)\monodll_snglinst.obj &
|
||||
$(OBJS)\monodll_stdpaths.obj &
|
||||
$(OBJS)\monodll_thread.obj &
|
||||
$(OBJS)\monodll_utils.obj &
|
||||
$(OBJS)\monodll_utilsexc.obj &
|
||||
@ -2498,6 +2493,7 @@ MONOLIB_OBJECTS = &
|
||||
$(OBJS)\monolib_regconf.obj &
|
||||
$(OBJS)\monolib_registry.obj &
|
||||
$(OBJS)\monolib_snglinst.obj &
|
||||
$(OBJS)\monolib_stdpaths.obj &
|
||||
$(OBJS)\monolib_thread.obj &
|
||||
$(OBJS)\monolib_utils.obj &
|
||||
$(OBJS)\monolib_utilsexc.obj &
|
||||
@ -2601,6 +2597,7 @@ BASEDLL_OBJECTS = &
|
||||
$(OBJS)\basedll_regconf.obj &
|
||||
$(OBJS)\basedll_registry.obj &
|
||||
$(OBJS)\basedll_snglinst.obj &
|
||||
$(OBJS)\basedll_stdpaths.obj &
|
||||
$(OBJS)\basedll_thread.obj &
|
||||
$(OBJS)\basedll_utils.obj &
|
||||
$(OBJS)\basedll_utilsexc.obj &
|
||||
@ -2688,6 +2685,7 @@ BASELIB_OBJECTS = &
|
||||
$(OBJS)\baselib_regconf.obj &
|
||||
$(OBJS)\baselib_registry.obj &
|
||||
$(OBJS)\baselib_snglinst.obj &
|
||||
$(OBJS)\baselib_stdpaths.obj &
|
||||
$(OBJS)\baselib_thread.obj &
|
||||
$(OBJS)\baselib_utils.obj &
|
||||
$(OBJS)\baselib_utilsexc.obj &
|
||||
@ -2824,6 +2822,7 @@ MEDIADLL_CXXFLAGS = -bd $(__DEBUGINFO) $(__OPTIMIZEFLAG) -bm $(__RUNTIME_LIBS) &
|
||||
/fh=$(OBJS)\wxprec_mediadll.pch $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS)
|
||||
MEDIADLL_OBJECTS = &
|
||||
$(OBJS)\mediadll_dummy.obj &
|
||||
$(OBJS)\mediadll_mediactrlcmn.obj &
|
||||
$(OBJS)\mediadll_mediactrl.obj
|
||||
MEDIALIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) -bm $(__RUNTIME_LIBS) &
|
||||
-d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) &
|
||||
@ -2833,6 +2832,7 @@ MEDIALIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) -bm $(__RUNTIME_LIBS) &
|
||||
$(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS)
|
||||
MEDIALIB_OBJECTS = &
|
||||
$(OBJS)\medialib_dummy.obj &
|
||||
$(OBJS)\medialib_mediactrlcmn.obj &
|
||||
$(OBJS)\medialib_mediactrl.obj
|
||||
ODBCDLL_CXXFLAGS = -bd $(__DEBUGINFO) $(__OPTIMIZEFLAG) -bm $(__RUNTIME_LIBS) &
|
||||
-d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) &
|
||||
@ -4101,6 +4101,9 @@ $(OBJS)\monodll_registry.obj : .AUTODEPEND ..\..\src\msw\registry.cpp
|
||||
$(OBJS)\monodll_snglinst.obj : .AUTODEPEND ..\..\src\msw\snglinst.cpp
|
||||
$(CXX) -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\monodll_stdpaths.obj : .AUTODEPEND ..\..\src\msw\stdpaths.cpp
|
||||
$(CXX) -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\monodll_thread.obj : .AUTODEPEND ..\..\src\msw\thread.cpp
|
||||
$(CXX) -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
|
||||
|
||||
@ -4344,6 +4347,9 @@ $(OBJS)\monodll_taskbar.obj : .AUTODEPEND ..\..\src\msw\taskbar.cpp
|
||||
$(OBJS)\monodll_joystick.obj : .AUTODEPEND ..\..\src\msw\joystick.cpp
|
||||
$(CXX) -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\monodll_mediactrlcmn.obj : .AUTODEPEND ..\..\src\common\mediactrlcmn.cpp
|
||||
$(CXX) -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\monodll_mediactrl.obj : .AUTODEPEND ..\..\src\msw\mediactrl.cpp
|
||||
$(CXX) -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
|
||||
|
||||
@ -4735,11 +4741,6 @@ $(OBJS)\monodll_settings.obj : .AUTODEPEND ..\..\src\msw\settings.cpp
|
||||
$(CXX) -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
|
||||
!endif
|
||||
|
||||
!ifeq USE_GUI 1
|
||||
$(OBJS)\monodll_stdpaths.obj : .AUTODEPEND ..\..\src\msw\stdpaths.cpp
|
||||
$(CXX) -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
|
||||
!endif
|
||||
|
||||
!ifeq USE_GUI 1
|
||||
$(OBJS)\monodll_timer.obj : .AUTODEPEND ..\..\src\msw\timer.cpp
|
||||
$(CXX) -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
|
||||
@ -5817,6 +5818,9 @@ $(OBJS)\monolib_registry.obj : .AUTODEPEND ..\..\src\msw\registry.cpp
|
||||
$(OBJS)\monolib_snglinst.obj : .AUTODEPEND ..\..\src\msw\snglinst.cpp
|
||||
$(CXX) -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\monolib_stdpaths.obj : .AUTODEPEND ..\..\src\msw\stdpaths.cpp
|
||||
$(CXX) -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\monolib_thread.obj : .AUTODEPEND ..\..\src\msw\thread.cpp
|
||||
$(CXX) -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
|
||||
|
||||
@ -6060,6 +6064,9 @@ $(OBJS)\monolib_taskbar.obj : .AUTODEPEND ..\..\src\msw\taskbar.cpp
|
||||
$(OBJS)\monolib_joystick.obj : .AUTODEPEND ..\..\src\msw\joystick.cpp
|
||||
$(CXX) -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\monolib_mediactrlcmn.obj : .AUTODEPEND ..\..\src\common\mediactrlcmn.cpp
|
||||
$(CXX) -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\monolib_mediactrl.obj : .AUTODEPEND ..\..\src\msw\mediactrl.cpp
|
||||
$(CXX) -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
|
||||
|
||||
@ -6451,11 +6458,6 @@ $(OBJS)\monolib_settings.obj : .AUTODEPEND ..\..\src\msw\settings.cpp
|
||||
$(CXX) -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
|
||||
!endif
|
||||
|
||||
!ifeq USE_GUI 1
|
||||
$(OBJS)\monolib_stdpaths.obj : .AUTODEPEND ..\..\src\msw\stdpaths.cpp
|
||||
$(CXX) -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
|
||||
!endif
|
||||
|
||||
!ifeq USE_GUI 1
|
||||
$(OBJS)\monolib_timer.obj : .AUTODEPEND ..\..\src\msw\timer.cpp
|
||||
$(CXX) -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
|
||||
@ -7533,6 +7535,9 @@ $(OBJS)\basedll_registry.obj : .AUTODEPEND ..\..\src\msw\registry.cpp
|
||||
$(OBJS)\basedll_snglinst.obj : .AUTODEPEND ..\..\src\msw\snglinst.cpp
|
||||
$(CXX) -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\basedll_stdpaths.obj : .AUTODEPEND ..\..\src\msw\stdpaths.cpp
|
||||
$(CXX) -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\basedll_thread.obj : .AUTODEPEND ..\..\src\msw\thread.cpp
|
||||
$(CXX) -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $<
|
||||
|
||||
@ -7755,6 +7760,9 @@ $(OBJS)\baselib_registry.obj : .AUTODEPEND ..\..\src\msw\registry.cpp
|
||||
$(OBJS)\baselib_snglinst.obj : .AUTODEPEND ..\..\src\msw\snglinst.cpp
|
||||
$(CXX) -zq -fo=$^@ $(BASELIB_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\baselib_stdpaths.obj : .AUTODEPEND ..\..\src\msw\stdpaths.cpp
|
||||
$(CXX) -zq -fo=$^@ $(BASELIB_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\baselib_thread.obj : .AUTODEPEND ..\..\src\msw\thread.cpp
|
||||
$(CXX) -zq -fo=$^@ $(BASELIB_CXXFLAGS) $<
|
||||
|
||||
@ -8212,11 +8220,6 @@ $(OBJS)\coredll_settings.obj : .AUTODEPEND ..\..\src\msw\settings.cpp
|
||||
$(CXX) -zq -fo=$^@ $(COREDLL_CXXFLAGS) $<
|
||||
!endif
|
||||
|
||||
!ifeq USE_GUI 1
|
||||
$(OBJS)\coredll_stdpaths.obj : .AUTODEPEND ..\..\src\msw\stdpaths.cpp
|
||||
$(CXX) -zq -fo=$^@ $(COREDLL_CXXFLAGS) $<
|
||||
!endif
|
||||
|
||||
!ifeq USE_GUI 1
|
||||
$(OBJS)\coredll_timer.obj : .AUTODEPEND ..\..\src\msw\timer.cpp
|
||||
$(CXX) -zq -fo=$^@ $(COREDLL_CXXFLAGS) $<
|
||||
@ -9451,11 +9454,6 @@ $(OBJS)\corelib_settings.obj : .AUTODEPEND ..\..\src\msw\settings.cpp
|
||||
$(CXX) -zq -fo=$^@ $(CORELIB_CXXFLAGS) $<
|
||||
!endif
|
||||
|
||||
!ifeq USE_GUI 1
|
||||
$(OBJS)\corelib_stdpaths.obj : .AUTODEPEND ..\..\src\msw\stdpaths.cpp
|
||||
$(CXX) -zq -fo=$^@ $(CORELIB_CXXFLAGS) $<
|
||||
!endif
|
||||
|
||||
!ifeq USE_GUI 1
|
||||
$(OBJS)\corelib_timer.obj : .AUTODEPEND ..\..\src\msw\timer.cpp
|
||||
$(CXX) -zq -fo=$^@ $(CORELIB_CXXFLAGS) $<
|
||||
@ -10434,12 +10432,18 @@ $(OBJS)\advlib_joystick.obj : .AUTODEPEND ..\..\src\msw\joystick.cpp
|
||||
$(OBJS)\mediadll_dummy.obj : .AUTODEPEND ..\..\src\msw\dummy.cpp
|
||||
$(CXX) -zq -fo=$^@ $(MEDIADLL_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\mediadll_mediactrlcmn.obj : .AUTODEPEND ..\..\src\common\mediactrlcmn.cpp
|
||||
$(CXX) -zq -fo=$^@ $(MEDIADLL_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\mediadll_mediactrl.obj : .AUTODEPEND ..\..\src\msw\mediactrl.cpp
|
||||
$(CXX) -zq -fo=$^@ $(MEDIADLL_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\medialib_dummy.obj : .AUTODEPEND ..\..\src\msw\dummy.cpp
|
||||
$(CXX) -zq -fo=$^@ $(MEDIALIB_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\medialib_mediactrlcmn.obj : .AUTODEPEND ..\..\src\common\mediactrlcmn.cpp
|
||||
$(CXX) -zq -fo=$^@ $(MEDIALIB_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\medialib_mediactrl.obj : .AUTODEPEND ..\..\src\msw\mediactrl.cpp
|
||||
$(CXX) -zq -fo=$^@ $(MEDIALIB_CXXFLAGS) $<
|
||||
|
||||
|
@ -739,6 +739,10 @@ SOURCE=..\..\src\msw\snglinst.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\src\msw\stdpaths.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\src\msw\thread.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -3530,10 +3530,6 @@ SOURCE=..\..\src\msw\stattext.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\src\msw\stdpaths.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\src\msw\tabctrl.cpp
|
||||
|
||||
!IF "$(CFG)" == "core - Win32 DLL Universal Unicode Release"
|
||||
@ -7447,10 +7443,6 @@ SOURCE=..\..\include\wx\msw\mdi.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\include\wx\msw\mediactrl.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\include\wx\msw\menu.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -447,6 +447,14 @@ LIB32=link.exe -lib
|
||||
# Name "media - Win32 Unicode Debug"
|
||||
# Name "media - Win32 Release"
|
||||
# Name "media - Win32 Debug"
|
||||
# Begin Group "Common Sources"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\src\common\mediactrlcmn.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "MSW Sources"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
@ -630,14 +638,6 @@ InputPath=..\include\wx\msw\setup.h
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "MSW Headers"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\include\wx\msw\mediactrl.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Common Headers"
|
||||
|
@ -1,120 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/msw/moviectrl.h
|
||||
// Purpose: wxMediaCtrl mac
|
||||
// Author: Ryan Norton <wxprojects@comcast.net>
|
||||
// Modified by:
|
||||
// Created: 11/07/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Ryan Norton
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_MEDIACTRL
|
||||
|
||||
#include "wx/control.h"
|
||||
#include "wx/uri.h"
|
||||
|
||||
#ifdef __WXMSW__
|
||||
typedef struct MovieRecord* WXMOVIE;
|
||||
#else
|
||||
typedef struct MovieType** WXMOVIE;
|
||||
#endif
|
||||
|
||||
enum wxMediaState
|
||||
{
|
||||
wxMEDIASTATE_STOPPED,
|
||||
wxMEDIASTATE_PAUSED,
|
||||
wxMEDIASTATE_PLAYING
|
||||
};
|
||||
|
||||
|
||||
class wxMediaCtrl : public wxControl
|
||||
{
|
||||
public:
|
||||
wxMediaCtrl() : m_bLoaded(false)
|
||||
{ }
|
||||
|
||||
wxMediaCtrl(wxWindow* parent, wxWindowID id, const wxString& fileName,
|
||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
long style = 0, long driver = 0, const wxString& name = wxPanelNameStr) : m_bLoaded(false)
|
||||
{ Create(parent, id, fileName, pos, size, style, driver, name); }
|
||||
|
||||
|
||||
wxMediaCtrl(wxWindow* parent, wxWindowID id, const wxURI& location,
|
||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
long style = 0, long driver = 0, const wxString& name = wxPanelNameStr) : m_bLoaded(false)
|
||||
{ Create(parent, id, location, pos, size, style, driver, name); }
|
||||
|
||||
~wxMediaCtrl();
|
||||
|
||||
bool Create(wxWindow* parent, wxWindowID id, const wxString& fileName,
|
||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
long style = 0, long driver = 0, const wxString& name = wxPanelNameStr);
|
||||
|
||||
bool Create(wxWindow* parent, wxWindowID id, const wxURI& location,
|
||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
long style = 0, long driver = 0, const wxString& name = wxPanelNameStr);
|
||||
|
||||
bool Play();
|
||||
bool Pause();
|
||||
bool Stop();
|
||||
|
||||
bool Load(const wxString& fileName);
|
||||
bool Load(const wxURI& location);
|
||||
|
||||
wxMediaState GetState();
|
||||
|
||||
double GetPlaybackRate();
|
||||
bool SetPlaybackRate(double dRate);
|
||||
|
||||
bool SetPosition(long where);
|
||||
long GetPosition();
|
||||
long GetDuration();
|
||||
|
||||
protected:
|
||||
virtual void DoMoveWindow(int x, int y, int w, int h);
|
||||
bool DoCreate(wxWindow* parent, wxWindowID id,
|
||||
const wxPoint& pos, const wxSize& size,
|
||||
long style, const wxString& name);
|
||||
|
||||
wxSize DoGetBestSize() const;
|
||||
bool InitQT();
|
||||
void Cleanup();
|
||||
void FinishLoad();
|
||||
|
||||
bool m_bLoaded;
|
||||
|
||||
WXMOVIE m_movie;
|
||||
wxSize m_bestSize;
|
||||
class _wxQTTimer* m_timer;
|
||||
|
||||
friend class _wxQTTimer;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxMediaCtrl);
|
||||
};
|
||||
|
||||
//Event stuff
|
||||
class WXDLLEXPORT wxMediaEvent : public wxNotifyEvent
|
||||
{
|
||||
public:
|
||||
wxMediaEvent(wxEventType commandType = wxEVT_NULL, int id = 0)
|
||||
: wxNotifyEvent(commandType, id)
|
||||
{ }
|
||||
|
||||
wxMediaEvent(const wxMediaEvent &clone)
|
||||
: wxNotifyEvent(clone.GetEventType(), clone.GetId())
|
||||
{ }
|
||||
|
||||
virtual wxEvent *Clone() const { return new wxMediaEvent(*this); }
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxMediaEvent)
|
||||
};
|
||||
|
||||
#define wxMEDIA_FINISHED_ID 13000
|
||||
DECLARE_EVENT_TYPE(wxEVT_MEDIA_FINISHED, wxMEDIA_FINISHED_ID)
|
||||
typedef void (wxEvtHandler::*wxMediaEventFunction)(wxMediaEvent&);
|
||||
#define EVT_MEDIA_FINISHED(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_FINISHED, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxMediaEventFunction) & fn, (wxObject *) NULL ),
|
||||
|
||||
#endif // wxUSE_MOVIECTRL
|
@ -1,4 +1,4 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/mediactrl.h
|
||||
// Purpose: wxMediaCtrl class
|
||||
// Author: Ryan Norton <wxprojects@comcast.net>
|
||||
@ -7,11 +7,285 @@
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Ryan Norton
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/mediactrl.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/carbon/mediactrl.h"
|
||||
// ============================================================================
|
||||
// Definitions
|
||||
// ============================================================================
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Header guard
|
||||
// ----------------------------------------------------------------------------
|
||||
#ifndef _WX_MEDIACTRL_H_
|
||||
#define _WX_MEDIACTRL_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Pre-compiled header stuff
|
||||
// ----------------------------------------------------------------------------
|
||||
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
||||
#pragma interface "mediactrl.h"
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Compilation guard
|
||||
// ----------------------------------------------------------------------------
|
||||
#if wxUSE_MEDIACTRL
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Includes
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "wx/control.h"
|
||||
#include "wx/uri.h"
|
||||
|
||||
// ============================================================================
|
||||
// Declarations
|
||||
// ============================================================================
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Enumerations
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
enum wxMediaState
|
||||
{
|
||||
wxMEDIASTATE_STOPPED,
|
||||
wxMEDIASTATE_PAUSED,
|
||||
wxMEDIASTATE_PLAYING
|
||||
};
|
||||
|
||||
enum wxMediaTimeFormat
|
||||
{
|
||||
wxMEDIATIMEFORMAT_TIME
|
||||
};
|
||||
|
||||
#define wxMEDIABACKEND_DIRECTSHOW wxT("wxAMMediaBackend")
|
||||
#define wxMEDIABACKEND_MCI wxT("wxMCIMediaBackend")
|
||||
#define wxMEDIABACKEND_QUICKTIME wxT("wxQTMediaBackend")
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// wxMediaCtrl
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class wxMediaCtrl : public wxControl
|
||||
{
|
||||
public:
|
||||
wxMediaCtrl() : m_imp(NULL), m_bLoaded(false), m_bLoop(false)
|
||||
{ }
|
||||
|
||||
wxMediaCtrl(wxWindow* parent, wxWindowID id,
|
||||
const wxString& fileName = wxT(""),
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& szBackend = wxT(""),
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxT("mediaCtrl"))
|
||||
: m_imp(NULL), m_bLoaded(false), m_bLoop(false)
|
||||
{ Create(parent, id, fileName, pos, size, style,
|
||||
szBackend, validator, name); }
|
||||
|
||||
wxMediaCtrl(wxWindow* parent, wxWindowID id,
|
||||
const wxURI& location,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& szBackend = wxT(""),
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxT("mediaCtrl"))
|
||||
: m_imp(NULL), m_bLoop(false)
|
||||
{ Create(parent, id, location, pos, size, style,
|
||||
szBackend, validator, name); }
|
||||
|
||||
~wxMediaCtrl();
|
||||
|
||||
bool Create(wxWindow* parent, wxWindowID id,
|
||||
const wxString& fileName = wxT(""),
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& szBackend = wxT(""),
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxT("mediaCtrl"));
|
||||
|
||||
bool Create(wxWindow* parent, wxWindowID id,
|
||||
const wxURI& location,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& szBackend = wxT(""),
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxT("mediaCtrl"));
|
||||
|
||||
bool DoCreate(wxClassInfo* instance,
|
||||
wxWindow* parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxT("mediaCtrl"));
|
||||
|
||||
static wxClassInfo* NextBackend();
|
||||
|
||||
|
||||
bool Play();
|
||||
bool Pause();
|
||||
bool Stop();
|
||||
|
||||
bool Load(const wxString& fileName);
|
||||
bool Load(const wxURI& location);
|
||||
|
||||
void Loop(bool bLoop = true);
|
||||
bool IsLooped();
|
||||
|
||||
wxMediaState GetState();
|
||||
|
||||
double GetPlaybackRate();
|
||||
bool SetPlaybackRate(double dRate);
|
||||
|
||||
bool SetPosition(wxLongLong where);
|
||||
wxLongLong GetPosition();
|
||||
wxLongLong GetDuration();
|
||||
|
||||
protected:
|
||||
void OnMediaFinished(const class wxMediaEvent& evt);
|
||||
virtual void DoMoveWindow(int x, int y, int w, int h);
|
||||
wxSize DoGetBestSize() const;
|
||||
|
||||
class wxMediaBackend* m_imp;
|
||||
bool m_bLoaded;
|
||||
bool m_bLoop;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxMediaCtrl);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// wxMediaBackend
|
||||
//
|
||||
// Currently an internal class - API stability not gauranteed.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class wxMediaBackend : public wxObject
|
||||
{
|
||||
public:
|
||||
wxMediaBackend()
|
||||
{ }
|
||||
|
||||
virtual ~wxMediaBackend();
|
||||
|
||||
virtual bool CreateControl(wxControl* ctrl, wxWindow* parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos, const wxSize& size,
|
||||
long style,
|
||||
const wxValidator& validator,
|
||||
const wxString& name)
|
||||
{ return false; }
|
||||
|
||||
virtual bool Play()
|
||||
{ return false; }
|
||||
virtual bool Pause()
|
||||
{ return false; }
|
||||
virtual bool Stop()
|
||||
{ return false; }
|
||||
|
||||
virtual bool Load(const wxString& WXUNUSED(fileName))
|
||||
{ return false; }
|
||||
virtual bool Load(const wxURI& WXUNUSED(location))
|
||||
{ return false; }
|
||||
|
||||
virtual bool SetPosition(wxLongLong WXUNUSED(where))
|
||||
{ return 0; }
|
||||
virtual wxLongLong GetPosition()
|
||||
{ return 0; }
|
||||
virtual wxLongLong GetDuration()
|
||||
{ return 0; }
|
||||
|
||||
virtual void Move(int WXUNUSED(x), int WXUNUSED(y),
|
||||
int WXUNUSED(w), int WXUNUSED(h))
|
||||
{ }
|
||||
virtual wxSize GetVideoSize() const
|
||||
{ return wxSize(0,0); }
|
||||
|
||||
virtual double GetPlaybackRate()
|
||||
{ return 0.0; }
|
||||
virtual bool SetPlaybackRate(double WXUNUSED(dRate))
|
||||
{ return false; }
|
||||
|
||||
virtual wxMediaState GetState()
|
||||
{ return wxMEDIASTATE_STOPPED; }
|
||||
|
||||
DECLARE_CLASS(wxMediaBackend)
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// wxMediaEvent
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxMediaEvent : public wxNotifyEvent
|
||||
{
|
||||
public:
|
||||
// ------------------------------------------------------------------------
|
||||
// wxMediaEvent Constructor
|
||||
//
|
||||
// Normal constructor, much the same as wxNotifyEvent
|
||||
// ------------------------------------------------------------------------
|
||||
wxMediaEvent(wxEventType commandType = wxEVT_NULL, int id = 0)
|
||||
: wxNotifyEvent(commandType, id)
|
||||
{ }
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// wxMediaEvent Copy Constructor
|
||||
//
|
||||
// Normal copy constructor, much the same as wxNotifyEvent
|
||||
// ------------------------------------------------------------------------
|
||||
wxMediaEvent(const wxMediaEvent &clone)
|
||||
: wxNotifyEvent(clone)
|
||||
{ }
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// wxMediaEvent::Clone
|
||||
//
|
||||
// Allocates a copy of this object.
|
||||
// Required for wxEvtHandler::AddPendingEvent
|
||||
// ------------------------------------------------------------------------
|
||||
virtual wxEvent *Clone() const
|
||||
{ return new wxMediaEvent(*this); }
|
||||
|
||||
|
||||
// Put this class on wxWidget's RTTI table
|
||||
DECLARE_DYNAMIC_CLASS(wxMediaEvent)
|
||||
};
|
||||
|
||||
//Event ID to give to our events
|
||||
#define wxMEDIA_FINISHED_ID 13000
|
||||
#define wxMEDIA_STOP_ID 13001
|
||||
|
||||
//Define our event types - we need to call DEFINE_EVENT_TYPE(EVT) later
|
||||
DECLARE_EVENT_TYPE(wxEVT_MEDIA_FINISHED, wxMEDIA_FINISHED_ID)
|
||||
DECLARE_EVENT_TYPE(wxEVT_MEDIA_STOP, wxMEDIA_STOP_ID)
|
||||
|
||||
//Function type(s) our events need
|
||||
typedef void (wxEvtHandler::*wxMediaEventFunction)(wxMediaEvent&);
|
||||
|
||||
//Macro for usage with message maps
|
||||
#define EVT_MEDIA_FINISHED(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_FINISHED, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxMediaEventFunction) & fn, (wxObject *) NULL ),
|
||||
#define EVT_MEDIA_STOP(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_STOP, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxMediaEventFunction) & fn, (wxObject *) NULL ),
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// End compilation gaurd
|
||||
// ----------------------------------------------------------------------------
|
||||
#endif // wxUSE_MEDIACTRL
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// End header guard and header itself
|
||||
// ----------------------------------------------------------------------------
|
||||
#endif // _WX_MEDIACTRL_H_
|
||||
|
||||
|
||||
|
@ -1,105 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/msw/mediactrl.h
|
||||
// Purpose: DirectX7+ wxMediaCtrl MSW
|
||||
// Author: Ryan Norton <wxprojects@comcast.net>
|
||||
// Modified by:
|
||||
// Created: 11/07/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Ryan Norton
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_MEDIACTRL
|
||||
|
||||
#include "wx/control.h"
|
||||
#include "wx/uri.h"
|
||||
|
||||
enum wxMediaState
|
||||
{
|
||||
wxMEDIASTATE_STOPPED,
|
||||
wxMEDIASTATE_PAUSED,
|
||||
wxMEDIASTATE_PLAYING
|
||||
};
|
||||
|
||||
class wxMediaCtrl : public wxControl
|
||||
{
|
||||
public:
|
||||
wxMediaCtrl() : m_imp(NULL)
|
||||
{ }
|
||||
|
||||
wxMediaCtrl(wxWindow* parent, wxWindowID id, const wxString& fileName,
|
||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
long style = 0, long driver = 0, const wxString& name = wxPanelNameStr) : m_imp(NULL)
|
||||
{ Create(parent, id, fileName, pos, size, style, driver, name); }
|
||||
|
||||
|
||||
wxMediaCtrl(wxWindow* parent, wxWindowID id, const wxURI& location,
|
||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
long style = 0, long driver = 0, const wxString& name = wxPanelNameStr) : m_imp(NULL)
|
||||
{ Create(parent, id, location, pos, size, style, driver, name); }
|
||||
|
||||
~wxMediaCtrl();
|
||||
|
||||
bool Create(wxWindow* parent, wxWindowID id, const wxString& fileName,
|
||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
long style = 0, long driver = 0, const wxString& name = wxPanelNameStr);
|
||||
|
||||
bool Create(wxWindow* parent, wxWindowID id, const wxURI& location,
|
||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
long style = 0, long driver = 0, const wxString& name = wxPanelNameStr);
|
||||
|
||||
bool Play();
|
||||
bool Pause();
|
||||
bool Stop();
|
||||
|
||||
bool Load(const wxString& fileName);
|
||||
bool Load(const wxURI& location);
|
||||
|
||||
wxMediaState GetState();
|
||||
|
||||
double GetPlaybackRate();
|
||||
bool SetPlaybackRate(double dRate);
|
||||
|
||||
bool SetPosition(long where);
|
||||
long GetPosition();
|
||||
long GetDuration();
|
||||
|
||||
protected:
|
||||
virtual void DoMoveWindow(int x, int y, int w, int h);
|
||||
wxSize DoGetBestSize() const;
|
||||
|
||||
//msw-specific - we need to overload the window proc
|
||||
WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||
|
||||
class wxMediaCtrlImpl* m_imp;
|
||||
bool m_bLoaded;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxMediaCtrl);
|
||||
};
|
||||
|
||||
//Event stuff
|
||||
class WXDLLEXPORT wxMediaEvent : public wxNotifyEvent
|
||||
{
|
||||
public:
|
||||
wxMediaEvent(wxEventType commandType = wxEVT_NULL, int id = 0)
|
||||
: wxNotifyEvent(commandType, id)
|
||||
{ }
|
||||
|
||||
wxMediaEvent(const wxMediaEvent &clone)
|
||||
: wxNotifyEvent(clone.GetEventType(), clone.GetId())
|
||||
{ }
|
||||
|
||||
virtual wxEvent *Clone() const { return new wxMediaEvent(*this); }
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxMediaEvent)
|
||||
};
|
||||
|
||||
#define wxMEDIA_FINISHED_ID 13000
|
||||
DECLARE_EVENT_TYPE(wxEVT_MEDIA_FINISHED, wxMEDIA_FINISHED_ID)
|
||||
typedef void (wxEvtHandler::*wxMediaEventFunction)(wxMediaEvent&);
|
||||
#define EVT_MEDIA_FINISHED(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_FINISHED, winid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxMediaEventFunction) & fn, (wxObject *) NULL ),
|
||||
|
||||
#endif // wxUSE_MEDIACTRL
|
||||
|
@ -1,4 +1,4 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: mediaplayer.cpp
|
||||
// Purpose: wxMediaCtrl sample
|
||||
// Author: Ryan Norton
|
||||
@ -7,14 +7,28 @@
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Ryan Norton
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
// MediaPlayer
|
||||
//
|
||||
// This is a simple example of how to use all the funtionality of
|
||||
// the wxMediaCtrl class in wxWidgets.
|
||||
//
|
||||
// To use this sample, simply select Open File from the file menu,
|
||||
// select the file you want to play - and MediaPlayer will play the file,
|
||||
// showing video if neccessary.
|
||||
//
|
||||
// You can select one of the menu options, or move the slider around
|
||||
// to manipulate what is playing.
|
||||
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
// ============================================================================
|
||||
// declarations
|
||||
// Definitions
|
||||
// ============================================================================
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// Pre-compiled header stuff
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "wx/wxprec.h"
|
||||
@ -28,7 +42,7 @@
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// resources
|
||||
// Headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "wx/mediactrl.h" //for wxMediaCtrl
|
||||
@ -38,13 +52,48 @@
|
||||
#include "wx/timer.h" //timer for updating status bar
|
||||
#include "wx/textdlg.h" //for getting user text from OpenURL
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Bail out if the user doesn't want one of the
|
||||
// things we need
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if !wxUSE_MEDIACTRL
|
||||
#error "wxUSE_MEDIACTRL must be enabled to use this sample!"
|
||||
#if !wxUSE_GUI
|
||||
#error "This is a GUI sample"
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
#if !wxUSE_MEDIACTRL || !wxUSE_MENUS || !wxUSE_SLIDER || !wxUSE_TIMER
|
||||
#error "menus, slider, mediactrl, and timers must all enabled for this sample!"
|
||||
#endif
|
||||
|
||||
// ============================================================================
|
||||
// Declarations
|
||||
// ============================================================================
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Enumurations
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// IDs for the controls and the menu commands
|
||||
enum
|
||||
{
|
||||
// menu items
|
||||
wxID_LOOP = 1,
|
||||
wxID_OPENFILE,
|
||||
wxID_PLAY,
|
||||
wxID_PAUSE,
|
||||
// wxID_STOP, [built-in to wxWidgets]
|
||||
// wxID_ABOUT, [built-in to wxWidgets]
|
||||
// wxID_EXIT, [built-in to wxWidgets]
|
||||
|
||||
// id for our slider
|
||||
wxID_SLIDER,
|
||||
|
||||
// id for our wxMediaCtrl
|
||||
wxID_MEDIACTRL
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// MyApp
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class MyApp : public wxApp
|
||||
@ -53,14 +102,18 @@ public:
|
||||
virtual bool OnInit();
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// MyFrame
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class MyFrame : public wxFrame
|
||||
{
|
||||
public:
|
||||
// ctor(s)
|
||||
// Ctor/Dtor
|
||||
MyFrame(const wxString& title);
|
||||
~MyFrame();
|
||||
|
||||
// event handlers (these functions should _not_ be virtual)
|
||||
// Menu event handlers
|
||||
void OnQuit(wxCommandEvent& event);
|
||||
void OnAbout(wxCommandEvent& event);
|
||||
void OnLoop(wxCommandEvent& event);
|
||||
@ -72,52 +125,60 @@ public:
|
||||
void OnPause(wxCommandEvent& event);
|
||||
void OnStop(wxCommandEvent& event);
|
||||
|
||||
// Slider event handlers
|
||||
void OnSeek(wxCommandEvent& event);
|
||||
|
||||
void OnMediaFinished(wxMediaEvent& event);
|
||||
// Media event handlers
|
||||
void OnMediaStop(wxMediaEvent& event);
|
||||
|
||||
private:
|
||||
// Rebuild base status string (see Implementation)
|
||||
void ResetStatus();
|
||||
|
||||
wxMediaCtrl* m_mediactrl;
|
||||
wxSlider* m_slider;
|
||||
wxBoxSizer* m_sizer;
|
||||
class MyTimer* m_timer;
|
||||
wxMediaCtrl* m_mediactrl; //Our media control
|
||||
wxSlider* m_slider; //The slider below our media control
|
||||
class MyTimer* m_timer; //Timer to write info to status bar
|
||||
wxString m_basestatus; //Base status string (see ResetStatus())
|
||||
int m_nLoops; //Counter, incremented each time media loops
|
||||
|
||||
// So that mytimer can access MyFrame's members
|
||||
friend class MyTimer;
|
||||
wxString m_basestatus;
|
||||
|
||||
bool m_bLoop;
|
||||
|
||||
// any class wishing to process wxWidgets events must use this macro
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
//
|
||||
//ResetStatus
|
||||
//-----------
|
||||
//Here we just make a simple status string
|
||||
//with some useful info about the media
|
||||
//We display info here in seconds (wxMediaCtrl
|
||||
//uses milliseconds - that's why we divide by 1000)
|
||||
//
|
||||
void MyFrame::ResetStatus()
|
||||
// ----------------------------------------------------------------------------
|
||||
// MyTimer
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class MyTimer : public wxTimer
|
||||
{
|
||||
m_basestatus = wxString::Format(_T("Size(x,y):%i,%i Length(Seconds):%u Speed:%1.1fx"),
|
||||
m_mediactrl->GetBestSize().x,
|
||||
m_mediactrl->GetBestSize().y,
|
||||
(unsigned)(m_mediactrl->GetDuration() / 1000),
|
||||
m_mediactrl->GetPlaybackRate()
|
||||
);
|
||||
public:
|
||||
//Ctor
|
||||
MyTimer(MyFrame* frame) {m_frame = frame;}
|
||||
|
||||
m_slider->SetRange(0, m_mediactrl->GetDuration() / 1000);
|
||||
}
|
||||
//Called each time the timer's timeout expires
|
||||
void Notify();
|
||||
|
||||
MyFrame* m_frame; //The MyFrame
|
||||
};
|
||||
|
||||
// ============================================================================
|
||||
//
|
||||
//wxGetMediaStateText
|
||||
//-------------------
|
||||
//Converts a wxMediaCtrl state into something
|
||||
//useful that we can display
|
||||
// Implementation
|
||||
//
|
||||
// ============================================================================
|
||||
|
||||
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
//
|
||||
// [Functions]
|
||||
//
|
||||
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxGetMediaStateText
|
||||
//
|
||||
// Converts a wxMediaCtrl state into something useful that we can display
|
||||
// to the user
|
||||
// ----------------------------------------------------------------------------
|
||||
const wxChar* wxGetMediaStateText(int nState)
|
||||
{
|
||||
switch(nState)
|
||||
@ -132,161 +193,112 @@ const wxChar* wxGetMediaStateText(int nState)
|
||||
}
|
||||
}
|
||||
|
||||
class MyTimer : public wxTimer
|
||||
{
|
||||
public:
|
||||
MyTimer(MyFrame* frame) {m_frame = frame;}
|
||||
|
||||
//
|
||||
//Notify
|
||||
//-----------
|
||||
//Updates the main frame's status bar with the current
|
||||
//position within the media and state the media is in
|
||||
//
|
||||
void Notify()
|
||||
{
|
||||
long lPosition = m_frame->m_mediactrl->GetPosition() / 1000;
|
||||
m_frame->m_slider->SetValue(lPosition);
|
||||
|
||||
m_frame->SetStatusText(wxString::Format(_T("%s Pos:%u State:%s"),
|
||||
m_frame->m_basestatus.c_str(),
|
||||
(unsigned int)lPosition,
|
||||
wxGetMediaStateText(m_frame->m_mediactrl->GetState())
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
MyFrame* m_frame;
|
||||
};
|
||||
|
||||
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
//
|
||||
// MyApp
|
||||
//
|
||||
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// constants
|
||||
// This sets up this wxApp as the global wxApp that gui calls in wxWidgets
|
||||
// use. For example, if you were to be in windows and use a file dialog,
|
||||
// wxWidgets would use wxTheApp->GetHInstance() which would get the instance
|
||||
// handle of the application. These routines in wx _DO NOT_ check to see if
|
||||
// the wxApp exists, and thus will crash the application if you try it.
|
||||
//
|
||||
// IMPLEMENT_APP does this, and also implements the platform-specific entry
|
||||
// routine, such as main or WinMain(). Use IMPLEMENT_APP_NO_MAIN if you do
|
||||
// not desire this behavior.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// IDs for the controls and the menu commands
|
||||
enum
|
||||
{
|
||||
// menu items
|
||||
Minimal_Quit = wxID_EXIT,
|
||||
Minimal_Loop,
|
||||
Minimal_OpenFile,
|
||||
Minimal_Play,
|
||||
Minimal_Pause,
|
||||
Minimal_Stop,
|
||||
Minimal_About = wxID_ABOUT,
|
||||
|
||||
// id for our slider
|
||||
Minimal_Slider = 1,
|
||||
|
||||
// id for our wxMediaCtrl
|
||||
Minimal_Media
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// event tables and other macros for wxWidgets
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||
//Menu events
|
||||
EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
|
||||
EVT_MENU(Minimal_About, MyFrame::OnAbout)
|
||||
EVT_MENU(Minimal_Loop, MyFrame::OnLoop)
|
||||
EVT_MENU(Minimal_OpenFile, MyFrame::OnOpenFile)
|
||||
EVT_MENU(Minimal_Play, MyFrame::OnPlay)
|
||||
EVT_MENU(Minimal_Pause, MyFrame::OnPause)
|
||||
EVT_MENU(Minimal_Stop, MyFrame::OnStop)
|
||||
|
||||
//Slider events
|
||||
EVT_SLIDER(Minimal_Slider, MyFrame::OnSeek)
|
||||
|
||||
//wxMediaCtrl events
|
||||
EVT_MEDIA_FINISHED(Minimal_Media, MyFrame::OnMediaFinished)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
//main/WinMain()
|
||||
IMPLEMENT_APP(MyApp)
|
||||
|
||||
// ============================================================================
|
||||
// implementation
|
||||
// ============================================================================
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// MyApp
|
||||
// MyApp::OnInit
|
||||
//
|
||||
// Where execution starts - akin to a main or WinMain.
|
||||
// 1) Create the frame and show it to the user
|
||||
// 2) return true specifying that we want execution to continue past OnInit
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// 'Main program' equivalent: the program execution "starts" here
|
||||
bool MyApp::OnInit()
|
||||
{
|
||||
MyFrame *frame = new MyFrame(_T("Minimal wxWidgets App"));
|
||||
MyFrame *frame = new MyFrame(_T("MediaPlayer wxWidgets Sample"));
|
||||
frame->Show(true);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// main frame
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
//
|
||||
//MyFrame
|
||||
//-------
|
||||
//Creates our menus and controls
|
||||
// MyFrame
|
||||
//
|
||||
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// MyFrame Constructor
|
||||
//
|
||||
// 1) Create our menus
|
||||
// 2) Create our controls and add them to some sizers
|
||||
// 3) Create our status bar
|
||||
// 4) Connect our events
|
||||
// 5) Start our timer
|
||||
// ----------------------------------------------------------------------------
|
||||
MyFrame::MyFrame(const wxString& title)
|
||||
: wxFrame(NULL, wxID_ANY, title), m_timer(NULL)
|
||||
: wxFrame(NULL, wxID_ANY, title)
|
||||
{
|
||||
//
|
||||
// Create Menus
|
||||
//
|
||||
#if wxUSE_MENUS
|
||||
wxMenu *menuFile = new wxMenu;
|
||||
|
||||
wxMenu *helpMenu = new wxMenu;
|
||||
helpMenu->Append(Minimal_About, _T("&About...\tF1"), _T("Show about dialog"));
|
||||
helpMenu->Append(wxID_ABOUT,
|
||||
_T("&About...\tF1"),
|
||||
_T("Show about dialog"));
|
||||
|
||||
menuFile->Append(Minimal_OpenFile, _T("&Open File"), _T("Open a File"));
|
||||
menuFile->Append(wxID_OPENFILE, _T("&Open File"), _T("Open a File"));
|
||||
menuFile->AppendSeparator();
|
||||
menuFile->Append(Minimal_Play, _T("&Play"), _T("Resume playback"));
|
||||
menuFile->Append(Minimal_Pause, _T("P&ause"), _T("Pause playback"));
|
||||
menuFile->Append(Minimal_Stop, _T("&Stop"), _T("Stop playback"));
|
||||
menuFile->Append(wxID_PLAY, _T("&Play"), _T("Resume playback"));
|
||||
menuFile->Append(wxID_PAUSE, _T("P&ause"), _T("Pause playback"));
|
||||
menuFile->Append(wxID_STOP, _T("&Stop"), _T("Stop playback"));
|
||||
menuFile->AppendSeparator();
|
||||
menuFile->AppendCheckItem(Minimal_Loop, _T("&Loop"), _T("Loop Selected Media"));
|
||||
menuFile->AppendCheckItem(wxID_LOOP,
|
||||
_T("&Loop"),
|
||||
_T("Loop Selected Media"));
|
||||
menuFile->AppendSeparator();
|
||||
menuFile->Append(Minimal_Quit, _T("E&xit\tAlt-X"), _T("Quit this program"));
|
||||
menuFile->Append(wxID_EXIT,
|
||||
_T("E&xit\tAlt-X"),
|
||||
_T("Quit this program"));
|
||||
|
||||
wxMenuBar *menuBar = new wxMenuBar();
|
||||
menuBar->Append(menuFile, _T("&File"));
|
||||
menuBar->Append(helpMenu, _T("&Help"));
|
||||
|
||||
SetMenuBar(menuBar);
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
//
|
||||
// Create and attach the first/main sizer
|
||||
//
|
||||
|
||||
m_sizer = new wxBoxSizer(wxVERTICAL);
|
||||
this->SetSizer(m_sizer);
|
||||
wxBoxSizer* vertsizer = new wxBoxSizer(wxVERTICAL);
|
||||
this->SetSizer(vertsizer);
|
||||
this->SetAutoLayout(true);
|
||||
|
||||
//
|
||||
// Create our media control
|
||||
//
|
||||
|
||||
m_mediactrl = new wxMediaCtrl(this, Minimal_Media, wxT(""));
|
||||
m_sizer->Add(m_mediactrl, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
|
||||
m_mediactrl = new wxMediaCtrl(this, wxID_MEDIACTRL);
|
||||
vertsizer->Add(m_mediactrl, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
|
||||
|
||||
//
|
||||
// Create our slider
|
||||
//
|
||||
|
||||
m_slider = new wxSlider(this, Minimal_Slider, 0, //init
|
||||
m_slider = new wxSlider(this, wxID_SLIDER, 0, //init
|
||||
0, //start
|
||||
0, //end
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
wxSL_HORIZONTAL );
|
||||
m_sizer->Add(m_slider, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND , 5);
|
||||
vertsizer->Add(m_slider, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND , 5);
|
||||
|
||||
|
||||
//
|
||||
@ -298,15 +310,8 @@ MyFrame::MyFrame(const wxString& title)
|
||||
//
|
||||
// [m_slider]
|
||||
//
|
||||
|
||||
wxBoxSizer* horzsizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
m_sizer->Add(horzsizer, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
|
||||
|
||||
//
|
||||
// We arn't looping initially
|
||||
//
|
||||
|
||||
m_bLoop = false;
|
||||
vertsizer->Add(horzsizer, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
|
||||
|
||||
//
|
||||
// Create our status bar
|
||||
@ -317,43 +322,193 @@ MyFrame::MyFrame(const wxString& title)
|
||||
ResetStatus();
|
||||
SetStatusText(m_basestatus);
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
//
|
||||
// Connect events.
|
||||
//
|
||||
// There are two ways in wxWidgets to use events -
|
||||
// Message Maps and Connections.
|
||||
//
|
||||
// Message Maps are implemented by putting
|
||||
// DECLARE_MESSAGE_MAP in your wxEvtHandler-derived
|
||||
// class you want to use for events, such as MyFrame.
|
||||
//
|
||||
// Then after your class declaration you put
|
||||
// BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||
// EVT_XXX(XXX)...
|
||||
// END_EVENT_TABLE()
|
||||
//
|
||||
// Where MyFrame is the class with the DECLARE_MESSAGE_MAP
|
||||
// in it. EVT_XXX(XXX) are each of your handlers, such
|
||||
// as EVT_MENU for menu events and the XXX inside
|
||||
// is the parameters to the event macro - in the case
|
||||
// of EVT_MENU the menu id and then the function to call.
|
||||
//
|
||||
// However, with wxEvtHandler::Connect you can avoid a
|
||||
// global message map for your class and those annoying
|
||||
// macros. You can also change the context in which
|
||||
// the call the handler (more later).
|
||||
//
|
||||
// The downside is that due to the limitation that
|
||||
// wxWidgets doesn't use templates in certain areas,
|
||||
// You have to triple-cast the event function.
|
||||
//
|
||||
// There are five parameters to wxEvtHandler::Connect -
|
||||
//
|
||||
// The first is the id of the instance whose events
|
||||
// you want to handle - i.e. a menu id for menus,
|
||||
// a control id for controls (wxControl::GetId())
|
||||
// and so on.
|
||||
//
|
||||
// The second is the event id. This is the same
|
||||
// as the message maps (EVT_MENU) except prefixed
|
||||
// with "wx" (wxEVT_MENU).
|
||||
//
|
||||
// The third is the function handler for the event -
|
||||
// You need to cast it to the specific event handler
|
||||
// type, then to a wxEventFunction, then to a
|
||||
// wxObjectEventFunction - I.E.
|
||||
// (wxObjectEventFunction)(wxEventFunction)
|
||||
// (wxCommandEventFunction) &MyFrame::MyHandler
|
||||
//
|
||||
// The fourth is an optional userdata param -
|
||||
// this is of historical relevance only and is
|
||||
// there only for backwards compatability.
|
||||
//
|
||||
// The fifth is the context in which to call the
|
||||
// handler - by default (this param is optional)
|
||||
// this. For example in your event handler
|
||||
// if you were to call "this->MyFunc()"
|
||||
// it would literally do this->MyFunc. However,
|
||||
// if you were to pass myHandler as the fifth
|
||||
// parameter, for instance, you would _really_
|
||||
// be calling myHandler->MyFunc, even though
|
||||
// the compiler doesn't really know it.
|
||||
//
|
||||
|
||||
//
|
||||
// Menu events
|
||||
//
|
||||
this->Connect(wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED,
|
||||
(wxObjectEventFunction) (wxEventFunction)
|
||||
(wxCommandEventFunction) &MyFrame::OnQuit);
|
||||
|
||||
this->Connect(wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED,
|
||||
(wxObjectEventFunction) (wxEventFunction)
|
||||
(wxCommandEventFunction) &MyFrame::OnAbout);
|
||||
|
||||
this->Connect(wxID_LOOP, wxEVT_COMMAND_MENU_SELECTED,
|
||||
(wxObjectEventFunction) (wxEventFunction)
|
||||
(wxCommandEventFunction) &MyFrame::OnLoop);
|
||||
|
||||
this->Connect(wxID_OPENFILE, wxEVT_COMMAND_MENU_SELECTED,
|
||||
(wxObjectEventFunction) (wxEventFunction)
|
||||
(wxCommandEventFunction) &MyFrame::OnOpenFile);
|
||||
|
||||
this->Connect(wxID_PLAY, wxEVT_COMMAND_MENU_SELECTED,
|
||||
(wxObjectEventFunction) (wxEventFunction)
|
||||
(wxCommandEventFunction) &MyFrame::OnPlay);
|
||||
|
||||
this->Connect(wxID_PAUSE, wxEVT_COMMAND_MENU_SELECTED,
|
||||
(wxObjectEventFunction) (wxEventFunction)
|
||||
(wxCommandEventFunction) &MyFrame::OnPause);
|
||||
|
||||
this->Connect(wxID_STOP, wxEVT_COMMAND_MENU_SELECTED,
|
||||
(wxObjectEventFunction) (wxEventFunction)
|
||||
(wxCommandEventFunction) &MyFrame::OnStop);
|
||||
|
||||
|
||||
//
|
||||
// Slider events
|
||||
//
|
||||
this->Connect(wxID_SLIDER, wxEVT_COMMAND_SLIDER_UPDATED,
|
||||
(wxObjectEventFunction) (wxEventFunction)
|
||||
(wxCommandEventFunction) &MyFrame::OnSeek);
|
||||
|
||||
//
|
||||
// Media Control events
|
||||
//
|
||||
this->Connect(wxID_MEDIACTRL, wxEVT_MEDIA_STOP,
|
||||
(wxObjectEventFunction) (wxEventFunction)
|
||||
(wxCommandEventFunction) &MyFrame::OnMediaStop);
|
||||
|
||||
//
|
||||
// End of Events
|
||||
//
|
||||
|
||||
//
|
||||
// Set our loop counter to 0
|
||||
//
|
||||
m_nLoops = 0;
|
||||
|
||||
//
|
||||
// Create a timer to update our status bar
|
||||
//
|
||||
|
||||
m_timer = new MyTimer(this);
|
||||
m_timer->Start(100);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// MyFrame Destructor
|
||||
//
|
||||
//~MyFrame
|
||||
//--------
|
||||
//Deletes child objects implicitly and our timer explicitly
|
||||
//
|
||||
// 1) Deletes child objects implicitly
|
||||
// 2) Delete our timer explicitly
|
||||
// ----------------------------------------------------------------------------
|
||||
MyFrame::~MyFrame()
|
||||
{
|
||||
delete m_timer;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// MyFrame::ResetStatus
|
||||
//
|
||||
//OnQuit
|
||||
//------
|
||||
//Called from file->quit.
|
||||
//Closes this application.
|
||||
// Here we just make a simple status string with some useful info about
|
||||
// the media that we won't change later - such as the length of the media.
|
||||
//
|
||||
// We then append some other info that changes in MyTimer::Notify, then
|
||||
// set the status bar to this text.
|
||||
//
|
||||
// In real applications, you'd want to find a better way to do this,
|
||||
// such as static text controls (wxStaticText).
|
||||
//
|
||||
// We display info here in seconds (wxMediaCtrl uses milliseconds - that's why
|
||||
// we divide by 1000).
|
||||
//
|
||||
// We also reset our loop counter here.
|
||||
// ----------------------------------------------------------------------------
|
||||
void MyFrame::ResetStatus()
|
||||
{
|
||||
m_basestatus = wxString::Format(_T("Size(x,y):%i,%i ")
|
||||
_T("Length(Seconds):%u Speed:%1.1fx"),
|
||||
m_mediactrl->GetBestSize().x,
|
||||
m_mediactrl->GetBestSize().y,
|
||||
(unsigned)((m_mediactrl->GetDuration() / 1000).ToLong()),
|
||||
m_mediactrl->GetPlaybackRate()
|
||||
);
|
||||
|
||||
m_slider->SetRange(0, (m_mediactrl->GetDuration() / 1000).ToLong());
|
||||
|
||||
m_nLoops = 0;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// MyFrame::OnQuit
|
||||
//
|
||||
// Called from file->quit.
|
||||
// Closes this application.
|
||||
// ----------------------------------------------------------------------------
|
||||
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
// true is to force the frame to close
|
||||
Close(true);
|
||||
}
|
||||
|
||||
//
|
||||
//OnAbout
|
||||
//-------
|
||||
//Called from help->about.
|
||||
//Gets some info about this application.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// MyFrame::OnAbout
|
||||
//
|
||||
// Called from help->about.
|
||||
// Gets some info about this application.
|
||||
// ----------------------------------------------------------------------------
|
||||
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxString msg;
|
||||
@ -363,23 +518,23 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
|
||||
wxMessageBox(msg, _T("About wxMediaCtrl test"), wxOK | wxICON_INFORMATION, this);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// MyFrame::OnLoop
|
||||
//
|
||||
//OnLoop
|
||||
//------
|
||||
//Called from file->loop.
|
||||
//Changes the state of whether we want to loop or not.
|
||||
//
|
||||
// Called from file->loop.
|
||||
// Changes the state of whether we want to loop or not.
|
||||
// ----------------------------------------------------------------------------
|
||||
void MyFrame::OnLoop(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
m_bLoop = !m_bLoop;
|
||||
m_mediactrl->Loop( !m_mediactrl->IsLooped() );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// MyFrame::OnOpenFile
|
||||
//
|
||||
//OnOpenFile
|
||||
//----------
|
||||
//Called from file->openfile.
|
||||
//Opens and plays a media file
|
||||
//
|
||||
// Called from file->openfile.
|
||||
// Opens and plays a media file
|
||||
// ----------------------------------------------------------------------------
|
||||
void MyFrame::OnOpenFile(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxFileDialog fd(this);
|
||||
@ -396,69 +551,100 @@ void MyFrame::OnOpenFile(wxCommandEvent& WXUNUSED(event))
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
//OnPlay
|
||||
//------
|
||||
//Called from file->play.
|
||||
//Resumes the media if it is paused or stopped.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// MyFrame::OnPlay
|
||||
//
|
||||
// Called from file->play.
|
||||
// Resumes the media if it is paused or stopped.
|
||||
// ----------------------------------------------------------------------------
|
||||
void MyFrame::OnPlay(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
if( !m_mediactrl->Play() )
|
||||
wxMessageBox(wxT("Couldn't play movie!"));
|
||||
}
|
||||
|
||||
//
|
||||
//OnPause
|
||||
//-------
|
||||
//Called from file->pause.
|
||||
//Pauses the media in-place.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// MyFrame::OnPause
|
||||
//
|
||||
// Called from file->pause.
|
||||
// Pauses the media in-place.
|
||||
// ----------------------------------------------------------------------------
|
||||
void MyFrame::OnPause(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
if( !m_mediactrl->Pause() )
|
||||
wxMessageBox(wxT("Couldn't pause movie!"));
|
||||
}
|
||||
|
||||
//
|
||||
//OnStop
|
||||
//------
|
||||
//Called from file->stop.
|
||||
//Where it stops depends on whether you can seek in the
|
||||
//media control or not - if you can it stops and seeks to the beginning,
|
||||
//otherwise it will appear to be at the end - but it will start over again
|
||||
//when play() is called
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// MyFrame::OnStop
|
||||
//
|
||||
// Called from file->stop.
|
||||
// Where it stops depends on whether you can seek in the
|
||||
// media control or not - if you can it stops and seeks to the beginning,
|
||||
// otherwise it will appear to be at the end - but it will start over again
|
||||
// when Play() is called
|
||||
// ----------------------------------------------------------------------------
|
||||
void MyFrame::OnStop(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
if( !m_mediactrl->Stop() )
|
||||
wxMessageBox(wxT("Couldn't stop movie!"));
|
||||
}
|
||||
|
||||
//
|
||||
//OnSeek
|
||||
//------
|
||||
//Called from file->seek.
|
||||
//Called when the user moves the slider -
|
||||
//seeks to a position within the media
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// MyFrame::OnSeek
|
||||
//
|
||||
// Called from file->seek.
|
||||
// Called when the user moves the slider -
|
||||
// seeks to a position within the media
|
||||
// ----------------------------------------------------------------------------
|
||||
void MyFrame::OnSeek(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
if( !m_mediactrl->SetPosition( m_slider->GetValue() * 1000 ) )
|
||||
wxMessageBox(wxT("Couldn't seek in movie!"));
|
||||
}
|
||||
|
||||
//
|
||||
//OnMediaFinished
|
||||
//---------------
|
||||
//Called when the media stops playing.
|
||||
//Here we loop it if the user wants to (has been selected from file menu)
|
||||
//
|
||||
void MyFrame::OnMediaFinished(wxMediaEvent& WXUNUSED(event))
|
||||
// ----------------------------------------------------------------------------
|
||||
// MyFrame::OnMediaStop
|
||||
//
|
||||
// Called when the media is about to stop playing.
|
||||
// Here we just increase our loop counter
|
||||
// ----------------------------------------------------------------------------
|
||||
void MyFrame::OnMediaStop(wxMediaEvent& WXUNUSED(event))
|
||||
{
|
||||
if(m_bLoop)
|
||||
{
|
||||
if ( !m_mediactrl->Play() )
|
||||
wxMessageBox(wxT("Couldn't loop movie!"));
|
||||
}
|
||||
++m_nLoops;
|
||||
}
|
||||
|
||||
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
//
|
||||
// MyTimer
|
||||
//
|
||||
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// MyTimer::Notify
|
||||
//
|
||||
// 1) Update our slider with the position were are in in the media
|
||||
// 2) Update our status bar with the base text from MyFrame::ResetStatus,
|
||||
// append some non-static (changing) info to it, then set the
|
||||
// status bar text to that result
|
||||
// ----------------------------------------------------------------------------
|
||||
void MyTimer::Notify()
|
||||
{
|
||||
long lPosition = (m_frame->m_mediactrl->GetPosition() / 1000).ToLong();
|
||||
m_frame->m_slider->SetValue(lPosition);
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
m_frame->SetStatusText(wxString::Format(
|
||||
_T("%s Pos:%u State:%s Loops:%i"),
|
||||
m_frame->m_basestatus.c_str(),
|
||||
(unsigned int)lPosition,
|
||||
wxGetMediaStateText(m_frame->m_mediactrl->GetState()),
|
||||
m_frame->m_nLoops
|
||||
)
|
||||
);
|
||||
#endif
|
||||
}
|
||||
|
||||
//
|
||||
// End of MediaPlayer sample
|
||||
//
|
||||
|
422
src/common/mediactrlcmn.cpp
Normal file
422
src/common/mediactrlcmn.cpp
Normal file
@ -0,0 +1,422 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: common/mediactrl.cpp
|
||||
// Purpose: wxMediaCtrl common code
|
||||
// Author: Ryan Norton <wxprojects@comcast.net>
|
||||
// Modified by:
|
||||
// Created: 11/07/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Ryan Norton
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//===========================================================================
|
||||
// Definitions
|
||||
//===========================================================================
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Pre-compiled header stuff
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
||||
#pragma implementation "mediactrl.h"
|
||||
#endif
|
||||
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Includes
|
||||
//---------------------------------------------------------------------------
|
||||
#include "wx/mediactrl.h"
|
||||
#include "wx/hash.h"
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Compilation guard
|
||||
//---------------------------------------------------------------------------
|
||||
#if wxUSE_MEDIACTRL
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// Implementation
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
// RTTI and Event implementations
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
IMPLEMENT_CLASS(wxMediaCtrl, wxControl);
|
||||
IMPLEMENT_CLASS(wxMediaBackend, wxObject);
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxMediaEvent, wxEvent);
|
||||
DEFINE_EVENT_TYPE(wxEVT_MEDIA_FINISHED);
|
||||
DEFINE_EVENT_TYPE(wxEVT_MEDIA_STOP);
|
||||
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
//
|
||||
// wxMediaCtrl
|
||||
//
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// wxMediaCtrl::Create (file version)
|
||||
// wxMediaCtrl::Create (URL version)
|
||||
//
|
||||
// Searches for a backend that is installed on the system (backends
|
||||
// starting with lower characters in the alphabet are given priority),
|
||||
// and creates the control from it
|
||||
//
|
||||
// This searches by searching the global RTTI hashtable, class by class,
|
||||
// attempting to call CreateControl on each one found that is a derivative
|
||||
// of wxMediaBackend - if it succeededs Create returns true, otherwise
|
||||
// it keeps iterating through the hashmap.
|
||||
//---------------------------------------------------------------------------
|
||||
bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id,
|
||||
const wxString& fileName,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
const wxString& szBackend,
|
||||
const wxValidator& validator,
|
||||
const wxString& name)
|
||||
{
|
||||
if(!szBackend.empty())
|
||||
{
|
||||
if(!DoCreate(wxClassInfo::FindClass(szBackend), parent, id,
|
||||
pos, size, style, validator, name))
|
||||
{
|
||||
m_imp = NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!fileName.empty())
|
||||
{
|
||||
if (!m_imp->Load(fileName))
|
||||
{
|
||||
delete m_imp;
|
||||
m_imp = NULL;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
wxClassInfo::sm_classTable->BeginFind();
|
||||
|
||||
wxClassInfo* classInfo = NextBackend();
|
||||
|
||||
while(classInfo)
|
||||
{
|
||||
if(!DoCreate(classInfo, parent, id,
|
||||
pos, size, style, validator, name))
|
||||
continue;
|
||||
|
||||
if (!fileName.empty())
|
||||
{
|
||||
if (m_imp->Load(fileName))
|
||||
return true;
|
||||
else
|
||||
delete m_imp;
|
||||
}
|
||||
else
|
||||
return true;
|
||||
|
||||
classInfo = NextBackend();
|
||||
}
|
||||
|
||||
m_imp = NULL;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id,
|
||||
const wxURI& location,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
const wxString& szBackend,
|
||||
const wxValidator& validator,
|
||||
const wxString& name)
|
||||
{
|
||||
if(!szBackend.empty())
|
||||
{
|
||||
if(!DoCreate(wxClassInfo::FindClass(szBackend), parent, id,
|
||||
pos, size, style, validator, name))
|
||||
{
|
||||
m_imp = NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_imp->Load(location))
|
||||
{
|
||||
delete m_imp;
|
||||
m_imp = NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
wxClassInfo::sm_classTable->BeginFind();
|
||||
|
||||
wxClassInfo* classInfo = NextBackend();
|
||||
|
||||
while(classInfo)
|
||||
{
|
||||
if(!DoCreate(classInfo, parent, id,
|
||||
pos, size, style, validator, name))
|
||||
continue;
|
||||
|
||||
if (m_imp->Load(location))
|
||||
return true;
|
||||
else
|
||||
delete m_imp;
|
||||
|
||||
classInfo = NextBackend();
|
||||
}
|
||||
|
||||
m_imp = NULL;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// wxMediaCtrl::DoCreate
|
||||
//
|
||||
// Attempts to create the control from a backend
|
||||
//---------------------------------------------------------------------------
|
||||
bool wxMediaCtrl::DoCreate(wxClassInfo* classInfo,
|
||||
wxWindow* parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
const wxValidator& validator,
|
||||
const wxString& name)
|
||||
{
|
||||
m_imp = (wxMediaBackend*)classInfo->CreateObject();
|
||||
|
||||
if( m_imp->CreateControl(this, parent, id, pos, size,
|
||||
style, validator, name) )
|
||||
{
|
||||
this->Connect(GetId(), wxEVT_MEDIA_FINISHED,
|
||||
(wxObjectEventFunction) (wxEventFunction)
|
||||
(wxMediaEventFunction)
|
||||
&wxMediaCtrl::OnMediaFinished);
|
||||
return true;
|
||||
}
|
||||
|
||||
delete m_imp;
|
||||
return false;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// wxMediaCtrl::NextBackend
|
||||
//
|
||||
//
|
||||
// Search through the RTTI hashmap one at a
|
||||
// time, attempting to create each derivative
|
||||
// of wxMediaBackend
|
||||
//
|
||||
//
|
||||
// STL isn't compatable with and will have a compilation error
|
||||
// on a wxNode, however, wxHashTable::compatibility_iterator is
|
||||
// incompatible with the old 2.4 stable version - but since
|
||||
// we're in 2.5 only we don't need to worry about this
|
||||
// static
|
||||
//---------------------------------------------------------------------------
|
||||
wxClassInfo* wxMediaCtrl::NextBackend()
|
||||
{
|
||||
wxHashTable::compatibility_iterator
|
||||
node = wxClassInfo::sm_classTable->Next();
|
||||
while (node)
|
||||
{
|
||||
wxClassInfo* classInfo = (wxClassInfo *)node->GetData();
|
||||
if ( classInfo->IsKindOf(CLASSINFO(wxMediaBackend)) &&
|
||||
classInfo != CLASSINFO(wxMediaBackend) )
|
||||
{
|
||||
return classInfo;
|
||||
}
|
||||
node = wxClassInfo::sm_classTable->Next();
|
||||
}
|
||||
|
||||
//
|
||||
// Nope - couldn't successfully find one... fail
|
||||
//
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// wxMediaCtrl Destructor
|
||||
//
|
||||
// Free up the backend if it exists
|
||||
//---------------------------------------------------------------------------
|
||||
wxMediaCtrl::~wxMediaCtrl()
|
||||
{
|
||||
if (m_imp)
|
||||
delete m_imp;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// wxMediaCtrl::Load (file version)
|
||||
// wxMediaCtrl::Load (URL version)
|
||||
//
|
||||
// Here we call load of the backend - keeping
|
||||
// track of whether it was successful or not - which
|
||||
// will determine which later method calls work
|
||||
//---------------------------------------------------------------------------
|
||||
bool wxMediaCtrl::Load(const wxString& fileName)
|
||||
{
|
||||
if(m_imp)
|
||||
return (m_bLoaded = m_imp->Load(fileName));
|
||||
return false;
|
||||
}
|
||||
|
||||
bool wxMediaCtrl::Load(const wxURI& location)
|
||||
{
|
||||
if(m_imp)
|
||||
return (m_bLoaded = m_imp->Load(location));
|
||||
return false;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// wxMediaCtrl::Play
|
||||
// wxMediaCtrl::Pause
|
||||
// wxMediaCtrl::Stop
|
||||
// wxMediaCtrl::GetPlaybackRate
|
||||
// wxMediaCtrl::SetPlaybackRate
|
||||
// wxMediaCtrl::SetPosition
|
||||
// wxMediaCtrl::GetPosition
|
||||
// wxMediaCtrl::GetDuration
|
||||
// wxMediaCtrl::GetState
|
||||
// wxMediaCtrl::DoGetBestSize
|
||||
//
|
||||
// 1) Check to see whether the backend exists and is loading
|
||||
// 2) Call the backend's version of the method, returning success
|
||||
// if the backend's version succeeds
|
||||
//---------------------------------------------------------------------------
|
||||
bool wxMediaCtrl::Play()
|
||||
{
|
||||
if(m_imp && m_bLoaded)
|
||||
return m_imp->Play();
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool wxMediaCtrl::Pause()
|
||||
{
|
||||
if(m_imp && m_bLoaded)
|
||||
return m_imp->Pause();
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool wxMediaCtrl::Stop()
|
||||
{
|
||||
if(m_imp && m_bLoaded)
|
||||
return m_imp->Stop();
|
||||
return 0;
|
||||
}
|
||||
|
||||
double wxMediaCtrl::GetPlaybackRate()
|
||||
{
|
||||
if(m_imp && m_bLoaded)
|
||||
return m_imp->GetPlaybackRate();
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool wxMediaCtrl::SetPlaybackRate(double dRate)
|
||||
{
|
||||
if(m_imp && m_bLoaded)
|
||||
return m_imp->SetPlaybackRate(dRate);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool wxMediaCtrl::SetPosition(wxLongLong where)
|
||||
{
|
||||
if(m_imp && m_bLoaded)
|
||||
return m_imp->SetPosition(where);
|
||||
return false;
|
||||
}
|
||||
|
||||
wxLongLong wxMediaCtrl::GetPosition()
|
||||
{
|
||||
if(m_imp && m_bLoaded)
|
||||
return m_imp->GetPosition();
|
||||
return 0;
|
||||
}
|
||||
|
||||
wxLongLong wxMediaCtrl::GetDuration()
|
||||
{
|
||||
if(m_imp && m_bLoaded)
|
||||
return m_imp->GetDuration();
|
||||
return 0;
|
||||
}
|
||||
|
||||
wxMediaState wxMediaCtrl::GetState()
|
||||
{
|
||||
if(m_imp && m_bLoaded)
|
||||
return m_imp->GetState();
|
||||
return wxMEDIASTATE_STOPPED;
|
||||
}
|
||||
|
||||
wxSize wxMediaCtrl::DoGetBestSize() const
|
||||
{
|
||||
if(m_imp)
|
||||
return m_imp->GetVideoSize();
|
||||
return wxSize(0,0);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// wxMediaCtrl::DoMoveWindow
|
||||
//
|
||||
// 1) Call parent's version so that our control's window moves where
|
||||
// it's supposed to
|
||||
// 2) If the backend exists and is loaded, move the video
|
||||
// of the media to where our control's window is now located
|
||||
//---------------------------------------------------------------------------
|
||||
void wxMediaCtrl::DoMoveWindow(int x, int y, int w, int h)
|
||||
{
|
||||
wxControl::DoMoveWindow(x,y,w,h);
|
||||
|
||||
if(m_imp)
|
||||
m_imp->Move(x, y, w, h);
|
||||
}
|
||||
|
||||
void wxMediaCtrl::Loop(bool bLoop)
|
||||
{
|
||||
m_bLoop = bLoop;
|
||||
}
|
||||
|
||||
bool wxMediaCtrl::IsLooped()
|
||||
{
|
||||
return m_bLoop;
|
||||
}
|
||||
|
||||
void wxMediaCtrl::OnMediaFinished(const wxMediaEvent& WXUNUSED(evt))
|
||||
{
|
||||
if(m_bLoop)
|
||||
{
|
||||
#ifdef __WXDEBUG__
|
||||
wxASSERT( Play() );
|
||||
#else
|
||||
Play();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
//DARWIN gcc compiler badly screwed up - needs destructor impl in source
|
||||
wxMediaBackend::~wxMediaBackend()
|
||||
{ }
|
||||
#include <wx/html/forcelnk.h>
|
||||
FORCE_LINK(basewxmediabackends);
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// End of compilation guard and of file
|
||||
//---------------------------------------------------------------------------
|
||||
#endif //wxUSE_MEDIACTRL
|
||||
|
||||
|
@ -1,17 +1,25 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: mac/carbon/moviectrl.cpp
|
||||
// Purpose: wxMediaCtrl MAC CARBON QT
|
||||
// Name: mac/carbon/mediactrl.cpp
|
||||
// Purpose: Built-in Media Backends for Mac
|
||||
// Author: Ryan Norton <wxprojects@comcast.net>
|
||||
// Modified by:
|
||||
// Modified by:
|
||||
// Created: 11/07/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Ryan Norton
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
||||
//#pragma implementation "moviectrl.h"
|
||||
//#endif
|
||||
//===========================================================================
|
||||
// DECLARATIONS
|
||||
//===========================================================================
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Pre-compiled header stuff
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
||||
#pragma implementation "mediactrl.h"
|
||||
#endif
|
||||
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
@ -20,46 +28,113 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
//---------------------------------------------------------------------------
|
||||
// Includes
|
||||
//---------------------------------------------------------------------------
|
||||
#include "wx/mediactrl.h"
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Compilation guard
|
||||
//---------------------------------------------------------------------------
|
||||
#if wxUSE_MEDIACTRL
|
||||
|
||||
#include "wx/mac/carbon/mediactrl.h"
|
||||
//===========================================================================
|
||||
// BACKEND DECLARATIONS
|
||||
//===========================================================================
|
||||
|
||||
#include "wx/timer.h"
|
||||
|
||||
IMPLEMENT_CLASS(wxMediaCtrl, wxControl);
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxMediaEvent, wxEvent);
|
||||
DEFINE_EVENT_TYPE(wxEVT_MEDIA_FINISHED);
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// wxQTMediaBackend
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// QT Includes
|
||||
//---------------------------------------------------------------------------
|
||||
//uma is for wxMacFSSpec
|
||||
#ifdef __WXMAC__
|
||||
#include "wx/mac/uma.h"
|
||||
#include "wx/timer.h"
|
||||
#include <Movies.h>
|
||||
#include <Gestalt.h>
|
||||
#else
|
||||
//quicktime media layer for mac emulation on pc
|
||||
#include <qtml.h>
|
||||
#endif
|
||||
#include <QuickTimeComponents.h> //Standard QT stuff
|
||||
|
||||
#include <QuickTimeComponents.h>
|
||||
//Determines whether version 6 of QT is installed
|
||||
Boolean _wxIsQuickTime4Installed (void)
|
||||
{
|
||||
short error;
|
||||
long result;
|
||||
|
||||
#ifdef __WXMAC__
|
||||
#define MSWMOVIECHECK
|
||||
#else
|
||||
#define MSWMOVIECHECK if(!m_bLoaded) return 0;
|
||||
#endif
|
||||
error = Gestalt (gestaltQuickTime, &result);
|
||||
return (error == noErr) && (((result >> 16) & 0xffff) >= 0x0400);
|
||||
}
|
||||
|
||||
class wxQTMediaBackend : public wxMediaBackend
|
||||
{
|
||||
public:
|
||||
|
||||
wxQTMediaBackend();
|
||||
~wxQTMediaBackend();
|
||||
|
||||
virtual bool CreateControl(wxControl* ctrl, wxWindow* parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
const wxValidator& validator,
|
||||
const wxString& name);
|
||||
|
||||
virtual bool Play();
|
||||
virtual bool Pause();
|
||||
virtual bool Stop();
|
||||
|
||||
virtual bool Load(const wxString& fileName);
|
||||
virtual bool Load(const wxURI& location);
|
||||
|
||||
virtual wxMediaState GetState();
|
||||
|
||||
virtual bool SetPosition(wxLongLong where);
|
||||
virtual wxLongLong GetPosition();
|
||||
virtual wxLongLong GetDuration();
|
||||
|
||||
virtual void Move(int x, int y, int w, int h);
|
||||
wxSize GetVideoSize() const;
|
||||
|
||||
virtual double GetPlaybackRate();
|
||||
virtual bool SetPlaybackRate(double dRate);
|
||||
|
||||
void Cleanup();
|
||||
void FinishLoad();
|
||||
|
||||
wxSize m_bestSize; //Original movie size
|
||||
struct MovieType** m_movie; //QT Movie handle/instance
|
||||
wxControl* m_ctrl; //Parent control
|
||||
bool m_bVideo; //Whether or not we have video
|
||||
class _wxQTTimer* m_timer; //Timer for streaming the movie
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxQTMediaBackend);
|
||||
};
|
||||
|
||||
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
//
|
||||
// wxQTMediaBackend
|
||||
//
|
||||
// TODO: Use a less cludgy way to pause/get state/set state
|
||||
// TODO: Dynamically load from qtml.dll
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxQTMediaBackend, wxMediaBackend);
|
||||
|
||||
//Time between timer calls
|
||||
#define MOVIE_DELAY 50
|
||||
#define MOVIE_DELAY 100
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// --------------------------------------------------------------------------
|
||||
// wxQTTimer - Handle Asyncronous Playing
|
||||
// ------------------------------------------------------------------
|
||||
// --------------------------------------------------------------------------
|
||||
class _wxQTTimer : public wxTimer
|
||||
{
|
||||
public:
|
||||
_wxQTTimer(Movie movie, wxMediaCtrl* parent) :
|
||||
_wxQTTimer(Movie movie, wxQTMediaBackend* parent) :
|
||||
m_movie(movie), m_bPaused(false), m_parent(parent)
|
||||
{
|
||||
}
|
||||
@ -71,140 +146,134 @@ public:
|
||||
bool GetPaused() {return m_bPaused;}
|
||||
void SetPaused(bool bPaused) {m_bPaused = bPaused;}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// _wxQTTimer::Notify
|
||||
//
|
||||
// 1) Checks to see if the movie is done, and if not continues
|
||||
// streaming the movie
|
||||
// 2) Sends the wxEVT_MEDIA_STOP event if we have reached the end of
|
||||
// the movie.
|
||||
//-----------------------------------------------------------------------
|
||||
void Notify()
|
||||
{
|
||||
if (!m_bPaused)
|
||||
{
|
||||
if(!IsMovieDone(m_movie))
|
||||
MoviesTask(m_movie, MOVIE_DELAY); //Give QT time to play movie
|
||||
MoviesTask(m_movie, MOVIE_DELAY);
|
||||
else
|
||||
{
|
||||
Stop();
|
||||
m_parent->Stop();
|
||||
wxASSERT(::GetMoviesError() == noErr);
|
||||
wxMediaEvent theEvent(wxEVT_MEDIA_FINISHED, m_parent->GetId());
|
||||
m_parent->GetParent()->ProcessEvent(theEvent);
|
||||
wxMediaEvent theEvent(wxEVT_MEDIA_STOP,
|
||||
m_parent->m_ctrl->GetId());
|
||||
m_parent->m_ctrl->ProcessEvent(theEvent);
|
||||
|
||||
if(theEvent.IsAllowed())
|
||||
{
|
||||
Stop();
|
||||
m_parent->Stop();
|
||||
wxASSERT(::GetMoviesError() == noErr);
|
||||
|
||||
//send the event to our child
|
||||
wxMediaEvent theEvent(wxEVT_MEDIA_FINISHED,
|
||||
m_parent->m_ctrl->GetId());
|
||||
m_parent->m_ctrl->ProcessEvent(theEvent);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
Movie m_movie;
|
||||
bool m_bPaused;
|
||||
wxMediaCtrl* m_parent;
|
||||
Movie m_movie; //Our movie instance
|
||||
bool m_bPaused; //Whether we are paused or not
|
||||
wxQTMediaBackend* m_parent; //Backend pointer
|
||||
};
|
||||
|
||||
//Determines whether version 6 of QT is installed
|
||||
Boolean _wxIsQuickTime4Installed (void)
|
||||
//---------------------------------------------------------------------------
|
||||
// wxQTMediaBackend Destructor
|
||||
//
|
||||
// Sets m_timer to NULL signifying we havn't loaded anything yet
|
||||
//---------------------------------------------------------------------------
|
||||
wxQTMediaBackend::wxQTMediaBackend() : m_timer(NULL)
|
||||
{
|
||||
#ifdef __WXMAC__
|
||||
short error;
|
||||
long result;
|
||||
|
||||
error = Gestalt (gestaltQuickTime, &result);
|
||||
return (error == noErr) && (((result >> 16) & 0xffff) >= 0x0400);
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool wxMediaCtrl::InitQT ()
|
||||
//---------------------------------------------------------------------------
|
||||
// wxQTMediaBackend Destructor
|
||||
//
|
||||
// 1) Cleans up the QuickTime movie instance
|
||||
// 2) Decrements the QuickTime reference counter - if this reaches
|
||||
// 0, QuickTime shuts down
|
||||
// 3) Decrements the QuickTime Windows Media Layer reference counter -
|
||||
// if this reaches 0, QuickTime shuts down the Windows Media Layer
|
||||
//---------------------------------------------------------------------------
|
||||
wxQTMediaBackend::~wxQTMediaBackend()
|
||||
{
|
||||
if (_wxIsQuickTime4Installed())
|
||||
{
|
||||
#ifndef __WXMAC__
|
||||
int nError;
|
||||
//-2093 no dll
|
||||
if ((nError = InitializeQTML(0)) != noErr)
|
||||
{
|
||||
wxFAIL_MSG(wxString::Format(wxT("Couldn't Initialize Quicktime-%i"), nError));
|
||||
}
|
||||
#endif
|
||||
EnterMovies();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
wxFAIL_MSG(wxT("Quicktime is not installed, or Your Version of Quicktime is <= 4."));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id, const wxString& fileName,
|
||||
const wxPoint& pos, const wxSize& size,
|
||||
long style, long WXUNUSED(driver), const wxString& name)
|
||||
{
|
||||
if(!DoCreate(parent, id, pos, size, style, name))
|
||||
return false;
|
||||
|
||||
if(!fileName.empty())
|
||||
{
|
||||
if (!Load(fileName))
|
||||
return false;
|
||||
|
||||
if(!Play())
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id, const wxURI& location,
|
||||
const wxPoint& pos, const wxSize& size,
|
||||
long style, long WXUNUSED(driver), const wxString& name)
|
||||
{
|
||||
if(!DoCreate(parent, id, pos, size, style, name))
|
||||
return false;
|
||||
|
||||
if(!location.IsReference())
|
||||
{
|
||||
if (!Load(location))
|
||||
return false;
|
||||
|
||||
if(!Play())
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxMediaCtrl::DoCreate(wxWindow* parent, wxWindowID id,
|
||||
const wxPoint& pos, const wxSize& size,
|
||||
long style, const wxString& name)
|
||||
{
|
||||
//do some window stuff
|
||||
if ( !wxControl::Create(parent, id, pos, size,
|
||||
#ifdef __WXMAC__
|
||||
MacRemoveBordersFromStyle(style),
|
||||
#else
|
||||
style | wxNO_BORDER,
|
||||
#endif
|
||||
wxDefaultValidator, name) )
|
||||
return false;
|
||||
|
||||
//Set our background color to black by default
|
||||
SetBackgroundColour(*wxBLACK);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxMediaCtrl::Load(const wxString& fileName)
|
||||
{
|
||||
if(m_bLoaded)
|
||||
if(m_timer)
|
||||
Cleanup();
|
||||
|
||||
if ( !InitQT() )
|
||||
//Note that ExitMovies() is not neccessary...
|
||||
ExitMovies();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// wxQTMediaBackend::CreateControl
|
||||
//
|
||||
// 1) Intializes QuickTime
|
||||
// 2) Creates the control window
|
||||
//---------------------------------------------------------------------------
|
||||
bool wxQTMediaBackend::CreateControl(wxControl* ctrl, wxWindow* parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
const wxValidator& validator,
|
||||
const wxString& name)
|
||||
{
|
||||
if (!_wxIsQuickTime4Installed())
|
||||
return false;
|
||||
|
||||
EnterMovies();
|
||||
|
||||
//
|
||||
// Create window
|
||||
// By default wxWindow(s) is created with a border -
|
||||
// so we need to get rid of those
|
||||
//
|
||||
// Since we don't have a child window like most other
|
||||
// backends, we don't need wxCLIP_CHILDREN
|
||||
//
|
||||
if ( !ctrl->wxControl::Create(parent, id, pos, size,
|
||||
m_ctrl->MacRemoveBordersFromStyle(style),
|
||||
validator, name) )
|
||||
return false;
|
||||
|
||||
//
|
||||
//Set our background color to black by default
|
||||
//
|
||||
ctrl->SetBackgroundColour(*wxBLACK);
|
||||
|
||||
m_ctrl = ctrl;
|
||||
return true;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// wxQTMediaBackend::Load (file version)
|
||||
//
|
||||
// 1) Get an FSSpec from the Windows path name
|
||||
// 2) Open the movie
|
||||
// 3) Obtain the movie instance from the movie resource
|
||||
// 4)
|
||||
//---------------------------------------------------------------------------
|
||||
bool wxQTMediaBackend::Load(const wxString& fileName)
|
||||
{
|
||||
if(m_timer)
|
||||
Cleanup();
|
||||
|
||||
OSErr err = noErr;
|
||||
short movieResFile;
|
||||
FSSpec sfFile;
|
||||
#ifdef __WXMAC__
|
||||
wxMacFilename2FSSpec( fileName , &sfFile ) ;
|
||||
#else
|
||||
if (NativePathNameToFSSpec ((char*) fileName.mb_str(), &sfFile, 0) != noErr)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
wxMacFilename2FSSpec( fileName , &sfFile );
|
||||
|
||||
if (OpenMovieFile (&sfFile, &movieResFile, fsRdPerm) != noErr)
|
||||
return false;
|
||||
|
||||
@ -226,17 +295,19 @@ bool wxMediaCtrl::Load(const wxString& fileName)
|
||||
|
||||
FinishLoad();
|
||||
|
||||
return m_bLoaded;
|
||||
return ::GetMoviesError() == noErr;
|
||||
}
|
||||
|
||||
bool wxMediaCtrl::Load(const wxURI& location)
|
||||
//---------------------------------------------------------------------------
|
||||
// wxQTMediaBackend::Move
|
||||
//
|
||||
// TODO
|
||||
//---------------------------------------------------------------------------
|
||||
bool wxQTMediaBackend::Load(const wxURI& location)
|
||||
{
|
||||
if(m_bLoaded)
|
||||
if(m_timer)
|
||||
Cleanup();
|
||||
|
||||
if ( !InitQT() )
|
||||
return false;
|
||||
|
||||
wxString theURI = location.BuildURI();
|
||||
|
||||
OSErr err = noErr;
|
||||
@ -268,12 +339,17 @@ bool wxMediaCtrl::Load(const wxURI& location)
|
||||
|
||||
FinishLoad();
|
||||
|
||||
return m_bLoaded;
|
||||
return ::GetMoviesError() == noErr;
|
||||
}
|
||||
|
||||
void wxMediaCtrl::FinishLoad()
|
||||
//---------------------------------------------------------------------------
|
||||
// wxQTMediaBackend::Move
|
||||
//
|
||||
// TODO
|
||||
//---------------------------------------------------------------------------
|
||||
void wxQTMediaBackend::FinishLoad()
|
||||
{
|
||||
m_timer = new _wxQTTimer(m_movie, (wxMediaCtrl*) this);
|
||||
m_timer = new _wxQTTimer(m_movie, (wxQTMediaBackend*) this);
|
||||
wxASSERT(m_timer);
|
||||
|
||||
//get the real size of the movie
|
||||
@ -284,60 +360,69 @@ void wxMediaCtrl::FinishLoad()
|
||||
m_bestSize.x = outRect.right - outRect.left;
|
||||
m_bestSize.y = outRect.bottom - outRect.top;
|
||||
|
||||
//reparent movie
|
||||
if(GetMovieIndTrackType(m_movie, 1, VisualMediaCharacteristic/*AudioMediaCharacteristic*/, movieTrackCharacteristic | movieTrackEnabledOnly) != NULL)
|
||||
{
|
||||
|
||||
#ifdef __WXMSW__
|
||||
CreatePortAssociation(this->GetHWND(), NULL, 0L);
|
||||
#endif
|
||||
SetMovieGWorld(m_movie, (CGrafPtr)
|
||||
|
||||
#ifdef __WXMSW__
|
||||
GetNativeWindowPort(this->GetHWND())
|
||||
#else
|
||||
GetWindowPort((WindowRef)this->MacGetTopLevelWindowRef())
|
||||
#endif
|
||||
, nil);
|
||||
//reparent movie/*AudioMediaCharacteristic*/
|
||||
if(GetMovieIndTrackType(m_movie, 1,
|
||||
VisualMediaCharacteristic,
|
||||
movieTrackCharacteristic |
|
||||
movieTrackEnabledOnly) != NULL)
|
||||
{
|
||||
SetMovieGWorld(m_movie,
|
||||
(CGrafPtr)
|
||||
GetWindowPort(
|
||||
(WindowRef)
|
||||
m_ctrl->MacGetTopLevelWindowRef()
|
||||
),
|
||||
nil);
|
||||
}
|
||||
|
||||
// wxPrintf(wxT("%u\n"), ::GetMovieTimeScale(m_movie));
|
||||
//we want millisecond precision
|
||||
::SetMovieTimeScale(m_movie, 1000);
|
||||
|
||||
m_bLoaded = (::GetMoviesError() == noErr);
|
||||
wxASSERT(::GetMoviesError() == noErr);
|
||||
|
||||
//work around refresh issues
|
||||
wxSize size = GetParent()->GetSize();
|
||||
GetParent()->SetSize(wxSize(size.x+1, size.y+1));
|
||||
GetParent()->Refresh();
|
||||
GetParent()->Update();
|
||||
GetParent()->SetSize(size);
|
||||
GetParent()->Refresh();
|
||||
GetParent()->Update();
|
||||
//
|
||||
//Here, if the parent of the control has a sizer - we
|
||||
//tell it to recalculate the size of this control since
|
||||
//the user opened a seperate media file
|
||||
//
|
||||
m_ctrl->InvalidateBestSize();
|
||||
m_ctrl->GetParent()->Layout();
|
||||
m_ctrl->GetParent()->Refresh();
|
||||
m_ctrl->GetParent()->Update();
|
||||
}
|
||||
|
||||
bool wxMediaCtrl::Play()
|
||||
//---------------------------------------------------------------------------
|
||||
// wxQTMediaBackend::Move
|
||||
//
|
||||
// TODO
|
||||
//---------------------------------------------------------------------------
|
||||
bool wxQTMediaBackend::Play()
|
||||
{
|
||||
MSWMOVIECHECK
|
||||
::StartMovie(m_movie);
|
||||
m_timer->SetPaused(false);
|
||||
m_timer->Start(MOVIE_DELAY, wxTIMER_CONTINUOUS);
|
||||
return ::GetMoviesError() == noErr;
|
||||
}
|
||||
|
||||
bool wxMediaCtrl::Pause()
|
||||
//---------------------------------------------------------------------------
|
||||
// wxQTMediaBackend::Move
|
||||
//
|
||||
// TODO
|
||||
//---------------------------------------------------------------------------
|
||||
bool wxQTMediaBackend::Pause()
|
||||
{
|
||||
MSWMOVIECHECK
|
||||
::StopMovie(m_movie);
|
||||
m_timer->SetPaused(true);
|
||||
m_timer->Stop();
|
||||
return ::GetMoviesError() == noErr;
|
||||
}
|
||||
|
||||
bool wxMediaCtrl::Stop()
|
||||
//---------------------------------------------------------------------------
|
||||
// wxQTMediaBackend::Move
|
||||
//
|
||||
// TODO
|
||||
//---------------------------------------------------------------------------
|
||||
bool wxQTMediaBackend::Stop()
|
||||
{
|
||||
MSWMOVIECHECK
|
||||
m_timer->SetPaused(false);
|
||||
m_timer->Stop();
|
||||
|
||||
@ -349,25 +434,37 @@ bool wxMediaCtrl::Stop()
|
||||
return ::GetMoviesError() == noErr;
|
||||
}
|
||||
|
||||
double wxMediaCtrl::GetPlaybackRate()
|
||||
//---------------------------------------------------------------------------
|
||||
// wxQTMediaBackend::Move
|
||||
//
|
||||
// TODO
|
||||
//---------------------------------------------------------------------------
|
||||
double wxQTMediaBackend::GetPlaybackRate()
|
||||
{
|
||||
MSWMOVIECHECK
|
||||
return ( ((double)::GetMovieRate(m_movie)) / 0x10000);
|
||||
}
|
||||
|
||||
bool wxMediaCtrl::SetPlaybackRate(double dRate)
|
||||
//---------------------------------------------------------------------------
|
||||
// wxQTMediaBackend::Move
|
||||
//
|
||||
// TODO
|
||||
//---------------------------------------------------------------------------
|
||||
bool wxQTMediaBackend::SetPlaybackRate(double dRate)
|
||||
{
|
||||
MSWMOVIECHECK
|
||||
::SetMovieRate(m_movie, (Fixed) (dRate * 0x10000));
|
||||
return ::GetMoviesError() == noErr;
|
||||
}
|
||||
|
||||
bool wxMediaCtrl::SetPosition(long where)
|
||||
//---------------------------------------------------------------------------
|
||||
// wxQTMediaBackend::Move
|
||||
//
|
||||
// TODO
|
||||
//---------------------------------------------------------------------------
|
||||
bool wxQTMediaBackend::SetPosition(wxLongLong where)
|
||||
{
|
||||
MSWMOVIECHECK
|
||||
TimeRecord theTimeRecord;
|
||||
memset(&theTimeRecord, 0, sizeof(TimeRecord));
|
||||
theTimeRecord.value.lo = where;
|
||||
theTimeRecord.value.lo = where.GetValue();
|
||||
theTimeRecord.scale = ::GetMovieTimeScale(m_movie);
|
||||
theTimeRecord.base = ::GetMovieTimeBase(m_movie);
|
||||
::SetMovieTime(m_movie, &theTimeRecord);
|
||||
@ -378,21 +475,35 @@ bool wxMediaCtrl::SetPosition(long where)
|
||||
return true;
|
||||
}
|
||||
|
||||
long wxMediaCtrl::GetPosition()
|
||||
//---------------------------------------------------------------------------
|
||||
// wxQTMediaBackend::Move
|
||||
//
|
||||
// TODO
|
||||
//---------------------------------------------------------------------------
|
||||
wxLongLong wxQTMediaBackend::GetPosition()
|
||||
{
|
||||
MSWMOVIECHECK
|
||||
return ::GetMovieTime(m_movie, NULL);
|
||||
}
|
||||
|
||||
long wxMediaCtrl::GetDuration()
|
||||
//---------------------------------------------------------------------------
|
||||
// wxQTMediaBackend::Move
|
||||
//
|
||||
// TODO
|
||||
//---------------------------------------------------------------------------
|
||||
wxLongLong wxQTMediaBackend::GetDuration()
|
||||
{
|
||||
MSWMOVIECHECK
|
||||
return ::GetMovieDuration(m_movie);
|
||||
}
|
||||
|
||||
wxMediaState wxMediaCtrl::GetState()
|
||||
//---------------------------------------------------------------------------
|
||||
// wxQTMediaBackend::Move
|
||||
//
|
||||
// TODO
|
||||
//---------------------------------------------------------------------------
|
||||
wxMediaState wxQTMediaBackend::GetState()
|
||||
{
|
||||
if ( !m_bLoaded || (m_timer->IsRunning() == false && m_timer->GetPaused() == false) )
|
||||
if ( !m_timer || (m_timer->IsRunning() == false &&
|
||||
m_timer->GetPaused() == false) )
|
||||
return wxMEDIASTATE_STOPPED;
|
||||
|
||||
if( m_timer->IsRunning() == true )
|
||||
@ -401,48 +512,54 @@ wxMediaState wxMediaCtrl::GetState()
|
||||
return wxMEDIASTATE_PAUSED;
|
||||
}
|
||||
|
||||
void wxMediaCtrl::Cleanup()
|
||||
//---------------------------------------------------------------------------
|
||||
// wxQTMediaBackend::Move
|
||||
//
|
||||
// TODO
|
||||
//---------------------------------------------------------------------------
|
||||
void wxQTMediaBackend::Cleanup()
|
||||
{
|
||||
delete m_timer;
|
||||
m_timer = NULL;
|
||||
|
||||
StopMovie(m_movie);
|
||||
DisposeMovie(m_movie);
|
||||
|
||||
//Note that ExitMovies() is not neccessary, but
|
||||
//the docs are fuzzy on whether or not TerminateQTML is
|
||||
ExitMovies();
|
||||
|
||||
#ifndef __WXMAC__
|
||||
TerminateQTML();
|
||||
#endif
|
||||
}
|
||||
|
||||
wxMediaCtrl::~wxMediaCtrl()
|
||||
{
|
||||
if(m_bLoaded)
|
||||
Cleanup();
|
||||
}
|
||||
|
||||
wxSize wxMediaCtrl::DoGetBestSize() const
|
||||
//---------------------------------------------------------------------------
|
||||
// wxQTMediaBackend::Move
|
||||
//
|
||||
// TODO
|
||||
//---------------------------------------------------------------------------
|
||||
wxSize wxQTMediaBackend::GetVideoSize() const
|
||||
{
|
||||
return m_bestSize;
|
||||
}
|
||||
|
||||
void wxMediaCtrl::DoMoveWindow(int x, int y, int w, int h)
|
||||
//---------------------------------------------------------------------------
|
||||
// wxQTMediaBackend::Move
|
||||
//
|
||||
// TODO
|
||||
//---------------------------------------------------------------------------
|
||||
void wxQTMediaBackend::Move(int x, int y, int w, int h)
|
||||
{
|
||||
wxControl::DoMoveWindow(x,y,w,h);
|
||||
|
||||
if(m_bLoaded)
|
||||
if(m_timer)
|
||||
{
|
||||
#ifdef __WXMAC__
|
||||
Rect theRect = {y, x, y+h, x+w};
|
||||
#else
|
||||
Rect theRect = {0, 0, h, w};
|
||||
#endif
|
||||
|
||||
::SetMovieBox(m_movie, &theRect);
|
||||
wxASSERT(::GetMoviesError() == noErr);
|
||||
}
|
||||
}
|
||||
|
||||
#endif //wxUSE_MOVIECTRL
|
||||
|
||||
//in source file that contains stuff you don't directly use
|
||||
#include <wx/html/forcelnk.h>
|
||||
FORCE_LINK_ME(basewxmediabackends);
|
||||
|
||||
#endif //wxUSE_MEDIACTRL
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -650,6 +650,10 @@ SOURCE=.\common\matrix.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\common\mediactrlcmn.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\common\memory.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -3339,10 +3343,6 @@ SOURCE=..\include\wx\msw\mdi.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\include\wx\msw\mediactrl.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\include\wx\msw\menu.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
Loading…
Reference in New Issue
Block a user