… | |
… | |
4 | #ifndef LIBPTYTTY_H_ /* public libptytty header file */ |
4 | #ifndef LIBPTYTTY_H_ /* public libptytty header file */ |
5 | #define LIBPTYTTY_H_ |
5 | #define LIBPTYTTY_H_ |
6 | |
6 | |
7 | #ifdef __cplusplus |
7 | #ifdef __cplusplus |
8 | |
8 | |
9 | // c++ api |
9 | // C++ API |
10 | |
10 | |
11 | struct ptytty { |
11 | struct ptytty { |
12 | int pty; // pty file descriptor; connected to rxvt |
12 | int pty; // pty file descriptor; connected to rxvt |
13 | int tty; // tty file descriptor; connected to child |
13 | int tty; // tty file descriptor; connected to child |
14 | |
14 | |
… | |
… | |
40 | } |
40 | } |
41 | }; |
41 | }; |
42 | |
42 | |
43 | #else |
43 | #else |
44 | |
44 | |
45 | // c api |
45 | // C API |
46 | |
46 | |
47 | typedef void *PTYTTY; |
47 | typedef void *PTYTTY; |
48 | |
48 | |
49 | int ptytty_pty (PTYTTY ptytty); |
49 | int ptytty_pty (PTYTTY ptytty); |
50 | int ptytty_tty (PTYTTY ptytty); |
50 | int ptytty_tty (PTYTTY ptytty); |
51 | void ptytty_delete (PTYTTY ptytty); |
51 | void ptytty_delete (PTYTTY ptytty); |
52 | int ptytty_get (PTYTTY ptytty); |
52 | int ptytty_get (PTYTTY ptytty); |
53 | void ptytty_login (PTYTTY ptytty, int cmd_pid, bool login_shell, const char *hostname); |
53 | void ptytty_login (PTYTTY ptytty, int cmd_pid, int login_shell, const char *hostname); |
54 | |
54 | |
55 | void ptytty_close_tty (PTYTTY ptytty); |
55 | void ptytty_close_tty (PTYTTY ptytty); |
56 | int ptytty_make_controlling_tty (PTYTTY ptytty); |
56 | int ptytty_make_controlling_tty (PTYTTY ptytty); |
57 | void ptytty_set_utf8_mode (PTYTTY ptytty, int on); |
57 | void ptytty_set_utf8_mode (PTYTTY ptytty, int on); |
58 | |
58 | |