Kitty Graphics Protocol in OCaml
terminal
graphics
ocaml
1(** Kitty Graphics Protocol Placement
2
3 Configuration for where and how to display images. *)
4
5type t
6(** Placement configuration. *)
7
8val make :
9 ?source_x:int ->
10 ?source_y:int ->
11 ?source_width:int ->
12 ?source_height:int ->
13 ?cell_x_offset:int ->
14 ?cell_y_offset:int ->
15 ?columns:int ->
16 ?rows:int ->
17 ?z_index:int ->
18 ?placement_id:int ->
19 ?cursor:Kgp_cursor.t ->
20 ?unicode_placeholder:bool ->
21 unit ->
22 t
23(** Create a placement configuration.
24
25 @param source_x Left edge of source rectangle in pixels (default 0)
26 @param source_y Top edge of source rectangle in pixels (default 0)
27 @param source_width Width of source rectangle (default: full width)
28 @param source_height Height of source rectangle (default: full height)
29 @param cell_x_offset X offset within the first cell in pixels
30 @param cell_y_offset Y offset within the first cell in pixels
31 @param columns Number of columns to display over (scales image)
32 @param rows Number of rows to display over (scales image)
33 @param z_index Stacking order (negative = under text)
34 @param placement_id Unique ID for this placement
35 @param cursor Cursor movement policy after display
36 @param unicode_placeholder Create virtual placement for Unicode mode *)
37
38val empty : t
39(** Empty placement with all defaults. *)
40
41(** {1 Field Accessors} *)
42
43val source_x : t -> int option
44val source_y : t -> int option
45val source_width : t -> int option
46val source_height : t -> int option
47val cell_x_offset : t -> int option
48val cell_y_offset : t -> int option
49val columns : t -> int option
50val rows : t -> int option
51val z_index : t -> int option
52val placement_id : t -> int option
53val cursor : t -> Kgp_cursor.t option
54val unicode_placeholder : t -> bool