Archeus 0.0.0
A C library and game engine that focuses on documentation
Loading...
Searching...
No Matches
shell.h
Go to the documentation of this file.
1#ifndef ARC_CONSOLE_SHELL_H_
2#define ARC_CONSOLE_SHELL_H_
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8//TODO: fix up this file
9
10#include "view.h"
11#include "buffer.h"
12#include "arc/std/string.h"
13#include "arc/std/vector.h"
14#include <stdint.h>
15
16/**
17 * @brief
18*/
20
21/**
22 * @brief
23*/
25
26/**
27 * @brief
28*/
42
43/**
44 * @brief creates ARC_ConsoleShell type
45 *
46 * @param shell ARC_ConsoleShell to create
47 * @param view ARC_ConsoleView to attach the shell to
48 * @param updateFn ARC_ConsoleShell_UpdateFn provided that will run the console
49*/
51
52/**
53 * @brief destroys ARC_ConsoleShell type
54 *
55 * @param shell ARC_ConsoleShell to destroy
56*/
58
59/**
60 * @brief updates the ARC_ConsoleShell type
61 *
62 * @param shell the ARC_ConsoleShell to update
63*/
65
66/**
67 * @brief renders the ARC_ConsoleShell type
68 *
69 * @param shell the ARC_ConsoleShell to render
70*/
72
73/**
74 * @brief adds history ARC_String to ARC_ConsoleShell
75 *
76 * @param shell the ARC_ConsoleShell to add history to
77 * @param string the history string to add to ARC_ConsoleShell
78*/
80
81/**
82 * @brief gets history from ARC_ConsoleShell
83 *
84 * @note the index 0 will start from the last added history
85 *
86 * @param shell the ARC_ConsoleShell to get history from
87 * @param index the location to get history at
88 *
89 * @return the history as an ARC_String
90*/
92
93#ifdef __cplusplus
94}
95#endif
96
97#endif //!ARC_CONSOLE_SHELL_H_
struct ARC_ConsoleBuffer ARC_ConsoleBuffer
Definition buffer.h:15
struct ARC_ConsoleView ARC_ConsoleView
Definition view.h:18
struct ARC_Vector ARC_Vector
a dynamic array type
Definition vector.h:26
void ARC_ConsoleShell_Render(ARC_ConsoleShell *shell)
renders the ARC_ConsoleShell type
void ARC_ConsoleShell_Destroy(ARC_ConsoleShell *shell)
destroys ARC_ConsoleShell type
void(* ARC_ConsoleShell_UpdateFn)(ARC_ConsoleShell *shell)
Definition shell.h:24
ARC_String * ARC_ConsoleShell_GetHistoryAt(ARC_ConsoleShell *shell, uint32_t index)
gets history from ARC_ConsoleShell
void ARC_ConsoleShell_Create(ARC_ConsoleShell **shell, ARC_ConsoleView *view, ARC_ConsoleShell_UpdateFn updateFn)
creates ARC_ConsoleShell type
void ARC_ConsoleShell_AddHistory(ARC_ConsoleShell *shell, ARC_String *string)
adds history ARC_String to ARC_ConsoleShell
void ARC_ConsoleShell_Update(ARC_ConsoleShell *shell)
updates the ARC_ConsoleShell type
uint32_t bufferLineIndex
Definition shell.h:32
ARC_ConsoleView * view
Definition shell.h:30
ARC_ConsoleBuffer * buffer
Definition shell.h:31
ARC_Vector * history
Definition shell.h:34
ARC_ConsoleShell_UpdateFn updateFn
Definition shell.h:37
ARC_String * currentLine
Definition shell.h:39
ARC_String * userInput
Definition shell.h:40
uint32_t historyIndex
Definition shell.h:35
substring position within a string
Definition string.h:14
creates and outlines a dynamic array type and its functions