libghostty
Loading...
Searching...
No Matches
kitty_graphics.h File Reference
#include <stdbool.h>
#include <stdint.h>
#include <ghostty/vt/allocator.h>
#include <ghostty/vt/selection.h>
#include <ghostty/vt/types.h>

Go to the source code of this file.

Data Structures

struct  GhosttyKittyGraphicsPlacementRenderInfo

Enumerations

enum  GhosttyKittyGraphicsData { GHOSTTY_KITTY_GRAPHICS_DATA_INVALID = 0 , GHOSTTY_KITTY_GRAPHICS_DATA_PLACEMENT_ITERATOR = 1 , GHOSTTY_KITTY_GRAPHICS_DATA_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE }
enum  GhosttyKittyGraphicsPlacementData {
  GHOSTTY_KITTY_GRAPHICS_PLACEMENT_DATA_INVALID = 0 , GHOSTTY_KITTY_GRAPHICS_PLACEMENT_DATA_IMAGE_ID = 1 , GHOSTTY_KITTY_GRAPHICS_PLACEMENT_DATA_PLACEMENT_ID = 2 , GHOSTTY_KITTY_GRAPHICS_PLACEMENT_DATA_IS_VIRTUAL = 3 ,
  GHOSTTY_KITTY_GRAPHICS_PLACEMENT_DATA_X_OFFSET = 4 , GHOSTTY_KITTY_GRAPHICS_PLACEMENT_DATA_Y_OFFSET = 5 , GHOSTTY_KITTY_GRAPHICS_PLACEMENT_DATA_SOURCE_X = 6 , GHOSTTY_KITTY_GRAPHICS_PLACEMENT_DATA_SOURCE_Y = 7 ,
  GHOSTTY_KITTY_GRAPHICS_PLACEMENT_DATA_SOURCE_WIDTH = 8 , GHOSTTY_KITTY_GRAPHICS_PLACEMENT_DATA_SOURCE_HEIGHT = 9 , GHOSTTY_KITTY_GRAPHICS_PLACEMENT_DATA_COLUMNS = 10 , GHOSTTY_KITTY_GRAPHICS_PLACEMENT_DATA_ROWS = 11 ,
  GHOSTTY_KITTY_GRAPHICS_PLACEMENT_DATA_Z = 12 , GHOSTTY_KITTY_GRAPHICS_PLACEMENT_DATA_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE
}
enum  GhosttyKittyPlacementLayer
enum  GhosttyKittyGraphicsPlacementIteratorOption { GHOSTTY_KITTY_GRAPHICS_PLACEMENT_ITERATOR_OPTION_LAYER = 0 , GHOSTTY_KITTY_GRAPHICS_PLACEMENT_ITERATOR_OPTION_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE }
enum  GhosttyKittyImageFormat
enum  GhosttyKittyImageCompression
enum  GhosttyKittyGraphicsImageData {
  GHOSTTY_KITTY_IMAGE_DATA_INVALID = 0 , GHOSTTY_KITTY_IMAGE_DATA_ID = 1 , GHOSTTY_KITTY_IMAGE_DATA_NUMBER = 2 , GHOSTTY_KITTY_IMAGE_DATA_WIDTH = 3 ,
  GHOSTTY_KITTY_IMAGE_DATA_HEIGHT = 4 , GHOSTTY_KITTY_IMAGE_DATA_FORMAT = 5 , GHOSTTY_KITTY_IMAGE_DATA_COMPRESSION = 6 , GHOSTTY_KITTY_IMAGE_DATA_DATA_PTR = 7 ,
  GHOSTTY_KITTY_IMAGE_DATA_DATA_LEN = 8 , GHOSTTY_KITTY_IMAGE_DATA_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE
}

Functions

GHOSTTY_API GhosttyResult ghostty_kitty_graphics_get (GhosttyKittyGraphics graphics, GhosttyKittyGraphicsData data, void *out)
GHOSTTY_API GhosttyKittyGraphicsImage ghostty_kitty_graphics_image (GhosttyKittyGraphics graphics, uint32_t image_id)
GHOSTTY_API GhosttyResult ghostty_kitty_graphics_image_get (GhosttyKittyGraphicsImage image, GhosttyKittyGraphicsImageData data, void *out)
GHOSTTY_API GhosttyResult ghostty_kitty_graphics_image_get_multi (GhosttyKittyGraphicsImage image, size_t count, const GhosttyKittyGraphicsImageData *keys, void **values, size_t *out_written)
GHOSTTY_API GhosttyResult ghostty_kitty_graphics_placement_iterator_new (const GhosttyAllocator *allocator, GhosttyKittyGraphicsPlacementIterator *out_iterator)
GHOSTTY_API void ghostty_kitty_graphics_placement_iterator_free (GhosttyKittyGraphicsPlacementIterator iterator)
GHOSTTY_API GhosttyResult ghostty_kitty_graphics_placement_iterator_set (GhosttyKittyGraphicsPlacementIterator iterator, GhosttyKittyGraphicsPlacementIteratorOption option, const void *value)
GHOSTTY_API bool ghostty_kitty_graphics_placement_next (GhosttyKittyGraphicsPlacementIterator iterator)
GHOSTTY_API GhosttyResult ghostty_kitty_graphics_placement_get (GhosttyKittyGraphicsPlacementIterator iterator, GhosttyKittyGraphicsPlacementData data, void *out)
GHOSTTY_API GhosttyResult ghostty_kitty_graphics_placement_get_multi (GhosttyKittyGraphicsPlacementIterator iterator, size_t count, const GhosttyKittyGraphicsPlacementData *keys, void **values, size_t *out_written)
GHOSTTY_API GhosttyResult ghostty_kitty_graphics_placement_rect (GhosttyKittyGraphicsPlacementIterator iterator, GhosttyKittyGraphicsImage image, GhosttyTerminal terminal, GhosttySelection *out_selection)
GHOSTTY_API GhosttyResult ghostty_kitty_graphics_placement_pixel_size (GhosttyKittyGraphicsPlacementIterator iterator, GhosttyKittyGraphicsImage image, GhosttyTerminal terminal, uint32_t *out_width, uint32_t *out_height)
GHOSTTY_API GhosttyResult ghostty_kitty_graphics_placement_grid_size (GhosttyKittyGraphicsPlacementIterator iterator, GhosttyKittyGraphicsImage image, GhosttyTerminal terminal, uint32_t *out_cols, uint32_t *out_rows)
GHOSTTY_API GhosttyResult ghostty_kitty_graphics_placement_viewport_pos (GhosttyKittyGraphicsPlacementIterator iterator, GhosttyKittyGraphicsImage image, GhosttyTerminal terminal, int32_t *out_col, int32_t *out_row)
GHOSTTY_API GhosttyResult ghostty_kitty_graphics_placement_source_rect (GhosttyKittyGraphicsPlacementIterator iterator, GhosttyKittyGraphicsImage image, uint32_t *out_x, uint32_t *out_y, uint32_t *out_width, uint32_t *out_height)
GHOSTTY_API GhosttyResult ghostty_kitty_graphics_placement_render_info (GhosttyKittyGraphicsPlacementIterator iterator, GhosttyKittyGraphicsImage image, GhosttyTerminal terminal, GhosttyKittyGraphicsPlacementRenderInfo *out_info)

Detailed Description

Kitty graphics protocol

See Kitty Graphics for a full usage guide.

Definition in file kitty_graphics.h.