summaryrefslogtreecommitdiff
path: root/src/gui.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui.h')
-rw-r--r--src/gui.h27
1 files changed, 25 insertions, 2 deletions
diff --git a/src/gui.h b/src/gui.h
index 6d2fcb9..953aac9 100644
--- a/src/gui.h
+++ b/src/gui.h
@@ -27,8 +27,6 @@
#ifndef ESPEC_GUI_H
#define ESPEC_GUI_H "$Id$"
-#include "SDL.h"
-
/* ---------------------------------------- INTERFACES
*/
@@ -44,6 +42,31 @@ void GUIMessage(const char *title, const char *format,...);
const char *GUIInputString(const char *prompt, const char *orig);
+/* Select a file from the given directory.
+
+ If load is TRUE then a new name cannot be entered.
+
+ Returns TRUE for selected, FALSE for cancelled.
+
+ path holds the new file entered. Note that start_dir can be a path to a
+ file - if chdir(start_dir) would not work, then it is tried with the
+ dirname(1) of start_dir.
+
+ Also start_dir and path can be the same pointer:
+
+ char file[FILENAME_MAX]="/home/foobar/dir/file.tap";
+
+ if (GUI_Fsel("Select tape",TRUE,file,file))
+ ....
+
+ Will work fine.
+*/
+int GUIFileSelect(const char *prompt,
+ int load,
+ const char *start_dir,
+ char path[]);
+
+
#endif