Mercurial > mplayer.hg
comparison libvo/vo_xmga.c @ 1723:5e4214a7540e
GUI stuff. now seeking works, and xmga renders to video window
author | arpi |
---|---|
date | Mon, 27 Aug 2001 23:56:44 +0000 |
parents | 248972c26eee |
children | beec84c3d830 |
comparison
equal
deleted
inserted
replaced
1722:9e23ceba3f65 | 1723:5e4214a7540e |
---|---|
106 static void set_window(){ | 106 static void set_window(){ |
107 | 107 |
108 XGetGeometry( mDisplay,mWindow,&mRoot,&drwX,&drwY,&drwWidth,&drwHeight,&drwBorderWidth,&drwDepth ); | 108 XGetGeometry( mDisplay,mWindow,&mRoot,&drwX,&drwY,&drwWidth,&drwHeight,&drwBorderWidth,&drwDepth ); |
109 drwX=0; drwY=0; // drwWidth=wndWidth; drwHeight=wndHeight; | 109 drwX=0; drwY=0; // drwWidth=wndWidth; drwHeight=wndHeight; |
110 XTranslateCoordinates( mDisplay,mWindow,mRoot,0,0,&drwcX,&drwcY,&mRoot ); | 110 XTranslateCoordinates( mDisplay,mWindow,mRoot,0,0,&drwcX,&drwcY,&mRoot ); |
111 //fprintf( stderr,"[xmga] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight ); | 111 fprintf( stderr,"[xmga] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight ); |
112 | 112 |
113 #ifdef HAVE_GUI | 113 #ifdef HAVE_GUI |
114 if ( vo_window != None ) | 114 if ( vo_window != None ) |
115 { | 115 { |
116 mFullscreen=0; | 116 mFullscreen=0; |
247 case 16: fgColor=0xf81fL; break; | 247 case 16: fgColor=0xf81fL; break; |
248 case 15: fgColor=0x7c1fL; break; | 248 case 15: fgColor=0x7c1fL; break; |
249 default: printf( "Sorry, this (%d) color depth not supported.\n",vo_depthonscreen ); return -1; | 249 default: printf( "Sorry, this (%d) color depth not supported.\n",vo_depthonscreen ); return -1; |
250 } | 250 } |
251 | 251 |
252 #ifdef HAVE_GUI | 252 #ifdef HAVE_NEW_GUI |
253 if ( vo_window == None ) | 253 if ( vo_window == None ) |
254 { | 254 { |
255 #endif | 255 #endif |
256 if ( mFullscreen ) | 256 if ( mFullscreen ) |
257 { | 257 { |
287 hint.base_width=wndWidth; hint.base_height=wndHeight; | 287 hint.base_width=wndWidth; hint.base_height=wndHeight; |
288 hint.flags=USPosition | USSize; | 288 hint.flags=USPosition | USSize; |
289 XSetNormalHints( mDisplay,mWindow,&hint ); | 289 XSetNormalHints( mDisplay,mWindow,&hint ); |
290 XStoreName( mDisplay,mWindow,mTitle ); | 290 XStoreName( mDisplay,mWindow,mTitle ); |
291 XMapWindow( mDisplay,mWindow ); | 291 XMapWindow( mDisplay,mWindow ); |
292 #ifdef HAVE_GUI | 292 mGC=XCreateGC( mDisplay,mWindow,GCForeground,&wGCV ); |
293 #ifdef HAVE_NEW_GUI | |
293 } | 294 } |
294 else | 295 else |
295 { | 296 { |
296 mWindow=vo_window; | 297 mWindow=vo_window; |
297 fprintf( stderr,"[xmga] width: %d height: %d d_width: %d d_height: %d\n",width,height,d_width,d_height ); | 298 fprintf( stderr,"[xmga] width: %d height: %d d_width: %d d_height: %d\n",width,height,d_width,d_height ); |
299 { | 300 { |
300 XMoveWindow( mDisplay,mWindow,( vo_screenwidth - d_width ) / 2,( vo_screenheight - d_height ) / 2 ); | 301 XMoveWindow( mDisplay,mWindow,( vo_screenwidth - d_width ) / 2,( vo_screenheight - d_height ) / 2 ); |
301 XResizeWindow( mDisplay,mWindow,d_width,d_height ); | 302 XResizeWindow( mDisplay,mWindow,d_width,d_height ); |
302 } | 303 } |
303 else mFullscreen=1; | 304 else mFullscreen=1; |
305 mGC=vo_gc; //XCreateGC( mDisplay,mWindow,GCForeground,&wGCV ); | |
304 } | 306 } |
305 #endif | 307 #endif |
306 mGC=XCreateGC( mDisplay,mWindow,GCForeground,&wGCV ); | |
307 | 308 |
308 set_window(); | 309 set_window(); |
309 | 310 |
310 mga_vid_config.src_width=width; | 311 mga_vid_config.src_width=width; |
311 mga_vid_config.src_height=height; | 312 mga_vid_config.src_height=height; |
315 mga_vid_config.colkey_green=0; | 316 mga_vid_config.colkey_green=0; |
316 mga_vid_config.colkey_blue=255; | 317 mga_vid_config.colkey_blue=255; |
317 | 318 |
318 if(mga_init()) return -1; | 319 if(mga_init()) return -1; |
319 | 320 |
320 #ifdef HAVE_GUI | 321 #ifdef HAVE_NEW_GUI |
321 if ( vo_window == None ) | 322 if ( vo_window == None ) |
322 { | 323 #endif |
323 #endif | 324 { |
324 XFlush( mDisplay ); | 325 XFlush( mDisplay ); |
325 XSync( mDisplay,False ); | 326 XSync( mDisplay,False ); |
326 #ifdef HAVE_GUI | 327 } |
327 } | |
328 #endif | |
329 | |
330 saver_off(mDisplay); | 328 saver_off(mDisplay); |
331 | 329 |
332 return 0; | 330 return 0; |
333 } | 331 } |
334 | 332 |