comparison gui/ui/video.c @ 35788:e3dcd5854344

Move video window initialization code to uiVideoInit().
author ib
date Fri, 25 Jan 2013 15:12:25 +0000
parents 4073fff5efc7
children 497a1c45a597
comparison
equal deleted inserted replaced
35787:c9d3bf288d36 35788:e3dcd5854344
20 20
21 #include <string.h> 21 #include <string.h>
22 22
23 #include "libvo/x11_common.h" 23 #include "libvo/x11_common.h"
24 #include "help_mp.h" 24 #include "help_mp.h"
25 #include "mp_msg.h"
25 #include "mp_core.h" 26 #include "mp_core.h"
26 27
27 #include "ui.h" 28 #include "ui.h"
28 #include "gui/app/app.h" 29 #include "gui/app/app.h"
29 #include "gui/app/gui.h" 30 #include "gui/app/gui.h"
30 #include "gui/interface.h" 31 #include "gui/interface.h"
31 #include "gui/dialog/dialog.h" 32 #include "gui/dialog/dialog.h"
33 #include "gui/wm/ws.h"
34 #include "gui/wm/wsxdnd.h"
32 35
33 int videoVisible = 0; 36 int videoVisible = 0;
34 37
35 static void uiVideoDraw( void ) 38 static void uiVideoDraw( void )
36 { 39 {
107 } 110 }
108 } 111 }
109 112
110 void uiVideoInit (void) 113 void uiVideoInit (void)
111 { 114 {
115 wsWindowCreate(&guiApp.videoWindow, guiApp.video.x, guiApp.video.y, guiApp.video.width, guiApp.video.height, wsShowFrame | wsHideWindow | wsWaitMap | wsAspect, wsShowMouseCursor | wsHandleMouseButton | wsHandleMouseMove, "MPlayer - Video");
116 mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[video] videoWindow ID: 0x%x\n", (int) guiApp.videoWindow.WindowID);
117 wsWindowIcon(wsDisplay, guiApp.videoWindow.WindowID, &guiIcon);
118 if (guiApp.video.Bitmap.Image)
119 {
120 wsImageResize(&guiApp.videoWindow, guiApp.video.Bitmap.Width, guiApp.video.Bitmap.Height);
121 wsImageRender(&guiApp.videoWindow, guiApp.video.Bitmap.Image);
122 }
123 wsXDNDMakeAwareness(&guiApp.videoWindow);
112 guiApp.videoWindow.DrawHandler = uiVideoDraw; 124 guiApp.videoWindow.DrawHandler = uiVideoDraw;
113 guiApp.videoWindow.MouseHandler = uiVideoMouse; 125 guiApp.videoWindow.MouseHandler = uiVideoMouse;
114 guiApp.videoWindow.KeyHandler = guiApp.mainWindow.KeyHandler; 126 guiApp.videoWindow.KeyHandler = guiApp.mainWindow.KeyHandler;
115 guiApp.videoWindow.DNDHandler = guiApp.mainWindow.DNDHandler; 127 guiApp.videoWindow.DNDHandler = guiApp.mainWindow.DNDHandler;
116 } 128 }