Merge branch 'master' of git://git.ucc.asn.au/tpg/acess2
[tpg/acess2.git] / Usermode / Libraries / ld-acess.so_src / include_exp / acess / devices / pty.h
1 /*
2  * Acess2 User Core
3  * - By John Hodge (thePowersGang)
4  * 
5  * acess/devices/pty.h
6  * - PTY Device type IOCtls
7  */
8 #ifndef _ACESS_DEVICES_PTY_H_
9 #define _ACESS_DEVICES_PTY_H_
10
11
12 #include "../devices.h"
13
14 #define PTYSFLAG_ILOCAL 0x001   //!< Input modes are handled in the server process
15 #define PTYSFLAG_SMODE  0x002   //!< Inform server of mode changes by the user
16
17 #define PTYIMODE_CANON  0x001   //!< Line-buffered input
18 #define PTYIMODE_ECHO   0x002   //!< Echo input characters
19 #define PTYIMODE_RAW    0x004   //!< Disable all input processing
20 #define PTYIMODE_NLCR   0x008   //!< Translate '\n' to '\r' (for old apps)
21
22 #define PTYOMODE_BUFFMT 0x003
23 #define PTYBUFFMT_TEXT   0x000
24 #define PTYBUFFMT_FB     0x001
25 #define PTYBUFFMT_2DCMD  0x002
26 #define PTYBUFFMT_3DCMD  0x003
27
28 /*
29  * Note: When setting dimensions from a client, it is up to the server what fields are used.
30  * This is usually dependent on the current output mode.
31  */
32 struct ptydims
33 {
34         short   W;
35         short   H;
36         short   PW;
37         short   PH;
38 } PACKED;
39 struct ptymode
40 {
41         unsigned int    OutputMode;
42         unsigned int    InputMode;
43 } PACKED;
44
45 enum
46 {
47         PTY_IOCTL_GETMODE = 4,
48         PTY_IOCTL_SETMODE,
49         PTY_IOCTL_GETDIMS,
50         PTY_IOCTL_SETDIMS,
51         PTY_IOCTL_GETID,
52         PTY_IOCTL_SETID,
53         PTY_IOCTL_SETPGRP
54 };
55
56 #endif
57

UCC git Repository :: git.ucc.asn.au