Jacob's patch for a drag-list to select SSH ciphers. Heavily hacked
[u/mdw/putty] / winstuff.h
CommitLineData
8c3cd914 1/*
2 * winstuff.h: Windows-specific inter-module stuff.
3 */
4
5/*
6 * Global variables. Most modules declare these `extern', but
7 * window.c will do `#define PUTTY_DO_GLOBALS' before including this
8 * module, and so will get them properly defined.
9 */
10#ifdef PUTTY_DO_GLOBALS
11#define GLOBAL
12#else
13#define GLOBAL extern
14#endif
15
16GLOBAL HINSTANCE hinst;
17
18/*
19 * Exports from winctrls.c.
20 */
21
22struct ctlpos {
23 HWND hwnd;
24 WPARAM font;
25 int dlu4inpix;
26 int ypos, width;
27 int xoff;
3ac9cd9f 28 int boxystart, boxid;
8c3cd914 29 char *boxtext;
30};
31
ca20bfcf 32/*
33 * Private structure for prefslist state. Only in the header file
34 * so that we can delegate allocation to callers.
35 */
36struct prefslist {
37 int listid, upbid, dnbid;
38 int srcitem;
39 int dummyitem;
40 int dragging;
41};
42
8c3cd914 43void ctlposinit(struct ctlpos *cp, HWND hwnd,
32874aea 44 int leftborder, int rightborder, int topborder);
ca20bfcf 45HWND doctl(struct ctlpos *cp, RECT r,
32874aea 46 char *wclass, int wstyle, int exstyle, char *wtext, int wid);
8c3cd914 47void bartitle(struct ctlpos *cp, char *name, int id);
3ac9cd9f 48void beginbox(struct ctlpos *cp, char *name, int idbox);
8c3cd914 49void endbox(struct ctlpos *cp);
50void multiedit(struct ctlpos *cp, ...);
32874aea 51void radioline(struct ctlpos *cp, char *text, int id, int nacross, ...);
d74d141c 52void bareradioline(struct ctlpos *cp, int nacross, ...);
8c3cd914 53void radiobig(struct ctlpos *cp, char *text, int id, ...);
54void checkbox(struct ctlpos *cp, char *text, int id);
6e522441 55void statictext(struct ctlpos *cp, char *text, int id);
8c3cd914 56void staticbtn(struct ctlpos *cp, char *stext, int sid,
32874aea 57 char *btext, int bid);
8c3cd914 58void staticedit(struct ctlpos *cp, char *stext,
32874aea 59 int sid, int eid, int percentedit);
875b193f 60void dropdownlist(struct ctlpos *cp, char *text, int staticid, int listid);
6e522441 61void staticpassedit(struct ctlpos *cp, char *stext,
32874aea 62 int sid, int eid, int percentedit);
6e522441 63void bigeditctrl(struct ctlpos *cp, char *stext,
32874aea 64 int sid, int eid, int lines);
65void ersatztab(struct ctlpos *cp, char *stext, int sid, int lid, int s2id);
8c3cd914 66void editbutton(struct ctlpos *cp, char *stext, int sid,
32874aea 67 int eid, char *btext, int bid);
8c3cd914 68void sesssaver(struct ctlpos *cp, char *text,
32874aea 69 int staticid, int editid, int listid, ...);
8c3cd914 70void envsetter(struct ctlpos *cp, char *stext, int sid,
32874aea 71 char *e1stext, int e1sid, int e1id,
72 char *e2stext, int e2sid, int e2id,
73 int listid, char *b1text, int b1id, char *b2text, int b2id);
8c3cd914 74void charclass(struct ctlpos *cp, char *stext, int sid, int listid,
32874aea 75 char *btext, int bid, int eid, char *s2text, int s2id);
8c3cd914 76void colouredit(struct ctlpos *cp, char *stext, int sid, int listid,
32874aea 77 char *btext, int bid, ...);
ca20bfcf 78void prefslist(struct prefslist *hdl, struct ctlpos *cp, char *stext,
79 int sid, int listid, int upbid, int dnbid);
80int handle_prefslist(struct prefslist *hdl,
81 int *array, int maxmemb,
82 int is_dlmsg, HWND hwnd,
83 WPARAM wParam, LPARAM lParam);
6e522441 84void progressbar(struct ctlpos *cp, int id);
d74d141c 85void fwdsetter(struct ctlpos *cp, int listid, char *stext, int sid,
86 char *e1stext, int e1sid, int e1id,
87 char *e2stext, int e2sid, int e2id,
88 char *btext, int bid);