[Mplayer-cvslog] CVS: main/libvo x11_common.c,1.10,1.11
Zoltan Ponekker
pontscho at users.sourceforge.net
Mon Apr 16 01:09:16 CEST 2001
Update of /cvsroot/mplayer/main/libvo
In directory usw-pr-cvs1:/tmp/cvs-serv24831/libvo
Modified Files:
x11_common.c
Log Message:
add mixer keys
Index: x11_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** x11_common.c 2001/04/15 20:31:58 1.10
--- x11_common.c 2001/04/15 23:09:14 1.11
***************
*** 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);
}
--- 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);
}
***************
*** 101,104 ****
--- 101,108 ----
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;
}
--- 158,172 ----
{
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;
}
***************
*** 177,194 ****
if (dpms_disabled)
{
! if (DPMSQueryExtension(mDisplay, ¬hing, ¬hing))
! {
! printf ("Enabling DPMS\n");
! DPMSEnable(mDisplay); // restoring power saving settings
! DPMSQueryExtension(mDisplay, ¬hing, ¬hing);
! }
}
!
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);
}
--- 181,198 ----
if (dpms_disabled)
{
! if (DPMSQueryExtension(mDisplay, ¬hing, ¬hing))
! {
! printf ("Enabling DPMS\n");
! DPMSEnable(mDisplay); // restoring power saving settings
! DPMSQueryExtension(mDisplay, ¬hing, ¬hing);
! }
}
!
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,218 ****
if (DPMSQueryExtension(mDisplay, ¬hing, ¬hing))
{
! 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
}
--- 205,222 ----
if (DPMSQueryExtension(mDisplay, ¬hing, ¬hing))
{
! 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