-/* Disconnects the RoteTerm from its forked child process. This function
- * should be called when the child process dies or something of the sort.
- * It is not strictly necessary to call this function, but it is
- * certainly tidy. */
-void rote_vt_forsake_child(RoteTerm *rt);
-
-/* Does some data plumbing, that is, sees if the sub process has
- * something to write to the terminal, and if so, write it. If you
- * called rote_vt_fork to start a forked process, you must call
- * this function regularly to update the terminal.
- *
- * This function will not block, that is, if there is no data to be
- * read from the child process it will return immediately. */
-void rote_vt_update(RoteTerm *rt);
-
-/* Puts data into the terminal: if there is a forked process running,
- * the data will be sent to it. If there is no forked process,
- * the data will simply be injected into the terminal (as in
- * rote_vt_inject) */
-void rote_vt_write(RoteTerm *rt, const char *data, int length);
-
-/* Inject data into the terminal. <data> needs NOT be 0-terminated:
- * its length is solely determined by the <length> parameter. Please
- * notice that this writes directly to the terminal, that is,
- * this function does NOT send the data to the forked process
- * running in the terminal (if any). For that, you might want
- * to use rote_vt_write.
- */
-void rote_vt_inject(RoteTerm *rt, const char *data, int length);
-
-#ifdef USE_NCURSES
-/* Paints the virtual terminal screen on the given window, putting
- * the top-left corner at the given position. The cur_set_attr
- * function must set the curses attributes given a Rote attribute
- * byte. It should, for example, do wattrset(win, COLOR_PAIR(n)) where
- * n is the colorpair appropriate for the attribute and such.
- *
- * If you pass NULL for cur_set_attr, the default implementation will
- * set the color pair given by (bg * 8 + 7 - fg), which seems to be
- * a common mapping, and the bold and blink attributes will be mapped
- * to A_BOLD and A_BLINK.
- *
- * At the end of the function, the cursor will be left where the virtual
- * cursor of the terminal is supposed to be.
- *
- * This function does not call wrefresh(win); you have to do that yourself.
- * This function automatically calls rote_vt_update prior to drawing
- * so that the drawn contents are accurate.
- */
-void rote_vt_draw(RoteTerm *rt, WINDOW *win, int startrow, int startcol,
- void (*cur_set_attr)(WINDOW *win, unsigned char attr));
-
-#endif
-/* Indicates to the terminal that the given key has been pressed.
- * This will cause the terminal to rote_vt_write() the appropriate
- * escape sequence for that key (that is, the escape sequence
- * that the linux text-mode console would produce for it). The argument,
- * keycode, must be a CURSES EXTENDED KEYCODE, the ones you get
- * when you use keypad(somewin, TRUE) (see man page). */
-void rote_vt_keypress(RoteTerm *rt, int keycode);
-
-/* Takes a snapshot of the current contents of the terminal and
- * saves them to a dynamically allocated buffer. Returns a pointer
- * to the newly created buffer, which you can pass to
- * rote_vt_restore_snapshot. Caller is responsible for free()'ing when
- * the snapshot is no longer needed. */
-void *rote_vt_take_snapshot(RoteTerm *rt);
-
-/* Restores a snapshot previously taken with rote_vt_take_snapshot.
- * 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);
-
-/* Installs a custom escape sequence handler for the given RoteTerm.
- * The handler will be called by the library every time it tries to
- * recognize an escape sequence; depending on the return value of the
- * handler, it will proceed in a different manner. See the description
- * of the possible return values (ROTE_HANDLERESULT_* constants) below
- * for more info.
- *
- * This handler will be called EACH TIME THE ESCAPE SEQUENCE BUFFER
- * RECEIVES A CHARACTER. Therefore, it must execute speedily in order
- * not to create too heavy a performance penalty. In particular, the
- * writer of the handler should take care to quickly test for invalid
- * or incomplete escape sequences before trying to do more elaborate
- * parsing.
- *
- * The handler will NOT be called with an empty escape sequence (i.e.
- * one in which only the initial ESC was received).
- *
- * The custom handler receives the terminal it pertains to and the
- * escape sequence as a string (without the initial escape character).
- *
- * The handler may of course modify the terminal as it sees fit, taking
- * care not to corrupt it of course (in particular, it should appropriately
- * raise the line_dirty[] and curpos_dirty flags to indicate what it has
- * changed).
- */
-void rote_vt_install_handler(RoteTerm *rt, rote_es_handler_t handler);
-
-/* Possible return values for the custom handler function and their
- * meanings: */
-#define ROTE_HANDLERESULT_OK 0 /* means escape sequence was handled */