mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-06-06 20:04:25 +00:00
example: add c-vt-kitty-graphics
Demonstrates the sys interface for Kitty Graphics Protocol PNG support. The example installs a PNG decode callback via ghostty_sys_set, creates a terminal with image storage enabled, and sends an inline 1x1 PNG image through vt_write. Snippet markers are wired up to the sys.h doxygen docs.
This commit is contained in:
@@ -98,6 +98,11 @@
|
||||
* grid refs to inspect cell codepoints, row wrap state, and cell styles.
|
||||
*/
|
||||
|
||||
/** @example c-vt-kitty-graphics/src/main.c
|
||||
* This example demonstrates how to use the system interface to install a
|
||||
* PNG decoder callback and send a Kitty Graphics Protocol image.
|
||||
*/
|
||||
|
||||
#ifndef GHOSTTY_VT_H
|
||||
#define GHOSTTY_VT_H
|
||||
|
||||
|
||||
@@ -28,6 +28,14 @@
|
||||
* an implementation. Passing NULL as the value clears the implementation
|
||||
* and disables the corresponding feature.
|
||||
*
|
||||
* ## Example
|
||||
*
|
||||
* ### Defining a PNG decode callback
|
||||
* @snippet c-vt-kitty-graphics/src/main.c kitty-graphics-decode-png
|
||||
*
|
||||
* ### Installing the callback and sending a PNG image
|
||||
* @snippet c-vt-kitty-graphics/src/main.c kitty-graphics-main
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user