Main Page | Modules | Class Hierarchy | Data Structures | File List | Data Fields | Globals | Related Pages

mu_term.h

Go to the documentation of this file.
00001 
00008 #ifndef __MU_TERM_H__
00009 #define __MU_TERM_H__
00010 
00011 #include <stdarg.h>
00012 
00020 #include "mu_termdefs.h"
00021 #include "my_types.h"
00022 
00024 typedef struct MUterm_char
00025 {
00026   char  c;       
00027   u8    fg_bg;   
00028 } MUterm_char_t;
00029 
00031 typedef struct MUterm
00032 {
00033   MUterm_char_t *data;    
00034   MUterm_char_t *dataend; 
00036   int ncol,nline;         
00037   int start_line;         
00040   struct
00041   {
00042     u8    x,y;    
00043     u8    fg_bg;  
00044     u8    sx,sy;  
00045   }cursor;
00046 
00048   struct
00049   {
00050     unsigned wrap:1;      
00051     unsigned step:1;      
00052     unsigned insert:1;    
00053     unsigned invvideo:1;  
00054     unsigned hidden:1;    
00055     unsigned localecho:1; 
00056     unsigned lf_crlf:1;   
00057   } mode;
00058 
00059   int escape;     
00060   int expected;   
00061   int command;    
00063   int (*getchar)(void); 
00065 } MUterm_t;
00066 
00069 MUterm_t *MUterm_create(int ncol, int nline, int donotsetactiv);
00070 
00073 int MUterm_setstream( int(*newreader)(void), MUterm_t *term);
00074 
00078 MUterm_t *MUterm_setactive(MUterm_t *term);
00079 
00082 MUterm_t *MUterm_getactive(void);
00083 
00086 void MUterm_kill(MUterm_t *term);
00087 
00090 int MUterm_reset(MUterm_t *term);
00091 
00094 int MUterm_update(MUterm_t *term);
00095 
00098 void MUterm_inputc(char a, MUterm_t *term);
00099 
00102 void MUterm_input(const char *a, MUterm_t *term);
00103 
00106 void MUterm_locate(int x, int y, MUterm_t *term);
00107 
00110 void MUterm_cls(MUterm_t *term);
00111 
00114 void MUterm_setcolor(int fg, int bg, MUterm_t *term);
00115 
00118 void MUterm_savecursor(MUterm_t *term);
00119 
00122 void MUterm_restorecursor(MUterm_t *term);
00123 
00126 void MUterm_printf( const char *fmt, ... );
00127 void MUterm_vprintf( const char *fmt, va_list args);
00128 
00131 #endif

dcplaya documentation version 1.2 Generated on January 2004 by doxygen 1.3.5