home *** CD-ROM | disk | FTP | other *** search
- /*
- File: KeyboardPlugin.h
-
- Contains: Required interface for Keyboard Family-Plugins
-
- Version: Technology:
- Release: Universal Interfaces 3.0d3 on Copland DR1
-
- Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
-
- Bugs?: If you find a problem with this file, send the file and version
- information (from above) and the problem description to:
-
- Internet: apple.bugs@applelink.apple.com
- AppleLink: APPLE.BUGS
-
- */
- #ifndef __KEYBOARDPLUGIN__
- #define __KEYBOARDPLUGIN__
-
- #ifndef __TYPES__
- #include <Types.h>
- #endif
- #ifndef __KEYBOARD__
- #include <Keyboard.h>
- #endif
- #ifndef __NAMEREGISTRY__
- #include <NameRegistry.h>
- #endif
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import on
- #endif
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=mac68k
- #endif
-
- #if FOR_SYSTEM8_PREEMPTIVE
- /*
- ####################################################################################
- Constructor/Destructor Messages
- ####################################################################################
- */
- typedef OSStatus (*KeyboardPluginInitPtr)(KeyboardID theID, KeyboardDeviceRecord *theDeviceRecord, const RegEntryRef *theRegEntryRef);
- /* normal termination*/
- typedef OSStatus (*KeyboardPluginFreePtr)(void );
- /* error condition termination*/
- typedef OSStatus (*KeyboardPluginEjectPtr)(void );
- /*
- ####################################################################################
- Control Messages
- ####################################################################################
- */
- typedef OSStatus (*KeyboardPluginStartI0Ptr)(void );
- typedef OSStatus (*KeyboardPluginHaltIOPtr)(void );
- /*
- ####################################################################################
- Functional Messages
- ####################################################################################
- */
- typedef OSStatus (*KeyboardPluginValidateHardwarePtr)(void);
- typedef OSStatus (*KeyboardPluginGetModifierKeyStatePtr)(KeyboardModifiers *modifiers);
- typedef OSStatus (*KeyboardPluginLEDStatusPtr)(KeyboardLEDSelector which, KeyboardLEDState *state);
- typedef OSStatus (*KeyboardPluginSetLEDPtr)(KeyboardLEDSelector which, KeyboardLEDState state);
- typedef OSStatus (*KeyboardPluginGetNextKeyPtr)(LowLevelKeyEvent *next);
- typedef OSStatus (*KeyboardPluginGetDeviceModePtr)(KeyboardDeviceMode *theMode);
- typedef OSStatus (*KeyboardPluginSetDeviceModePtr)(KeyboardDeviceMode theMode);
- /*
- ####################################################################################
- Dispatch Table Definition
- ####################################################################################
- */
-
- enum {
- kKeyboardPluginDispatchTableVersion1 = 0x0001,
- kKeyboardPluginDispatchTableCurrentVersion = kKeyboardPluginDispatchTableVersion1
- };
-
- struct KeyboardPluginDispatchTable {
-
- short version;
- KeyboardPluginInitPtr PlugInInit;
- KeyboardPluginFreePtr PlugInFree;
- KeyboardPluginEjectPtr PlugInEject;
-
- KeyboardPluginStartI0Ptr PlugInStartIO;
- KeyboardPluginHaltIOPtr PlugInHaltIO;
-
- KeyboardPluginValidateHardwarePtr PlugInValidateHardware;
- KeyboardPluginGetModifierKeyStatePtr PlugInGetModifierKeyState;
- KeyboardPluginLEDStatusPtr PlugInLEDStatus;
- KeyboardPluginSetLEDPtr PlugInSetLED;
- KeyboardPluginGetNextKeyPtr PlugInGetNextKey;
- KeyboardPluginGetDeviceModePtr PlugInGetDeviceMode;
- KeyboardPluginSetDeviceModePtr PlugInSetDeviceMode;
- };
- typedef struct KeyboardPluginDispatchTable KeyboardPluginDispatchTable;
-
- #endif
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=reset
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import off
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __KEYBOARDPLUGIN__ */
-
-