[Plib-cvs] plib/src/pui puPW.h,NONE,1.1 Makefile.am,1.20,1.21 pu.h,1.143,1.144
Brought to you by:
sjbaker
From: Steve B. <sj...@us...> - 2004-02-17 01:51:50
|
Update of /cvsroot/plib/plib/src/pui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26747/plib/src/pui Modified Files: Makefile.am pu.h Added Files: puPW.h Log Message: Added support for PW into PUI - and provided a demo of it working! --- NEW FILE: puPW.h --- /* PLIB - A Suite of Portable Game Libraries Copyright (C) 1998,2002 Steve Baker This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA For further information visit http://plib.sourceforge.net $Id: puPW.h,v 1.1 2004/02/17 01:43:21 sjbaker Exp $ */ #ifndef _PU_PW_H_ #define _PU_PW_H_ #include "pu.h" #define PUPW_WINDOW_MAGIC 0x3DEB4938 /* Random! */ inline int puGetWindowPW() { return PUPW_WINDOW_MAGIC ; } inline void puSetWindowPW ( int window ) { // Not possible because PW is a single-window library. // But we can at least check that the handle matches. assert ( window == PUPW_WINDOW_MAGIC ) ; } inline void puGetWindowSizePW ( int *width, int *height ) { pwGetSize ( width, height ) ; } inline void puSetWindowSizePW ( int width, int height ) { pwSetSize ( width, height ) ; } inline void puInitPW () { puSetWindowFuncs ( puGetWindowPW, puSetWindowPW, puGetWindowSizePW, puSetWindowSizePW ) ; puRealInit () ; } #endif Index: Makefile.am =================================================================== RCS file: /cvsroot/plib/plib/src/pui/Makefile.am,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- Makefile.am 16 Feb 2004 13:49:02 -0000 1.20 +++ Makefile.am 17 Feb 2004 01:43:21 -0000 1.21 @@ -2,7 +2,7 @@ lib_LIBRARIES = libplibpu.a -include_HEADERS = pu.h puGLUT.h puFLTK.h puSDL.h puNative.h +include_HEADERS = pu.h puGLUT.h puFLTK.h puSDL.h puNative.h puPW.h libplibpu_a_SOURCES = \ pu.cxx puBox.cxx puButton.cxx puButtonBox.cxx \ Index: pu.h =================================================================== RCS file: /cvsroot/plib/plib/src/pui/pu.h,v retrieving revision 1.143 retrieving revision 1.144 diff -u -d -r1.143 -r1.144 --- pu.h 16 Feb 2004 13:49:03 -0000 1.143 +++ pu.h 17 Feb 2004 01:43:21 -0000 1.144 @@ -2024,7 +2024,7 @@ * Window System Integration * ------------------------- * - * PUI has direct support for GLUT, FLTK, SDL and GTK. All code is provided + * PUI has direct support for GLUT, PW, FLTK, SDL and GTK. All code is provided * inline, making PUI itself independent. There are several ways to choose * implementation, for instance: * @@ -2062,13 +2062,16 @@ // Choose implementation #if !defined(PU_USE_GLUT) && \ + !defined(PU_USE_PW) && \ !defined(PU_USE_FLTK) && \ !defined(PU_USE_SDL) && \ !defined(PU_USE_NATIVE) && \ !defined(PU_USE_NONE) // Nothing selected. Try to figure out which one to use. -#if defined(FL_MAJOR_VERSION) +#if defined(PW_IS_PRESENT) +# define PU_USE_PW +#elif defined(FL_MAJOR_VERSION) # define PU_USE_FLTK #elif defined(SDL_MAJOR_VERSION) # define PU_USE_SDL @@ -2084,6 +2087,9 @@ #if defined(PU_USE_GLUT) # include "puGLUT.h" # define puInit puInitGLUT +#elif defined(PU_USE_PW) +# include "puPW.h" +# define puInit puInitPW #elif defined(PU_USE_FLTK) # include "puFLTK.h" # define puInit puInitFLTK |