00001
00002
00003
00004
00005
00006
00007
00008
00009
00014 #ifndef __VTSCREEN_H__
00015 #define __VTSCREEN_H__
00016
00017 #define UK_CHARSET 'A'
00018
00019 #define ASCII_CHARSET 'B'
00020
00021 #define SPECIAL_GRAPHICS '0'
00022
00025 enum {
00026 OFF,
00027 ON
00028 };
00029
00036 enum {
00037 MOUSE_OFF,
00038 X10_MOUSE,
00039 VT200_MOUSE
00040 };
00041
00048 enum {
00049 SELECTION_CHAR,
00050 SELECTION_WORD,
00051 SELECTION_LINE
00052 };
00053
00061 typedef struct _VTScreenView
00062 {
00063 void *object;
00065 void (*draw_text)(struct _VTScreenView *view,int col, int row,
00066 char *mbstring, int length,int width);
00077 void (*update_cursor_position)(struct _VTScreenView *view,int col, int row);
00085 void (*set_rendition)(struct _VTScreenView *view,
00086 int bold, int blink,
00087 int inverse, int underline,
00088 int foreground, int background,
00089 char charset);
00105 void (*clear_rect)(struct _VTScreenView *view,int s_col,
00106 int s_row, int e_col, int e_row);
00115 void (*swap_video)(struct _VTScreenView *view);
00123 void (*ring)(struct _VTScreenView *view);
00129 void (*resize_request)(struct _VTScreenView *view, int cols, int rows);
00142 void (*notify_osc)(struct _VTScreenView *view, int type,
00143 char *params, int n_params);
00159 void (*update_scrollbar)(struct _VTScreenView *view, int max,
00160 int top, int shown);
00170 void (*scroll_view)(struct _VTScreenView *view, int dest_row,
00171 int src_row, int num_line);
00180 } VTScreenView;
00183 #define VTScreenView_init(view) \
00184 do \
00185 { \
00186 view->object = NULL; \
00187 view->draw_text = NULL; \
00188 view->clear_rect = NULL; \
00189 view->set_rendition = NULL; \
00190 view->swap_video = NULL; \
00191 view->resize_request = NULL; \
00192 view->update_cursor_position = NULL; \
00193 view->ring = NULL; \
00194 view->notify_osc = NULL; \
00195 view->update_scrollbar = NULL; \
00196 view->scroll_view = NULL; \
00197 } while(0)
00198
00203 #endif