FreeNOS
Data Structures | Macros | Typedefs | Functions
teken.h File Reference
#include <sys/types.h>
#include <Macros.h>

Go to the source code of this file.

Data Structures

struct  teken_pos_t
 
struct  teken_rect_t
 
struct  teken_attr_t
 
struct  teken_span_t
 
struct  teken_funcs_t
 
struct  __teken
 

Macros

#define TF_BOLD   0x01
 
#define TF_UNDERLINE   0x02
 
#define TF_BLINK   0x04
 
#define TF_REVERSE   0x08
 
#define TC_BLACK   0
 
#define TC_RED   1
 
#define TC_GREEN   2
 
#define TC_BROWN   3
 
#define TC_BLUE   4
 
#define TC_MAGENTA   5
 
#define TC_CYAN   6
 
#define TC_WHITE   7
 
#define TC_NCOLORS   8
 
#define TP_SHOWCURSOR   0
 
#define TP_CURSORKEYS   1
 
#define TP_KEYPADAPP   2
 
#define TP_AUTOREPEAT   3
 
#define TP_SWITCHVT   4
 
#define TP_132COLS   5
 
#define TP_SETBELLPD   6
 
#define TP_SETBELLPD_PITCH(pd)   ((pd) >> 16)
 
#define TP_SETBELLPD_DURATION(pd)   ((pd) & 0xffff)
 
#define T_NUMSIZE   8
 
#define T_NUMCOL   160
 

Typedefs

typedef unsigned char teken_char_t
 
typedef unsigned short teken_unit_t
 
typedef unsigned char teken_format_t
 
typedef unsigned char teken_color_t
 
typedef struct __teken teken_t
 
typedef void teken_state_t(teken_t *, teken_char_t)
 
typedef void tf_bell_t(void *)
 
typedef void tf_cursor_t(void *, const teken_pos_t *)
 
typedef void tf_putchar_t(void *, const teken_pos_t *, teken_char_t, const teken_attr_t *)
 
typedef void tf_fill_t(void *, const teken_rect_t *, teken_char_t, const teken_attr_t *)
 
typedef void tf_copy_t(void *, const teken_rect_t *, const teken_pos_t *)
 
typedef void tf_param_t(void *, int, unsigned int)
 
typedef void tf_respond_t(void *, const void *, size_t)
 

Functions

C void teken_init (teken_t *, const teken_funcs_t *, void *)
 
C void teken_input (teken_t *, const void *, size_t)
 
const C teken_attr_tteken_get_curattr (teken_t *)
 
const C teken_attr_tteken_get_defattr (teken_t *)
 
C void teken_set_cursor (teken_t *, const teken_pos_t *)
 
C void teken_set_curattr (teken_t *, const teken_attr_t *)
 
C void teken_set_defattr (teken_t *, const teken_attr_t *)
 
C void teken_set_winsize (teken_t *, const teken_pos_t *)
 

Macro Definition Documentation

◆ T_NUMCOL

#define T_NUMCOL   160

Definition at line 155 of file teken.h.

◆ T_NUMSIZE

#define T_NUMSIZE   8

Definition at line 138 of file teken.h.

◆ TC_BLACK

#define TC_BLACK   0

Definition at line 58 of file teken.h.

◆ TC_BLUE

#define TC_BLUE   4

Definition at line 62 of file teken.h.

◆ TC_BROWN

#define TC_BROWN   3

Definition at line 61 of file teken.h.

◆ TC_CYAN

#define TC_CYAN   6

Definition at line 64 of file teken.h.

◆ TC_GREEN

#define TC_GREEN   2

Definition at line 60 of file teken.h.

◆ TC_MAGENTA

#define TC_MAGENTA   5

Definition at line 63 of file teken.h.

◆ TC_NCOLORS

#define TC_NCOLORS   8

Definition at line 66 of file teken.h.

◆ TC_RED

#define TC_RED   1

Definition at line 59 of file teken.h.

◆ TC_WHITE

#define TC_WHITE   7

Definition at line 65 of file teken.h.

◆ TF_BLINK

#define TF_BLINK   0x04

Definition at line 55 of file teken.h.

◆ TF_BOLD

#define TF_BOLD   0x01

Definition at line 53 of file teken.h.

◆ TF_REVERSE

#define TF_REVERSE   0x08

Definition at line 56 of file teken.h.

◆ TF_UNDERLINE

#define TF_UNDERLINE   0x02

Definition at line 54 of file teken.h.

◆ TP_132COLS

#define TP_132COLS   5

Definition at line 107 of file teken.h.

◆ TP_AUTOREPEAT

#define TP_AUTOREPEAT   3

Definition at line 105 of file teken.h.

◆ TP_CURSORKEYS

#define TP_CURSORKEYS   1

Definition at line 103 of file teken.h.

◆ TP_KEYPADAPP

#define TP_KEYPADAPP   2

Definition at line 104 of file teken.h.

◆ TP_SETBELLPD

#define TP_SETBELLPD   6

Definition at line 108 of file teken.h.

◆ TP_SETBELLPD_DURATION

#define TP_SETBELLPD_DURATION (   pd)    ((pd) & 0xffff)

Definition at line 110 of file teken.h.

◆ TP_SETBELLPD_PITCH

#define TP_SETBELLPD_PITCH (   pd)    ((pd) >> 16)

Definition at line 109 of file teken.h.

◆ TP_SHOWCURSOR

#define TP_SHOWCURSOR   0

Definition at line 102 of file teken.h.

◆ TP_SWITCHVT

#define TP_SWITCHVT   4

Definition at line 106 of file teken.h.

Typedef Documentation

◆ teken_char_t

typedef unsigned char teken_char_t

Definition at line 49 of file teken.h.

◆ teken_color_t

typedef unsigned char teken_color_t

Definition at line 57 of file teken.h.

◆ teken_format_t

typedef unsigned char teken_format_t

Definition at line 52 of file teken.h.

◆ teken_state_t

typedef void teken_state_t(teken_t *, teken_char_t)

Definition at line 88 of file teken.h.

◆ teken_t

typedef struct __teken teken_t

Definition at line 86 of file teken.h.

◆ teken_unit_t

typedef unsigned short teken_unit_t

Definition at line 51 of file teken.h.

◆ tf_bell_t

typedef void tf_bell_t(void *)

Definition at line 94 of file teken.h.

◆ tf_copy_t

typedef void tf_copy_t(void *, const teken_rect_t *, const teken_pos_t *)

Definition at line 100 of file teken.h.

◆ tf_cursor_t

typedef void tf_cursor_t(void *, const teken_pos_t *)

Definition at line 95 of file teken.h.

◆ tf_fill_t

typedef void tf_fill_t(void *, const teken_rect_t *, teken_char_t, const teken_attr_t *)

Definition at line 98 of file teken.h.

◆ tf_param_t

typedef void tf_param_t(void *, int, unsigned int)

Definition at line 101 of file teken.h.

◆ tf_putchar_t

typedef void tf_putchar_t(void *, const teken_pos_t *, teken_char_t, const teken_attr_t *)

Definition at line 96 of file teken.h.

◆ tf_respond_t

typedef void tf_respond_t(void *, const void *, size_t)

Definition at line 111 of file teken.h.

Function Documentation

◆ teken_get_curattr()

const C teken_attr_t* teken_get_curattr ( teken_t )

Definition at line 309 of file teken.c.

References __teken::t_curattr.

◆ teken_get_defattr()

const C teken_attr_t* teken_get_defattr ( teken_t )

Definition at line 323 of file teken.c.

References __teken::t_defattr.

◆ teken_init()

C void teken_init ( teken_t ,
const teken_funcs_t ,
void *   
)

◆ teken_input()

C void teken_input ( teken_t ,
const void *  ,
size_t   
)

Definition at line 289 of file teken.c.

References teken_input_byte().

Referenced by Terminal::writeTerminal().

◆ teken_set_curattr()

C void teken_set_curattr ( teken_t ,
const teken_attr_t  
)

Definition at line 316 of file teken.c.

References __teken::t_curattr.

◆ teken_set_cursor()

C void teken_set_cursor ( teken_t ,
const teken_pos_t  
)

◆ teken_set_defattr()

C void teken_set_defattr ( teken_t ,
const teken_attr_t  
)

Definition at line 330 of file teken.c.

References __teken::t_curattr, __teken::t_defattr, and __teken::t_saved_curattr.

◆ teken_set_winsize()

C void teken_set_winsize ( teken_t ,
const teken_pos_t  
)