Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

output.h

Go to the documentation of this file.
00001 
00008 #ifndef FISH_OUTPUT_H
00009 #define FISH_OUTPUT_H
00010 
00011 #include <wchar.h>
00012 
00016 enum
00017 {
00018         FISH_COLOR_BLACK,
00019         FISH_COLOR_RED,
00020         FISH_COLOR_GREEN,
00021         FISH_COLOR_YELLOW,
00022         FISH_COLOR_BLUE,
00023         FISH_COLOR_MAGENTA,
00024         FISH_COLOR_CYAN,
00025         FISH_COLOR_WHITE,
00027         FISH_COLOR_NORMAL,
00028         FISH_COLOR_IGNORE,
00029         FISH_COLOR_RESET
00030 }
00031 ;
00032 
00036 #define FISH_COLOR_BOLD 0x80
00037 
00040 #define FISH_COLOR_UNDERLINE 0x100
00041 
00074 void set_color( int c, int c2 );
00075 
00076 
00077 #define writembs( mbs )                         \
00078         {                                       \
00079                 char *tmp = mbs;                \
00080                 if( tmp )                               \
00081                 {                                       \
00082                         writembs_internal( tmp );                       \
00083                 }                                                       \
00084                 else                                                    \
00085                 {                                                       \
00086                         debug( 0,                                       \
00087                                _(L"Tried to use terminfo string %s on line %d of %s, which is undefined in terminal of type \"%ls\". Please report this error to %s"), \
00088                                #mbs,                                    \
00089                                __LINE__,                                \
00090                                __FILE__,                                \
00091                                output_get_term(),                       \
00092                                PACKAGE_BUGREPORT);                      \
00093                 }                                                       \
00094         }
00095 
00096 
00103 int writembs_internal( char *str );
00104 
00108 int writech( wint_t ch );
00109 
00113 void writestr( const wchar_t *str );
00114 
00119 void writestr_ellipsis( const wchar_t *str, int max_width );
00120 
00124 int write_escaped_str( const wchar_t *str, int max_len );
00125 
00129 int output_color_code( const wchar_t *val );
00130 
00136 int writeb( tputs_arg_t b );
00137 
00144 void output_set_writer( int (*writer)(char) );
00145 
00146 //typedef int (*func_ptr_t)(char);
00147 
00148 int (*output_get_writer())(char) ;
00149 
00150 void output_set_term( wchar_t *term );
00151 wchar_t *output_get_term();
00152 
00153 #endif

Generated on Sun Jan 13 02:52:28 2008 for fish by  doxygen 1.4.4