+/* Every window used by PuTTY has a refCon field pointing to one of these. */
+typedef struct {
+ struct Session *s; /* Only used in PuTTY */
+ struct KeyState *ks; /* Only used in PuTTYgen */
+ struct macctrls *mcs;
+
+ void (*activate) (WindowPtr, EventRecord *);
+ void (*adjustcursor)(WindowPtr, Point, RgnHandle);
+ void (*adjustmenus) (WindowPtr);
+ void (*update) (WindowPtr);
+ void (*click) (WindowPtr, EventRecord *);
+ void (*grow) (WindowPtr, EventRecord *);
+ void (*key) (WindowPtr, EventRecord *);
+ void (*menu) (WindowPtr, short, short);
+ void (*close) (WindowPtr);
+
+ int wtype;
+} WinInfo;
+
+#define mac_wininfo(w) ((WinInfo *)GetWRefCon(w))
+#define mac_windowsession(w) (((WinInfo *)GetWRefCon(w))->s)
+#define mac_winctrls(w) (((WinInfo *)GetWRefCon(w))->mcs)
+
+union macctrl;
+
+struct macctrls {
+ tree234 *byctrl;
+ void *data; /* private data for config box */
+ unsigned int npanels;
+ union macctrl **panels; /* lists of controls by panel */
+};
+