libDtSearch: Coverity 86579
[oweals/cde.git] / cde / programs / dtfile / Filter.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these libraries and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* $XConsortium: Filter.h /main/3 1995/11/02 14:39:05 rswiston $ */
24 /************************************<+>*************************************
25  ****************************************************************************
26  *
27  *   FILE:           Filter.h
28  *
29  *   COMPONENT_NAME: Desktop File Manager
30  *
31  *   DESCRIPTION:    Public include file for the file filter dialog.
32  *
33  *   (c) Copyright 1993, 1994, 1995 Hewlett-Packard Company
34  *   (c) Copyright 1993, 1994, 1995 International Business Machines Corp.
35  *   (c) Copyright 1993, 1994, 1995 Sun Microsystems, Inc.
36  *   (c) Copyright 1993, 1994, 1995 Novell, Inc.
37  *
38  ****************************************************************************
39  ************************************<+>*************************************/
40
41 #ifndef _Filter_h
42 #define _Filter_h
43
44 #define SHOWN  0
45 #define HIDDEN 1
46
47 #define DEFAULT_FILTER "DOT_FILE,DOT_FOLDER,CURRENT_FOLDER"
48
49 extern DialogClass * filterClass;
50
51
52 typedef struct {
53    char *filetype;
54    int index;
55    Boolean selected;
56 } FTData;
57
58 typedef struct
59 {
60    Boolean       displayed;
61    Position      x;
62    Position      y;
63    Dimension     width;
64    Dimension     height;
65  
66    Boolean       match_flag;
67    String        filter;
68    Boolean       show_hidden;
69
70    FTData        **user_data;
71    int           count;
72    int           filetypesFilteredCount;
73    char          *filetypesFiltered;
74 } FilterData, * FilterDataPtr;
75
76
77 typedef struct
78 {
79    XtCallbackProc callback;
80    XtPointer      client_data;
81    XtPointer      filter_rec;
82 } FilterApply;
83
84 typedef struct
85 {
86    Widget shell;
87    Widget form;
88    Widget fileNameFilter;
89    Widget hidArray[2];
90    Widget hidden;
91    Widget scrolled_window;
92    Widget file_window;
93    Widget select_all;
94    Widget unselect_all;
95    Widget label;
96
97    Widget ok;
98    Widget apply;
99    Widget reset;
100    Widget close;
101    Widget help;
102
103    FilterApply * apply_data;
104
105    char cancel;
106    FilterData * previous_filter_data;
107 } FilterRec;
108
109 #endif /* _Filter_h */
110 /* DON'T ADD ANYTHING AFTER THIS #endif */