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