From 25bc35fbadebbf28eed3c89978e435d2df557b42 Mon Sep 17 00:00:00 2001 From: Ian C Date: Tue, 6 Jan 2004 02:06:37 +0000 Subject: Devel checkin - added util and snap objects and non-working TAP support --- src/gui.h | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'src/gui.h') 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 -- cgit v1.2.3