/[dtapublic]/projs/ets/trunk/src/c_tk_base_7_5_w_mods/tkfilefilter.h
ViewVC logotype

Diff of /projs/ets/trunk/src/c_tk_base_7_5_w_mods/tkfilefilter.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.70  
changed lines
  Added in v.71

dashley@gmail.com
ViewVC Help
Powered by ViewVC 1.1.25