|
/* $Header: /cvsroot/esrg/sfesrg/esrgpcpj/shared/tk_base/tkfilefilter.h,v 1.1.1.1 2001/06/13 05:00:16 dtashley Exp $ */ |
|
|
|
|
|
/* |
|
|
* tkFileFilter.h -- |
|
|
* |
|
|
* Declarations for the file filter processing routines needed by |
|
|
* the file selection dialogs. |
|
|
* |
|
|
* Copyright (c) 1996 Sun Microsystems, Inc. |
|
|
* |
|
|
* See the file "license.terms" for information on usage and redistribution |
|
|
* of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
|
|
* |
|
|
* RCS: @(#) $Id: tkfilefilter.h,v 1.1.1.1 2001/06/13 05:00:16 dtashley Exp $ |
|
|
* |
|
|
*/ |
|
|
|
|
|
#ifndef _TK_FILE_FILTER |
|
|
#define _TK_FILE_FILTER |
|
|
|
|
|
#ifdef MAC_TCL |
|
|
#include <StandardFile.h> |
|
|
#else |
|
|
#define OSType long |
|
|
#endif |
|
|
|
|
|
#ifdef BUILD_tk |
|
|
# undef TCL_STORAGE_CLASS |
|
|
# define TCL_STORAGE_CLASS DLLEXPORT |
|
|
#endif |
|
|
|
|
|
typedef struct GlobPattern { |
|
|
struct GlobPattern * next; /* Chains to the next glob pattern |
|
|
* in a glob pattern list */ |
|
|
char * pattern; /* String value of the pattern, such |
|
|
* as "*.txt" or "*.*" |
|
|
*/ |
|
|
} GlobPattern; |
|
|
|
|
|
typedef struct MacFileType { |
|
|
struct MacFileType * next; /* Chains to the next mac file type |
|
|
* in a mac file type list */ |
|
|
OSType type; /* Mac file type, such as 'TEXT' or |
|
|
* 'GIFF' */ |
|
|
} MacFileType; |
|
|
|
|
|
typedef struct FileFilterClause { |
|
|
struct FileFilterClause * next; /* Chains to the next clause in |
|
|
* a clause list */ |
|
|
GlobPattern * patterns; /* Head of glob pattern type list */ |
|
|
GlobPattern * patternsTail; /* Tail of glob pattern type list */ |
|
|
MacFileType * macTypes; /* Head of mac file type list */ |
|
|
MacFileType * macTypesTail; /* Tail of mac file type list */ |
|
|
} FileFilterClause; |
|
|
|
|
|
typedef struct FileFilter { |
|
|
struct FileFilter * next; /* Chains to the next filter |
|
|
* in a filter list */ |
|
|
char * name; /* Name of the file filter, |
|
|
* such as "Text Documents" */ |
|
|
FileFilterClause * clauses; /* Head of the clauses list */ |
|
|
FileFilterClause * clausesTail; /* Tail of the clauses list */ |
|
|
} FileFilter; |
|
|
|
|
|
/*---------------------------------------------------------------------- |
|
|
* FileFilterList -- |
|
|
* |
|
|
* The routine TkGetFileFilters() translates the string value of the |
|
|
* -filefilters option into a FileFilterList structure, which consists |
|
|
* of a list of file filters. |
|
|
* |
|
|
* Each file filter consists of one or more clauses. Each clause has |
|
|
* one or more glob patterns and/or one or more Mac file types |
|
|
*---------------------------------------------------------------------- |
|
|
*/ |
|
|
|
|
|
typedef struct FileFilterList { |
|
|
FileFilter * filters; /* Head of the filter list */ |
|
|
FileFilter * filtersTail; /* Tail of the filter list */ |
|
|
int numFilters; /* number of filters in the list */ |
|
|
} FileFilterList; |
|
|
|
|
|
extern void TkFreeFileFilters _ANSI_ARGS_(( |
|
|
FileFilterList * flistPtr)); |
|
|
extern void TkInitFileFilters _ANSI_ARGS_(( |
|
|
FileFilterList * flistPtr)); |
|
|
extern int TkGetFileFilters _ANSI_ARGS_ ((Tcl_Interp *interp, |
|
|
FileFilterList * flistPtr, char * string, |
|
|
int isWindows)); |
|
|
|
|
|
# undef TCL_STORAGE_CLASS |
|
|
# define TCL_STORAGE_CLASS DLLIMPORT |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
/* $History: tkFileFilter.h $ |
|
|
* |
|
|
* ***************** Version 1 ***************** |
|
|
* User: Dtashley Date: 1/02/01 Time: 2:49a |
|
|
* Created in $/IjuScripter, IjuConsole/Source/Tk Base |
|
|
* Initial check-in. |
|
|
*/ |
|
|
|
|
|
/* End of TKFILEFILTER.H */ |
|
1 |
|
/* $Header$ */ |
2 |
|
|
3 |
|
/* |
4 |
|
* tkFileFilter.h -- |
5 |
|
* |
6 |
|
* Declarations for the file filter processing routines needed by |
7 |
|
* the file selection dialogs. |
8 |
|
* |
9 |
|
* Copyright (c) 1996 Sun Microsystems, Inc. |
10 |
|
* |
11 |
|
* See the file "license.terms" for information on usage and redistribution |
12 |
|
* of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
13 |
|
* |
14 |
|
* RCS: @(#) $Id: tkfilefilter.h,v 1.1.1.1 2001/06/13 05:00:16 dtashley Exp $ |
15 |
|
* |
16 |
|
*/ |
17 |
|
|
18 |
|
#ifndef _TK_FILE_FILTER |
19 |
|
#define _TK_FILE_FILTER |
20 |
|
|
21 |
|
#ifdef MAC_TCL |
22 |
|
#include <StandardFile.h> |
23 |
|
#else |
24 |
|
#define OSType long |
25 |
|
#endif |
26 |
|
|
27 |
|
#ifdef BUILD_tk |
28 |
|
# undef TCL_STORAGE_CLASS |
29 |
|
# define TCL_STORAGE_CLASS DLLEXPORT |
30 |
|
#endif |
31 |
|
|
32 |
|
typedef struct GlobPattern { |
33 |
|
struct GlobPattern * next; /* Chains to the next glob pattern |
34 |
|
* in a glob pattern list */ |
35 |
|
char * pattern; /* String value of the pattern, such |
36 |
|
* as "*.txt" or "*.*" |
37 |
|
*/ |
38 |
|
} GlobPattern; |
39 |
|
|
40 |
|
typedef struct MacFileType { |
41 |
|
struct MacFileType * next; /* Chains to the next mac file type |
42 |
|
* in a mac file type list */ |
43 |
|
OSType type; /* Mac file type, such as 'TEXT' or |
44 |
|
* 'GIFF' */ |
45 |
|
} MacFileType; |
46 |
|
|
47 |
|
typedef struct FileFilterClause { |
48 |
|
struct FileFilterClause * next; /* Chains to the next clause in |
49 |
|
* a clause list */ |
50 |
|
GlobPattern * patterns; /* Head of glob pattern type list */ |
51 |
|
GlobPattern * patternsTail; /* Tail of glob pattern type list */ |
52 |
|
MacFileType * macTypes; /* Head of mac file type list */ |
53 |
|
MacFileType * macTypesTail; /* Tail of mac file type list */ |
54 |
|
} FileFilterClause; |
55 |
|
|
56 |
|
typedef struct FileFilter { |
57 |
|
struct FileFilter * next; /* Chains to the next filter |
58 |
|
* in a filter list */ |
59 |
|
char * name; /* Name of the file filter, |
60 |
|
* such as "Text Documents" */ |
61 |
|
FileFilterClause * clauses; /* Head of the clauses list */ |
62 |
|
FileFilterClause * clausesTail; /* Tail of the clauses list */ |
63 |
|
} FileFilter; |
64 |
|
|
65 |
|
/*---------------------------------------------------------------------- |
66 |
|
* FileFilterList -- |
67 |
|
* |
68 |
|
* The routine TkGetFileFilters() translates the string value of the |
69 |
|
* -filefilters option into a FileFilterList structure, which consists |
70 |
|
* of a list of file filters. |
71 |
|
* |
72 |
|
* Each file filter consists of one or more clauses. Each clause has |
73 |
|
* one or more glob patterns and/or one or more Mac file types |
74 |
|
*---------------------------------------------------------------------- |
75 |
|
*/ |
76 |
|
|
77 |
|
typedef struct FileFilterList { |
78 |
|
FileFilter * filters; /* Head of the filter list */ |
79 |
|
FileFilter * filtersTail; /* Tail of the filter list */ |
80 |
|
int numFilters; /* number of filters in the list */ |
81 |
|
} FileFilterList; |
82 |
|
|
83 |
|
extern void TkFreeFileFilters _ANSI_ARGS_(( |
84 |
|
FileFilterList * flistPtr)); |
85 |
|
extern void TkInitFileFilters _ANSI_ARGS_(( |
86 |
|
FileFilterList * flistPtr)); |
87 |
|
extern int TkGetFileFilters _ANSI_ARGS_ ((Tcl_Interp *interp, |
88 |
|
FileFilterList * flistPtr, char * string, |
89 |
|
int isWindows)); |
90 |
|
|
91 |
|
# undef TCL_STORAGE_CLASS |
92 |
|
# define TCL_STORAGE_CLASS DLLIMPORT |
93 |
|
|
94 |
|
#endif |
95 |
|
|
96 |
|
/* End of tkfilefilter.h */ |