Fix dttypes for BSD systems
[oweals/cde.git] / cde / programs / dtfile / SharedProcs.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 librararies 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: SharedProcs.h /main/4 1995/11/02 14:44:13 rswiston $ */
24 /************************************<+>*************************************
25  ****************************************************************************
26  *
27  *   FILE:           SharedProcs.h
28  *
29  *   COMPONENT_NAME: Desktop File Manager
30  *
31  *   DESCRIPTION:    Public include file for some shared functions.
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 _SharedProcs_h
42 #define _SharedProcs_h
43
44 #include <Dt/Icon.h>
45 #include <Dt/Action.h>
46 #include <Dt/Dnd.h>
47
48 #include "Common.h"
49 #include "FileMgr.h"
50
51 /********    Public Function Declarations    ********/
52
53 extern String _DtStripSpaces(
54                         String string) ;
55
56 extern char * _DtPName(
57                         register char *name) ;
58 extern char * _DtFollowLink(
59                         char * path) ;
60 extern Boolean _DtStringsAreEquivalent(
61                         register char *in_str,
62                         register char *test_str) ;
63 extern void _DtDuplicateDialogNameList (
64                         char ** nameList,
65                         char ** newNameList,
66                         int newNameListSize,
67                         int * nameCount) ;
68 extern void _DtLoadSubdialogArray (
69                         char ** nameList,
70                         int    nameCount,
71                         DialogData *** dialogArray,
72                         int    dialogCount,
73                         int    dialogId,
74                         XrmDatabase dataBase,
75                         int    firstId );
76 extern void _DtSaveSubdialogArray (
77                         char ** nameList,
78                         int    nameCount,
79                         DialogData ** dialogArray,
80                         int    dialogCount,
81                         int    fd,
82                         int    firstId );
83 extern void _DtDestroySubdialogArray (
84                         DialogData ** dialogArray,
85                         int    dialogCount) ;
86 extern void _DtDestroySubdialog (
87                         DialogData * dialogData) ;
88 extern void _DtHideOneSubdialog (
89                         DialogData * dialogData,
90                         DialogData *** dialogArray,
91                         int         * dialogCountPtr) ;
92 extern void _DtAddOneSubdialog (
93                         DialogData * dialogData,
94                         DialogData *** dialogArray,
95                         int         * dialogCountPtr) ;
96 extern void _DtMappedCB(
97                         Widget w,
98                         XtPointer client_data,
99                         XtPointer call_data) ;
100 extern void _DtGenericMapWindow (
101                         Widget parent,
102                         XtPointer recordPtr) ;
103 extern void _DtGenericDestroy(
104                         XtPointer recordPtr) ;
105 extern void _DtGenericUpdateWindowPosition(
106                         DialogData * dataPtr) ;
107 extern void _DtBuildPath(
108                         char         *path,
109                         char         *directory,
110                         char         *fileName) ;
111 extern PixmapData * _DtRetrievePixmapData(
112                         char         *dataType,
113                         char         *fileName,
114                         char         *directory,
115                         Widget        shell,
116                         int           size);
117 extern void _DtCheckAndFreePixmapData(
118                         char         *dataType,
119                         Widget        shell,
120                         DtIconGadget  iconGadget,
121                         PixmapData   *pixmapData) ;
122 extern Boolean _DtCheckForDataTypeProperty(
123                         char *dataType,
124                         char *property) ;
125 extern char ** _DtCompileActionVector(
126                         char *dataType) ;
127 extern char * _DtRetrieveDefaultAction(
128                         char *dataType) ;
129 extern char * _DtBuildFMTitle(
130                         FileMgrData *file_mgr_data) ;
131 extern char * _DtGetSelectedFilePath(
132                         FileViewData *selected_file) ;
133 extern void _DtBuildActionArgsWithSelectedFiles(
134                         FileViewData **selection_list,
135                         int selected_file_count,
136                         DtActionArg **action_args,
137                         int *args_count) ;
138 extern void _DtBuildActionArgsWithDroppedFiles(
139                         FileViewData *dropped_on_obj,
140                         DtDndDropCallbackStruct *drop_parameters,
141                         DtActionArg **action_args,
142                         int *args_count) ;
143 extern void _DtBuildActionArgsWithDroppedBuffers(
144                         FileViewData *dropped_on_obj,
145                         DtDndDropCallbackStruct *drop_parameters,
146                         DtActionArg **action_args,
147                         int *args_count) ;
148 extern void _DtFreeActionArgs(
149                         DtActionArg *action_args,
150                         int args_count) ;
151 extern void _DtSetDroppedBufferInfo(
152                         char **file_set,
153                         BufferInfo *buffer_set,
154                         char **host_set,
155                         DtDndDropCallbackStruct *drop_parameters);
156 extern void _DtFreeDroppedBufferInfo (
157                         char **file_set,
158                         BufferInfo *buffer_set,
159                         char **host_set,
160                         int num_of_buffers);
161 extern Boolean _DtIsBufferExecutable(
162                         void *buffer,
163                         int buffer_size) ;
164 extern void _DtSetDroppedFileInfo(
165                         DtDndDropCallbackStruct *drop_parameters,
166                         char ***file_set,
167                         char ***host_set) ;
168 extern void _DtCopyDroppedFileInfo(
169                         int num_files,
170                         char **orig_file_set,
171                         char **orig_host_set,
172                         char ***new_file_set,
173                         char ***new_host_set) ;
174 extern void _DtFreeDroppedFileInfo(
175                         int num_files,
176                         char **file_set,
177                         char **host_set) ;
178 extern void _DtPathFromInput(
179                         char *input_string,
180                         char *current_dir,
181                         char **host,
182                         char **rel_path) ;
183 extern char * _DtChangeTildeToHome(
184                         char *input_string) ;
185 extern Boolean _DtSpacesInFileNames(
186                         char **fileNames,
187                         int fileCount) ;
188 extern char * _DtResolveAppManPath(
189                         char *path,
190                         char *restricted_dir) ;
191
192 /********    End Public Function Declarations    ********/
193
194 /* _DtMessage Dialog build defines */
195 #define ERROR_DIALOG  1
196 #define WARNING_DIALOG  2
197 #define QUESTION_DIALOG 3
198
199 /* Flag which can be used to prevent error dialogs from being posted */
200 extern Boolean messageDisplayEnabled;
201
202 /* Flag controlling whether dialogs are auto-positioned */
203 extern Boolean disableDialogAutoPlacement;
204
205 /* Generic overlay for all dialog 'Rec' structures */
206 typedef struct
207 {
208    Widget shell;
209 } GenericRecord;
210
211 #endif /* _SharedProcs_h */
212 /* DON'T ADD ANYTHING AFTER THIS #endif */