X-Git-Url: http://git.madism.org/?p=apps%2Fmadtty.git;a=blobdiff_plain;f=rote.h;fp=rote.h;h=62846d639d8e3bea1b2aea2d74bdf25b609acf25;hp=a4f6b3ebf2a771ec8fe6c75c9f21ee74e75821c7;hb=7f23e2cf7b485ba8c4a66ccc2ee7fc4ee8172109;hpb=7ea77f37c3d2ad6f176182e2b1441dd33e39af8c diff --git a/rote.h b/rote.h index a4f6b3e..62846d6 100644 --- a/rote.h +++ b/rote.h @@ -240,6 +240,15 @@ void *rote_vt_take_snapshot(RoteTerm *rt); * This function does NOT free() the passed buffer */ void rote_vt_restore_snapshot(RoteTerm *rt, void *snapbuf); +/* Returns the pseudo tty descriptor associated with the given terminal. + * Please don't do weird things with it (like close it for instance), + * or things will break + * + * This function returns -1 if the given terminal does not yet have + * an associated pty. A pty is only associated to a terminal when + * needed, e.g. on a call to rote_vt_forkpty. */ +int rote_vt_get_pty_fd(RoteTerm *rt); + /* Declaration of custom escape sequence callback type. See the * rote_vt_add_es_handler function for more info */ typedef int (*rote_es_handler_t)(RoteTerm *rt, const char *es);