[Plib-cvs] plib/doc/pw index.html,1.1,1.2
Brought to you by:
sjbaker
From: Steve B. <sj...@us...> - 2004-02-24 01:58:10
|
Update of /cvsroot/plib/plib/doc/pw In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16914/plib/doc/pw Modified Files: index.html Log Message: Added pwOpenWindow to avoid some nasty race conditions. Index: index.html =================================================================== RCS file: /cvsroot/plib/plib/doc/pw/index.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- index.html 16 Feb 2004 02:26:27 -0000 1.1 +++ index.html 24 Feb 2004 01:52:06 -0000 1.2 @@ -36,9 +36,7 @@ library by calling either: <pre> -void pwInit ( int multisample, int num_samples, - pwKeybdFunc *kb, pwMouseFunc *ms, pwMousePosFunc *mp, - pwResizeCB *rcb = NULL, pwExitCB *ecb = NULL ) ; +void pwInit ( int multisample, int num_samples ) ; </pre> ...or: @@ -46,9 +44,7 @@ void pwInit ( int x, int y, int w, int h, int multisample, - char *title, int border, int num_samples, - pwKeybdFunc *kb, pwMouseFunc *ms, pwMousePosFunc *mp, - pwResizeCB *rcb = NULL, pwExitCB *ecb = NULL ) ; + char *title, int border, int num_samples ) ; </pre> The first version creates a full-screen window with no borders, @@ -65,7 +61,16 @@ system cannot produce the number of samples requested, pwInit will fall back to the best it can do. <p> -The final five parameters are callback functions for (repectively) +Then, initialise other PLIB components such as PUI. When initialisation +is complete, call this function: +<pre> + +void pwOpenWindow ( pwKeybdFunc *kb = NULL, pwMouseFunc *ms = NULL, + pwMousePosFunc *mp = NULL, pwResizeCB *rcb = NULL, + pwExitCB *ecb = NULL ) ; + +</pre> +These parameters are callback functions for (repectively) incoming keyboard keystrokes, incoming mouse button press or release events, mouse movements, window resize events and finally, a window close callback. (That's invoked by PW when the user attempts @@ -73,6 +78,11 @@ PW also calls the exit function when it detects a fatal error that occurs after the window has been successfully opened. <p> +Your application has to be prepared for these callbacks to be invoked +at any time after pwOpenWindow. PW doesn't guarantee that the window +won't be opened before pwOpenWindow - but the window will certainly +be opened after it returns. +<p> The specifications of these various callbacks are: <pre> |