Netzhaut
Web Browser Engine
ver.0.3.0.0
rev.0.15.61.18
nhtty

Environment for running text based programs. More...

Data Structures

struct  nh_tty_GlyphAttributes
 
struct  nh_tty_GlyphColor
 
struct  nh_tty_Glyph
 
struct  nh_tty_Row
 
struct  nh_tty_ProgramCallbacks
 
struct  nh_tty_ProgramPrototype
 
struct  nh_tty_Program
 

Typedefs

typedef struct nh_tty_TTY nh_tty_TTY
 
typedef void *(* nh_tty_init_f) (void *arg_p)
 
typedef NH_TTY_RESULT(* nh_tty_draw_f) (nh_tty_Program *Program_p, nh_tty_Glyph *Glyphs_p, int width, int height, int row)
 
typedef NH_TTY_RESULT(* nh_tty_getCursorPosition_f) (nh_tty_Program *Program_p, int *x_p, int *y_p)
 
typedef NH_TTY_RESULT(* nh_tty_handleInput_f) (nh_tty_Program *Program_p, nh_wsi_KeyboardEvent Event)
 
typedef NH_TTY_RESULT(* nh_tty_update_f) (nh_tty_Program *Program_p)
 
typedef NH_TTY_RESULT(* nh_tty_handleCommand_f) (nh_tty_Program *Program_p, nh_List *Arguments_p)
 
typedef void *(* nh_tty_createView_f) ()
 
typedef void(* nh_tty_destroyView_f) (void *view_p)
 

Enumerations

enum  NH_TTY_RESULT {
  NH_TTY_SUCCESS , NH_TTY_ERROR_NULL_POINTER , NH_TTY_ERROR_BAD_STATE , NH_TTY_ERROR_MEMORY_ALLOCATION ,
  NH_TTY_ERROR_TERMINFO_DATA_CANNOT_BE_FOUND , NH_TTY_ERROR_UNKNOWN_TERMINAL_TYPE , NH_TTY_ERROR_TERMINAL_IS_HARDCOPY , NH_TTY_ERROR_UNKNOWN_COMMAND ,
  NH_TTY_ERROR_INVALID_ARGUMENT
}
 

Functions

nh_tty_TTYnh_tty_openTTY ()
 
NH_TTY_RESULT nh_tty_addProgram (nh_tty_TTY *TTY_p, NH_ENCODING_UTF32 *name_p)
 
NH_TTY_RESULT nh_tty_addProgramOnce (nh_tty_TTY *TTY_p, NH_ENCODING_UTF32 *name_p)
 
NH_TTY_RESULT nh_tty_claimStandardIO (nh_tty_TTY *TTY_p)
 
NH_TTY_RESULT nh_tty_unclaimStandardIO (nh_tty_TTY *TTY_p)
 
NH_TTY_RESULT nh_tty_sendInput (nh_tty_TTY *TTY_p, nh_wsi_Event Event)
 
NH_TTY_RESULT nh_tty_sendCommandToShell (int pid, NH_BYTE *command_p)
 

Detailed Description

Environment for running text based programs.

In this API, TTY stands for TeleType and provides an interface for writing text based programs. Using these programs, it processes input streams from either standard input or nh_tty_sendInput and sends the result to either standard output or a nh_terminal_Terminal. Text based programs can be either added by using nh_tty_addDefaultProgram or nh_tty_addCustomProgram.

Typedef Documentation

◆ nh_tty_createView_f

typedef void *(* nh_tty_createView_f) ()

◆ nh_tty_destroyView_f

typedef void(* nh_tty_destroyView_f) (void *view_p)

◆ nh_tty_draw_f

typedef NH_TTY_RESULT(* nh_tty_draw_f) (nh_tty_Program *Program_p, nh_tty_Glyph *Glyphs_p, int width, int height, int row)

◆ nh_tty_getCursorPosition_f

typedef NH_TTY_RESULT(* nh_tty_getCursorPosition_f) (nh_tty_Program *Program_p, int *x_p, int *y_p)

◆ nh_tty_handleCommand_f

typedef NH_TTY_RESULT(* nh_tty_handleCommand_f) (nh_tty_Program *Program_p, nh_List *Arguments_p)

◆ nh_tty_handleInput_f

typedef NH_TTY_RESULT(* nh_tty_handleInput_f) (nh_tty_Program *Program_p, nh_wsi_KeyboardEvent Event)

◆ nh_tty_init_f

typedef void *(* nh_tty_init_f) (void *arg_p)

◆ nh_tty_TTY

typedef struct nh_tty_TTY nh_tty_TTY

◆ nh_tty_update_f

typedef NH_TTY_RESULT(* nh_tty_update_f) (nh_tty_Program *Program_p)

Enumeration Type Documentation

◆ NH_TTY_RESULT

Return values for functions.

Enumerator
NH_TTY_SUCCESS 

Indicates that something worked as planned.

NH_TTY_ERROR_NULL_POINTER 
NH_TTY_ERROR_BAD_STATE 
NH_TTY_ERROR_MEMORY_ALLOCATION 
NH_TTY_ERROR_TERMINFO_DATA_CANNOT_BE_FOUND 
NH_TTY_ERROR_UNKNOWN_TERMINAL_TYPE 
NH_TTY_ERROR_TERMINAL_IS_HARDCOPY 
NH_TTY_ERROR_UNKNOWN_COMMAND 
NH_TTY_ERROR_INVALID_ARGUMENT 

Function Documentation

◆ nh_tty_addProgram()

NH_TTY_RESULT nh_tty_addProgram ( nh_tty_TTY TTY_p,
NH_ENCODING_UTF32 name_p 
)

Todo.

◆ nh_tty_addProgramOnce()

NH_TTY_RESULT nh_tty_addProgramOnce ( nh_tty_TTY TTY_p,
NH_ENCODING_UTF32 name_p 
)

Todo.

◆ nh_tty_claimStandardIO()

NH_TTY_RESULT nh_tty_claimStandardIO ( nh_tty_TTY TTY_p)

Todo.

◆ nh_tty_openTTY()

nh_tty_TTY * nh_tty_openTTY ( )

Todo.

◆ nh_tty_sendCommandToShell()

NH_TTY_RESULT nh_tty_sendCommandToShell ( int  pid,
NH_BYTE command_p 
)

Todo.

◆ nh_tty_sendInput()

NH_TTY_RESULT nh_tty_sendInput ( nh_tty_TTY TTY_p,
nh_wsi_Event  Event 
)

Todo.

◆ nh_tty_unclaimStandardIO()

NH_TTY_RESULT nh_tty_unclaimStandardIO ( nh_tty_TTY TTY_p)

Todo.