1 /*****************************************************************************/
8 /* This software is provided "as-is", without any expressed or implied */
9 /* warranty. In no event will the authors be held liable for any damages */
10 /* arising from the use of this software. */
12 /* Permission is granted to anyone to use this software for any purpose, */
13 /* including commercial applications, and to alter it and redistribute it */
14 /* freely, subject to the following restrictions: */
16 /* 1. The origin of this software must not be misrepresented; you must not */
17 /* claim that you wrote the original software. If you use this software */
18 /* in a product, an acknowledgment in the product documentation would be */
19 /* appreciated, but is not required. */
20 /* 2. Altered source versions must be marked plainly as such; and, must not */
21 /* be misrepresented as being the original software. */
22 /* 3. This notice may not be removed or altered from any source */
25 /*****************************************************************************/
34 /*****************************************************************************/
36 /*****************************************************************************/
40 /* A program optionally can set this pointer to a function that gives
41 ** a calibration value to a driver. If this pointer isn't NULL,
42 ** then a driver that wants a value can call that function.
43 ** pen_adjuster must be set before the driver is installed.
45 extern void __fastcall__ (*pen_adjuster) (unsigned char *pValue);
49 /*****************************************************************************/
51 /*****************************************************************************/
55 void __fastcall__ pen_calibrate (unsigned char *XOffset);
56 /* Ask the user to help to calibrate a lightpen. Changes the screen!
57 ** A pointer to this function can be put into pen_adjuster.
60 void __fastcall__ pen_adjust (const char *filename);
61 /* Get a lightpen calibration value from a file if it exists. Otherwise, call
62 ** pen_calibrate() to create a value; then, write it into a file, so that it
63 ** will be available at the next time that the lightpen is used.
64 ** Might change the screen.
65 ** pen_adjust() is optional; if you want to use its feature,
66 ** then it must be called before a driver is installed.
67 ** Note: This function merely saves the file-name pointer, and sets
68 ** the pen_adjuster pointer. The file will be read only when a driver
69 ** is installed, and only if that driver wants to be calibrated.