X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/c6f21f1b5fbf31e9014822c480ebec6bacb22aa3..125105d16c788398562ac03e91ce7a0dc0292492:/dialog.h diff --git a/dialog.h b/dialog.h index a124e1ab..078aca19 100644 --- a/dialog.h +++ b/dialog.h @@ -282,6 +282,11 @@ union control { * Return even if it doesn't have the input focus. */ int isdefault; + /* + * Also, the reverse of this: a default cancel-type button, + * which is implicitly pressed when you hit Escape. + */ + int iscancel; } button; struct { STANDARD_PREFIX; @@ -575,8 +580,8 @@ void dlg_listbox_add(union control *ctrl, void *dlg, char const *text); * strings in any listbox then you MUST not assign them different * IDs and expect to get meaningful results back. */ -void dlg_listbox_addwithindex(union control *ctrl, void *dlg, - char const *text, int id); +void dlg_listbox_addwithid(union control *ctrl, void *dlg, + char const *text, int id); int dlg_listbox_getid(union control *ctrl, void *dlg, int index); /* dlg_listbox_index returns <0 if no single element is selected. */ int dlg_listbox_index(union control *ctrl, void *dlg); @@ -599,11 +604,12 @@ void dlg_update_done(union control *ctrl, void *dlg); */ void dlg_set_focus(union control *ctrl, void *dlg); /* - * Return the `ctrl' structure for the control that had the input - * focus before this one. This is NOT GUARANTEED to work on all - * platforms, so don't base any critical functionality on it! + * Return the `ctrl' structure for the most recent control that had + * the input focus apart from the one mentioned. This is NOT + * GUARANTEED to work on all platforms, so don't base any critical + * functionality on it! */ -union control *dlg_last_focused(void *dlg); +union control *dlg_last_focused(union control *ctrl, void *dlg); /* * During event processing, you might well want to give an error * indication to the user. dlg_beep() is a quick and easy generic