summaryrefslogtreecommitdiff
path: root/fpcsrc/packages/palmunits/src/penmgr.pp
blob: 2ce5273c47eb9dbd931e023067c038d12825b83d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{$MACRO ON}

(******************************************************************************
 *
 * Copyright (c) 1994-2000 Palm, Inc. or its subsidiaries.
 * All rights reserved.
 *
 * File: PenMgr.h
 *
 * Release: Palm OS SDK 4.0 (63220)
 *
 * Description:
 *    Include file for Pen manager
 *
 * History:
 *    6/5/96 Created by Ron Marianetti
 *
 *****************************************************************************)

unit penmgr;

interface

uses palmos, coretraps, rect, errorbase;

(********************************************************************
 * Pen Manager Errors
 * the constant serErrorClass is defined in ErrorBase.h
 ********************************************************************)

const
  penErrBadParam    = penErrorClass or 1;
  penErrIgnorePoint = penErrorClass or 2;

(********************************************************************
 * Pen manager Routines
 ********************************************************************)

// Initializes the Pen Manager
function PenOpen: Err; syscall sysTrapPenOpen;

// Closes the Pen Manager and frees whatever memory it allocated
function PenClose: Err; syscall sysTrapPenClose;


// Put pen to sleep
function PenSleep: Err; syscall sysTrapPenSleep;

// Wake pen
function PenWake: Err; syscall sysTrapPenWake;


// Get the raw pen coordinates from the hardware.
function PenGetRawPen(var penP: PointType): Err; syscall sysTrapPenGetRawPen;

// Reset calibration in preparation for setting it again
function PenResetCalibration: Err; syscall sysTrapPenResetCalibration;

// Set calibration settings for the pen
function PenCalibrate(var digTopLeftP, digBotRightP, scrTopLeftP, scrBotRightP: PointType): Err; syscall sysTrapPenCalibrate;

// Scale a raw pen coordinate into screen coordinates
function PenRawToScreen(var penP: PointType): Err; syscall sysTrapPenRawToScreen;

// Scale a screen pen coordinate back into a raw coordinate
function PenScreenToRaw(var penP: PointType): Err; syscall sysTrapPenScreenToRaw;

(************************************************************
 * Assembly Function Prototypes
 *************************************************************)

// _PenGetRawPen ASM_SYS_TRAP(sysTrapPenGetRawPen)

implementation

end.