[Mplayer-cvslog] CVS: main/Gui/wm ws.c,1.31,1.32 ws.h,1.11,1.12 wsconv.c,1.4,1.5 wsconv.h,1.3,1.4

Zoltan Ponekker pontscho at mplayer.dev.hu
Sat Feb 23 16:12:58 CET 2002


Update of /cvsroot/mplayer/main/Gui/wm
In directory mplayer:/var/tmp.root/cvs-serv25081/Gui/wm

Modified Files:
	ws.c ws.h wsconv.c wsconv.h 
Log Message:
new gui interface, and gtk moved into mplayer process. fork ... bleh :)

Index: ws.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/wm/ws.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- ws.c	7 Feb 2002 12:27:19 -0000	1.31
+++ ws.c	23 Feb 2002 15:12:55 -0000	1.32
@@ -18,9 +18,9 @@
 
 #include <inttypes.h>
 
+#include "../../config.h"
 #include "ws.h"
 #include "wsconv.h"
-#include "../../config.h"
 #include "../../postproc/rgb2rgb.h"
 
 #include <X11/extensions/XShm.h>
@@ -381,9 +381,9 @@
  {
   char buf[32]; int i;
   sprintf( buf,"_%s_REMOTE",label );
-  for( i=0;i<strlen( buf );i++ )
+  for( i=0;i < (int)strlen( buf );i++ )
     if ( ( buf[i] >= 'a' )&&( buf[i] <= 'z' ) ) buf[i]=buf[i] - 32;
-  for( i=0;i<strlen( buf );i++ )
+  for( i=0;i < (int)strlen( buf );i++ )
     if ( buf[i] == ' ' ) buf[i]='_';
   fprintf( stderr,"[ws] atomname: %s\n",buf );
   win->AtomRemote=XInternAtom( wsDisplay,buf,False );
@@ -681,11 +681,11 @@
           wsWindowList[l]->MouseHandler( i,Event->xbutton.x,Event->xbutton.y,Event->xmotion.x_root,Event->xmotion.y_root );
         break;
 
-   case GravityNotify:
+//   case GravityNotify:
 //        #ifdef DEBUG
-         fprintf( stderr,"[ws] window ( 0x%x ) gravity: %d,%d\n",wsWindowList[l]->WindowID,Event->xgravity.x,Event->xgravity.y );
+//         fprintf( stderr,"[ws] window ( 0x%x ) gravity: %d,%d\n",wsWindowList[l]->WindowID,Event->xgravity.x,Event->xgravity.y );
 //      #endif
-        break;
+//        break;
 
    case PropertyNotify:
 //      break;
@@ -730,8 +730,7 @@
 Bool wsDummyEvents( Display * display,XEvent * Event,XPointer arg )
 { return True; }
 
-// mplTimerHandler(0); // handle timer event
-void wsHandleEvents(){
+void wsHandleEvents( void ){
  // handle pending events
  while ( XPending(wsDisplay) ){
    XNextEvent( wsDisplay,&wsEvent );
@@ -740,6 +739,8 @@
  }
 }
 
+extern void mplTimerHandler( void );
+
 void wsMainLoop( void )
 {
  int delay=20;
@@ -758,7 +759,7 @@
    wsEvents( wsDisplay,&wsEvent,NULL );
    delay=0;
  }
- mplTimerHandler(0); // handle timer event
+ mplTimerHandler(); // handle timer event
  usleep(delay*1000); // FIXME!
  if(delay<10*20) delay+=20; // pump up delay up to 0.2 sec (low activity)
 }

Index: ws.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/wm/ws.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- ws.h	12 Feb 2002 22:06:12 -0000	1.11
+++ ws.h	23 Feb 2002 15:12:55 -0000	1.12
@@ -194,6 +194,8 @@
 
 extern void wsDoExit( void );
 extern void wsMainLoop( void );
+extern Bool wsEvents( Display * display,XEvent * Event,XPointer arg );
+extern void wsHandleEvents( void );
 
 // ----------------------------------------------------------------------------------------------
 //  wsCrateWindow: create a new window on the screen.

Index: wsconv.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/wm/wsconv.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- wsconv.c	9 Nov 2001 13:05:55 -0000	1.4
+++ wsconv.c	23 Feb 2002 15:12:55 -0000	1.5
@@ -18,7 +18,7 @@
 
 #define SWAP_RGB_24(src,dst) dst[1]=src[0];dst[1]=src[1];dst[2]=src[0]
 
-void BGR8880_to_RGB555_c( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned num_pixels)
+void BGR8880_to_RGB555_c( const unsigned char * in_pixels, unsigned char * out_pixels, int num_pixels)
 {
  unsigned short pixel;
  int i;
@@ -31,7 +31,7 @@
   }
 }
 
-void BGR8880_to_BGR555_c( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned num_pixels)
+void BGR8880_to_BGR555_c( const unsigned char * in_pixels, unsigned char * out_pixels, int num_pixels)
 {
  unsigned short pixel;
  int i;
@@ -44,7 +44,7 @@
   }
 }
 
-void BGR8880_to_RGB565_c( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned num_pixels)
+void BGR8880_to_RGB565_c( const unsigned char * in_pixels, unsigned char * out_pixels, int num_pixels)
 {
  unsigned short pixel;
  int i;
@@ -57,7 +57,7 @@
   }
 }
 
-void BGR8880_to_BGR565_c( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned num_pixels)
+void BGR8880_to_BGR565_c( const unsigned char * in_pixels, unsigned char * out_pixels, int num_pixels)
 {
  unsigned short pixel;
  int i;
@@ -70,7 +70,7 @@
   }
 }
 
-void BGR8880_to_RGB888_c( const unsigned char * in_pixels, unsigned char * out_pixels,unsigned num_pixels )
+void BGR8880_to_RGB888_c( const unsigned char * in_pixels, unsigned char * out_pixels,int num_pixels )
 {
  int i;
  for(i = 0; i < num_pixels / 4; i++)
@@ -81,7 +81,7 @@
   }
 }
 
-void BGR8880_to_BGR888_c( const unsigned char * in_pixels, unsigned char * out_pixels,unsigned num_pixels )
+void BGR8880_to_BGR888_c( const unsigned char * in_pixels, unsigned char * out_pixels,int num_pixels )
 {
  int i;
  for(i = 0; i < num_pixels / 4; i++)
@@ -92,7 +92,7 @@
   }
 }
 
-void BGR8880_to_BGR8880_c( const unsigned char * in_pixels, unsigned char * out_pixels,unsigned num_pixels )
+void BGR8880_to_BGR8880_c( const unsigned char * in_pixels, unsigned char * out_pixels,int num_pixels )
 {
  int i;
  for(i = 0; i < num_pixels / 4; i++)
@@ -103,7 +103,7 @@
   }
 }
 
-void BGR8880_to_RGB8880_c( const unsigned char * in_pixels, unsigned char * out_pixels,unsigned num_pixels )
+void BGR8880_to_RGB8880_c( const unsigned char * in_pixels, unsigned char * out_pixels,int num_pixels )
 { memcpy( out_pixels,in_pixels,num_pixels ); }
 
 /*
@@ -119,7 +119,7 @@
 #define RGB16_MIDDLE_MASK 0x07e0
 #define RGB16_UPPER_MASK  0xf800
 
-void RGB565_to_RGB888_c( const unsigned char * in_pixels, unsigned char * out_pixels,unsigned num_pixels)
+void RGB565_to_RGB888_c( const unsigned char * in_pixels, unsigned char * out_pixels,int num_pixels)
 {
  unsigned short in_pixel;
  int i;

Index: wsconv.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/wm/wsconv.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- wsconv.h	9 Nov 2001 13:05:55 -0000	1.3
+++ wsconv.h	23 Feb 2002 15:12:55 -0000	1.4
@@ -19,14 +19,14 @@
 typedef void(*wsTConvFunc)( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned num_pixels );
 extern wsTConvFunc wsConvFunc;
 
-extern void BGR8880_to_RGB555_c( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned num_pixels );
-extern void BGR8880_to_BGR555_c( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned  num_pixels );
-extern void BGR8880_to_RGB565_c( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned  num_pixels );
-extern void BGR8880_to_BGR565_c( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned  num_pixels );
-extern void BGR8880_to_RGB888_c( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned  num_pixels );
-extern void BGR8880_to_BGR888_c( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned  num_pixels );
-extern void BGR8880_to_BGR8880_c( const unsigned char * in_pixels, unsigned char * out_pixels,unsigned  num_pixels );
-extern void BGR8880_to_RGB8880_c( const unsigned char * in_pixels, unsigned char * out_pixels,unsigned  num_pixels );
+extern void BGR8880_to_RGB555_c( const unsigned char * in_pixels, unsigned char * out_pixels, int num_pixels );
+extern void BGR8880_to_BGR555_c( const unsigned char * in_pixels, unsigned char * out_pixels, int num_pixels );
+extern void BGR8880_to_RGB565_c( const unsigned char * in_pixels, unsigned char * out_pixels, int num_pixels );
+extern void BGR8880_to_BGR565_c( const unsigned char * in_pixels, unsigned char * out_pixels, int num_pixels );
+extern void BGR8880_to_RGB888_c( const unsigned char * in_pixels, unsigned char * out_pixels, int num_pixels );
+extern void BGR8880_to_BGR888_c( const unsigned char * in_pixels, unsigned char * out_pixels, int num_pixels );
+extern void BGR8880_to_BGR8880_c( const unsigned char * in_pixels, unsigned char * out_pixels,int num_pixels );
+extern void BGR8880_to_RGB8880_c( const unsigned char * in_pixels, unsigned char * out_pixels,int num_pixels );
 
 #ifdef xHAVE_MMX
  extern void BGR8880_to_RGB888_mmx( const unsigned char * in_pixels,unsigned char * out_pixels,unsigned num_pixels);




More information about the MPlayer-cvslog mailing list