[Plib-cvs] plib/src/pw pw.h,1.6,1.7 pwMacOSX.cxx,1.6,1.7 pwWindows.cxx,1.9,1.10 pwX11.cxx,1.6,1.7
Brought to you by:
sjbaker
From: Steve B. <sj...@us...> - 2004-04-06 23:58:12
|
Update of /cvsroot/plib/plib/src/pw In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14232/plib/src/pw Modified Files: pw.h pwMacOSX.cxx pwWindows.cxx pwX11.cxx Log Message: Added autorepeat function to PW for X11 and MacOSX. Added a dummy function for Windows until someone gets around to writing it. Index: pw.h =================================================================== RCS file: /cvsroot/plib/plib/src/pw/pw.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- pw.h 6 Apr 2004 12:53:16 -0000 1.6 +++ pw.h 6 Apr 2004 23:45:19 -0000 1.7 @@ -53,6 +53,7 @@ void pwSetOrigin ( int w, int h ) ; void pwSetCursor ( int c ) ; void pwCleanup () ; +void pwSetAutoRepeatKey ( bool enable ) ; #define PW_CURSOR_NONE 0 #define PW_CURSOR_RIGHT 1 Index: pwMacOSX.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/pw/pwMacOSX.cxx,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- pwMacOSX.cxx 24 Mar 2004 01:30:41 -0000 1.6 +++ pwMacOSX.cxx 6 Apr 2004 23:45:19 -0000 1.7 @@ -22,31 +22,62 @@ $Id$ */ -/* - * - with Mac OS 8.6 to 9.2: - * - must be linked with the following libraries: - * InterfaceLib, accessors.o, AppearanceLib and OpenGL (it contains agl) - * - * - ACTIVE_SLEEPTIME must be defined to 0 for the fastest execution; - * but it will not let other app to get events. - * [...858 lines suppressed...] +#ifdef UL_MACINTOSH + if (full_screen) + { + if (dspContext != NULL) + { + //DSpContext_FadeGammaOut (NULL, NULL); // remove for debug + DSpContext_SetState (dspContext, kDSpContextState_Inactive); + //DSpContext_FadeGammaIn (NULL, NULL); + DSpContext_Release (dspContext); + } + + DSpShutdown (); + } #endif + pwInitialized = false; +} + +#endif Index: pwWindows.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/pw/pwWindows.cxx,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- pwWindows.cxx 26 Mar 2004 17:45:40 -0000 1.9 +++ pwWindows.cxx 6 Apr 2004 23:45:19 -0000 1.10 @@ -183,6 +183,12 @@ } +void pwSetAutoRepeatKey ( bool enable ) +{ + fprintf(stderr,"pwSetAutoRepeatKey is not yet functional under Windows.\n" ) ; +} + + void pwSetCallbacks ( pwKeybdFunc *kb, pwMouseFunc *ms, pwMousePosFunc *mp, pwResizeCB *rcb, pwExitCB *ecb ) { Index: pwX11.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/pw/pwX11.cxx,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- pwX11.cxx 20 Mar 2004 02:21:18 -0000 1.6 +++ pwX11.cxx 6 Apr 2004 23:45:19 -0000 1.7 @@ -96,6 +96,13 @@ static Window rootWindow ; static Atom delWinAtom ; +static bool autoRepeat = false ; + +void pwSetAutoRepeatKey ( bool enable ) +{ + autoRepeat = enable ; +} + struct PixelFormat { @@ -535,7 +542,7 @@ and not repeating. */ - if ( repeating ) + if ( ! autoRepeat && repeating ) break ; XComposeStatus composeStatus ; |