2 * an application for displaying Win32 console
4 * Copyright 2001 Eric Pouech
10 #include "wineconsole_res.h"
12 /* this is the configuration stored & loaded into the registry */
14 unsigned cell_width; /* width in pixels of a character */
15 unsigned cell_height; /* height in pixels of a character */
16 int cursor_size; /* in % of cell height */
19 WCHAR face_name[32]; /* name of font (size is LF_FACESIZE) */
22 DWORD menu_mask; /* MK_CONTROL MK_SHIFT mask to drive submenu opening */
23 unsigned sb_width; /* active screen buffer width */
24 unsigned sb_height; /* active screen buffer height */
25 unsigned win_width; /* size (in cells) of visible part of window (width & height) */
27 COORD win_pos; /* position (in cells) of visible part of screen buffer in window */
31 struct config_data curcfg;
32 struct config_data defcfg;
34 CHAR_INFO* cells; /* local copy of cells (sb_width * sb_height) */
36 COORD cursor; /* position in cells of cursor */
38 HANDLE hConIn; /* console input handle */
39 HANDLE hConOut; /* screen buffer handle: has to be changed when active sb changes */
40 HANDLE hSynchro; /* waitable handle signalled by server when something in server has been modified */
42 int (*fnMainLoop)(struct inner_data* data);
43 void (*fnPosCursor)(const struct inner_data* data);
44 void (*fnShapeCursor)(struct inner_data* data, int size, int vis, BOOL force);
45 void (*fnComputePositions)(struct inner_data* data);
46 void (*fnRefresh)(const struct inner_data* data, int tp, int bm);
47 void (*fnResizeScreenBuffer)(struct inner_data* data);
48 void (*fnSetTitle)(const struct inner_data* data);
49 void (*fnScroll)(struct inner_data* data, int pos, BOOL horz);
50 void (*fnDeleteBackend)(struct inner_data* data);
52 void* private; /* data part belonging to the choosen backed */
56 extern void XTracer(int level, const char* format, ...) __attribute__((format (printf,2,3)));
58 extern void XTracer(int level, const char* format, ...);
62 # define Trace XTracer
65 # define Trace (1) ? (void)0 : XTracer
68 /* from wineconsole.c */
69 extern void WINECON_NotifyWindowChange(struct inner_data* data);
70 extern int WINECON_GetHistorySize(HANDLE hConIn);
71 extern BOOL WINECON_SetHistorySize(HANDLE hConIn, int size);
72 extern int WINECON_GetHistoryMode(HANDLE hConIn);
73 extern BOOL WINECON_SetHistoryMode(HANDLE hConIn, int mode);
74 extern BOOL WINECON_GetConsoleTitle(HANDLE hConIn, WCHAR* buffer, size_t len);
75 extern void WINECON_FetchCells(struct inner_data* data, int upd_tp, int upd_bm);
76 extern int WINECON_GrabChanges(struct inner_data* data);
79 extern BOOL WINECON_RegLoad(struct config_data* cfg);
80 extern BOOL WINECON_RegSave(const struct config_data* cfg);
83 extern BOOL WCUSER_InitBackend(struct inner_data* data);