summaryrefslogtreecommitdiff
path: root/src/gui.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui.h')
-rw-r--r--src/gui.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/gui.h b/src/gui.h
index 953aac9..e1ad43a 100644
--- a/src/gui.h
+++ b/src/gui.h
@@ -31,10 +31,20 @@
/* ---------------------------------------- INTERFACES
*/
+/* Message types
+*/
+typedef enum {eMessageBox, eYesNoBox} GUIBoxType;
+
/* Display a simple message box. A message of longer than 1024 bytes causes
- undefined behaviour. Newlines cause a line break.
+ undefined behaviour. Newlines cause a line break. If a line is over 38
+ characters then it will be truncated.
+
+ If type is eYesNoBox then TRUE/FALSE is returned depending on whether
+ yes/no was selected.
*/
-void GUIMessage(const char *title, const char *format,...);
+int GUIMessage(GUIBoxType type,
+ const char *title,
+ const char *format,...);
/* Enter a string, max 40 characters
@@ -42,6 +52,12 @@ void GUIMessage(const char *title, const char *format,...);
const char *GUIInputString(const char *prompt, const char *orig);
+/* Selects an entry from a list. Returns the index selected, or
+ -1 if cancelled.
+*/
+int GUIListSelect(const char *title, int no, char * const list[]);
+
+
/* Select a file from the given directory.
If load is TRUE then a new name cannot be entered.