aboutsummaryrefslogtreecommitdiff
path: root/SrcShared/Palm/Platform/Incs/Core/System/PenMgr.h
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbarenblat@gmail.com>2021-11-23 23:13:26 -0500
committerGravatar Benjamin Barenblat <bbarenblat@gmail.com>2021-11-23 23:13:26 -0500
commite5df1aafb6d1346207343ccb858fa373e6b86301 (patch)
treefb26f0091dda7dd69d48d6b06169ea618332b99e /SrcShared/Palm/Platform/Incs/Core/System/PenMgr.h
Palm OS Emulator v3.5HEADmain
Check in the Palm OS Emulator, version 3.5 (2001). These files come from the tarball present in the Debian archives [1]. The SHA-256 digest of the tarball, c5e0d23424e88525bfba0ecdf0a432a8d93c885d04740df06a9eeee44e5f25e4, matches the digest preserved in the FreeBSD ports tree [2], giving further confidence that these files are as distributed by upstream. [1] http://archive.debian.org/debian/pool/contrib/p/pose/ [2] https://svnweb.freebsd.org/ports/head/palm/pose/distinfo?revision=271305&view=markup&pathrev=282162
Diffstat (limited to 'SrcShared/Palm/Platform/Incs/Core/System/PenMgr.h')
-rw-r--r--SrcShared/Palm/Platform/Incs/Core/System/PenMgr.h98
1 files changed, 98 insertions, 0 deletions
diff --git a/SrcShared/Palm/Platform/Incs/Core/System/PenMgr.h b/SrcShared/Palm/Platform/Incs/Core/System/PenMgr.h
new file mode 100644
index 0000000..538c9ac
--- /dev/null
+++ b/SrcShared/Palm/Platform/Incs/Core/System/PenMgr.h
@@ -0,0 +1,98 @@
+/******************************************************************************
+ *
+ * Copyright (c) 1994-1999 Palm Computing, Inc. or its subsidiaries.
+ * All rights reserved.
+ *
+ * File: PenMgr.h
+ *
+ * Description:
+ * Include file for Pen manager
+ *
+ * History:
+ * 6/5/96 Created by Ron Marianetti
+ *
+ *****************************************************************************/
+
+#ifndef __PEN_MGR_H
+#define __PEN_MGR_H
+
+// Pilot common definitions
+#include <PalmTypes.h>
+#include <CoreTraps.h>
+#include <ErrorBase.h>
+#include <Rect.h>
+
+
+/********************************************************************
+ * Pen Manager Errors
+ * the constant serErrorClass is defined in ErrorBase.h
+ ********************************************************************/
+#define penErrBadParam (penErrorClass | 1)
+#define penErrIgnorePoint (penErrorClass | 2)
+
+
+
+/********************************************************************
+ * Pen manager Routines
+ ********************************************************************/
+#ifdef REMOVE_FOR_EMULATOR
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+// Initializes the Pen Manager
+Err PenOpen(void)
+ SYS_TRAP(sysTrapPenOpen);
+
+// Closes the Pen Manager and frees whatever memory it allocated
+Err PenClose(void)
+ SYS_TRAP(sysTrapPenClose);
+
+
+// Put pen to sleep
+Err PenSleep(void)
+ SYS_TRAP(sysTrapPenSleep);
+
+// Wake pen
+Err PenWake(void)
+ SYS_TRAP(sysTrapPenWake);
+
+
+// Get the raw pen coordinates from the hardware.
+Err PenGetRawPen(PointType *penP)
+ SYS_TRAP(sysTrapPenGetRawPen);
+
+// Reset calibration in preparation for setting it again
+Err PenResetCalibration (void)
+ SYS_TRAP(sysTrapPenResetCalibration);
+
+// Set calibration settings for the pen
+Err PenCalibrate (PointType *digTopLeftP, PointType *digBotRightP,
+ PointType *scrTopLeftP, PointType *scrBotRightP)
+ SYS_TRAP(sysTrapPenCalibrate);
+
+// Scale a raw pen coordinate into screen coordinates
+Err PenRawToScreen(PointType *penP)
+ SYS_TRAP(sysTrapPenRawToScreen);
+
+// Scale a screen pen coordinate back into a raw coordinate
+Err PenScreenToRaw(PointType *penP)
+ SYS_TRAP(sysTrapPenScreenToRaw);
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+
+/************************************************************
+ * Assembly Function Prototypes
+ *************************************************************/
+#define _PenGetRawPen \
+ ASM_SYS_TRAP(sysTrapPenGetRawPen)
+
+
+
+#endif //__PEN_MGR_H