1 | /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86OSKbd.h,v 1.3 2003/02/17 15:11:55 dawes Exp $ */
|
---|
2 |
|
---|
3 | /*
|
---|
4 | * Copyright (c) 2002 by The XFree86 Project, Inc.
|
---|
5 | * Author: Ivan Pascal.
|
---|
6 | */
|
---|
7 |
|
---|
8 | #include "xf86Xinput.h"
|
---|
9 |
|
---|
10 | Bool ATScancode(InputInfoPtr pInfo, int *scanCode);
|
---|
11 |
|
---|
12 | /* Public interface to OS-specific keyboard support. */
|
---|
13 |
|
---|
14 | typedef int (*KbdInitProc)(InputInfoPtr pInfo, int what);
|
---|
15 | typedef int (*KbdOnProc)(InputInfoPtr pInfo, int what);
|
---|
16 | typedef int (*KbdOffProc)(InputInfoPtr pInfo, int what);
|
---|
17 | typedef void (*BellProc)(InputInfoPtr pInfo,
|
---|
18 | int loudness, int pitch, int duration);
|
---|
19 | typedef void (*SetLedsProc)(InputInfoPtr pInfo, int leds);
|
---|
20 | typedef int (*GetLedsProc)(InputInfoPtr pInfo);
|
---|
21 | typedef void (*SetKbdRepeatProc)(InputInfoPtr pInfo, char rad);
|
---|
22 | typedef void (*KbdGetMappingProc)(InputInfoPtr pInfo,
|
---|
23 | KeySymsPtr pKeySyms, CARD8* pModMap);
|
---|
24 | typedef int (*GetSpecialKeyProc)(InputInfoPtr pInfo, int scanCode);
|
---|
25 | typedef Bool (*SpecialKeyProc)(InputInfoPtr pInfo,
|
---|
26 | int key, Bool down, int modifiers);
|
---|
27 | typedef int (*RemapScanCodeProc)(InputInfoPtr pInfo, int *scanCode);
|
---|
28 | typedef Bool (*OpenKeyboardProc)(InputInfoPtr pInfo);
|
---|
29 | typedef void (*PostEventProc)(InputInfoPtr pInfo,
|
---|
30 | unsigned int key, Bool down);
|
---|
31 | typedef struct {
|
---|
32 | int begin;
|
---|
33 | int end;
|
---|
34 | unsigned char *map;
|
---|
35 | } TransMapRec, *TransMapPtr;
|
---|
36 |
|
---|
37 | typedef struct {
|
---|
38 | KbdInitProc KbdInit;
|
---|
39 | KbdOnProc KbdOn;
|
---|
40 | KbdOffProc KbdOff;
|
---|
41 | BellProc Bell;
|
---|
42 | SetLedsProc SetLeds;
|
---|
43 | GetLedsProc GetLeds;
|
---|
44 | SetKbdRepeatProc SetKbdRepeat;
|
---|
45 | KbdGetMappingProc KbdGetMapping;
|
---|
46 | RemapScanCodeProc RemapScanCode;
|
---|
47 | GetSpecialKeyProc GetSpecialKey;
|
---|
48 | SpecialKeyProc SpecialKey;
|
---|
49 |
|
---|
50 | OpenKeyboardProc OpenKeyboard;
|
---|
51 | PostEventProc PostEvent;
|
---|
52 |
|
---|
53 | int rate;
|
---|
54 | int delay;
|
---|
55 | int bell_pitch;
|
---|
56 | int bell_duration;
|
---|
57 | Bool autoRepeat;
|
---|
58 | unsigned long leds;
|
---|
59 | unsigned long xledsMask;
|
---|
60 | unsigned long keyLeds;
|
---|
61 | int scanPrefix;
|
---|
62 | Bool vtSwitchSupported;
|
---|
63 | Bool CustomKeycodes;
|
---|
64 | Bool noXkb;
|
---|
65 | Bool isConsole;
|
---|
66 | TransMapPtr scancodeMap;
|
---|
67 | TransMapPtr specialMap;
|
---|
68 |
|
---|
69 | /* os specific */
|
---|
70 | pointer private;
|
---|
71 | int kbdType;
|
---|
72 | int consType;
|
---|
73 | int wsKbdType;
|
---|
74 | Bool sunKbd;
|
---|
75 | Bool Panix106;
|
---|
76 |
|
---|
77 | } KbdDevRec, *KbdDevPtr;
|
---|
78 |
|
---|
79 | typedef enum {
|
---|
80 | PROT_STD,
|
---|
81 | PROT_XQUEUE,
|
---|
82 | PROT_WSCONS,
|
---|
83 | PROT_USB,
|
---|
84 | PROT_UNKNOWN
|
---|
85 | } KbdProtocolId;
|
---|
86 |
|
---|
87 | typedef struct {
|
---|
88 | const char *name;
|
---|
89 | KbdProtocolId id;
|
---|
90 | } KbdProtocolRec;
|
---|
91 |
|
---|
92 | Bool xf86OSKbdPreInit(InputInfoPtr pInfo);
|
---|