]>
Commit | Line | Data |
---|---|---|
1c79356b A |
1 | /* |
2 | * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
43866e37 | 6 | * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. |
1c79356b | 7 | * |
43866e37 A |
8 | * This file contains Original Code and/or Modifications of Original Code |
9 | * as defined in and that are subject to the Apple Public Source License | |
10 | * Version 2.0 (the 'License'). You may not use this file except in | |
11 | * compliance with the License. Please obtain a copy of the License at | |
12 | * http://www.opensource.apple.com/apsl/ and read it before using this | |
13 | * file. | |
14 | * | |
15 | * The Original Code and all software distributed under the License are | |
16 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
1c79356b A |
17 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
18 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
43866e37 A |
19 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. |
20 | * Please see the License for the specific language governing rights and | |
21 | * limitations under the License. | |
1c79356b A |
22 | * |
23 | * @APPLE_LICENSE_HEADER_END@ | |
24 | */ | |
25 | /****************************************************************************** | |
26 | event_status_driver.h | |
27 | API for the events status driver. | |
28 | This file contains public API. | |
29 | mpaque 11Oct91 | |
30 | ||
31 | Copyright 1991 NeXT Computer, Inc. | |
32 | ||
33 | Modified: | |
34 | ||
35 | ******************************************************************************/ | |
36 | ||
37 | #ifndef _DRIVERS_EVENT_STATUS_DRIVER_ | |
38 | #define _DRIVERS_EVENT_STATUS_DRIVER_ | |
39 | ||
40 | #ifdef __cplusplus | |
41 | extern "C" { | |
42 | #endif | |
43 | ||
44 | #include <mach/port.h> | |
45 | #include <IOKit/hidsystem/IOLLEvent.h> | |
46 | #include <IOKit/hidsystem/IOHIDTypes.h> | |
47 | ||
48 | ||
49 | /* | |
50 | * Event System Handle: | |
51 | * | |
52 | * Information used by the system between calls to NXOpenEventSystem and | |
53 | * NXCloseEventSystem. The application should not | |
54 | * access any of the elements of this structure. | |
55 | */ | |
56 | typedef mach_port_t NXEventHandle; | |
57 | ||
58 | /* Open and Close */ | |
59 | NXEventHandle NXOpenEventStatus(void); | |
60 | void NXCloseEventStatus(NXEventHandle handle); | |
61 | ||
62 | /* Status */ | |
63 | extern NXEventSystemInfoType NXEventSystemInfo(NXEventHandle handle, | |
64 | char *flavor, | |
65 | int *evs_info, | |
66 | unsigned int *evs_info_cnt); | |
67 | /* Keyboard */ | |
68 | extern void NXSetKeyRepeatInterval(NXEventHandle handle, double seconds); | |
69 | extern double NXKeyRepeatInterval(NXEventHandle handle); | |
70 | extern void NXSetKeyRepeatThreshold(NXEventHandle handle, double threshold); | |
71 | extern double NXKeyRepeatThreshold(NXEventHandle handle); | |
72 | extern NXKeyMapping *NXSetKeyMapping(NXEventHandle h, NXKeyMapping *keymap); | |
73 | extern int NXKeyMappingLength(NXEventHandle handle); | |
74 | extern NXKeyMapping *NXGetKeyMapping(NXEventHandle h, NXKeyMapping *keymap); | |
75 | extern void NXResetKeyboard(NXEventHandle handle); | |
76 | ||
77 | /* Mouse */ | |
78 | extern void NXSetClickTime(NXEventHandle handle, double seconds); | |
79 | extern double NXClickTime(NXEventHandle handle); | |
80 | extern void NXSetClickSpace(NXEventHandle handle, _NXSize_ *area); | |
81 | extern void NXGetClickSpace(NXEventHandle handle, _NXSize_ *area); | |
82 | extern void NXSetMouseScaling(NXEventHandle handle, NXMouseScaling *scaling); | |
83 | extern void NXGetMouseScaling(NXEventHandle handle, NXMouseScaling *scaling); | |
84 | #ifdef _undef | |
85 | extern void NXEnableMouseButton(NXEventHandle handle, NXMouseButton button); | |
86 | extern NXMouseButton NXMouseButtonEnabled(NXEventHandle handle); | |
87 | #endif | |
88 | extern void NXResetMouse(NXEventHandle handle); | |
89 | ||
90 | /* Screen Brightness and Auto-dimming */ | |
91 | ||
92 | extern void NXSetAutoDimThreshold(NXEventHandle handle, double seconds); | |
93 | extern double NXAutoDimThreshold(NXEventHandle handle); | |
94 | extern double NXAutoDimTime(NXEventHandle handle); | |
95 | extern double NXIdleTime(NXEventHandle handle); | |
96 | extern void NXSetAutoDimState(NXEventHandle handle, boolean_t dimmed); | |
97 | extern boolean_t NXAutoDimState(NXEventHandle handle); | |
98 | extern void NXSetAutoDimBrightness(NXEventHandle handle, double level); | |
99 | extern double NXAutoDimBrightness(NXEventHandle handle); | |
100 | extern void NXSetScreenBrightness(NXEventHandle handle, double level); | |
101 | extern double NXScreenBrightness(NXEventHandle handle); | |
102 | ||
103 | /* Speaker Volume */ | |
104 | #ifdef _undef | |
105 | extern void NXSetCurrentVolume(NXEventHandle handle, double volume); | |
106 | extern double NXCurrentVolume(NXEventHandle handle); | |
107 | #endif | |
108 | ||
109 | /* Wait Cursor */ | |
110 | #ifdef _undef | |
111 | extern void NXSetWaitCursorThreshold(NXEventHandle handle, double seconds); | |
112 | extern double NXWaitCursorThreshold(NXEventHandle handle); | |
113 | extern void NXSetWaitCursorSustain(NXEventHandle handle, double seconds); | |
114 | extern double NXWaitCursorSustain(NXEventHandle handle); | |
115 | extern void NXSetWaitCursorFrameInterval(NXEventHandle handle, double seconds); | |
116 | extern double NXWaitCursorFrameInterval(NXEventHandle handle); | |
117 | #endif | |
118 | ||
119 | /* | |
120 | * Generic calls. Argument values are device and architecture dependent. | |
121 | * This API is provided for the convenience of special device users. Code | |
122 | * which is intended to be portable across multiple platforms and architectures | |
123 | * should not use the following functions. | |
124 | */ | |
125 | #ifdef _undef | |
126 | extern int NXEvSetParameterInt(NXEventHandle handle, | |
127 | char *parameterName, | |
128 | unsigned int *parameterArray, | |
129 | unsigned int count); | |
130 | ||
131 | extern int NXEvSetParameterChar(NXEventHandle handle, | |
132 | char *parameterName, | |
133 | unsigned char *parameterArray, | |
134 | unsigned int count); | |
135 | ||
136 | extern int NXEvGetParameterInt(NXEventHandle handle, | |
137 | char *parameterName, | |
138 | unsigned int maxCount, | |
139 | unsigned int *parameterArray, | |
140 | unsigned int *returnedCount); | |
141 | ||
142 | extern int NXEvGetParameterChar(NXEventHandle handle, | |
143 | char *parameterName, | |
144 | unsigned int maxCount, | |
145 | unsigned char *parameterArray, | |
146 | unsigned int *returnedCount); | |
147 | #endif | |
148 | ||
149 | #ifdef __cplusplus | |
150 | } /* extern "C" */ | |
151 | #endif | |
152 | ||
153 | #endif /*_DRIVERS_EVENT_STATUS_DRIVER_ */ | |
154 |