[Mplayer-cvslog] CVS: main/libvo wskeys.h,1.1.1.1,1.2 x11_common.c,1.8,1.9

Berczi Gabor gabucino at users.sourceforge.net
Sun Apr 15 20:35:19 CEST 2001


Update of /cvsroot/mplayer/main/libvo
In directory usw-pr-cvs1:/tmp/cvs-serv9181/libvo

Modified Files:
	wskeys.h x11_common.c 
Log Message:

Pontscho's mixer, select, and hell-a-lot-of-stuff patch ;)


Index: wskeys.h
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/wskeys.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** wskeys.h	2001/02/24 20:30:05	1.1.1.1
--- wskeys.h	2001/04/15 18:35:17	1.2
***************
*** 61,64 ****
--- 61,66 ----
  #define wsMinus '-'
  #define wsPlus  '+'
+ #define wsMul   '*'
+ #define wsDiv   '/'
  
  #define wsUp            0x52 + 256

Index: x11_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** x11_common.c	2001/04/14 21:12:41	1.8
--- x11_common.c	2001/04/15 18:35:17	1.9
***************
*** 1,16 ****
- 
  #include <stdio.h>
  #include <stdlib.h>
- 
- #include "config.h"
- 
- #ifdef X11_FULLSCREEN
- 
  #include <string.h>
  #include <unistd.h>
  #include <sys/mman.h>
  
  #include "video_out.h"
  
  #include <X11/Xmd.h>
  #include <X11/Xlib.h>
--- 1,14 ----
  #include <stdio.h>
  #include <stdlib.h>
  #include <string.h>
+ 
  #include <unistd.h>
  #include <sys/mman.h>
  
+ #include "config.h"
  #include "video_out.h"
  
+ #ifdef X11_FULLSCREEN
+ 
  #include <X11/Xmd.h>
  #include <X11/Xlib.h>
***************
*** 18,23 ****
  #include <X11/Xatom.h>
  
- #include <X11/extensions/dpms.h>
- 
  static int dpms_disabled=0;
  static int timeout_save=0;
--- 16,19 ----
***************
*** 26,40 ****
  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);
  }
  
--- 22,36 ----
  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);
  }
  
***************
*** 101,104 ****
--- 97,104 ----
     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);
    }
***************
*** 154,168 ****
      {
         case Expose:
! 	     ret|=VO_EVENT_EXPOSE;
               break;
         case ConfigureNotify:
               vo_dwidth=Event.xconfigure.width;
! 	     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;
               break;
      }
--- 154,168 ----
      {
         case Expose:
!              ret|=VO_EVENT_EXPOSE;
               break;
         case ConfigureNotify:
               vo_dwidth=Event.xconfigure.width;
!              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;
               break;
      }
***************
*** 172,175 ****
--- 172,177 ----
  }
  
+ #endif
+ 
  void saver_on(Display *mDisplay) {
  
***************
*** 177,194 ****
      if (dpms_disabled)
      {
! 	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);
      }
  
--- 179,196 ----
      if (dpms_disabled)
      {
!         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);
      }
  
***************
*** 201,219 ****
      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
! 	}
      }
      XGetScreenSaver(mDisplay, &timeout_save, &interval, &prefer_blank, &allow_exp);
      if (timeout_save)
! 	XSetScreenSaver(mDisplay, 0, interval, prefer_blank, allow_exp);
! 		    // turning off screensaver
  }
- 
- #endif
--- 203,219 ----
      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
!         }
      }
      XGetScreenSaver(mDisplay, &timeout_save, &interval, &prefer_blank, &allow_exp);
      if (timeout_save)
!         XSetScreenSaver(mDisplay, 0, interval, prefer_blank, allow_exp);
!                     // turning off screensaver
  }


_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog



More information about the MPlayer-cvslog mailing list