blob: ba806e8711beb42129534649e8270c9b4bd35ba9 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _LINUX_VT_H
2#define _LINUX_VT_H
3
Jon Smirla8f340e2006-07-10 04:44:12 -07004/*
5 * These constants are also useful for user-level apps (e.g., VC
6 * resizing).
7 */
8#define MIN_NR_CONSOLES 1 /* must be at least 1 */
9#define MAX_NR_CONSOLES 63 /* serial lines start at 64 */
10#define MAX_NR_USER_CONSOLES 63 /* must be root to allocate above this */
11 /* Note: the ioctl VT_GETSTATE does not work for
12 consoles 16 and higher (since it returns a short) */
13
Linus Torvalds1da177e2005-04-16 15:20:36 -070014/* 0x56 is 'V', to avoid collision with termios and kd */
15
16#define VT_OPENQRY 0x5600 /* find available vt */
17
18struct vt_mode {
19 char mode; /* vt mode */
20 char waitv; /* if set, hang on writes if not active */
21 short relsig; /* signal to raise on release req */
22 short acqsig; /* signal to raise on acquisition */
23 short frsig; /* unused (set to 0) */
24};
25#define VT_GETMODE 0x5601 /* get mode of active vt */
26#define VT_SETMODE 0x5602 /* set mode of active vt */
27#define VT_AUTO 0x00 /* auto vt switching */
28#define VT_PROCESS 0x01 /* process controls switching */
29#define VT_ACKACQ 0x02 /* acknowledge switch */
30
31struct vt_stat {
32 unsigned short v_active; /* active vt */
33 unsigned short v_signal; /* signal to send */
34 unsigned short v_state; /* vt bitmask */
35};
36#define VT_GETSTATE 0x5603 /* get global vt state info */
37#define VT_SENDSIG 0x5604 /* signal to send to bitmask of vts */
38
39#define VT_RELDISP 0x5605 /* release display */
40
41#define VT_ACTIVATE 0x5606 /* make vt active */
42#define VT_WAITACTIVE 0x5607 /* wait for vt active */
43#define VT_DISALLOCATE 0x5608 /* free memory associated to vt */
44
45struct vt_sizes {
46 unsigned short v_rows; /* number of rows */
47 unsigned short v_cols; /* number of columns */
48 unsigned short v_scrollsize; /* number of lines of scrollback */
49};
50#define VT_RESIZE 0x5609 /* set kernel's idea of screensize */
51
52struct vt_consize {
53 unsigned short v_rows; /* number of rows */
54 unsigned short v_cols; /* number of columns */
55 unsigned short v_vlin; /* number of pixel rows on screen */
56 unsigned short v_clin; /* number of pixel rows per character */
57 unsigned short v_vcol; /* number of pixel columns on screen */
58 unsigned short v_ccol; /* number of pixel columns per character */
59};
60#define VT_RESIZEX 0x560A /* set kernel's idea of screensize + more */
61#define VT_LOCKSWITCH 0x560B /* disallow vt switching */
62#define VT_UNLOCKSWITCH 0x560C /* allow vt switching */
Samuel Thibault533475d2006-08-27 01:23:39 -070063#define VT_GETHIFONTMASK 0x560D /* return hi font mask */
Linus Torvalds1da177e2005-04-16 15:20:36 -070064
65#endif /* _LINUX_VT_H */