]> git.sur5r.net Git - cc65/blob - include/pen.h
un-remove TABs in doc/using-make.sgml
[cc65] / include / pen.h
1 /*****************************************************************************/
2 /*                                                                           */
3 /*                                   pen.h                                   */
4 /*                                                                           */
5 /*                               Lightpen API                                */
6 /*                                                                           */
7 /*                                                                           */
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.                                    */
11 /*                                                                           */
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:                            */
15 /*                                                                           */
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              */
23 /*    distribution.                                                          */
24 /*                                                                           */
25 /*****************************************************************************/
26
27
28
29 #ifndef _PEN_H
30 #define _PEN_H
31
32
33
34 /*****************************************************************************/
35 /*                               Declarations                                */
36 /*****************************************************************************/
37
38
39
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.
44 */
45 extern void __fastcall__ (*pen_adjuster) (unsigned char *pValue);
46
47
48
49 /*****************************************************************************/
50 /*                                 Functions                                 */
51 /*****************************************************************************/
52
53
54
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.
58 */
59
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.
70 */
71
72
73
74 /* End of pen.h */
75 #endif
76
77
78