mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
Add data structure to term->vt. This structure tracks the free-form data that is passed-through, and the handler to call at the end. Intermediates and parameters are collected by the normal VT parser. Then, when we enter the passthrough state, we call dcs_hook(). This function checks the intermediate(s) and parameters, and selects the appropriate unhook handler (and optionally does some execution already). In passthrough mode, we simply append strings to an internal buffer. This might have to be changed in the future, if we need to support a DCS that needs to execute as we go. In unhook (i.e. when the DCS is terminated), we execute the unhook handler. As a proof-of-concept, handlers for BSU/ESU (Begin/End Synchronized Update) has been added (but are left unimplemented).
8 lines
199 B
C
8 lines
199 B
C
#pragma once
|
|
|
|
#include <stdbool.h>
|
|
#include "terminal.h"
|
|
|
|
void dcs_hook(struct terminal *term, uint8_t final);
|
|
void dcs_put(struct terminal *term, uint8_t c);
|
|
void dcs_unhook(struct terminal *term);
|