changeset 456:884ea555b1a2

add mixer keys
author pontscho
date Sun, 15 Apr 2001 23:09:14 +0000
parents 166239ec8a7b
children cc7e37b09748
files DOCS/LIRC libvo/x11_common.c
diffstat 2 files changed, 45 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- a/DOCS/LIRC	Sun Apr 15 23:05:12 2001 +0000
+++ b/DOCS/LIRC	Sun Apr 15 23:09:14 2001 +0000
@@ -29,6 +29,10 @@
  FRWND  - 60 secs back
  FWD    - skip 10 secs
  FFWD   - skip 60 secs
+ INCVOL - increase volume one percent
+ DECVOL - decrease volmue one percent
+ MASTER - use master mixer channel
+ PCM    - use pcm mixer channel
 
  Don't forget to enable the repeat flag for RWND/FWD in .lircrc. Here's an
  excerpt from my .lircrc:
--- a/libvo/x11_common.c	Sun Apr 15 23:05:12 2001 +0000
+++ b/libvo/x11_common.c	Sun Apr 15 23:09:14 2001 +0000
@@ -25,17 +25,17 @@
 
 void vo_hidecursor ( Display *disp , Window win )
 {
-	Cursor no_ptr;
-	Pixmap bm_no;
-	XColor black,dummy;
-	Colormap colormap;
-	static unsigned char bm_no_data[] = { 0,0,0,0, 0,0,0,0  };
-	
-	colormap = DefaultColormap(disp,DefaultScreen(disp));
-	XAllocNamedColor(disp,colormap,"black",&black,&dummy);	
-	bm_no = XCreateBitmapFromData(disp, win, bm_no_data, 8,8);    
-	no_ptr=XCreatePixmapCursor(disp, bm_no, bm_no,&black, &black,0, 0);									          
-	XDefineCursor(disp,win,no_ptr);
+        Cursor no_ptr;
+        Pixmap bm_no;
+        XColor black,dummy;
+        Colormap colormap;
+        static unsigned char bm_no_data[] = { 0,0,0,0, 0,0,0,0  };
+
+        colormap = DefaultColormap(disp,DefaultScreen(disp));
+        XAllocNamedColor(disp,colormap,"black",&black,&dummy);
+        bm_no = XCreateBitmapFromData(disp, win, bm_no_data, 8,8);
+        no_ptr=XCreatePixmapCursor(disp, bm_no, bm_no,&black, &black,0, 0);
+        XDefineCursor(disp,win,no_ptr);
 }
 
 
@@ -100,6 +100,10 @@
    case wsGrayMinus: mplayer_put_key('-'); break;
    case wsPlus:
    case wsGrayPlus:  mplayer_put_key('+'); break;
+   case wsGrayMul:
+   case wsMul:       mplayer_put_key('*'); break;
+   case wsGrayDiv:
+   case wsDiv:       mplayer_put_key('/'); break;
    default: if((key>='a' && key<='z')||(key>='A' && key<='Z')) mplayer_put_key(key);
   }
 
@@ -153,17 +157,17 @@
    switch( Event.type )
     {
        case Expose:
-	     ret|=VO_EVENT_EXPOSE;
+             ret|=VO_EVENT_EXPOSE;
              break;
        case ConfigureNotify:
              vo_dwidth=Event.xconfigure.width;
-	     vo_dheight=Event.xconfigure.height;
-	     ret|=VO_EVENT_RESIZE;
+             vo_dheight=Event.xconfigure.height;
+             ret|=VO_EVENT_RESIZE;
              break;
        case KeyPress:
              XLookupString( &Event.xkey,buf,sizeof(buf),&keySym,&stat );
              vo_x11_putkey( ( (keySym&0xff00) != 0?( (keySym&0x00ff) + 256 ):( keySym ) ) );
-	     ret|=VO_EVENT_KEYPRESS;
+             ret|=VO_EVENT_KEYPRESS;
              break;
     }
   }
@@ -176,20 +180,20 @@
     int nothing;
     if (dpms_disabled)
     {
-	if (DPMSQueryExtension(mDisplay, &nothing, &nothing))
-	{
-	    printf ("Enabling DPMS\n");
-	    DPMSEnable(mDisplay);  // restoring power saving settings
-	    DPMSQueryExtension(mDisplay, &nothing, &nothing);
-	}
+        if (DPMSQueryExtension(mDisplay, &nothing, &nothing))
+        {
+            printf ("Enabling DPMS\n");
+            DPMSEnable(mDisplay);  // restoring power saving settings
+            DPMSQueryExtension(mDisplay, &nothing, &nothing);
+        }
     }
-    
+
     if (timeout_save)
     {
-	int dummy, interval, prefer_blank, allow_exp;
-	XGetScreenSaver(mDisplay, &dummy, &interval, &prefer_blank, &allow_exp);
-	XSetScreenSaver(mDisplay, timeout_save, interval, prefer_blank, allow_exp);
-	XGetScreenSaver(mDisplay, &timeout_save, &interval, &prefer_blank, &allow_exp);
+        int dummy, interval, prefer_blank, allow_exp;
+        XGetScreenSaver(mDisplay, &dummy, &interval, &prefer_blank, &allow_exp);
+        XSetScreenSaver(mDisplay, timeout_save, interval, prefer_blank, allow_exp);
+        XGetScreenSaver(mDisplay, &timeout_save, &interval, &prefer_blank, &allow_exp);
     }
 
 }
@@ -200,20 +204,20 @@
 
     if (DPMSQueryExtension(mDisplay, &nothing, &nothing))
     {
-	BOOL onoff;
-	CARD16 state;
-	DPMSInfo(mDisplay, &state, &onoff);
-	if (onoff)
-	{
-	    printf ("Disabling DPMS\n");
-	    dpms_disabled=1;
-		DPMSDisable(mDisplay);  // monitor powersave off
-	}
+        BOOL onoff;
+        CARD16 state;
+        DPMSInfo(mDisplay, &state, &onoff);
+        if (onoff)
+        {
+            printf ("Disabling DPMS\n");
+            dpms_disabled=1;
+                DPMSDisable(mDisplay);  // monitor powersave off
+        }
     }
     XGetScreenSaver(mDisplay, &timeout_save, &interval, &prefer_blank, &allow_exp);
     if (timeout_save)
-	XSetScreenSaver(mDisplay, 0, interval, prefer_blank, allow_exp);
-		    // turning off screensaver
+        XSetScreenSaver(mDisplay, 0, interval, prefer_blank, allow_exp);
+                    // turning off screensaver
 }
 
 #endif