Archeus 0.0.0
A C library and game engine that focuses on documentation
Loading...
Searching...
No Matches
buffer.h File Reference
#include <stdint.h>
#include "arc/console/view.h"
#include "arc/std/string.h"

Go to the source code of this file.

Typedefs

typedef struct ARC_ConsoleBuffer ARC_ConsoleBuffer
 

Functions

void ARC_ConsoleBuffer_Create (ARC_ConsoleBuffer **buffer)
 creates ARC_ConsoleBuffer type
 
void ARC_ConsoleBuffer_Destroy (ARC_ConsoleBuffer *buffer)
 destroys ARC_ConsoleBuffer type
 
void ARC_ConsoleBuffer_Clear (ARC_ConsoleBuffer *buffer)
 clears the contents of a ARC_ConsoleBuffer
 
void ARC_ConsoleBuffer_Render (ARC_ConsoleBuffer *buffer, ARC_ConsoleView *view)
 renders a buffer to a ARC_ConsoleView
 
void ARC_ConsoleBuffer_RenderSection (ARC_ConsoleBuffer *buffer, ARC_ConsoleView *view, uint32_t startIndex, uint32_t lines)
 renders a section of buffer to a ARC_ConsoleView
 
void ARC_ConsoleBuffer_AddChar (ARC_ConsoleBuffer *buffer, char character)
 adds a character to the buffer
 
void ARC_ConsoleBuffer_AddString (ARC_ConsoleBuffer *buffer, ARC_String *string)
 adds an ARC_String to the buffer
 
void ARC_ConsoleBuffer_AddCString (ARC_ConsoleBuffer *buffer, char *cstring, uint64_t length)
 adds a cstring to the buffer
 
void ARC_ConsoleBuffer_AddCStringWithStrlen (ARC_ConsoleBuffer *buffer, char *cstring)
 adds a cstring to the buffer with the cstrings string length
 
uint32_t ARC_ConsoleBuffer_GetLineNumbers (ARC_ConsoleBuffer *buffer)
 gets the number of lines from a console line buffer
 

Typedef Documentation

◆ ARC_ConsoleBuffer

Definition at line 15 of file buffer.h.

Function Documentation

◆ ARC_ConsoleBuffer_AddChar()

void ARC_ConsoleBuffer_AddChar ( ARC_ConsoleBuffer * buffer,
char character )

adds a character to the buffer

Parameters
bufferARC_ConsoleBuffer to add character to
characterchar to add to ARC_ConsoleBuffer

◆ ARC_ConsoleBuffer_AddCString()

void ARC_ConsoleBuffer_AddCString ( ARC_ConsoleBuffer * buffer,
char * cstring,
uint64_t length )

adds a cstring to the buffer

Parameters
bufferARC_ConsoleBuffer to add character to
stringcstring to add to ARC_ConsoleBuffer
lengththe length of the c string to add

◆ ARC_ConsoleBuffer_AddCStringWithStrlen()

void ARC_ConsoleBuffer_AddCStringWithStrlen ( ARC_ConsoleBuffer * buffer,
char * cstring )

adds a cstring to the buffer with the cstrings string length

Parameters
bufferARC_ConsoleBuffer to add character to
stringcstring to add to ARC_ConsoleBuffer

◆ ARC_ConsoleBuffer_AddString()

void ARC_ConsoleBuffer_AddString ( ARC_ConsoleBuffer * buffer,
ARC_String * string )

adds an ARC_String to the buffer

Parameters
bufferARC_ConsoleBuffer to add character to
stringARC_String to add to ARC_ConsoleBuffer

◆ ARC_ConsoleBuffer_Clear()

void ARC_ConsoleBuffer_Clear ( ARC_ConsoleBuffer * buffer)

clears the contents of a ARC_ConsoleBuffer

Parameters
bufferARC_ConsoleBuffer to clear

◆ ARC_ConsoleBuffer_Create()

void ARC_ConsoleBuffer_Create ( ARC_ConsoleBuffer ** buffer)

creates ARC_ConsoleBuffer type

Parameters
bufferARC_ConsoleBuffer to create

◆ ARC_ConsoleBuffer_Destroy()

void ARC_ConsoleBuffer_Destroy ( ARC_ConsoleBuffer * buffer)

destroys ARC_ConsoleBuffer type

Parameters
bufferARC_ConsoleBuffer to destroy

◆ ARC_ConsoleBuffer_GetLineNumbers()

uint32_t ARC_ConsoleBuffer_GetLineNumbers ( ARC_ConsoleBuffer * buffer)

gets the number of lines from a console line buffer

Parameters
bufferARC_ConsoleBuffer get number of lines from
Returns
the number of lines within an ARC_ConsoleBuffer

◆ ARC_ConsoleBuffer_Render()

void ARC_ConsoleBuffer_Render ( ARC_ConsoleBuffer * buffer,
ARC_ConsoleView * view )

renders a buffer to a ARC_ConsoleView

Parameters
bufferARC_ConsoleBuffer to render
viewARC_ConsoleView to render the buffer contents to

◆ ARC_ConsoleBuffer_RenderSection()

void ARC_ConsoleBuffer_RenderSection ( ARC_ConsoleBuffer * buffer,
ARC_ConsoleView * view,
uint32_t startIndex,
uint32_t lines )

renders a section of buffer to a ARC_ConsoleView

Parameters
bufferARC_ConsoleBuffer to render
viewARC_ConsoleView to render the buffer contents to
startIndexstart index of buffer to render
linesthe number of lines of buffer to render