1 /*
2  * FChooser.h : Public header file for the FileChooser widget
3  *
4  * George Ferguson, ferguson@cs.rochester.edu, 21 Jan 1993.
5  *
6  * This code is derived from the FileSelector widget by Brian Totty,
7  * hence the following copyright applies:
8  *
9  * Copyright 1990,1991,1992 Brian Totty
10  *
11  * Permission to use, copy, modify, distribute, and sell this software
12  * and its documentation for any purpose is hereby granted without fee,
13  * provided that the above copyright notice appears in all copies and that
14  * both that copyright notice and this permission notice appear in
15  * supporting documentation, and that the name of Brian Totty or
16  * University of Illinois not be used in advertising or publicity
17  * pertaining to distribution of the software without specific, written
18  * prior permission.  Brian Totty and University of Illinois make no
19  * representations about the suitability of this software for any
20  * purpose.  It is provided "as is" without express or implied warranty.
21  *
22  * Brian Totty and University of Illinois disclaim all warranties with
23  * regard to this software, including all implied warranties of
24  * merchantability and fitness, in no event shall Brian Totty or
25  * University of Illinois be liable for any special, indirect or
26  * consequential damages or any damages whatsoever resulting from loss of
27  * use, data or profits, whether in an action of contract, negligence or
28  * other tortious action, arising out of or in connection with the use or
29  * performance of this software.
30  *
31  * Author:
32  * 	Brian Totty
33  * 	Department of Computer Science
34  * 	University Of Illinois at Urbana-Champaign
35  *	1304 West Springfield Avenue
36  * 	Urbana, IL 61801
37  *
38  * 	totty@cs.uiuc.edu
39  *
40  */
41 
42 #ifndef _FCHOOSER_H
43 #define _FCHOOSER_H
44 
45 #include "DirMgr.h"
46 
47 extern WidgetClass xfwfFileChooserWidgetClass;
48 
49 typedef struct _XfwfFileChooserClassRec	*XfwfFileChooserWidgetClass;
50 typedef struct _XfwfFileChooserRec	*XfwfFileChooserWidget;
51 
52 #ifndef XtNcurrentDirectory
53 #define	XtNcurrentDirectory		"currentDirectory"
54 #endif
55 #define	XtNcurrentFile			"currentFile"
56 #define	XtNsortMode			"sortMode"
57 #define	XtNpattern			"pattern"
58 
59 #define	XtCPathname			"Pathname"
60 #define	XtCFilename			"Filename"
61 
62 typedef struct _XfwfFileChooserReturnStruct
63 {
64 	char *directory;
65 	char *file;
66 } XfwfFileChooserReturnStruct;
67 
68 /*---------------------------------------------------------------------------*
69 
70                   E X T E R N A L    F U N C T I O N S
71 
72  *---------------------------------------------------------------------------*/
73 
74 #if (!NeedFunctionPrototypes)
75 
76 void	XfwfFileChooserChangeDirectory();
77 void	XfwfFileChooserRefresh();
78 char	*XfwfFileChooserCurrentDirectory();
79 char	*XfwfFileChooserCurrentFile();
80 
81 #else
82 
83 void	XfwfFileChooserChangeDirectory(XfwfFileChooserWidget fcw, char *dir);
84 void	XfwfFileChooserRefresh(XfwfFileChooserWidget fcw);
85 char	*XfwfFileChooserCurrentDirectory(XfwfFileChooserWidget fcw);
86 char	*XfwfFileChooserCurrentFile(XfwfFileChooserWidget fcw);
87 
88 #endif /* !NeedFunctionPrototypes */
89 #endif /* !_FCHOOSER_H */
90