9dcfded77501529adf80f2a8bde6c859548f0bf4
2 * winstuff.h: Windows-specific inter-module stuff.
5 #ifndef PUTTY_WINSTUFF_H
6 #define PUTTY_WINSTUFF_H
9 * Global variables. Most modules declare these `extern', but
10 * window.c will do `#define PUTTY_DO_GLOBALS' before including this
11 * module, and so will get them properly defined.
14 #ifdef PUTTY_DO_GLOBALS
21 #define PUTTY_REG_POS "Software\\SimonTatham\\PuTTY"
22 #define PUTTY_REG_PARENT "Software\\SimonTatham"
23 #define PUTTY_REG_PARENT_CHILD "PuTTY"
24 #define PUTTY_REG_GPARENT "Software"
25 #define PUTTY_REG_GPARENT_CHILD "SimonTatham"
27 #define GETTICKCOUNT GetTickCount
28 #define CURSORBLINK GetCaretBlinkTime()
29 #define TICKSPERSEC 1000 /* GetTickCount returns milliseconds */
31 #define DEFAULT_CODEPAGE CP_ACP
36 * Window handles for the dialog boxes that can be running during a
42 * The all-important instance handle.
44 GLOBAL HINSTANCE hinst
;
47 * Details of the help file.
49 GLOBAL
char *help_path
;
50 GLOBAL
int help_has_contents
;
53 * I've just looked in the windows standard headr files for WM_USER, there
54 * are hundreds of flags defined using the form WM_USER+123 so I've
55 * renumbered this NETEVENT value and the two in window.c
57 #define WM_XUSER (WM_USER + 0x2000)
58 #define WM_NETEVENT (WM_XUSER + 5)
61 * On Windows, we send MA_2CLK as the only event marking the second
62 * press of a mouse button. Compare unix.h.
64 #define MULTICLICK_ONLY_EVENT 1
67 * On Windows, data written to the clipboard must be NUL-terminated.
69 #define SELECTION_NUL_TERMINATED 1
72 * On Windows, copying to the clipboard terminates lines with CRLF.
74 #define SEL_NL { 13, 10 }
77 * Exports from winctrls.c.
91 * Exports from winutils.c.
93 void split_into_argv(char *, int *, char ***, char ***);
96 * Private structure for prefslist state. Only in the header file
97 * so that we can delegate allocation to callers.
100 int listid
, upbid
, dnbid
;
107 * Exports from winctrls.c.
109 void ctlposinit(struct ctlpos
*cp
, HWND hwnd
,
110 int leftborder
, int rightborder
, int topborder
);
111 HWND
doctl(struct ctlpos
*cp
, RECT r
,
112 char *wclass
, int wstyle
, int exstyle
, char *wtext
, int wid
);
113 void bartitle(struct ctlpos
*cp
, char *name
, int id
);
114 void beginbox(struct ctlpos
*cp
, char *name
, int idbox
);
115 void endbox(struct ctlpos
*cp
);
116 void multiedit(struct ctlpos
*cp
, ...);
117 void radioline(struct ctlpos
*cp
, char *text
, int id
, int nacross
, ...);
118 void bareradioline(struct ctlpos
*cp
, int nacross
, ...);
119 void radiobig(struct ctlpos
*cp
, char *text
, int id
, ...);
120 void checkbox(struct ctlpos
*cp
, char *text
, int id
);
121 void statictext(struct ctlpos
*cp
, char *text
, int lines
, int id
);
122 void staticbtn(struct ctlpos
*cp
, char *stext
, int sid
,
123 char *btext
, int bid
);
124 void static2btn(struct ctlpos
*cp
, char *stext
, int sid
,
125 char *btext1
, int bid1
, char *btext2
, int bid2
);
126 void staticedit(struct ctlpos
*cp
, char *stext
,
127 int sid
, int eid
, int percentedit
);
128 void staticddl(struct ctlpos
*cp
, char *stext
,
129 int sid
, int lid
, int percentlist
);
130 void combobox(struct ctlpos
*cp
, char *text
, int staticid
, int listid
);
131 void staticpassedit(struct ctlpos
*cp
, char *stext
,
132 int sid
, int eid
, int percentedit
);
133 void bigeditctrl(struct ctlpos
*cp
, char *stext
,
134 int sid
, int eid
, int lines
);
135 void ersatztab(struct ctlpos
*cp
, char *stext
, int sid
, int lid
, int s2id
);
136 void editbutton(struct ctlpos
*cp
, char *stext
, int sid
,
137 int eid
, char *btext
, int bid
);
138 void sesssaver(struct ctlpos
*cp
, char *text
,
139 int staticid
, int editid
, int listid
, ...);
140 void envsetter(struct ctlpos
*cp
, char *stext
, int sid
,
141 char *e1stext
, int e1sid
, int e1id
,
142 char *e2stext
, int e2sid
, int e2id
,
143 int listid
, char *b1text
, int b1id
, char *b2text
, int b2id
);
144 void charclass(struct ctlpos
*cp
, char *stext
, int sid
, int listid
,
145 char *btext
, int bid
, int eid
, char *s2text
, int s2id
);
146 void colouredit(struct ctlpos
*cp
, char *stext
, int sid
, int listid
,
147 char *btext
, int bid
, ...);
148 void prefslist(struct prefslist
*hdl
, struct ctlpos
*cp
, char *stext
,
149 int sid
, int listid
, int upbid
, int dnbid
);
150 int handle_prefslist(struct prefslist
*hdl
,
151 int *array
, int maxmemb
,
152 int is_dlmsg
, HWND hwnd
,
153 WPARAM wParam
, LPARAM lParam
);
154 void progressbar(struct ctlpos
*cp
, int id
);
155 void fwdsetter(struct ctlpos
*cp
, int listid
, char *stext
, int sid
,
156 char *e1stext
, int e1sid
, int e1id
,
157 char *e2stext
, int e2sid
, int e2id
,
158 char *btext
, int bid
);
161 * Exports from windlg.c.
163 void defuse_showwindow(void);
165 int do_reconfig(HWND
);
166 void showeventlog(HWND
);
167 void showabout(HWND
);
168 void force_normal(HWND hwnd
);
171 * Exports from sizetip.c.
173 void UpdateSizeTip(HWND src
, int cx
, int cy
);
174 void EnableSizeTip(int bEnable
);