OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [start/] [insight/] [tk/] [generic/] [tkFileFilter.h] - Diff between revs 579 and 1765

Only display areas with differences | Details | Blame | View Log

Rev 579 Rev 1765
/*
/*
 * tkFileFilter.h --
 * tkFileFilter.h --
 *
 *
 *      Declarations for the file filter processing routines needed by
 *      Declarations for the file filter processing routines needed by
 *      the file selection dialogs.
 *      the file selection dialogs.
 *
 *
 * Copyright (c) 1996 Sun Microsystems, Inc.
 * Copyright (c) 1996 Sun Microsystems, Inc.
 *
 *
 * See the file "license.terms" for information on usage and redistribution
 * See the file "license.terms" for information on usage and redistribution
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 *
 * RCS: @(#) $Id: tkFileFilter.h,v 1.1.1.1 2002-01-16 10:25:51 markom Exp $
 * RCS: @(#) $Id: tkFileFilter.h,v 1.1.1.1 2002-01-16 10:25:51 markom Exp $
 *
 *
 */
 */
 
 
#ifndef _TK_FILE_FILTER
#ifndef _TK_FILE_FILTER
#define _TK_FILE_FILTER
#define _TK_FILE_FILTER
 
 
#ifdef MAC_TCL
#ifdef MAC_TCL
#include <StandardFile.h>
#include <StandardFile.h>
#else
#else
#define OSType long
#define OSType long
#endif
#endif
 
 
#ifdef BUILD_tk
#ifdef BUILD_tk
# undef TCL_STORAGE_CLASS
# undef TCL_STORAGE_CLASS
# define TCL_STORAGE_CLASS DLLEXPORT
# define TCL_STORAGE_CLASS DLLEXPORT
#endif
#endif
 
 
typedef struct GlobPattern {
typedef struct GlobPattern {
    struct GlobPattern * next;          /* Chains to the next glob pattern
    struct GlobPattern * next;          /* Chains to the next glob pattern
                                         * in a glob pattern list */
                                         * in a glob pattern list */
    char * pattern;                     /* String value of the pattern, such
    char * pattern;                     /* String value of the pattern, such
                                         * as "*.txt" or "*.*"
                                         * as "*.txt" or "*.*"
                                         */
                                         */
} GlobPattern;
} GlobPattern;
 
 
typedef struct MacFileType {
typedef struct MacFileType {
    struct MacFileType * next;          /* Chains to the next mac file type
    struct MacFileType * next;          /* Chains to the next mac file type
                                         * in a mac file type list */
                                         * in a mac file type list */
    OSType type;                        /* Mac file type, such as 'TEXT' or
    OSType type;                        /* Mac file type, such as 'TEXT' or
                                         * 'GIFF' */
                                         * 'GIFF' */
} MacFileType;
} MacFileType;
 
 
typedef struct FileFilterClause {
typedef struct FileFilterClause {
    struct FileFilterClause * next;     /* Chains to the next clause in
    struct FileFilterClause * next;     /* Chains to the next clause in
                                         * a clause list */
                                         * a clause list */
    GlobPattern * patterns;             /* Head of glob pattern type list */
    GlobPattern * patterns;             /* Head of glob pattern type list */
    GlobPattern * patternsTail;         /* Tail of glob pattern type list */
    GlobPattern * patternsTail;         /* Tail of glob pattern type list */
    MacFileType * macTypes;             /* Head of mac file type list */
    MacFileType * macTypes;             /* Head of mac file type list */
    MacFileType * macTypesTail;         /* Tail of mac file type list */
    MacFileType * macTypesTail;         /* Tail of mac file type list */
} FileFilterClause;
} FileFilterClause;
 
 
typedef struct FileFilter {
typedef struct FileFilter {
    struct FileFilter * next;           /* Chains to the next filter
    struct FileFilter * next;           /* Chains to the next filter
                                         * in a filter list */
                                         * in a filter list */
    char * name;                        /* Name of the file filter,
    char * name;                        /* Name of the file filter,
                                         * such as "Text Documents" */
                                         * such as "Text Documents" */
    FileFilterClause * clauses;         /* Head of the clauses list */
    FileFilterClause * clauses;         /* Head of the clauses list */
    FileFilterClause * clausesTail;     /* Tail of the clauses list */
    FileFilterClause * clausesTail;     /* Tail of the clauses list */
} FileFilter;
} FileFilter;
 
 
/*----------------------------------------------------------------------
/*----------------------------------------------------------------------
 * FileFilterList --
 * FileFilterList --
 *
 *
 * The routine TkGetFileFilters() translates the string value of the
 * The routine TkGetFileFilters() translates the string value of the
 * -filefilters option into a FileFilterList structure, which consists
 * -filefilters option into a FileFilterList structure, which consists
 * of a list of file filters.
 * of a list of file filters.
 *
 *
 * Each file filter consists of one or more clauses. Each clause has
 * 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
 * one or more glob patterns and/or one or more Mac file types
 *----------------------------------------------------------------------
 *----------------------------------------------------------------------
 */
 */
 
 
typedef struct FileFilterList {
typedef struct FileFilterList {
    FileFilter * filters;               /* Head of the filter list */
    FileFilter * filters;               /* Head of the filter list */
    FileFilter * filtersTail;           /* Tail of the filter list */
    FileFilter * filtersTail;           /* Tail of the filter list */
    int numFilters;                     /* number of filters in the list */
    int numFilters;                     /* number of filters in the list */
} FileFilterList;
} FileFilterList;
 
 
EXTERN void             TkFreeFileFilters _ANSI_ARGS_((
EXTERN void             TkFreeFileFilters _ANSI_ARGS_((
                            FileFilterList * flistPtr));
                            FileFilterList * flistPtr));
EXTERN void             TkInitFileFilters _ANSI_ARGS_((
EXTERN void             TkInitFileFilters _ANSI_ARGS_((
                            FileFilterList * flistPtr));
                            FileFilterList * flistPtr));
EXTERN int              TkGetFileFilters _ANSI_ARGS_ ((Tcl_Interp *interp,
EXTERN int              TkGetFileFilters _ANSI_ARGS_ ((Tcl_Interp *interp,
                            FileFilterList * flistPtr, char * string,
                            FileFilterList * flistPtr, char * string,
                            int isWindows));
                            int isWindows));
 
 
# undef TCL_STORAGE_CLASS
# undef TCL_STORAGE_CLASS
# define TCL_STORAGE_CLASS DLLIMPORT
# define TCL_STORAGE_CLASS DLLIMPORT
 
 
#endif
#endif
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.