00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef _ASTERISK_TERM_H
00015 #define _ASTERISK_TERM_H
00016
00017 #if defined(__cplusplus) || defined(c_plusplus)
00018 extern "C" {
00019 #endif
00020
00021 #define ESC 0x1b
00022 #define ATTR_RESET 0
00023 #define ATTR_BRIGHT 1
00024 #define ATTR_DIM 2
00025 #define ATTR_UNDER 4
00026 #define ATTR_BLINK 5
00027 #define ATTR_REVER 7
00028 #define ATTR_HIDDEN 8
00029
00030 #define COLOR_BLACK 30
00031 #define COLOR_GRAY 30 | 128
00032 #define COLOR_RED 31
00033 #define COLOR_BRRED 31 | 128
00034 #define COLOR_GREEN 32
00035 #define COLOR_BRGREEN 32 | 128
00036 #define COLOR_BROWN 33
00037 #define COLOR_YELLOW 33 | 128
00038 #define COLOR_BLUE 34
00039 #define COLOR_BRBLUE 34 | 128
00040 #define COLOR_MAGENTA 35
00041 #define COLOR_BRMAGENTA 35 | 128
00042 #define COLOR_CYAN 36
00043 #define COLOR_BRCYAN 36 | 128
00044 #define COLOR_WHITE 37
00045 #define COLOR_BRWHITE 37 | 128
00046
00047 extern char *term_color(char *outbuf, const char *inbuf, int fgcolor, int bgcolor, int maxout);
00048
00049 extern char *term_color_code(char *outbuf, int fgcolor, int bgcolor, int maxout);
00050
00051 extern char *term_strip(char *outbuf, char *inbuf, int maxout);
00052
00053 extern char *term_prompt(char *outbuf, const char *inbuf, int maxout);
00054
00055 extern char *term_prep(void);
00056
00057 extern char *term_end(void);
00058
00059 extern char *term_quit(void);
00060
00061 #if defined(__cplusplus) || defined(c_plusplus)
00062 }
00063 #endif
00064
00065 #endif