diff options
author | vayne <vayne@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-07-06 01:51:31 +0000 |
---|---|---|
committer | vayne <vayne@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-07-06 01:51:31 +0000 |
commit | c5cf04f5430fa3a44ea1d92d5bcf75ca0623f5a7 (patch) | |
tree | f3bf4919423e38dab02ffedf57bae2379839b638 | |
parent | 71045b33a33f4b3c4c05621a80f059840879bb97 (diff) |
Initial win32 gui release.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18918 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | Gui/Makefile | 17 | ||||
-rwxr-xr-x | configure | 8 | ||||
-rw-r--r-- | libvo/vo_directx.c | 11 | ||||
-rw-r--r-- | mplayer.c | 23 |
4 files changed, 56 insertions, 3 deletions
diff --git a/Gui/Makefile b/Gui/Makefile index 346be565ee..3e499ef443 100644 --- a/Gui/Makefile +++ b/Gui/Makefile @@ -9,6 +9,16 @@ OPTIMIZE = $(OPTFLAGS) CFLAGS = $(OPTIMIZE) $(INCDIR) $(DEBUG) +ifeq ($(TARGET_WIN32),yes) +SRCS = win32/dialogs.c \ + win32/gui.c \ + win32/interface.c \ + win32/playlist.c \ + win32/preferences.c \ + win32/skinload.c \ + win32/widgetrender.c \ + win32/wincfg.c +else SRCS = wm/ws.c \ wm/wsxdnd.c \ app.c \ @@ -34,8 +44,8 @@ SRCS = wm/ws.c \ mplayer/gtk/opts.c \ mplayer/gtk/url.c \ mplayer/gtk/eq.c \ - mplayer/gtk/common.c \ - + mplayer/gtk/common.c +endif OBJS = $(SRCS:.c=.o) .SUFFIXES: .c .o @@ -57,7 +67,8 @@ clean: mplayer/*.o mplayer/*~ \ mplayer/gtk/*.o mplayer/gtk/*~ \ skin/*.o skin/*~ \ - wm/*.o wm/*~ + wm/*.o wm/*~ \ + win32/*.o #dep: depend # @@ -6942,6 +6942,7 @@ if test "$_gui" = yes ; then # Required libraries test "$_png" != yes && die "PNG support required for GUI compilation, please install libpng and libpng-dev packages." +if not win32 ; then test "$_x11" != yes && die "X11 support required for GUI compilation" echocheck "XShape extension" @@ -7046,6 +7047,13 @@ if test "$_gtk1" = yes ; then _ld_gui='$(GTKLIB) $(GLIBLIB)' fi +else + _ld_win32libs="-lcomdlg32 -lcomctl32 -lshell32 -lkernel32 $_ld_win32libs" + _def_gui='#define HAVE_NEW_GUI 1' + _def_gtk2_gui='#undef HAVE_GTK2_GUI' + _ld_gui='$(GTKLIB) $(GLIBLIB)' +fi + echo "Creating Gui/config.mak" cat > Gui/config.mak << EOF # -------- Generated by configure ----------- diff --git a/libvo/vo_directx.c b/libvo/vo_directx.c index 57603104d7..05b9cc5bb6 100644 --- a/libvo/vo_directx.c +++ b/libvo/vo_directx.c @@ -35,6 +35,10 @@ #include "aspect.h" #include "geometry.h" +#ifdef HAVE_NEW_GUI +#include "Gui/interface.h" +#endif + #ifndef WM_XBUTTONDOWN # define WM_XBUTTONDOWN 0x020B # define WM_XBUTTONUP 0x020C @@ -1311,6 +1315,13 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin vo_dx = 0; vo_dy = 0; +#ifdef HAVE_NEW_GUI + if(use_gui && WinID != -1){ + vo_dwidth = d_image_width; + vo_dheight = d_image_height; + guiGetEvent(guiSetShVideo, 0); + } +#endif /*release all directx objects*/ if (g_cc != NULL)g_cc->lpVtbl->Release(g_cc); g_cc=NULL; @@ -2538,10 +2538,16 @@ int gui_no_filename=0; tv_param_immediate = 1; #endif +#if defined(WIN32) && defined(HAVE_NEW_GUI) + char *cmdline = GetCommandLine(); + if(!strstr(cmdline, "-slave")) + use_gui=1; +#else if ( argv[0] ) if(!strcmp(argv[0],"gmplayer") || (strrchr(argv[0],'/') && !strcmp(strrchr(argv[0],'/'),"/gmplayer") ) ) use_gui=1; +#endif mconfig = m_config_new(); m_config_register_options(mconfig,mplayer_opts); @@ -2570,6 +2576,21 @@ int gui_no_filename=0; } } +#if defined(WIN32) && defined(HAVE_NEW_GUI) + void *runningmplayer = FindWindow("MPlayer GUI for Windows", "MPlayer for Windows"); + if(runningmplayer && filename && use_gui){ + COPYDATASTRUCT csData; + char file[MAX_PATH]; + char *filepart = filename; + if(GetFullPathName(filename, MAX_PATH, file, &filepart)){ + csData.dwData = 0; + csData.cbData = strlen(file)*2; + csData.lpData = file; + SendMessage(runningmplayer, WM_COPYDATA, (WPARAM)runningmplayer, (LPARAM)&csData); + } + } +#endif + #ifdef WIN32 if(proc_priority){ int i; @@ -2598,12 +2619,14 @@ int gui_no_filename=0; play_tree_iter_free(playtree_iter); playtree_iter=NULL; +#ifndef WIN32 //Allow playing movies from network drives. eg. \\Desktop\c\somemovie.avi if (getcwd(cwd, PATH_MAX) != (char *)NULL) { strcat(cwd, "/"); // Prefix relative paths with current working directory play_tree_add_bpf(playtree, cwd); } +#endif /* WIN32 */ // Import initital playtree into GUI. import_initial_playtree_into_gui(playtree, mconfig, enqueue); } |