Skip to content

Commit 9d7803c

Browse files
Adds ability to request the status in the render-image command.
1 parent 48a4a6a commit 9d7803c

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

spec/vt-good-image-protocol.tex

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,13 @@ \subsection{Render Image}
255255
\item image-y-offset; optional, start rendering at the given pixel y-offset cell of the image (default 0)
256256
\item image-width; optional, number of pixels of the image's width to display (default: max width)
257257
\item image-height; optional, number of pixels of the image's height to display (default max height)
258-
% \item status: optional, request a success/failure status response from the terminal, by default
259-
% no status result will be sent back to the client application.
258+
\item status: optional, request a success/failure status response code from the terminal, by default
259+
no status result will be sent back to the client application.
260+
The response status code can be one of the following:
261+
\begin{itemize}
262+
\item Success
263+
\item Image Not Available (has never been or was removed actively or by the garbage collector)
264+
\end{itemize}
260265
\end{itemize}
261266

262267
\subsection{Upload and Render Image}
@@ -322,7 +327,7 @@ \subsection{Upload Image}
322327

323328
\subsection{Render Image}
324329

325-
Syntax: \code{DCS id:ID ; x:NUM ; y:NUM ; w:NUM ; h:NUM ; resize:RESIZE ; alignment:ALIGNMENT r ST}
330+
Syntax: \code{DCS id:ID ; x:NUM ; y:NUM ; w:NUM ; h:NUM ; resize:RESIZE ; alignment:ALIGNMENT ; status:VAL r ST}
326331

327332
\begin{tabular}{ |c|c|l| }
328333
\hline
@@ -337,6 +342,20 @@ \subsection{Render Image}
337342
alignment & 6 & 1 (MiddleCenter), 2 (MiddleStart), 3 (MiddleEnd), \\
338343
& & 4 (TopStart), 5 (TopCenter), 6 (TopEnd), \\
339344
& & 7 (BottomStart), 8 (BottomCenter), 9 (BottomEnd) \\
345+
reqStatus & 7 & 0 (Success), 1 (Image not available) \\
346+
\hline
347+
\end{tabular}
348+
349+
\paragraph*{}
350+
351+
When a response status code was requested, the syntax will be as follows:
352+
353+
\begin{tabular}{ |r|l| }
354+
\hline
355+
\textbf{VT sequence} & \textbf{description} \\
356+
\hline
357+
\code{CSI > 0 i} & Image is rendered successfully \\
358+
\code{CSI > 1 i} & Image was not rendered. No image with the given Id found. \\
340359
\hline
341360
\end{tabular}
342361

0 commit comments

Comments
 (0)