Asynchronous agent requests on Windows. Actually, I've kept the
[u/mdw/putty] / winstuff.h
index 21d7aa8..33b604f 100644 (file)
@@ -163,13 +163,15 @@ struct dlgparam {
     HWND hwnd;                        /* the hwnd of the dialog box */
     struct winctrls *controltrees[8];  /* can have several of these */
     int nctrltrees;
+    char *wintitle;                   /* title of actual window */
     char *errtitle;                   /* title of error sub-messageboxes */
     void *data;                               /* data to pass in refresh events */
     union control *focused, *lastfocused; /* which ctrl has focus now/before */
+    char shortcuts[128];              /* track which shortcuts in use */
     int coloursel_wanted;             /* has an event handler asked for
                                        * a colour selector? */
-    char shortcuts[128];              /* track which shortcuts in use */
     struct { unsigned char r, g, b, ok; } coloursel_result;   /* 0-255 */
+    tree234 *privdata;                /* stores per-control private data */
     int ended, endresult;             /* has the dialog been ended? */
 };
 
@@ -266,6 +268,9 @@ struct winctrl {
 struct winctrls {
     tree234 *byctrl, *byid;
 };
+struct controlset;
+struct controlbox;
+
 void winctrl_init(struct winctrls *);
 void winctrl_cleanup(struct winctrls *);
 void winctrl_add(struct winctrls *, struct winctrl *);
@@ -277,6 +282,18 @@ void winctrl_layout(struct dlgparam *dp, struct winctrls *wc,
                    struct ctlpos *cp, struct controlset *s, int *id);
 int winctrl_handle_command(struct dlgparam *dp, UINT msg,
                           WPARAM wParam, LPARAM lParam);
+void winctrl_rem_shortcuts(struct dlgparam *dp, struct winctrl *c);
+int winctrl_context_help(struct dlgparam *dp, HWND hwnd, int id);
+
+void dp_init(struct dlgparam *dp);
+void dp_add_tree(struct dlgparam *dp, struct winctrls *tree);
+void dp_cleanup(struct dlgparam *dp);
+
+/*
+ * Exports from wincfg.c.
+ */
+void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help,
+                         int midsession);
 
 /*
  * Exports from windlg.c.
@@ -287,6 +304,8 @@ int do_reconfig(HWND);
 void showeventlog(HWND);
 void showabout(HWND);
 void force_normal(HWND hwnd);
+void modal_about_box(HWND hwnd);
+void show_help(HWND hwnd);
 
 /*
  * Exports from sizetip.c.
@@ -300,4 +319,16 @@ void EnableSizeTip(int bEnable);
 struct unicode_data;
 void init_ucs(Config *, struct unicode_data *);
 
+/*
+ * pageantc.c needs to schedule callbacks for asynchronous agent
+ * requests. This has to be done differently in GUI and console, so
+ * there's an exported function used for the purpose.
+ * 
+ * Also, we supply FLAG_SYNCAGENT to force agent requests to be
+ * synchronous in pscp and psftp.
+ */
+void agent_schedule_callback(void (*callback)(void *, void *, int),
+                            void *callback_ctx, void *data, int len);
+#define FLAG_SYNCAGENT 0x1000
+
 #endif