Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 176 lines (154 sloc) 7.918 kB
8d1ac0c @mbert Import Elvis 2.1 (written by Steve Kirkendall)
authored
1 /*
2 ** winelvis.h -- MS-Windows support for elvis.
3 **
4 ** Copyright 1996, Serge Pirotte.
5 */
6
7 #if !defined (WINELVIS_H)
8 #define WINELVIS_H
9
10 struct vkey {
11 char *label;
12 char *cooked;
13 MAPFLAGS flags;
14 char *rawin;
15 };
16
17 struct gwopts {
18 OPTVAL scrollbar;
19 OPTVAL toolbar;
20 OPTVAL statusbar;
21 OPTVAL menubar;
22 OPTVAL font;
9f1c6f0 @mbert Import Elvis 2.2_0 (written by Steve Kirkendall)
authored
23 OPTVAL propfont;
24 OPTVAL titleformat;
25 OPTVAL scrollbgimage;
26 OPTVAL iconimage;
8d1ac0c @mbert Import Elvis 2.1 (written by Steve Kirkendall)
authored
27 };
28
29 typedef struct GUI_WINDOW {
30 struct GUI_WINDOW *nextp;
31 HWND frameHWnd;
32 HWND clientHWnd;
33 HWND toolbarHWnd;
34 HWND statusbarHWnd;
35 HMENU menuHndl;
9f1c6f0 @mbert Import Elvis 2.2_0 (written by Steve Kirkendall)
authored
36 COLORREF bg;
37 long scrolled;
8d1ac0c @mbert Import Elvis 2.1 (written by Steve Kirkendall)
authored
38 int active;
39 int currow;
40 int curcol;
41 int numrows;
42 int numcols;
43 int xcsize;
44 int ycsize;
45 int xsize;
46 int ysize;
47 int font_size_array[256];
48 long thumbsize;
49 long scrollsize;
50 ELVCURSOR cursor_type;
51 int caret;
9f1c6f0 @mbert Import Elvis 2.2_0 (written by Steve Kirkendall)
authored
52 HFONT fonts[8];
8d1ac0c @mbert Import Elvis 2.1 (written by Steve Kirkendall)
authored
53 struct gwopts options;
54 } GUI_WINDOW;
55
9f1c6f0 @mbert Import Elvis 2.2_0 (written by Steve Kirkendall)
authored
56 typedef struct
57 {
58 char *name;
59 unsigned char rgb[3];
60 } GUI_COLORTBL;
61
8d1ac0c @mbert Import Elvis 2.1 (written by Steve Kirkendall)
authored
62 #define o_scrollbar(p) (p)->options.scrollbar.value.boolean
63 #define o_toolbar(p) (p)->options.toolbar.value.boolean
64 #define o_statusbar(p) (p)->options.statusbar.value.boolean
65 #define o_menubar(p) (p)->options.menubar.value.boolean
66 #define o_font(p) (p)->options.font.value.string
9f1c6f0 @mbert Import Elvis 2.2_0 (written by Steve Kirkendall)
authored
67 #define o_propfont(p) (p)->options.propfont.value.string
68 #define o_titleformat(p) (p)->options.titleformat.value.string
69 #define o_scrollbgimage(p) (p)->options.scrollbgimage.value.boolean
8d1ac0c @mbert Import Elvis 2.1 (written by Steve Kirkendall)
authored
70
9f1c6f0 @mbert Import Elvis 2.2_0 (written by Steve Kirkendall)
authored
71 #define NUM_OPTIONS 8
72 #define DEFAULT_FONT "Courier new*10"
73 #define DEFAULT_PROPFONT "Times*10"
74 #define DEFAULT_TITLEFORMAT "$1"
8d1ac0c @mbert Import Elvis 2.1 (written by Steve Kirkendall)
authored
75
76 extern GUI_WINDOW gw_def_win;
77 extern HINSTANCE hInst;
78 extern PRINTDLG gwpdlg;
79 extern int gw_printing_ok;
80 extern HCURSOR hLeftArrow;
81 extern HCURSOR hRightArrow;
82 extern HCURSOR selectedCursor;
9f1c6f0 @mbert Import Elvis 2.2_0 (written by Steve Kirkendall)
authored
83 extern GUI_COLORTBL colortbl[];
84 extern HICON gwcustomicon;
8d1ac0c @mbert Import Elvis 2.1 (written by Steve Kirkendall)
authored
85
86 /* ---[ function prototypes ]------------------------------------------ */
87
88 extern LONG gwcmd (GUI_WINDOW *gwp, UINT wParam);
89
90 extern BOOL CALLBACK DlgAbout (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
91 extern BOOL CALLBACK DlgGoto (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
92 extern BOOL CALLBACK DlgSearch (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
93 extern BOOL CALLBACK DlgSearch (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
94 extern BOOL CALLBACK DlgReplace (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
95 extern BOOL CALLBACK DlgRun (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
96 extern BOOL CALLBACK DlgTags (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
97 extern BOOL CALLBACK DlgOptGui (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
98 extern BOOL CALLBACK DlgOptBuffer (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
99 extern BOOL CALLBACK DlgOptGlobal (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
100 extern BOOL CALLBACK DlgOptWindow (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
101 extern BOOL CALLBACK DlgOptUser (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
102
103 extern void opt_parse_font (unsigned char *option, LOGFONT *plf);
104 extern void opt_parse_attr (unsigned char *option, LOGFONT *plf);
105 extern int optstoresb (OPTDESC *opt, OPTVAL *val, Char *newval);
106 extern int optstoretb (OPTDESC *opt, OPTVAL *val, Char *newval);
107 extern int optstorestb (OPTDESC *opt, OPTVAL *val, Char *newval);
108 extern int optstoremnu (OPTDESC *opt, OPTVAL *val, Char *newval);
109 extern int optisfont (OPTDESC *opt, OPTVAL *val, Char *newval);
9f1c6f0 @mbert Import Elvis 2.2_0 (written by Steve Kirkendall)
authored
110 extern int optisicon (OPTDESC *opt, OPTVAL *val, Char *newval);
8d1ac0c @mbert Import Elvis 2.1 (written by Steve Kirkendall)
authored
111 extern int optstoreattr (OPTDESC *opt, OPTVAL *val, Char *newval);
112
113 extern void gw_disable_printing (GUI_WINDOW *gwp);
114 extern void gw_get_default_printer (void);
115 extern void gw_set_default_printer (char *pDevice, char *pDriver,
116 char *pOutput);
117
118 extern LONG gwframe_WM_GETMINMAXINFO (GUI_WINDOW *gwp, UINT wParam, LONG lParam);
119 extern LONG gwframe_WM_INITMENU (GUI_WINDOW *gwp, UINT wParam, LONG lParam);
120 extern LONG gwframe_WM_MENUSELECT (GUI_WINDOW *gwp, UINT wParam, LONG lParam);
121 extern LONG gwframe_WM_NOTIFY (GUI_WINDOW *gwp, UINT wParam, LONG lParam);
122 extern LONG gwframe_WM_PAINT (GUI_WINDOW *gwp, UINT wParam, LONG lParam);
123 extern LONG gwframe_WM_SIZE (GUI_WINDOW *gwp, UINT wParam, LONG lParam);
124 extern LONG gwframe_WM_SETFOCUS (GUI_WINDOW *gwp, UINT wParam, LONG lParam);
125 extern LONG gwclient_WM_CHAR (GUI_WINDOW *gwp, UINT wParam, LONG lParam);
126 extern LONG gwclient_WM_DROPFILES (GUI_WINDOW *gwp, UINT wParam, LONG lParam);
127 extern LONG gwclient_WM_ERASEBKGND (GUI_WINDOW *gwp, UINT wParam, LONG lParam);
128 extern LONG gwclient_WM_KEYDOWN (GUI_WINDOW *gwp, UINT wParam, LONG lParam);
129 extern LONG gwclient_WM_KEYUP (GUI_WINDOW *gwp, UINT wParam, LONG lParam);
130 extern LONG gwclient_WM_KILLFOCUS (GUI_WINDOW *gwp, UINT wParam, LONG lParam);
131 extern LONG gwclient_WM_LBUTTONDBLCLK (GUI_WINDOW *gwp, UINT wParam, LONG lParam);
132 extern LONG gwclient_WM_LBUTTONDOWN (GUI_WINDOW *gwp, UINT wParam, LONG lParam);
133 extern LONG gwclient_WM_LBUTTONUP (GUI_WINDOW *gwp, UINT wParam, LONG lParam);
134 extern LONG gwclient_WM_MOUSEMOVE (GUI_WINDOW *gwp, UINT wParam, LONG lParam);
135 extern LONG gwclient_WM_MOUSEWHEEL (GUI_WINDOW *gwp, UINT wParam, LONG lParam);
136 extern LONG gwclient_WM_PAINT (GUI_WINDOW *gwp, UINT wParam, LONG lParam);
137 extern LONG gwclient_WM_RBUTTONDBLCLK (GUI_WINDOW *gwp, UINT wParam, LONG lParam);
138 extern LONG gwclient_WM_RBUTTONDOWN (GUI_WINDOW *gwp, UINT wParam, LONG lParam);
139 extern LONG gwclient_WM_RBUTTONUP (GUI_WINDOW *gwp, UINT wParam, LONG lParam);
140 extern LONG gwclient_WM_SETFOCUS (GUI_WINDOW *gwp, UINT wParam, LONG lParam);
141 extern LONG gwclient_WM_SIZE (GUI_WINDOW *gwp, UINT wParam, LONG lParam);
142 extern LONG gwclient_WM_SYSKEYDOWN (GUI_WINDOW *gwp, UINT wParam, LONG lParam);
143 extern LONG gwclient_WM_VSCROLL (GUI_WINDOW *gwp, UINT wParam, LONG lParam);
144
145 extern void gw_create_status_bar (GUI_WINDOW *gwp);
146 extern void gw_destroy_status_bar (GUI_WINDOW *gwp);
147 extern int gw_size_status_bar (GUI_WINDOW *gwp, RECT *parentRect, int maximized);
148 extern void gw_upd_status_bar (GUI_WINDOW *gwp, Char *cmd, long row, long col, char learn, char *mode);
149 extern void gw_upd_status_bar_ind (GUI_WINDOW *gwp, int num_state, int cap_state);
150 extern void gw_status_bar_text (GUI_WINDOW *gwp, char *str);
151
152 extern void gw_create_toolbar (GUI_WINDOW *gwp);
153 extern void gw_destroy_toolbar (GUI_WINDOW *gwp);
154 extern int gw_size_toolbar (GUI_WINDOW *gwp, RECT *rect);
155 extern void gw_toolbar_tooltip (GUI_WINDOW *gwp, LPARAM lParam);
156
157 extern GUI_WINDOW *gw_find_client (HWND hWnd);
158 extern GUI_WINDOW *gw_find_frame (HWND hWnd);
159 extern void gw_get_win_size (GUI_WINDOW *gwp);
160 extern int gw_set_win_size (GUI_WINDOW *gwp, int check);
161 extern void gw_set_fonts (GUI_WINDOW *gwp);
162 extern void gw_set_cursor (GUI_WINDOW *gwp, BOOLEAN chgshape);
163 extern void gw_del_fonts (GUI_WINDOW *gwp);
164 extern void gw_redraw_win (GUI_WINDOW *gwp);
165
9f1c6f0 @mbert Import Elvis 2.2_0 (written by Steve Kirkendall)
authored
166 # ifdef FEATURE_IMAGE
167 extern HBITMAP normalimage, idleimage;
168
169 extern HBITMAP gw_load_xpm(char *filename, long tint, long *average, HBITMAP *mask);
170 extern void gw_unload_xpm(HBITMAP bitmap);
171 extern void gw_erase_rect(HDC hdc, RECT *rect, HBITMAP bitmap, long scrolled);
172 #endif
173
8d1ac0c @mbert Import Elvis 2.1 (written by Steve Kirkendall)
authored
174 #endif
175
Something went wrong with that request. Please try again.