f***ed up and needed to rework packages
This commit is contained in:
parent
b43ab1702f
commit
f7a87d7519
78 changed files with 3713 additions and 0 deletions
102
include/arc/console/buffer/line.h
Normal file
102
include/arc/console/buffer/line.h
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
#ifndef ARC_CONSOLE_LINE_BUFFER_H_
|
||||
#define ARC_CONSOLE_LINE_BUFFER_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include "arc/console/view.h"
|
||||
#include "arc/std/string.h"
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*/
|
||||
typedef struct ARC_ConsoleLineBuffer ARC_ConsoleLineBuffer;
|
||||
|
||||
/**
|
||||
* @brief creates ARC_ConsoleLineBuffer type
|
||||
*
|
||||
* @param buffer ARC_ConsoleLineBuffer to create
|
||||
*/
|
||||
void ARC_ConsoleLineBuffer_Create(ARC_ConsoleLineBuffer **buffer);
|
||||
|
||||
/**
|
||||
* @brief destroys ARC_ConsoleLineBuffer type
|
||||
*
|
||||
* @param buffer ARC_ConsoleLineBuffer to destroy
|
||||
*/
|
||||
void ARC_ConsoleLineBuffer_Destroy(ARC_ConsoleLineBuffer *buffer);
|
||||
|
||||
/**
|
||||
* @brief clears the contents of a ARC_ConsoleLineBuffer
|
||||
*
|
||||
* @param buffer ARC_ConsoleLineBuffer to clear
|
||||
*/
|
||||
void ARC_ConsoleLineBuffer_Clear(ARC_ConsoleLineBuffer *buffer);
|
||||
|
||||
/**
|
||||
* @brief renders a buffer to a ARC_ConsoleView
|
||||
*
|
||||
* @param buffer ARC_ConsoleLineBuffer to render
|
||||
* @param view ARC_ConsoleView to render the buffer contents to
|
||||
*/
|
||||
void ARC_ConsoleLineBuffer_Render(ARC_ConsoleLineBuffer *buffer, ARC_ConsoleView *view);
|
||||
|
||||
/**
|
||||
* @brief renders a section of buffer to a ARC_ConsoleView
|
||||
*
|
||||
* @param buffer ARC_ConsoleLineBuffer to render
|
||||
* @param view ARC_ConsoleView to render the buffer contents to
|
||||
* @param startIndex start index of buffer to render
|
||||
* @param lines the number of lines of buffer to render
|
||||
*/
|
||||
void ARC_ConsoleLineBuffer_RenderSection(ARC_ConsoleLineBuffer *buffer, ARC_ConsoleView *view, uint32_t startIndex, uint32_t lines);
|
||||
|
||||
/**
|
||||
* @brief adds a character to the buffer
|
||||
*
|
||||
* @param buffer ARC_ConsoleLineBuffer to add character to
|
||||
* @param character char to add to ARC_ConsoleBuffer
|
||||
*/
|
||||
void ARC_ConsoleLineBuffer_AddChar(ARC_ConsoleLineBuffer *buffer, char character);
|
||||
|
||||
/**
|
||||
* @brief adds an ARC_String to the buffer
|
||||
*
|
||||
* @param buffer ARC_ConsoleLineBuffer to add character to
|
||||
* @param string ARC_String to add to ARC_ConsoleLineBuffer
|
||||
*/
|
||||
void ARC_ConsoleLineBuffer_AddString(ARC_ConsoleLineBuffer *buffer, ARC_String *string);
|
||||
|
||||
/**
|
||||
* @brief adds a cstring to the buffer
|
||||
*
|
||||
* @param buffer ARC_ConsoleLineBuffer to add character to
|
||||
* @param string cstring to add to ARC_ConsoleLineBuffer
|
||||
* @param length the length of the c string to add
|
||||
*/
|
||||
void ARC_ConsoleLineBuffer_AddCString(ARC_ConsoleLineBuffer *buffer, char *cstring, uint64_t length);
|
||||
|
||||
/**
|
||||
* @brief adds a cstring to the buffer with the cstrings string length
|
||||
*
|
||||
* @param buffer ARC_ConsoleLineBuffer to add character to
|
||||
* @param string cstring to add to ARC_ConsoleLineBuffer
|
||||
*/
|
||||
void ARC_ConsoleLineBuffer_AddCStringWithStrlen(ARC_ConsoleLineBuffer *buffer, char *cstring);
|
||||
|
||||
/**
|
||||
* @brief gets the number of lines from a console line buffer
|
||||
*
|
||||
* @param buffer ARC_ConsoleLineBuffer get number of lines from
|
||||
*
|
||||
* @return the number of lines within an ARC_ConsoleLineBuffer
|
||||
*/
|
||||
uint32_t ARC_ConsoleLineBuffer_GetLineNumbers(ARC_ConsoleLineBuffer *buffer);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif //!ARC_CONSOLE_LINE_BUFFER_H_
|
||||
98
include/arc/console/buffer/view.h
Normal file
98
include/arc/console/buffer/view.h
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
#ifndef ARC_CONSOLE_VIEW_BUFFER_H_
|
||||
#define ARC_CONSOLE_VIEW_BUFFER_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include "arc/console/view.h"
|
||||
#include "arc/math/point.h"
|
||||
#include "arc/std/string.h"
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*/
|
||||
typedef struct ARC_ConsoleViewBuffer ARC_ConsoleViewBuffer;
|
||||
|
||||
/**
|
||||
* @brief creates ARC_ConsoleViewBuffer type
|
||||
*
|
||||
* @param buffer ARC_ConsoleViewBuffer to create
|
||||
*/
|
||||
void ARC_ConsoleViewBuffer_Create(ARC_ConsoleViewBuffer **buffer, ARC_ConsoleView *view);
|
||||
|
||||
/**
|
||||
* @brief destroys ARC_ConsoleViewBuffer type
|
||||
*
|
||||
* @param buffer ARC_ConsoleViewBuffer to destroy
|
||||
*/
|
||||
void ARC_ConsoleViewBuffer_Destroy(ARC_ConsoleViewBuffer *buffer);
|
||||
|
||||
/**
|
||||
* @brief clears the contents of a ARC_ConsoleViewBuffer
|
||||
*
|
||||
* @param buffer ARC_ConsoleViewBuffer to clear
|
||||
*/
|
||||
void ARC_ConsoleViewBuffer_Clear(ARC_ConsoleViewBuffer *buffer);
|
||||
|
||||
/**
|
||||
* @brief renders a buffer to a ARC_ConsoleView
|
||||
*
|
||||
* @param buffer ARC_ConsoleViewBuffer to render
|
||||
* @param view ARC_ConsoleView to render the buffer contents to
|
||||
*/
|
||||
void ARC_ConsoleViewBuffer_Render(ARC_ConsoleViewBuffer *buffer, ARC_ConsoleView *view);
|
||||
|
||||
/**
|
||||
* @brief renders a section of buffer to a ARC_ConsoleView
|
||||
*
|
||||
* @param buffer ARC_ConsoleViewBuffer to render
|
||||
* @param view ARC_ConsoleView to render the buffer contents to
|
||||
* @param startIndex start index of buffer to render
|
||||
* @param lines the number of lines of buffer to render
|
||||
*/
|
||||
void ARC_ConsoleViewBuffer_RenderArea(ARC_ConsoleViewBuffer *buffer, ARC_ConsoleView *view, uint32_t startIndex, uint32_t lines);
|
||||
|
||||
/**
|
||||
* @brief adds a character to the buffer
|
||||
*
|
||||
* @param buffer ARC_ConsoleViewBuffer to add character to
|
||||
* @param character char to add to ARC_ConsoleBuffer
|
||||
* @param pos position to add the char at
|
||||
*/
|
||||
void ARC_ConsoleViewBuffer_AddCharAt(ARC_ConsoleViewBuffer *buffer, char character, ARC_Point pos);
|
||||
|
||||
/**
|
||||
* @brief adds an ARC_String to the buffer
|
||||
*
|
||||
* @param buffer ARC_ConsoleViewBuffer to add character to
|
||||
* @param string ARC_String to add to ARC_ConsoleViewBuffer
|
||||
* @param pos position to add the char at
|
||||
*/
|
||||
void ARC_ConsoleViewBuffer_AddStringAt(ARC_ConsoleViewBuffer *buffer, ARC_String *string, ARC_Point pos);
|
||||
|
||||
/**
|
||||
* @brief adds a cstring to the buffer
|
||||
*
|
||||
* @param buffer ARC_ConsoleViewBuffer to add character to
|
||||
* @param string cstring to add to ARC_ConsoleViewBuffer
|
||||
* @param length the length of the c string to add
|
||||
* @param pos position to add the char at
|
||||
*/
|
||||
void ARC_ConsoleViewBuffer_AddCString(ARC_ConsoleViewBuffer *buffer, char *cstring, uint64_t length);
|
||||
|
||||
/**
|
||||
* @brief adds a cstring to the buffer with the cstrings string length
|
||||
*
|
||||
* @param buffer ARC_ConsoleViewBuffer to add character to
|
||||
* @param string cstring to add to ARC_ConsoleViewBuffer
|
||||
* @param pos position to add the char at
|
||||
*/
|
||||
void ARC_ConsoleViewBuffer_AddCStringWithStrlen(ARC_ConsoleViewBuffer *buffer, char *cstring);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // [!ARC_CONSOLE_VIEW_BUFFER_H_
|
||||
Loading…
Add table
Add a link
Reference in a new issue