]> git.saurik.com Git - apple/xnu.git/blame - iokit/include/drivers/event_status_driver.h
xnu-344.49.tar.gz
[apple/xnu.git] / iokit / include / drivers / event_status_driver.h
CommitLineData
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
41extern "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 */
56typedef mach_port_t NXEventHandle;
57
58/* Open and Close */
59NXEventHandle NXOpenEventStatus(void);
60void NXCloseEventStatus(NXEventHandle handle);
61
62/* Status */
63extern NXEventSystemInfoType NXEventSystemInfo(NXEventHandle handle,
64 char *flavor,
65 int *evs_info,
66 unsigned int *evs_info_cnt);
67/* Keyboard */
68extern void NXSetKeyRepeatInterval(NXEventHandle handle, double seconds);
69extern double NXKeyRepeatInterval(NXEventHandle handle);
70extern void NXSetKeyRepeatThreshold(NXEventHandle handle, double threshold);
71extern double NXKeyRepeatThreshold(NXEventHandle handle);
72extern NXKeyMapping *NXSetKeyMapping(NXEventHandle h, NXKeyMapping *keymap);
73extern int NXKeyMappingLength(NXEventHandle handle);
74extern NXKeyMapping *NXGetKeyMapping(NXEventHandle h, NXKeyMapping *keymap);
75extern void NXResetKeyboard(NXEventHandle handle);
76
77/* Mouse */
78extern void NXSetClickTime(NXEventHandle handle, double seconds);
79extern double NXClickTime(NXEventHandle handle);
80extern void NXSetClickSpace(NXEventHandle handle, _NXSize_ *area);
81extern void NXGetClickSpace(NXEventHandle handle, _NXSize_ *area);
82extern void NXSetMouseScaling(NXEventHandle handle, NXMouseScaling *scaling);
83extern void NXGetMouseScaling(NXEventHandle handle, NXMouseScaling *scaling);
84#ifdef _undef
85extern void NXEnableMouseButton(NXEventHandle handle, NXMouseButton button);
86extern NXMouseButton NXMouseButtonEnabled(NXEventHandle handle);
87#endif
88extern void NXResetMouse(NXEventHandle handle);
89
90/* Screen Brightness and Auto-dimming */
91
92extern void NXSetAutoDimThreshold(NXEventHandle handle, double seconds);
93extern double NXAutoDimThreshold(NXEventHandle handle);
94extern double NXAutoDimTime(NXEventHandle handle);
95extern double NXIdleTime(NXEventHandle handle);
96extern void NXSetAutoDimState(NXEventHandle handle, boolean_t dimmed);
97extern boolean_t NXAutoDimState(NXEventHandle handle);
98extern void NXSetAutoDimBrightness(NXEventHandle handle, double level);
99extern double NXAutoDimBrightness(NXEventHandle handle);
100extern void NXSetScreenBrightness(NXEventHandle handle, double level);
101extern double NXScreenBrightness(NXEventHandle handle);
102
103/* Speaker Volume */
104#ifdef _undef
105extern void NXSetCurrentVolume(NXEventHandle handle, double volume);
106extern double NXCurrentVolume(NXEventHandle handle);
107#endif
108
109/* Wait Cursor */
110#ifdef _undef
111extern void NXSetWaitCursorThreshold(NXEventHandle handle, double seconds);
112extern double NXWaitCursorThreshold(NXEventHandle handle);
113extern void NXSetWaitCursorSustain(NXEventHandle handle, double seconds);
114extern double NXWaitCursorSustain(NXEventHandle handle);
115extern void NXSetWaitCursorFrameInterval(NXEventHandle handle, double seconds);
116extern 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
126extern int NXEvSetParameterInt(NXEventHandle handle,
127 char *parameterName,
128 unsigned int *parameterArray,
129 unsigned int count);
130
131extern int NXEvSetParameterChar(NXEventHandle handle,
132 char *parameterName,
133 unsigned char *parameterArray,
134 unsigned int count);
135
136extern int NXEvGetParameterInt(NXEventHandle handle,
137 char *parameterName,
138 unsigned int maxCount,
139 unsigned int *parameterArray,
140 unsigned int *returnedCount);
141
142extern 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