const char * sista_getVersion()
Definition api.cpp:486
ANSISettingsHandler_t sista_createANSISettings(enum sista_ForegroundColor, enum sista_BackgroundColor, enum sista_Attribute)
Creates an ANSISettings object.
Definition api.cpp:167
int sista_printSwappableField(SwappableFieldHandler_t, char)
Prints the specified Field with a given border.
Definition api.cpp:87
int sista_printHyperlink(const char *text, const char *url)
Prints an OSC 8 hyperlink to standard output without a newline.
Definition api.cpp:97
int sista_getVersionPatch()
Definition api.cpp:495
int sista_getVersionMajor()
Definition api.cpp:489
struct sista_Cursor * CursorHandler_t
Definition api.h:716
sista_ErrorCode
Error codes exposed by the C API for detailed diagnostics.
Definition api.h:523
@ SISTA_ERR_NULL_SETTINGS
Definition api.h:526
@ SISTA_ERR_NULL_FIELD
Definition api.h:525
@ SISTA_ERR_NULL_PAWN
Definition api.h:530
@ SISTA_ERR_OCCUPIED
Definition api.h:528
@ SISTA_ERR_NULL_CURSOR
Definition api.h:532
@ SISTA_ERR_NULL_BORDER
Definition api.h:531
@ SISTA_ERR_OUT_OF_BOUNDS
Definition api.h:527
@ SISTA_ERR_NULL_COLOR
Definition api.h:533
@ SISTA_ERR_BAD_ALLOC
Definition api.h:529
@ SISTA_OK
Definition api.h:524
@ SISTA_ERR_NULL_STRING
Definition api.h:534
@ SISTA_ERR_UNKNOWN
Definition api.h:535
int sista_printField(FieldHandler_t, char)
Prints the specified Field with a given border.
Definition api.cpp:78
sista_Attribute
Text attributes for terminal text.
Definition api.h:218
@ A_BLINK_FAST
Definition api.h:225
@ A_RESET
Definition api.h:219
@ A_HIDDEN
Definition api.h:227
@ A_ITALIC
Definition api.h:222
@ A_STRIKETHROUGH
Definition api.h:228
@ A_FAINT
Definition api.h:221
@ A_BLINK
Definition api.h:224
@ A_REVERSE
Definition api.h:226
@ A_UNDERLINE
Definition api.h:223
@ A_BRIGHT
Definition api.h:220
int sista_setAttribute(enum sista_Attribute)
Sets a text attribute.
Definition api.cpp:130
int sista_setForegroundColorRGB(const struct sista_RGBColor *)
Sets the foreground color using an RGB color.
Definition api.cpp:140
struct sista_Field * FieldHandler_t
Definition api.h:40
sista_ForegroundColor
Predefined foreground colors for terminal text.
Definition api.h:177
@ F_RED
Definition api.h:179
@ F_GREEN
Definition api.h:180
@ F_CYAN
Definition api.h:184
@ F_WHITE
Definition api.h:185
@ F_MAGENTA
Definition api.h:183
@ F_BLACK
Definition api.h:178
@ F_YELLOW
Definition api.h:181
@ F_BLUE
Definition api.h:182
struct sista_Border * BorderHandler_t
Definition api.h:425
int sista_printFieldWithBorder(FieldHandler_t, BorderHandler_t)
Prints the field with the specified border.
Definition api.cpp:250
int sista_destroyANSISettings(ANSISettingsHandler_t)
Deallocates the ANSISettings from memory.
Definition api.cpp:205
int sista_getLastErrorCode()
Returns the last API error code for the current thread.
Definition api.cpp:498
struct sista_ANSISettings * ANSISettingsHandler_t
Definition api.h:340
int sista_cursorGoTo(CursorHandler_t, unsigned short, unsigned short)
Moves the cursor to the specified coordinates.
Definition api.cpp:468
ANSISettingsHandler_t sista_createANSISettingsRGB(struct sista_RGBColor, struct sista_RGBColor, enum sista_Attribute)
Creates an ANSISettings object.
int sista_destroyField(FieldHandler_t)
Deallocates the Field from memory.
Definition api.cpp:48
int sista_setBackgroundColorRGB(const struct sista_RGBColor *)
Sets the background color using an RGB color.
Definition api.cpp:153
int sista_movePawn(FieldHandler_t, PawnHandler_t, struct sista_Coordinates)
Moves the pawn to a new position.
Definition api.cpp:351
struct sista_Pawn * PawnHandler_t
Definition api.h:514
int sista_destroySwappableField(SwappableFieldHandler_t)
Deallocates the SwappableField from memory.
Definition api.cpp:68
int sista_moveCursor(CursorHandler_t, enum sista_MoveCursor, unsigned short)
Moves the cursor in the specified direction by a given amount.
Definition api.cpp:457
int sista_setForegroundColor(enum sista_ForegroundColor)
Sets the foreground color using a predefined color.
Definition api.cpp:120
int sista_resetAnsi()
Resets ANSI settings to default.
Definition api.cpp:115
int sista_destroyBorder(BorderHandler_t)
Deallocates the Border from memory.
Definition api.cpp:240
FieldHandler_t sista_createField(size_t, size_t)
Creates a Field with the specified width and height.
Definition api.cpp:37
int sista_printSwappableFieldWithBorder(SwappableFieldHandler_t, BorderHandler_t)
Prints the field with the specified border.
Definition api.cpp:263
int sista_resetAttribute(enum sista_Attribute)
Resets a text attribute.
Definition api.cpp:135
struct sista_SwappableField * SwappableFieldHandler_t
Definition api.h:96
int sista_applySwaps(SwappableFieldHandler_t)
Executes all pending pawn swaps.
Definition api.cpp:420
sista_BackgroundColor
Predefined background colors for terminal text.
Definition api.h:197
@ B_BLACK
Definition api.h:198
@ B_RED
Definition api.h:199
@ B_WHITE
Definition api.h:205
@ B_MAGENTA
Definition api.h:203
@ B_GREEN
Definition api.h:200
@ B_BLUE
Definition api.h:202
@ B_YELLOW
Definition api.h:201
@ B_CYAN
Definition api.h:204
int sista_clearScreen(int spaces)
Clears the terminal screen and repositions the cursor.
Definition api.cpp:434
CursorHandler_t sista_createCursor()
Creates a cursor handler.
Definition api.cpp:439
int sista_cursorGoToCoordinates(CursorHandler_t, struct sista_Coordinates)
Moves the cursor to the specified coordinates.
Definition api.cpp:477
sista_MoveCursor
Enumeration for cursor movement directions in ANSI escape codes.
Definition api.h:705
@ BEGINNING_OF_NEXT_LINE
Definition api.h:710
@ HORIZONTAL_ABSOLUTE
Definition api.h:712
@ DOWN
Definition api.h:707
@ LEFT
Definition api.h:709
@ RIGHT
Definition api.h:708
@ BEGINNING_OF_PREVIOUS_LINE
Definition api.h:711
PawnHandler_t sista_createPawnInSwappableField(SwappableFieldHandler_t, char, ANSISettingsHandler_t, struct sista_Coordinates)
Creates a Pawn object in a given field.
Definition api.cpp:277
PawnHandler_t sista_createPawnInField(FieldHandler_t, char, ANSISettingsHandler_t, struct sista_Coordinates)
Creates a Pawn object in a given field.
Definition api.cpp:314
int sista_getVersionMinor()
Definition api.cpp:492
BorderHandler_t sista_createBorder(char, ANSISettingsHandler_t)
Creates a Border object.
Definition api.cpp:225
int sista_applyANSISettings(ANSISettingsHandler_t)
Applies the ANSI settings to the terminal.
Definition api.cpp:215
int sista_addPawnToSwap(SwappableFieldHandler_t, PawnHandler_t, struct sista_Coordinates)
Adds the Pawn to a list of pawns to be moved ("swapped") later.
Definition api.cpp:388
const char * sista_getLastErrorMessage()
Returns the last API error message for the current thread.
Definition api.cpp:501
int sista_destroyCursor(CursorHandler_t)
Deallocates the Cursor from memory.
Definition api.cpp:448
int sista_setBackgroundColor(enum sista_BackgroundColor)
Sets the background color using a predefined color.
Definition api.cpp:125
SwappableFieldHandler_t sista_createSwappableField(size_t, size_t)
Creates a SwappableField with the specified width and height.
Definition api.cpp:57
Opaque struct representing ANSI settings.
Opaque struct representing a Border object.
Represents a pair of coordinates (y, x).
Definition api.h:499
unsigned short y
Definition api.h:500
unsigned short x
Definition api.h:501
Opaque struct representing a Field object.
Opaque struct representing a Pawn object.
Represents an RGB color with red, green, and blue components.
Definition api.h:241
unsigned char blue
Definition api.h:244
unsigned char red
Definition api.h:242
unsigned char green
Definition api.h:243
Opaque struct representing a SwappableField object.