From: George H. <geo...@us...> - 2006-05-26 12:42:48
|
Update of /cvsroot/win32forth/win32forth/doc In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv5303/win32forth/doc Modified Files: p-callback.htm Log Message: gah: Added extra documentation Index: p-callback.htm =================================================================== RCS file: /cvsroot/win32forth/win32forth/doc/p-callback.htm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** p-callback.htm 25 May 2006 09:22:35 -0000 1.1 --- p-callback.htm 26 May 2006 12:42:38 -0000 1.2 *************** *** 17,25 **** width="32" height="32"> Win32Forth</h1> <hr /><h1>Windows Callback support ! </h1><hr /><h2>Glossary </h2><pre><b><a name="0">: __STDCALL ( -- ) \ w32f sys </a></b></pre><p>Turn on stdcall type callback (the default). </p><pre><b><a name="1">: __CDECL ( -- ) \ w32f sys ! </a></b></pre><p>Turn on __cdecl type callback. </p><pre><b><a name="2">: CALLBACK ( n1 -<name function>- ) \ w32f sys </a></b></pre><p>Define a callback with "name" that has n1 arguments. --- 17,32 ---- width="32" height="32"> Win32Forth</h1> <hr /><h1>Windows Callback support ! </h1><hr /><p>The Windows operating system DLLs often needs application defined callbacks to be ! supplied for certain jobs. Since it is written in C then it assumes the callback only ! needs a single stack to work with, so Win32Forth must wrap a Forth word to allocate a ! second stack and transfer the input arguments to it. It also sets up other registers ! for Forth, including the USER pointer for the calling Task (Versions of Win32Forth prior ! to V6.06.xx always used the CONUSER pointer for this so callbacks were restricted to the ! main (console) task only). It is important to remember a normal xt will not work as a callback. ! </p><h2>Glossary </h2><pre><b><a name="0">: __STDCALL ( -- ) \ w32f sys </a></b></pre><p>Turn on stdcall type callback (the default). </p><pre><b><a name="1">: __CDECL ( -- ) \ w32f sys ! </a></b></pre><p>Turn on __cdecl type callback for the next callback only. </p><pre><b><a name="2">: CALLBACK ( n1 -<name function>- ) \ w32f sys </a></b></pre><p>Define a callback with "name" that has n1 arguments. *************** *** 92,98 **** </h2>********************************************************************** <pre><b><a name="5">: HandleMessages { pMsg -- 0 } ! </a></b></pre><p>This is the callback which handles the messages send by windows to our Application. The chain MSG-CHAIN receives all messages. ! </p><p>This callback is called by the console window and by WINPAUSE. </p>********************************************************************** <h2>Allow Forth to send messages to itself. --- 99,105 ---- </h2>********************************************************************** <pre><b><a name="5">: HandleMessages { pMsg -- 0 } ! </a></b></pre><p>This is the word which handles the messages send by windows to our Application. The chain MSG-CHAIN receives all messages. ! </p><p>This word is called by WINPAUSE, and is also used as a callback by the console. </p>********************************************************************** <h2>Allow Forth to send messages to itself. |