cursesinterface.h
Go to the documentation of this file.00001 #ifndef cursesinterface_h_included
00002 #define cursesinterface_h_included
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00033
00034 #include <cxxtls/file.h>
00035
00036 namespace cxxtls
00039 {
00040
00041 class CursorWindow;
00042
00043 namespace CursesInterface
00048 {
00049 void make_xterm_terminfo_file(FileName const &dir);
00050 void openCursesTerminal();
00051 void closeCursesTerminal();
00052 void getCursesCursor(int *row, int *col);
00053 void getCursesScreenSize(int *row, int *col);
00054 void setCursesAttributes( int a );
00055 void paintCharString(char const *r, int count, int a, int row, int col);
00056 void paintCharString(long c, int count, int a, int row, int col);
00057 void refreshCursesWindow();
00058 void beepCursesTerminal();
00059 void moveCursesCursor(int row, int col);
00060 void make_xterm_terminfo_file(FileName const &dir);
00061
00062 extern bool winch_occurred;
00063 extern bool resize_requested;
00064
00065 int read_mapped_key(CursorWindow&);
00066
00067 enum special_keys
00068 {
00069 MouseEvent = 0x8000000,
00070 ResizeEvent= -1
00071 };
00072
00073 enum mouse_down_bits
00074 {
00075 left =1,
00076 right=2,
00077 middle=4
00078 };
00079
00080 struct mouse_info
00083 {
00084
00085
00086 mouse_info(int row, int col, int mouseDownBitMask)
00087 : row_(row),
00088 col_(col),
00089 state_(mouseDownBitMask)
00090 {
00091 }
00092
00093 int row_;
00094 int col_;
00095 int state_;
00096 };
00097
00098 mouse_info read_mouse_info();
00099
00100 enum line_drawing_characters
00102 {
00103 UL_CORNER,
00104 LL_CORNER,
00105 UR_CORNER,
00106 LR_CORNER,
00107 HL_MIDDLE,
00108 VL_MIDDLE,
00109 PL_BOX ,
00110 TE_LEFT ,
00111 TE_RIGHT ,
00112 TE_BOTTOM,
00113 TE_TOP ,
00114
00115 lcCOUNT
00116 };
00117
00118 extern long line_chars[lcCOUNT];
00119
00120 };
00121
00122 }
00123 #endif