Loading...
Searching...
No Matches
shell.h File Reference
`#include "view.h"`
`#include "buffer.h"`
`#include "arc/std/string.h"`
`#include "arc/std/vector.h"`
`#include <stdint.h>`

Go to the source code of this file.

## Data Structures

struct | ARC_ConsoleShell

## Typedefs

typedef struct ARC_ConsoleShell | ARC_ConsoleShell
typedef void(* | ARC_ConsoleShell_UpdateFn) (ARC_ConsoleShell *shell)

## Functions

void | ARC_ConsoleShell_Create (ARC_ConsoleShell **shell, ARC_ConsoleView *view, ARC_ConsoleShell_UpdateFn updateFn)
| creates ARC_ConsoleShell type
void | ARC_ConsoleShell_Destroy (ARC_ConsoleShell *shell)
| destroys ARC_ConsoleShell type
void | ARC_ConsoleShell_Update (ARC_ConsoleShell *shell)
| updates the ARC_ConsoleShell type
void | ARC_ConsoleShell_Render (ARC_ConsoleShell *shell)
| renders the ARC_ConsoleShell type
void | ARC_ConsoleShell_AddHistory (ARC_ConsoleShell *shell, ARC_String *string)
| adds history ARC_String to ARC_ConsoleShell
ARC_String * | ARC_ConsoleShell_GetHistoryAt (ARC_ConsoleShell *shell, uint32_t index)
| gets history from ARC_ConsoleShell

## Typedef Documentation

## ARC_ConsoleShell

typedef struct ARC_ConsoleShell ARC_ConsoleShell

Definition at line 19 of file shell.h.

## ARC_ConsoleShell_UpdateFn

typedef void(* ARC_ConsoleShell_UpdateFn) (ARC_ConsoleShell *shell)

Definition at line 24 of file shell.h.

## Function Documentation

## ARC_ConsoleShell_AddHistory()

void ARC_ConsoleShell_AddHistory | ( | ARC_ConsoleShell * | shell,
|  | ARC_String * | string )

adds history ARC_String to ARC_ConsoleShell

Parameters

  shell | the ARC_ConsoleShell to add history to
  string | the history string to add to ARC_ConsoleShell

## ARC_ConsoleShell_Create()

void ARC_ConsoleShell_Create | ( | ARC_ConsoleShell ** | shell,
|  | ARC_ConsoleView * | view,
|  | ARC_ConsoleShell_UpdateFn | updateFn )

creates ARC_ConsoleShell type

Parameters

  shell | ARC_ConsoleShell to create
  view | ARC_ConsoleView to attach the shell to
  updateFn | ARC_ConsoleShell_UpdateFn provided that will run the console

## ARC_ConsoleShell_Destroy()

void ARC_ConsoleShell_Destroy | ( | ARC_ConsoleShell * | shell | ) |

destroys ARC_ConsoleShell type

Parameters

  shell | ARC_ConsoleShell to destroy

## ARC_ConsoleShell_GetHistoryAt()

ARC_String * ARC_ConsoleShell_GetHistoryAt | ( | ARC_ConsoleShell * | shell,
|  | uint32_t | index )

gets history from ARC_ConsoleShell

Note
  the index 0 will start from the last added history

Parameters

  shell | the ARC_ConsoleShell to get history from
  index | the location to get history at

Returns
  the history as an ARC_String

## ARC_ConsoleShell_Render()

void ARC_ConsoleShell_Render | ( | ARC_ConsoleShell * | shell | ) |

renders the ARC_ConsoleShell type

Parameters

  shell | the ARC_ConsoleShell to render

## ARC_ConsoleShell_Update()

void ARC_ConsoleShell_Update | ( | ARC_ConsoleShell * | shell | ) |

updates the ARC_ConsoleShell type

Parameters

  shell | the ARC_ConsoleShell to update