]> bbs.cooldavid.org Git - net-next-2.6.git/blame - include/linux/vt.h
Console events and accessibility
[net-next-2.6.git] / include / linux / vt.h
CommitLineData
1da177e4
LT
1#ifndef _LINUX_VT_H
2#define _LINUX_VT_H
3
b293d758
ST
4#ifdef __KERNEL__
5struct notifier_block;
6
7struct vt_notifier_param {
8 struct vc_data *vc; /* VC on which the update happened */
9 unsigned int c; /* Printed char */
10};
11
12extern int register_vt_notifier(struct notifier_block *nb);
13extern int unregister_vt_notifier(struct notifier_block *nb);
14#endif
15
a8f340e3
JS
16/*
17 * These constants are also useful for user-level apps (e.g., VC
18 * resizing).
19 */
20#define MIN_NR_CONSOLES 1 /* must be at least 1 */
21#define MAX_NR_CONSOLES 63 /* serial lines start at 64 */
22#define MAX_NR_USER_CONSOLES 63 /* must be root to allocate above this */
23 /* Note: the ioctl VT_GETSTATE does not work for
24 consoles 16 and higher (since it returns a short) */
25
1da177e4
LT
26/* 0x56 is 'V', to avoid collision with termios and kd */
27
28#define VT_OPENQRY 0x5600 /* find available vt */
29
30struct vt_mode {
31 char mode; /* vt mode */
32 char waitv; /* if set, hang on writes if not active */
33 short relsig; /* signal to raise on release req */
34 short acqsig; /* signal to raise on acquisition */
35 short frsig; /* unused (set to 0) */
36};
37#define VT_GETMODE 0x5601 /* get mode of active vt */
38#define VT_SETMODE 0x5602 /* set mode of active vt */
39#define VT_AUTO 0x00 /* auto vt switching */
40#define VT_PROCESS 0x01 /* process controls switching */
41#define VT_ACKACQ 0x02 /* acknowledge switch */
42
43struct vt_stat {
44 unsigned short v_active; /* active vt */
45 unsigned short v_signal; /* signal to send */
46 unsigned short v_state; /* vt bitmask */
47};
48#define VT_GETSTATE 0x5603 /* get global vt state info */
49#define VT_SENDSIG 0x5604 /* signal to send to bitmask of vts */
50
51#define VT_RELDISP 0x5605 /* release display */
52
53#define VT_ACTIVATE 0x5606 /* make vt active */
54#define VT_WAITACTIVE 0x5607 /* wait for vt active */
55#define VT_DISALLOCATE 0x5608 /* free memory associated to vt */
56
57struct vt_sizes {
58 unsigned short v_rows; /* number of rows */
59 unsigned short v_cols; /* number of columns */
60 unsigned short v_scrollsize; /* number of lines of scrollback */
61};
62#define VT_RESIZE 0x5609 /* set kernel's idea of screensize */
63
64struct vt_consize {
65 unsigned short v_rows; /* number of rows */
66 unsigned short v_cols; /* number of columns */
67 unsigned short v_vlin; /* number of pixel rows on screen */
68 unsigned short v_clin; /* number of pixel rows per character */
69 unsigned short v_vcol; /* number of pixel columns on screen */
70 unsigned short v_ccol; /* number of pixel columns per character */
71};
72#define VT_RESIZEX 0x560A /* set kernel's idea of screensize + more */
73#define VT_LOCKSWITCH 0x560B /* disallow vt switching */
74#define VT_UNLOCKSWITCH 0x560C /* allow vt switching */
533475d3 75#define VT_GETHIFONTMASK 0x560D /* return hi font mask */
1da177e4
LT
76
77#endif /* _LINUX_VT_H */