|
Archeus 0.0.0
A C library and game engine that focuses on documentation
|
#include "arc/console/buffer.h"#include "arc/console/view.h"#include "arc/std/string.h"#include "arc/std/vector.h"#include <stdlib.h>Go to the source code of this file.
Data Structures | |
| struct | 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 | |
| void ARC_ConsoleBuffer_AddChar | ( | ARC_ConsoleBuffer * | buffer, |
| char | character ) |
adds a character to the buffer
| buffer | ARC_ConsoleBuffer to add character to |
| character | char to add to ARC_ConsoleBuffer |
Definition at line 94 of file buffer.c.
References ARC_String_Create(), ARC_String_Destroy(), ARC_String_Merge(), ARC_Vector_Add(), ARC_Vector_Get(), ARC_Vector_RemoveIndex(), and ARC_ConsoleBuffer::bufferLines.
Referenced by ARC_ConsoleBuffer_AddCString(), ARC_ConsoleBuffer_AddCStringWithStrlen(), and ARC_ConsoleBuffer_AddString().
| void ARC_ConsoleBuffer_AddCString | ( | ARC_ConsoleBuffer * | buffer, |
| char * | cstring, | ||
| uint64_t | length ) |
adds a cstring to the buffer
| buffer | ARC_ConsoleBuffer to add character to |
| string | cstring to add to ARC_ConsoleBuffer |
| length | the length of the c string to add |
Definition at line 131 of file buffer.c.
References ARC_ConsoleBuffer_AddChar().
| void ARC_ConsoleBuffer_AddCStringWithStrlen | ( | ARC_ConsoleBuffer * | buffer, |
| char * | cstring ) |
adds a cstring to the buffer with the cstrings string length
| buffer | ARC_ConsoleBuffer to add character to |
| string | cstring to add to ARC_ConsoleBuffer |
Definition at line 138 of file buffer.c.
References ARC_ConsoleBuffer_AddChar().
| void ARC_ConsoleBuffer_AddString | ( | ARC_ConsoleBuffer * | buffer, |
| ARC_String * | string ) |
adds an ARC_String to the buffer
| buffer | ARC_ConsoleBuffer to add character to |
| string | ARC_String to add to ARC_ConsoleBuffer |
Definition at line 124 of file buffer.c.
References ARC_ConsoleBuffer_AddChar(), and ARC_String::data.
| void ARC_ConsoleBuffer_Clear | ( | ARC_ConsoleBuffer * | buffer | ) |
clears the contents of a ARC_ConsoleBuffer
| buffer | ARC_ConsoleBuffer to clear |
Definition at line 35 of file buffer.c.
References ARC_String_Destroy(), ARC_Vector_Add(), ARC_Vector_Create(), ARC_Vector_Destroy(), ARC_Vector_Get(), and ARC_ConsoleBuffer::bufferLines.
| void ARC_ConsoleBuffer_Create | ( | ARC_ConsoleBuffer ** | buffer | ) |
creates ARC_ConsoleBuffer type
| buffer | ARC_ConsoleBuffer to create |
Definition at line 13 of file buffer.c.
References ARC_Vector_Add(), and ARC_Vector_Create().
Referenced by ARC_ConsoleShell_Create().
| void ARC_ConsoleBuffer_Destroy | ( | ARC_ConsoleBuffer * | buffer | ) |
destroys ARC_ConsoleBuffer type
| buffer | ARC_ConsoleBuffer to destroy |
Definition at line 22 of file buffer.c.
References ARC_String_Destroy(), ARC_Vector_Destroy(), ARC_Vector_Get(), and ARC_ConsoleBuffer::bufferLines.
Referenced by ARC_ConsoleShell_Destroy().
| uint32_t ARC_ConsoleBuffer_GetLineNumbers | ( | ARC_ConsoleBuffer * | buffer | ) |
gets the number of lines from a console line buffer
| buffer | ARC_ConsoleBuffer get number of lines from |
Definition at line 145 of file buffer.c.
References ARC_ConsoleBuffer::bufferLines.
| void ARC_ConsoleBuffer_Render | ( | ARC_ConsoleBuffer * | buffer, |
| ARC_ConsoleView * | view ) |
renders a buffer to a ARC_ConsoleView
| buffer | ARC_ConsoleBuffer to render |
| view | ARC_ConsoleView to render the buffer contents to |
Definition at line 51 of file buffer.c.
References ARC_ConsoleView_GetBounds(), ARC_ConsoleView_RenderStringAt(), ARC_Vector_Get(), ARC_ConsoleBuffer::bufferLines, and ARC_Rect::h.
Referenced by ARC_ConsoleShell_Render().
| 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
| buffer | ARC_ConsoleBuffer to render |
| view | ARC_ConsoleView to render the buffer contents to |
| startIndex | start index of buffer to render |
| lines | the number of lines of buffer to render |
Definition at line 73 of file buffer.c.
References ARC_ConsoleView_GetBounds(), ARC_ConsoleView_RenderStringAt(), ARC_Vector_Get(), ARC_ConsoleBuffer::bufferLines, and ARC_Rect::h.