reorganize Makefile to support "least surprise" config/make semantics
[musl] / include / linux / kd.h
1 #ifndef _LINUX_KD_H
2 #define _LINUX_KD_H
3
4 #define GIO_FONT 0x4B60
5 #define PIO_FONT 0x4B61
6 #define GIO_FONTX 0x4B6B
7 #define PIO_FONTX 0x4B6C
8
9 struct consolefontdesc {
10         unsigned short charcount;
11         unsigned short charheight;
12         char *chardata;
13 };
14
15 #define PIO_FONTRESET 0x4B6D
16
17 #define GIO_CMAP 0x4B70
18 #define PIO_CMAP 0x4B71
19
20 #define KIOCSOUND 0x4B2F
21 #define KDMKTONE 0x4B30
22
23 #define KDGETLED 0x4B31
24 #define KDSETLED 0x4B32
25 #define LED_SCR 0x01
26 #define LED_NUM 0x02
27 #define LED_CAP 0x04
28
29 #define KDGKBTYPE 0x4B33
30 #define KB_84 0x01
31 #define KB_101 0x02
32 #define KB_OTHER 0x03
33
34 #define KDADDIO 0x4B34
35 #define KDDELIO 0x4B35
36 #define KDENABIO 0x4B36
37 #define KDDISABIO 0x4B37
38
39 #define KDSETMODE 0x4B3A
40 #define KD_TEXT 0x00
41 #define KD_GRAPHICS 0x01
42 #define KD_TEXT0 0x02
43 #define KD_TEXT1 0x03
44 #define KDGETMODE 0x4B3B
45
46 #define KDMAPDISP 0x4B3C
47 #define KDUNMAPDISP 0x4B3D
48
49 typedef char scrnmap_t;
50 #define E_TABSZ 256
51 #define GIO_SCRNMAP 0x4B40
52 #define PIO_SCRNMAP 0x4B41
53 #define GIO_UNISCRNMAP 0x4B69
54 #define PIO_UNISCRNMAP 0x4B6A
55
56 #define GIO_UNIMAP 0x4B66
57 struct unipair {
58         unsigned short unicode;
59         unsigned short fontpos;
60 };
61 struct unimapdesc {
62         unsigned short entry_ct;
63         struct unipair *entries;
64 };
65
66 #define PIO_UNIMAP 0x4B67
67 #define PIO_UNIMAPCLR 0x4B68
68
69 struct unimapinit {
70         unsigned short advised_hashsize;
71         unsigned short advised_hashstep;
72         unsigned short advised_hashlevel;
73 };
74
75 #define UNI_DIRECT_BASE 0xF000
76 #define UNI_DIRECT_MASK 0x01FF
77
78 #define K_RAW 0x00
79 #define K_XLATE 0x01
80 #define K_MEDIUMRAW 0x02
81 #define K_UNICODE 0x03
82 #define KDGKBMODE 0x4B44
83 #define KDSKBMODE 0x4B45
84
85 #define K_METABIT 0x03
86 #define K_ESCPREFIX 0x04
87 #define KDGKBMETA 0x4B62
88 #define KDSKBMETA 0x4B63
89
90 #define K_SCROLLLOCK 0x01
91 #define K_NUMLOCK 0x02
92 #define K_CAPSLOCK 0x04
93 #define KDGKBLED 0x4B64
94 #define KDSKBLED 0x4B65
95
96 struct kbentry {
97         unsigned char kb_table;
98         unsigned char kb_index;
99         unsigned short kb_value;
100 };
101 #define K_NORMTAB 0x00
102 #define K_SHIFTTAB 0x01
103 #define K_ALTTAB 0x02
104 #define K_ALTSHIFTTAB 0x03
105
106 #define KDGKBENT 0x4B46
107 #define KDSKBENT 0x4B47
108
109 struct kbsentry {
110         unsigned char kb_func;
111         unsigned char kb_string[512];
112 };
113 #define KDGKBSENT 0x4B48
114 #define KDSKBSENT 0x4B49
115
116 struct kbdiacr {
117         unsigned char diacr, base, result;
118 };
119 struct kbdiacrs {
120         unsigned int kb_cnt;
121         struct kbdiacr kbdiacr[256];
122 };
123 #define KDGKBDIACR 0x4B4A
124 #define KDSKBDIACR 0x4B4B
125
126 struct kbkeycode {
127         unsigned int scancode, keycode;
128 };
129 #define KDGETKEYCODE 0x4B4C
130 #define KDSETKEYCODE 0x4B4D
131
132 #define KDSIGACCEPT 0x4B4E
133
134 struct kbd_repeat {
135         int delay;
136         int rate;
137 };
138
139 #define KDKBDREP 0x4B52
140 #define KDFONTOP 0x4B72
141
142 struct console_font_op {
143         unsigned int op;
144         unsigned int flags;
145         unsigned int width, height;
146         unsigned int charcount;
147         unsigned char *data;
148 };
149
150 #define KD_FONT_OP_SET 0
151 #define KD_FONT_OP_GET 1
152 #define KD_FONT_OP_SET_DEFAULT 2
153 #define KD_FONT_OP_COPY 3
154
155 #define KD_FONT_FLAG_DONT_RECALC 1
156
157 #endif