VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.1.0/xf86OSKbd.h@ 78293

Last change on this file since 78293 was 51223, checked in by vboxsync, 11 years ago

Additions/x11/x11include: added header files for X.Org Server 1.0 and 1.1.

  • Property svn:eol-style set to native
File size: 4.3 KB
Line 
1/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86OSKbd.h,v 1.5tsi Exp $ */
2/*
3 * Copyright (c) 2002-2003 by The XFree86 Project, Inc.
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
19 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
20 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21 * OTHER DEALINGS IN THE SOFTWARE.
22 *
23 * Except as contained in this notice, the name of the copyright holder(s)
24 * and author(s) shall not be used in advertising or otherwise to promote
25 * the sale, use or other dealings in this Software without prior written
26 * authorization from the copyright holder(s) and author(s).
27 *
28 * Author: Ivan Pascal.
29 */
30
31#include "xf86Xinput.h"
32
33Bool ATScancode(InputInfoPtr pInfo, int *scanCode);
34
35/* Public interface to OS-specific keyboard support. */
36
37typedef int (*KbdInitProc)(InputInfoPtr pInfo, int what);
38typedef int (*KbdOnProc)(InputInfoPtr pInfo, int what);
39typedef int (*KbdOffProc)(InputInfoPtr pInfo, int what);
40typedef void (*BellProc)(InputInfoPtr pInfo,
41 int loudness, int pitch, int duration);
42typedef void (*SetLedsProc)(InputInfoPtr pInfo, int leds);
43typedef int (*GetLedsProc)(InputInfoPtr pInfo);
44typedef void (*SetKbdRepeatProc)(InputInfoPtr pInfo, char rad);
45typedef void (*KbdGetMappingProc)(InputInfoPtr pInfo,
46 KeySymsPtr pKeySyms, CARD8* pModMap);
47typedef int (*GetSpecialKeyProc)(InputInfoPtr pInfo, int scanCode);
48typedef Bool (*SpecialKeyProc)(InputInfoPtr pInfo,
49 int key, Bool down, int modifiers);
50typedef int (*RemapScanCodeProc)(InputInfoPtr pInfo, int *scanCode);
51typedef Bool (*OpenKeyboardProc)(InputInfoPtr pInfo);
52typedef void (*PostEventProc)(InputInfoPtr pInfo,
53 unsigned int key, Bool down);
54typedef struct {
55 int begin;
56 int end;
57 unsigned char *map;
58} TransMapRec, *TransMapPtr;
59
60typedef struct {
61 KbdInitProc KbdInit;
62 KbdOnProc KbdOn;
63 KbdOffProc KbdOff;
64 BellProc Bell;
65 SetLedsProc SetLeds;
66 GetLedsProc GetLeds;
67 SetKbdRepeatProc SetKbdRepeat;
68 KbdGetMappingProc KbdGetMapping;
69 RemapScanCodeProc RemapScanCode;
70 GetSpecialKeyProc GetSpecialKey;
71 SpecialKeyProc SpecialKey;
72
73 OpenKeyboardProc OpenKeyboard;
74 PostEventProc PostEvent;
75
76 int rate;
77 int delay;
78 int bell_pitch;
79 int bell_duration;
80 Bool autoRepeat;
81 unsigned long leds;
82 unsigned long xledsMask;
83 unsigned long keyLeds;
84 int scanPrefix;
85 Bool vtSwitchSupported;
86 Bool CustomKeycodes;
87 Bool noXkb;
88 Bool isConsole;
89 TransMapPtr scancodeMap;
90 TransMapPtr specialMap;
91
92 /* os specific */
93 pointer private;
94 int kbdType;
95 int consType;
96 int wsKbdType;
97 Bool sunKbd;
98 Bool Panix106;
99
100} KbdDevRec, *KbdDevPtr;
101
102typedef enum {
103 PROT_STD,
104 PROT_XQUEUE,
105 PROT_WSCONS,
106 PROT_USB,
107 PROT_UNKNOWN_KBD
108} KbdProtocolId;
109
110typedef struct {
111 const char *name;
112 KbdProtocolId id;
113} KbdProtocolRec;
114
115Bool xf86OSKbdPreInit(InputInfoPtr pInfo);
116
117/* Adjust this when the kbd interface changes. */
118
119/*
120 * History:
121 *
122 * 1.0.0 - Initial version.
123 */
124
125#define OS_KBD_VERSION_MAJOR 1
126#define OS_KBD_VERSION_MINOR 0
127#define OS_KBD_VERSION_PATCH 0
128
129#define OS_KBD_VERSION_CURRENT \
130 BUILTIN_INTERFACE_VERSION_NUMERIC(OS_KBD_VERSION_MAJOR, \
131 OS_KBD_VERSION_MINOR, \
132 OS_KBD_VERSION_PATCH)
133
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette