[Mplayer-cvslog] CVS: main/Gui/wm ws.c,1.43,1.44 ws.h,1.16,1.17 wskeys.h,1.3,1.4

Zoltan Ponekker pontscho at mplayerhq.hu
Sat May 25 11:46:39 CEST 2002


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

Modified Files:
	ws.c ws.h wskeys.h 
Log Message:
fix two small bug and add multimedia keyboard support ( i tested with Acer AirKey V only )

Index: ws.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/wm/ws.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- ws.c	23 May 2002 14:46:08 -0000	1.43
+++ ws.c	25 May 2002 09:46:37 -0000	1.44
@@ -618,14 +618,17 @@
         if ( Event->xkey.state & ShiftMask ) wsWindowList[l]->Shift=1;
         if ( Event->xkey.state & LockMask ) wsWindowList[l]->CapsLock=1;
 #if 0
-        keySym=XKeycodeToKeysym( wsDisplay,Event->xkey.keycode,0 );
-        if ( keySym != NoSymbol )
-         {
-          keySym=( (keySym&0xff00) != 0?( (keySym&0x00ff) + 256 ):( keySym ) );
-          wsKeyTable[ keySym ]=i;
-          if ( wsWindowList[l]->KeyHandler )
-            wsWindowList[l]->KeyHandler( Event->xkey.state,i,keySym );
-         }
+        {
+	 KeySym        keySym;
+         keySym=XKeycodeToKeysym( wsDisplay,Event->xkey.keycode,0 );
+         if ( keySym != NoSymbol )
+          {
+           keySym=( (keySym&0xff00) != 0?( (keySym&0x00ff) + 256 ):( keySym ) );
+           wsKeyTable[ keySym ]=i;
+           if ( wsWindowList[l]->KeyHandler )
+             wsWindowList[l]->KeyHandler( Event->xkey.state,i,keySym );
+          }
+	}
 #else
 	{
         	int    		key;
@@ -636,7 +639,7 @@
 	 XLookupString( &Event->xkey,buf,sizeof(buf),&keySym,&stat );
 	 key=( (keySym&0xff00) != 0?( (keySym&0x00ff) + 256 ):( keySym ) );
 	 wsKeyTable[ key ]=i;
-	 if ( wsWindowList[l]->KeyHandler ) wsWindowList[l]->KeyHandler( Event->xkey.state,i,key );
+	 if ( wsWindowList[l]->KeyHandler ) wsWindowList[l]->KeyHandler( Event->xkey.keycode,i,key );
 	}
 #endif
         break;

Index: ws.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/wm/ws.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- ws.h	20 May 2002 13:56:16 -0000	1.16
+++ ws.h	25 May 2002 09:46:37 -0000	1.17
@@ -98,7 +98,7 @@
 typedef   void (*wsTReDraw)( wsParamDisplay );
 typedef   void (*wsTReSize)( unsigned int X,unsigned int Y,unsigned int width,unsigned int height );
 typedef   void (*wsTIdle)( void );
-typedef   void (*wsTKeyHandler)( int State,int Type,int Key );
+typedef   void (*wsTKeyHandler)( int KeyCode,int Type,int Key );
 typedef   void (*wsTMouseHandler)( int Button,int X,int Y,int RX,int RY  );
 typedef   void (*wsRemoteHandler)( char * str );
 

Index: wskeys.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/wm/wskeys.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- wskeys.h	14 May 2002 11:41:01 -0000	1.3
+++ wskeys.h	25 May 2002 09:46:37 -0000	1.4
@@ -141,6 +141,14 @@
 #define wsXF86Next        0x17 + 256
 #define wsXF86Media       0x32 + 256
 
+#define wsXFMMPrev        0x98
+#define wsXFMMStop        0xb1
+#define wsXFMMPlay	  0x95
+#define wsXFMMNext        0x93
+#define wsXFMMVolUp       0xad
+#define wsXFMMVolDown     0xa6
+#define wsXFMMMute        0x99
+
 #define wsKeyNumber 128
 
 typedef struct




More information about the MPlayer-cvslog mailing list