Fixes several issues with grid registration of the dtwm panel on dtfile startup and...
[oweals/cde.git] / cde / programs / dtfile / Main.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 /* $TOG: Main.h /main/8 1999/12/09 13:06:45 mgreess $ */
24 /************************************<+>*************************************
25  ****************************************************************************
26  *
27  *   FILE:           Main.h
28  *
29  *   COMPONENT_NAME: Desktop File Manager
30  *
31  *   DESCRIPTION:    Structures and defines needed by all of the files
32  *
33  *   MACROS:    DPRINTF
34  *              DPRINTF2
35  *              FileManip
36  *              FileMoveCopy
37  *              FileMoveCopyDesktop
38  *              GETMESSAGE
39  *              MakeFile
40  *              MakeFilesFromBuffers
41  *              MakeFilesFromBuffersDT
42  *              XtMalloc
43  *
44  *   (c) Copyright 1993, 1994, 1995 Hewlett-Packard Company
45  *   (c) Copyright 1993, 1994, 1995 International Business Machines Corp.
46  *   (c) Copyright 1993, 1994, 1995 Sun Microsystems, Inc.
47  *   (c) Copyright 1993, 1994, 1995 Novell, Inc.
48  *
49  ****************************************************************************
50  ************************************<+>*************************************/
51
52 #ifndef _Main_h
53 #define _Main_h
54
55 /* ANSI C definitions */
56 #ifdef __STDC__
57 #define Const const
58 #else
59 #define Const /**/
60 #endif
61
62 /*  Replacing XtMalloc by XtCalloc */
63
64 #define XtMalloc(x)     XtCalloc(1,x)
65 /*  Unknown type of file.  */
66
67 #define DtUNKNOWN       255
68
69
70 /*  The defines for icon states  */
71
72 #define NORMAL          0
73 #define SELECTED        1
74
75
76 /*  Generally used defines  */
77
78 #define MAX_PATH        1024
79 #define BLOCK_SIZE      1024
80 #define BUF_SIZE        256
81
82
83 /*  Current Directory Area defines  */
84
85 #define CURRENT_DIRECTORY_PAD_X 10
86 #define CURRENT_DIRECTORY_PAD_Y 4
87
88 #define FAST_RENAME "fast_rename"
89
90 /*  Session restore defines  */
91
92 #define NORMAL_RESTORE  0
93 #define HOME_RESTORE    1
94 #define TOOL_RESTORE    2
95
96 #define TOOL_SETTINGS_FILENAME  "dtfile.appl"
97 #define HOME_SETTINGS_FILENAME  "dtfile.fmgr"
98
99 #define HOME_DIR_RESTORE     1
100 #define CURRENT_DIR_RESTORE  2
101
102 #define TOOL     0
103 #define NON_TOOL 1
104
105 #define PIXELS_PER_ROW_LARGE    82
106 #define PIXELS_PER_COLUMN_LARGE 128
107 #define PIXELS_PER_ROW_SMALL    35
108 #define PIXELS_PER_COLUMN_SMALL 128
109 #define FP_HEIGHT 115
110
111
112 /* Physical file type defines */
113
114 #define DtDATA          1
115 #define DtDIRECTORY     2
116 #define DtEXECUTABLE    3
117
118
119 /* Logical file type defines */
120
121 #define LT_BROKEN_LINK            "BROKEN_LINK"
122 #define LT_RECURSIVE_LINK         "RECURSIVE_LINK"
123 #define LT_DIRECTORY              "FOLDER"
124 #define LT_DATA                   "DATA"
125 #define LT_AGROUP                 "AGROUP"
126 #define LT_AGROUP_SUBDIR          "APPGROUP"
127 #define LT_TRASH                  "TRASH_FOLDER"
128 #define LT_FOLDER_LOCK            "FOLDER_LOCK"
129 #define LT_NON_WRITABLE_FOLDER    "NON_WRITABLE_FOLDER"
130 #define LT_DOT_FOLDER     "DOT_FOLDER"
131 #define LT_CURRENT_FOLDER "CURRENT_FOLDER"
132 #define LT_NON_WRITABLE_FOLDER    "NON_WRITABLE_FOLDER"
133
134
135 /* _DtMessage Dialog build defines */
136
137 #define ERROR_DIALOG    1
138 #define WARNING_DIALOG  2
139 #define QUESTION_DIALOG 3
140
141
142 /* Trash movement defines -- see FileMgr.c and Desktop.c */
143
144 #define TO_TRASH     1
145 #define WITHIN_TRASH 2
146 #define FROM_TRASH   3
147
148
149 /* Trash Action */
150 #define TRASH_ACTION    "Trash"
151
152
153 /*  Internal bitmap file names  */
154 #define CHANGE_VIEW_ICON_S      "change_view.s"
155 #define CHANGE_VIEW_ICON_M      "change_view.m"
156 #define MULTIPLE_FILE_DRAG      "drag.bm"
157 #define SMALL_DIRECTORY_ICON    CDE_INSTALLATION_TOP "/appconfig/icons/C/dirblue.t.pm"
158
159 #define TOOL_ICON_NAME     CDE_INSTALLATION_TOP "/appconfig/icons/C/Fpapps.l.pm"
160 #define TRASH_ICON_NAME    CDE_INSTALLATION_TOP "/appconfig/icons/C/Fptrsh.l.pm"
161 #define HOME_ICON_NAME     CDE_INSTALLATION_TOP "/appconfig/icons/C/Fphome.l.pm"
162
163
164 /* File manipulation types */
165 #define MOVE_FILE       0
166 #define COPY_FILE       1
167 #define LINK_FILE       2
168 #define REMOVE_FILE     3
169 #define TRASH_FILE      4
170 #define RENAME_FILE     5
171 #define MERGE_DIR       6
172 #define MAKE_BUFFER     7
173
174 /* object placement values (for objectPlacement on the desktop) */
175 #define OBJ_PLACE_LEFT_PRIMARY         (1L << 0)
176 #define OBJ_PLACE_RIGHT_PRIMARY        (1L << 1)
177 #define OBJ_PLACE_TOP_PRIMARY          (1L << 2)
178 #define OBJ_PLACE_BOTTOM_PRIMARY       (1L << 3)
179 #define OBJ_PLACE_LEFT_SECONDARY       (1L << 4)
180 #define OBJ_PLACE_RIGHT_SECONDARY      (1L << 5)
181 #define OBJ_PLACE_TOP_SECONDARY        (1L << 6)
182 #define OBJ_PLACE_BOTTOM_SECONDARY     (1L << 7)
183 #define OBJ_PLACE_EDGE                 (1L << 8)
184 #define OBJ_PLACE_TIGHT                (1L << 9)
185 #define OBJ_PLACE_RESERVE              (1L << 10)
186
187 /* defines for the icon type on the Desktop */
188 #define DEFAULT 0
189 #define LARGE   1
190 #define SMALL   2
191
192 /* defines for whether to open New or use current */
193 #define CURRENT 0
194 #define NEW 1
195
196 /* defines for tree branch operations */
197 #define BRANCH_UPDATE   0
198 #define BRANCH_EXPAND   1
199 #define BRANCH_COLLAPSE 2
200
201 /* defines for Selected Menu button */
202 #define SELECTED_MENU_MAX  12  /* This is the number of children in Selected
203                                   menu pane excluding all action items
204                                   ('move to', 'copy to' ...
205                                    'change permission', separator)
206                                   Will use this to know where to unmanage
207                                   action menu items for the Selected menu pane.
208                                */
209                       
210 /* defines for default Buffer file names */
211 #define DEFAULT_BUFFER_FILENAME        "Untitled"
212 #define MAX_POSTFIX_LENGTH              11
213
214
215 /* Creation mask */
216 #define DtFILE_DATA_CREATION_MASK    S_IRUSR | S_IWUSR |  S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH
217 #define DtFILE_DIR_CREATION_MASK     S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IWOTH | S_IXOTH
218 #define DtFILE_OTHER_CREATION_MASK   S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IWOTH | S_IXOTH
219
220
221 #include <Tt/tttk.h>
222
223 /*  The main directory structure and directory set list  */
224 typedef struct
225 {
226    XtPointer dialog_data;
227    char  * host_name;
228    char  * directory_name;
229    Tt_message msg;
230    Tt_pattern * pats;
231 } View;
232
233 typedef struct
234 {
235   int x, y;
236 } WindowPosition;
237
238 /* Used by File.c */
239 typedef int (*StrcollProc) (const char *,const char *);
240
241 /* Global strings */
242 extern char DESKTOP_DIR[];
243 extern char DTFILE_CLASS_NAME[];
244 extern char DTFILE_HELP_NAME[];
245
246
247 /* Trash globals */
248 extern Widget trashShell;
249 extern DialogData * primaryTrashHelpDialog;
250 extern DialogData ** secondaryTrashHelpDialogList;
251 extern int secondaryTrashHelpDialogCount;
252
253
254 /*  debugging output  */
255 #ifdef DEBUG
256 extern int debug;
257 #define DBGFORK(p)  if (debug) {fflush(stdout); printf("pid %d, ppid %d:  ",getpid(),getppid()); printf p ; fflush(stdout);}
258 #define DPRINTF(p)  \
259   if (debug) {printf("pid %d, ppid %d:  ",getpid(),getppid()); printf p ;}
260 #define DPRINTF2(p) \
261   if (debug>=2) {printf("pid %d, ppid %d:  ",getpid(),getppid()); printf p ;}
262 #else
263 #define DBGFORK(p)  /* noop */
264 #define DPRINTF(p)  /* noop */
265 #define DPRINTF2(p) /* noop */
266 #endif
267
268 /*  Externally referenced globals  */
269
270 extern Widget toplevel;
271 extern char * application_name;
272 extern long root_user;
273 extern char home_host_name[];
274 extern char users_home_dir[];
275 extern Pixel black_pixel;
276 extern Pixel white_pixel;
277 extern XtPointer initiating_view;
278 extern Boolean special_view;
279 extern Boolean TrashView;
280 extern XmFontList user_font;
281 extern Boolean showFilesystem;
282 extern Boolean showDropZone;
283 extern Boolean showEmptySet;
284 extern Boolean showEmptyMsg;
285 extern Boolean restrictMode;
286 extern int openDirType;
287 extern char *root_title;
288 extern char *fileMgrTitle;
289 extern char *fileMgrHelpVol;
290 extern int desktopIconType;
291 extern Boolean freezeOnConfig;
292 #if defined(__hpux) || defined(sun)
293 extern Boolean follow_links;
294 #endif
295 extern int maxDirectoryProcesses;
296 extern int maxRereadProcesses;
297 extern int maxRereadProcsPerTick;
298 extern int rereadTime;
299 extern int checkBrokenLink;
300 extern int trashWait;
301 extern int desktopPlacement;
302 extern int treeType;
303 extern int treeFiles;
304 extern int viewType;
305 extern int orderType;
306 extern int directionType;
307 extern int randomType;
308 extern int special_treeType;
309 extern int special_treeFiles;
310 extern int special_viewType;
311 extern int special_orderType;
312 extern int special_directionType;
313 extern int special_randomType;
314 extern int instanceWidth;
315 extern int instanceHeight;
316 extern char *special_restricted;
317 extern char *special_title;
318 extern char *special_helpVol;
319 extern char *fileMgrIcon;
320 extern char *appMgrIcon;
321 extern char *trashIcon;
322 extern int retryLoadDesktopInfo;
323 extern int smallIconWidth;
324 extern int smallIconHeight;
325 extern int largeIconWidth;
326 extern int largeIconHeight;
327 extern Boolean emptyTrashOnExit;
328 extern String openInPlace;
329 extern String openNewView;
330 extern char * desktop_dir;
331 extern char * trash_dir;
332 extern char * remote_sys_dir;
333 extern XmString okXmString;
334 extern XmString cancelXmString;
335 extern XmString helpXmString;
336 extern XmString applyXmString;
337 extern XmString closeXmString;
338 extern unsigned int currentMenuStates;
339 extern Boolean b1Drag;
340 extern Boolean dragActive;
341 extern int restoreType;
342 extern int file_mgr_dialog;
343 extern int change_dir_dialog;
344 extern int preferences_dialog;
345 extern int filter_dialog;
346 extern int find_dialog;
347 extern int mod_attr_dialog;
348 extern int help_dialog;
349 extern Boolean TurnOnTextName;
350 extern int numColumns;
351 extern int numRows;
352 extern FileMgrPopup fileMgrPopup;
353 extern unsigned char keybdFocusPolicy;
354 extern FileMgrData *trashFileMgrData;
355 extern DialogData *trashDialogData;
356 #ifdef SHAPE
357 extern Boolean shapeExtension;
358 #endif
359
360 extern Widget * create_dataBtn;
361 extern Widget * renameBtn;
362 extern Widget * moveBtn;
363 extern Widget * duplicateBtn;
364 extern Widget * linkBtn;
365 extern Widget * findBtn;
366 extern Widget * create_directoryBtn;
367 extern Widget * change_directoryBtn;
368 extern Widget * preferencesBtn;
369 extern Widget * filterBtn;
370 extern Widget * defaultEnvBtn;
371 extern Widget * homeBarBtn;
372 extern Widget * upBarBtn;
373 extern Widget * newViewBtn;
374 extern Widget * cleanUpBtn;
375 extern Widget * separator1;
376 extern Widget * separator2;
377 extern Widget * terminalBtn;
378 extern Widget * showHiddenMenu;
379 extern Widget * usingHelp;
380 extern Widget * fileManagerHelp;
381 extern Widget * applicationManagerHelp;
382 extern Widget * usingHelpTrash;
383
384 extern Widget widget_dragged;
385
386 /* Drag state variables */
387 extern Boolean B1DragPossible;
388 extern Boolean B2DragPossible;
389 extern Boolean ProcessBtnUp;
390 extern Boolean ProcessBtnUpCD;
391 extern int initialDragX;
392 extern int initialDragY;
393 extern int dragThreshold;
394 extern int xErrorDetected;
395
396 /* BMenu button binding */
397 extern int bMenuButton;
398
399 extern char translations_sp_esc[];
400 extern char translations_space[];
401 extern char translations_escape[];
402 extern char translations_da[];
403
404 extern View ** view_set;
405 extern int view_count;
406 extern int view_set_size;
407
408 extern StrcollProc FMStrcoll;
409 extern XtIntervalId checkBrokenLinkTimerId;
410
411 /********    Public Function Declarations    ********/
412
413
414 #include <Xm/GadgetP.h>
415 #include <Xm/ManagerP.h>
416
417 #include <Dt/DtP.h>
418 #include <Dt/Action.h>
419 #include <Dt/Dnd.h>
420
421 #include "sharedFuncs.h"
422 #include "FileMgr.h"
423 #include "ChangeDir.h"
424 #include "ModAttr.h"
425
426 /* prototypes from Main.c */
427
428 extern void SaveSettingsCB(
429                         Widget w,
430                         XtPointer client_data,
431                         XtPointer call_data) ;
432 extern void SaveSessionCallback(
433                         Widget w,
434                         XtPointer client_data,
435                         XtPointer call_data) ;
436 extern DialogData *ViewDirectoryProc(
437                         char *root_dir,
438                         int restricted,
439                         Tt_message msg) ;
440 extern DialogData *GetNewView(
441                         char *host_name,
442                         char *directory_name,
443                         char *type,
444                         WindowPosition *position,
445                         Tt_message msg) ;
446 extern void CloseView(
447                         DialogData *dialog_data) ;
448 extern void DirectoryContentsModified(
449                         char *host_name,
450                         char *directory_name,
451                         FileMgrRec *file_mgr_rec) ;
452 extern void DirectoryChanged(
453                         XtPointer file_mgr_data,
454                         char *old_host_name,
455                         char *new_host_name,
456                         char *old_directory_name,
457                         char *new_directory_name) ;
458 extern PixmapData * CheckForOpenDirectory(
459                         FileViewData *order_list,
460                         DirectorySet *directory_set,
461                         FileMgrData *file_mgr_data,
462                         char * logical_type) ;
463 extern FileMgrData * ReturnDesktopPtr (
464                         Widget w);
465 extern void CleanUp (
466                         Widget w,
467                         XtPointer client_data,
468                         XtPointer call_data) ;
469 extern void DragEndedHandler(
470                         Display *drop_display,
471                         Window drop_window,
472                         Position drop_x,
473                         Position drop_y,
474                         Window root_window,
475                         Position root_x,
476                         Position root_y,
477                         unsigned int modifiers,
478                         char *types,
479                         char *objects,
480                         XtPointer client_data) ;
481 extern char * GetMessage(
482                         int set,
483                         int n,
484                         char *s) ;
485 extern FileMgrData * CheckOpenDir (
486                         char * directory,
487                         char * host) ;
488 extern char * GetRestrictedDirectory ( Widget widget) ;
489 extern char * BuildTrueDTFilePath(
490                         DesktopRec *desktopWindow,
491                         FileViewData *file_view_data) ;
492 extern void ForceMyIconClosed (
493                         char * host_name,
494                         char * directory_name) ;
495 extern void ForceMyIconOpen (
496                         char * host_name,
497                         char * directory_name) ;
498 extern Tt_callback_action HandleTtRequest(
499                         Tt_message msg,
500                         Tt_pattern pat) ;
501
502 /* prototype from ChangeDir.c */
503
504 extern void ChangeToNewDir (
505                         Widget text_field,
506                         XtPointer client_data,
507                         XmAnyCallbackStruct * callback_data );
508
509 extern void ChangeDirectoryToParent(
510                         FileMgrRec * file_mgr_rec,
511                         char *directory) ;
512 extern void DropOnChangeView (
513                         Widget w,
514                         XtPointer client_data,
515                         XtPointer call_data ) ;
516 extern void TextChange(
517                         Widget text,
518                         XtPointer client_data,
519                         XmTextVerifyCallbackStruct * callback_data );
520
521 /* prototypes from ChangeDirP.c */
522
523 extern void ShowNewDirectory(
524                         FileMgrData *,
525                         char *,
526                         char * );
527 extern void ShowChangeDirDialog(
528                         Widget w,
529                         XtPointer client_data,
530                         XtPointer callback) ;
531 extern void CurrentDirSelected(
532                         Widget w,
533                         XtPointer client_data,
534                         XtPointer call_data) ;
535 extern void CurrentDirDropCallback(
536                         Widget w,
537                         XtPointer client_data,
538                         XtPointer call_data) ;
539 extern void CurrentDirIconCallback(
540                         Widget w,
541                         XtPointer client_data,
542                         XtPointer call_data) ;
543 extern void CurrentDirExposed(
544                         Widget w,
545                         XtPointer client_data,
546                         XtPointer call_data) ;
547 extern Boolean GetStatusMsg(
548                         FileMgrData *file_mgr_data,
549                         char *buf) ;
550 extern void DrawCurrentDirectory(
551                         Widget w,
552                         FileMgrRec *file_mgr_rec,
553                         FileMgrData *file_mgr_data) ;
554 extern void CurrentDirectoryIconMotion(
555                         Widget w,
556                         XtPointer client_data,
557                         XEvent *event) ;
558 extern void ShowFastChangeDir(
559                         FileMgrRec *file_mgr_rec,
560                         FileMgrData *file_mgr_data ) ;
561 extern void IconicPathExposeCallback(
562                         Widget w,
563                         XtPointer client_data,
564                         XtPointer call_data) ;
565 extern void IconicPathResizeCallback(
566                         Widget w,
567                         XtPointer client_data,
568                         XEvent *event) ;
569
570 /* prototype from Command.c */
571
572 extern void UpdateActionMenuPane(
573                         XtPointer client_data,
574                         FileMgrRec *file_mgr_rec,
575                         char * file_type,
576                         int type,
577                         int number,
578                         Widget widget,
579                         unsigned char physical_type) ;
580 extern void RunCommand( char *command,
581                         FileMgrData *file_mgr_data,
582                         FileViewData *file_view_data,
583                         WindowPosition *position,
584                         DtDndDropCallbackStruct *drop_parameters,
585                         Widget drop_window) ;
586 extern Boolean InvalidTrashDragDrop ( int drop_op,
587                                       int trash_context,
588                                       Widget w) ;
589 extern void ProcessNewView ( char *command,
590                              FileMgrData *file_mgr_data,
591                              FileViewData *file_view_data,
592                              WindowPosition *position) ;
593 extern void ProcessMoveCopyLink ( char *command,
594                                   FileMgrData *file_mgr_data,
595                                   FileViewData *file_view_data,
596                                   DtDndDropCallbackStruct *drop_parameters,
597                                   Widget drop_window) ;
598 extern void ProcessAction ( char *action,
599                             FileViewData *file_view_data,
600                             DtDndDropCallbackStruct *drop_parameters,
601                             char *cur_host,
602                             char *cur_dir,
603                             char *restricted_dir,
604                             Widget w) ;
605
606 /* prototype from Common.c */
607
608 extern void VFTextChangeSpace(
609                         Widget text,
610                         XEvent *event,
611                         XtPointer params,
612                         XtPointer num_params ) ;
613 extern void CancelOut(
614                         Widget widget,
615                         XEvent *event,
616                         XtPointer params,
617                         XtPointer num_params ) ;
618 extern void AddString(
619                         String *buf,
620                         int *size,
621                         String string,
622                         String header ) ;
623
624 /* prototype from MakeDir.c */
625
626 extern int RunFileCommand(
627                         register char *command_path,
628                         register char *argument1,
629                         register char *argument2,
630                         register char *argument3) ;
631
632 /* prototypes from Directory.h */
633
634 extern void InitializeDirectoryRead(
635                         Widget widget) ;
636 extern void FileWindowMapUnmap(
637                         FileMgrData *file_mgr_data) ;
638 extern int ReadDir(
639                         Widget w,
640                         FileMgrData *file_mgr_data,
641                         char *host_name,
642                         char *directory_name,
643                         FileViewData *dp,
644                         int level,
645                         int read_level,
646                         char **branch_list) ;
647 extern void RereadDirectory(
648                         Widget w,
649                         char *host_name,
650                         char *directory_name) ;
651 extern void UpdateDirectory(
652                         Widget w,
653                         char *host_name,
654                         char *directory_name) ;
655 extern void DirectoryBeginModify(
656                         char *host_name,
657                         char *directory_name) ;
658 extern void DirectoryModifyTime(
659                         char *host_name,
660                         char *directory_name,
661                         long modify_time) ;
662 extern void DirectoryFileModified(
663                         char *host_name,
664                         char *directory_name,
665                         char *file_name) ;
666 extern void DirectoryEndModify(
667                         char *host_name,
668                         char *directory_name) ;
669 extern void DirectoryAbortModify(
670                         char *host_name,
671                         char *directory_name);
672
673 extern void UpdateDirectorySet( void ) ;
674 extern void UpdateCachedDirectories(
675                         View **view_set,
676                         int view_count) ;
677 extern char * GetLongName(
678                         FileData *file_data) ;
679 extern Boolean DirectoryBusy(
680                         char *path) ;
681 extern char * GetDirectoryLogicalType(
682                         FileMgrData *file_mgr_data,
683                         char *path) ;
684 extern FileData * FileData2toFileData(
685                         FileData2 *file_data2,
686                         int *l);
687
688 extern FileData * ReadFileData(
689                         char *full_directory_name,
690                         char *file_name);
691
692 extern int ReadFileData2(
693                         FileData2 *fdata,
694                         char *full_directory_name,
695                         char *file_name,
696                         Boolean IsToolBox) ;
697 extern void FreeFileData(
698                         FileData *file_data,
699                         Boolean free_all) ;
700 extern FileData * LookupFileData(
701                         char *host_name,
702                         char *directory_name,
703                         char *file_name) ;
704 extern int GetDirectoryPositionInfo(
705                         char *host_name,
706                         char *directory_name,
707                         PositionInfo **position_info) ;
708 extern int SetDirectoryPositionInfo(
709                         char *host_name,
710                         char *directory_name,
711                         int position_count,
712                         PositionInfo *position_info) ;
713 extern void TimerEventBrokenLinks(
714                         XtPointer client_data,
715                         XtIntervalId *id);
716 extern char * GetTTPath(
717                         char *name) ;
718
719 /* prototypes for File.c */
720
721 extern void SetHotRects (
722                         FileViewData * file_view_data,
723                         XtCallbackProc callback,
724                         XtPointer callback_data) ;
725 extern unsigned char TypeToDropOperations (
726                         char * file_type) ;
727 extern char * TypeToAction (
728                         unsigned char operation,
729                         char * logical_type) ;
730 extern void OrderFiles(
731                         FileMgrData *file_mgr_data,
732                         DirectorySet *directory_set) ;
733 extern void FilterFiles(
734                         FileMgrData *file_mgr_data,
735                         DirectorySet *directory_set) ;
736 extern void UnmanageFileIcons(
737                         FileMgrRec *file_mgr_rec,
738                         FileMgrData *file_mgr_data,
739                         FileViewData *file_view_data);
740 extern void UpdateFileIcons(
741                         FileMgrRec *file_mgr_rec,
742                         FileMgrData *file_mgr_data,
743                         Boolean new_directory) ;
744 extern void AddFileIcons(
745                         FileMgrRec *file_mgr_rec,
746                         FileMgrData *file_mgr_data,
747                         DirectorySet * add_dir_set) ;
748 extern void EraseTreeLines(
749                         FileMgrRec *file_mgr_rec,
750                         FileMgrData *file_mgr_data,
751                         FileViewData *file_view_data) ;
752 extern void RedrawTreeLines(
753                         Widget w,
754                         int ex, int ey, int ewidth, int eheight, int ecount,
755                         FileMgrRec *file_mgr_rec,
756                         FileMgrData *file_mgr_data) ;
757 extern void LayoutFileIcons(
758                         FileMgrRec *file_mgr_rec,
759                         FileMgrData *file_mgr_data,
760                         Boolean update_scrolling_position,
761                         Boolean turn_off_hourglass) ;
762 extern Pixmap GetTreebtnPixmap(
763                         FileMgrData *file_mgr_data,
764                         FileViewData *file_view_data);
765 extern void IconCallback(
766                         Widget w,
767                         XtPointer clientData,
768                         XtPointer callData) ;
769 extern void FileIconMotion(
770                         Widget w,
771                         XtPointer clientData,
772                         XEvent *event) ;
773 extern Boolean FileIsSelected(
774                         FileMgrData *file_mgr_data,
775                         FileViewData *file_view_data) ;
776 extern void SelectFile(
777                         FileMgrData *file_mgr_data,
778                         FileViewData *file_view_data) ;
779 extern void DeselectFile(
780                         FileMgrData *file_mgr_data,
781                         FileViewData *file_view_data,
782                         Boolean valid ) ;
783 extern void DeselectAllFiles(
784                         FileMgrData *file_mgr_data) ;
785 extern void SelectAllFiles(
786                         FileMgrData *file_mgr_data) ;
787 extern void SetToSelectColors(
788                         Widget widget,
789                         Widget file_window,
790                         int type) ;
791 extern void SetToNormalColors(
792                         Widget widget,
793                         Widget bg_fg_colors,
794                         Widget top_shadow_colors,
795                         int type) ;
796 extern void GetTarget(
797                         char *from_host,
798                         char *from_dir,
799                         char *new_name,
800                         char *to_host,
801                         char *to_dir,
802                         char *to_file);
803 extern Boolean FileMoveCopy(
804                         FileMgrData *file_mgr_data,
805                         char *to_file,
806                         char *directory,
807                         char *host,
808                         char **host_set,
809                         char **file_set,
810                         int file_count,
811                         unsigned int modifiers,
812                         void (*finish_callback)(),
813                         XtPointer callback_data);
814 extern void RepositionIcons(
815                         FileMgrData *file_mgr_data,
816                         char **file_list,
817                         int file_count,
818                         Position drop_x,
819                         Position drop_y,
820                         Boolean late_binding_needed) ;
821 extern void RegisterDesktopHotspots(
822                         FileMgrData *file_mgr_data,
823                         FileMgrRec *file_mgr_rec) ;
824 extern void DestroyIconName(
825                         Widget w,
826                         XtPointer client_data,
827                         XtPointer call_data) ;
828 extern void CreateNameChangeDialog(
829                         Widget w,
830                         FileViewData *file_view_data,
831                         XtPointer client_data,
832                         int type) ;
833 extern void SavePositionalData(
834                         int fd,
835                         FileMgrData *file_mgr_data,
836                         char **name_list,
837                         char *name) ;
838 extern void RestorePositionalData(
839                         XrmDatabase db,
840                         char **name_list,
841                         FileMgrData *file_mgr_data,
842                         char *name) ;
843 extern void UnpostTextField(
844                         FileMgrData *file_mgr_data) ;
845 extern void UnpostTextPath(
846                         FileMgrData *file_mgr_data) ;
847 extern void RedrawOneGadget(
848                         Widget child,
849                         XEvent *event,
850                         Region region) ;
851 extern void RepaintDesktop(
852                         FileMgrData *file_mgr_data,
853                         XEvent *event,
854                         Region region) ;
855 extern void DrawingAreaRedisplay(
856                         Widget wid,
857                         XEvent *event,
858                         Region region) ;
859 extern ObjectPtr GetBottomOfStack(
860                         FileMgrData *file_mgr_data) ;
861 extern ObjectPtr GetTopOfStack(
862                         FileMgrData *file_mgr_data) ;
863 extern void RepositionUpInStack(
864                         FileMgrData *file_mgr_data,
865                         int oldPos,
866                         int newPos) ;
867 extern ObjectPtr FindCurrentPosition(
868                         FileMgrData *file_mgr_data,
869                         char *file_name) ;
870 extern void RepairStackingPointers(
871                         FileMgrData *file_mgr_data) ;
872 extern void OrderChildrenList(
873                         FileMgrData *file_mgr_data) ;
874 extern void PositionFileView(
875                         FileViewData *file_view_data,
876                         FileMgrData *file_mgr_data) ;
877 extern void DrawHighlight (
878                         Widget w,
879                         FileViewData *file_view_data,
880                         FileMgrData *file_mgr_data,
881                         int type );
882 extern void DrawUnhighlight (
883                         Widget w,
884                         int type);
885 extern void DrawShadowTh (
886                         Widget w,
887                         GC gc,
888                         int type);
889 extern void FmPopup (
890                         Widget w,
891                         XtPointer client_data,
892                         XEvent *event,
893                         FileMgrData *file_mgr_data);
894 extern Boolean VerticalScrollbarIsVisible(
895                         Widget vertSB,
896                         Widget scrolledWin);
897 extern Boolean HorizontalScrollbarIsVisible(
898                         Widget hortSB,
899                         Widget scrolledWin);
900 extern void RepairFileWindow (
901                         FileMgrData * file_mgr_data);
902 StrcollProc GetStrcollProc(void);
903
904 extern void StartDrag(
905                         Widget w,
906                         FileViewData * fileViewData,
907                         XEvent * event);
908 extern void FreeLayoutData(XtPointer p);
909
910 extern void GetAncestorInfo(
911                         FileMgrData *file_mgr_data,
912                         FileViewData *ip,
913                         int *levelp,
914                         char *path,
915                         Bool *morep);
916
917 extern void GetFullName(
918                         FileMgrData *file_mgr_data,
919                         FileViewData *ip,
920                         char *path);
921
922 /* prototypes from FileDialog.h */
923
924 extern void ShowRenameFileDialog(
925                         Widget w,
926                         XtPointer client_data,
927                         XtPointer call_data) ;
928 extern void ShowCopyFileDialog(
929                         Widget w,
930                         XtPointer client_data,
931                         XtPointer call_data) ;
932 extern void ShowMoveFileDialog(
933                         Widget w,
934                         XtPointer client_data,
935                         XtPointer call_data) ;
936 extern void ShowLinkFileDialog(
937                         Widget w,
938                         XtPointer client_data,
939                         XtPointer call_data) ;
940 extern void ShowMakeFileDialog(
941                         Widget w,
942                         XtPointer client_data,
943                         XtPointer call_data) ;
944 extern void RenameDone(
945                         XtPointer client_data,
946                         int rc) ;
947 extern int RecheckFlag(
948                         Widget parent,
949                         Widget w);
950 extern void ResetFlag(
951                         Widget parent,
952                         Widget w);
953
954 /* prototypes from FileManip.h */
955
956 extern void FileOperationError(
957                         Widget w,
958                         char *message1,
959                         char *message2) ;
960 extern Boolean FileManip(
961                         Widget w,
962                         int mode,
963                         register char *from,
964                         register char *to,
965                         Boolean isContainer,
966                         void (*errorHandler)(),
967                         Boolean checkForBusyDir,
968                         int type);
969 extern int CheckAccess(
970                         char *fname,
971                         int what);
972
973 extern char * DName(
974                         register char *name) ;
975
976 /* prototypes from FileMgr.h */
977
978 extern PixmapData * GetPixmapData(
979                         FileMgrRec *file_mgr_rec,
980                         FileMgrData *file_mgr_data,
981                         char *path,
982                         Boolean large) ;
983 extern void SetSpecialMsg(
984                         FileMgrRec *file_mgr_rec,
985                         FileMgrData *file_mgr_data,
986                         char *msg) ;
987 extern void UpdateHeaders(
988                         FileMgrRec *file_mgr_rec,
989                         FileMgrData *file_mgr_data,
990                         Boolean icons_changed) ;
991 extern void FileMgrRedisplayFiles(
992                         FileMgrRec *file_mgr_rec,
993                         FileMgrData *file_mgr_data,
994                         Boolean new_directory) ;
995 extern void ShowNewDirectory(
996                         FileMgrData *file_mgr_data,
997                         char *host_name,
998                         char *directory_name) ;
999 extern void FileMgrReread(
1000                         FileMgrRec *file_mgr_rec) ;
1001 extern void FileMgrBuildDirectories(
1002                         FileMgrData *file_mgr_data,
1003                         char *host_name,
1004                         char *directory_name) ;
1005 extern Boolean DropOnGadget(
1006                         FileMgrData *file_mgr_data,
1007                         Widget w,
1008                         Position x,
1009                         Position y) ;
1010 extern void FileMgrProcessDrop(
1011                         FileMgrData *file_mgr_data,
1012                         FileMgrRec *file_mgr_rec,
1013                         Window w,
1014                         Position drop_x,
1015                         Position drop_y,
1016                         unsigned int modifiers,
1017                         char *types,
1018                         char *files) ;
1019 extern void FileMgrPropagateSettings(
1020                         FileMgrData *src_data,
1021                         FileMgrData *dst_data) ;
1022 extern void Close(
1023                         Widget w,
1024                         XtPointer client_data,
1025                         XtPointer call_data) ;
1026 extern void ShowChangeDirField(
1027                         Widget w,
1028                         XtPointer client_data,
1029                         XtPointer callback) ;
1030 extern void FreePositionInfo(
1031                         FileMgrData *file_mgr_data) ;
1032 extern Boolean PositioningEnabledInView(
1033                         FileMgrData *file_mgr_data) ;
1034 extern Boolean PositionFlagSet(
1035                         FileMgrData *file_mgr_data) ;
1036 extern void InheritPositionInfo(
1037                         FileMgrData *src_file_mgr_data,
1038                         FileMgrData *dest_file_mgr_data) ;
1039 extern void SavePositionInfo(
1040                         FileMgrData *file_mgr_data) ;
1041 extern void LoadPositionInfo(
1042                         FileMgrData *file_mgr_data) ;
1043 extern void SetPWD(
1044                         char *viewHost,
1045                         char *viewDir,
1046                         char **pwdHostRet,
1047                         char **pwdDirRet,
1048                         char *type) ;
1049 extern FileViewData * DropOnPrimaryHotspot (
1050                         FileMgrData * file_mgr_data,
1051                         Position drop_x,
1052                         Position drop_y,
1053                         DirectorySet ** directory_data);
1054 extern void DropOnFileWindow (
1055                         Widget w,
1056                         XtPointer client_data,
1057                         XtPointer call_data);
1058 extern void DropOnObject (
1059                         Widget w,
1060                         XtPointer client_data,
1061                         XtPointer call_data);
1062 extern void CheckMoveType(
1063                         FileMgrData *file_mgr_data,
1064                         FileViewData *file_view_data,
1065                         DirectorySet * directory_data,
1066                         DesktopRec * desktopWindow,
1067                         char **file_set,
1068                         char **host_set,
1069                         unsigned int modifiers,
1070                         int file_count,
1071                         Position drop_x,
1072                         Position drop_y,
1073                         int view ) ;
1074 extern void UpdateBranchList(
1075                         FileMgrData *file_mgr_data,
1076                         DirectorySet *directory_set) ;
1077 extern Boolean QueryBranchList(
1078                         FileMgrData *file_mgr_data,
1079                         char **branch_list,
1080                         char *directory_name,
1081                         TreeShow *tsp) ;
1082 extern void UpdateBranchState(
1083                         FileMgrData *file_mgr_data,
1084                         FileViewData *ip,
1085                         int op,
1086                         Boolean busy) ;
1087 extern void DirTreeExpand(
1088                         FileMgrData *file_mgr_data,
1089                         FileViewData *ip,
1090                         Boolean expand) ;
1091
1092 /* prototype from Filter.c */
1093 extern void UpdataFilterAfterDBReread (
1094                         DialogData * dialog_data) ;
1095
1096 /* prototype from FilterP.c */
1097
1098 extern void ShowFilterDialog(
1099                         Widget w,
1100                         XtPointer client_data,
1101                         XtPointer callback) ;
1102 extern void ShowHiddenFiles (
1103                         Widget  w,
1104                         XtPointer client_data,
1105                         XtPointer callback) ;
1106 extern void NewFileTypeSelected (
1107                         Widget  w,
1108                         XtPointer client_data,
1109                         XtPointer callback) ;
1110 extern void SelectAllFileTypes (
1111                         Widget  w,
1112                         XtPointer client_data,
1113                         XtPointer callback) ;
1114 extern void UnselectAllFileTypes (
1115                         Widget  w,
1116                         XtPointer client_data,
1117                         XtPointer callback) ;
1118
1119 /* prototype from FindP.c */
1120
1121 extern void ShowFindDialog(
1122                         Widget w,
1123                         XtPointer client_data,
1124                         XtPointer callback) ;
1125
1126 /* prototype from IconWindow.c */
1127
1128 extern void FileWindowExposeCallback(
1129                         Widget w,
1130                         XtPointer client_data,
1131                         XtPointer call_data) ;
1132 extern void FileWindowResizeCallback(
1133                         Widget w,
1134                         XtPointer client_data,
1135                         XEvent *event) ;
1136 extern void FileWindowMapCallback(
1137                         Widget w,
1138                         XtPointer client_data,
1139                         XEvent *event ) ;
1140 extern void FileWindowInputCallback(
1141                         Widget w,
1142                         XtPointer client_data,
1143                         XtPointer call_data) ;
1144 extern void WidgetRectToRegion (
1145                         FileMgrData * file_mgr_data,
1146                         Widget w,
1147                         Region region) ;
1148
1149 /* prototype from Menu.c */
1150
1151 extern Widget CreateMenu(
1152                         Widget main,
1153                         FileMgrRec *file_mgr_rec) ;
1154 extern void ActivateSingleSelect(
1155                         FileMgrRec *file_mgr_rec,
1156                         char * file_type) ;
1157 extern void ActivateMultipleSelect(
1158                         FileMgrRec *file_mgr_rec) ;
1159 extern void ActivateNoSelect(
1160                         FileMgrRec *file_mgr_rec) ;
1161 extern void UnselectAll(
1162                         Widget w,
1163                         XtPointer client_data,
1164                         XtPointer call_data) ;
1165 extern void SelectAll(
1166                         Widget w,
1167                         XtPointer client_data,
1168                         XtPointer call_data) ;
1169
1170 extern void TrashFiles(
1171                         Widget w,
1172                         XtPointer client_data,
1173                         XtPointer call_data) ;
1174 extern void ChangeToHome(
1175                         Widget w,
1176                         XtPointer client_data,
1177                         XtPointer call_data ) ;
1178 extern void ChangeToParent(
1179                         Widget w,
1180                         XtPointer client_data,
1181                         XtPointer call_data ) ;
1182
1183 /* prototype from ModAttr.c */
1184
1185 extern Boolean LoadFileAttributes(
1186                         String host,
1187                         String dir,
1188                         String file,
1189                         ModAttrData *modAttr_data) ;
1190 extern void ModAttrChange(
1191                         XtPointer client_data,
1192                         DialogData *old_dialog_data,
1193                         DialogData *new_dialog_data,
1194                         XtPointer call_data) ;
1195 extern void ModAttrClose(
1196                         XtPointer client_data,
1197                         DialogData *old_dialog_data,
1198                         DialogData *new_dialog_data) ;
1199 extern void ModAttrFreeValues(
1200                         ModAttrData *modAttr_data );
1201
1202
1203 /* prototype from ModAttrP.c */
1204
1205 extern void ShowModAttrDialog(
1206                         Widget w,
1207                         XtPointer client_data,
1208                         XtPointer callback) ;
1209
1210 /* prototypes from Prefs.c */
1211
1212 extern void ShowTypeToString(
1213                         int fd,
1214                         unsigned char *value,
1215                         char *out_buf) ;
1216 extern void StringToShowType(
1217                         XrmValuePtr args,
1218                         Cardinal *num_args,
1219                         XrmValue *from_val,
1220                         XrmValue *to_val) ;
1221 extern void TreeFilesToString(
1222                         int fd,
1223                         unsigned char *value,
1224                         char *out_buf) ;
1225 extern void StringToTreeFiles(
1226                         XrmValuePtr args,
1227                         Cardinal *num_args,
1228                         XrmValue *from_val,
1229                         XrmValue *to_val) ;
1230 extern void ViewToString(
1231                         int fd,
1232                         unsigned char *value,
1233                         char *out_buf) ;
1234 extern void StringToView(
1235                         XrmValuePtr args,
1236                         Cardinal *num_args,
1237                         XrmValue *from_val,
1238                         XrmValue *to_val) ;
1239 extern void OrderToString(
1240                         int fd,
1241                         unsigned char *value,
1242                         char *out_buf) ;
1243 extern void StringToOrder(
1244                         XrmValuePtr args,
1245                         Cardinal *num_args,
1246                         XrmValue *from_val,
1247                         XrmValue *to_val) ;
1248 extern void DirectionToString(
1249                         int fd,
1250                         unsigned char *value,
1251                         char *out_buf) ;
1252 extern void RandomToString(
1253                         int fd,
1254                         unsigned char *value,
1255                         char *out_buf) ;
1256 extern void StringToDirection(
1257                         XrmValuePtr args,
1258                         Cardinal *num_args,
1259                         XrmValue *from_val,
1260                         XrmValue *to_val) ;
1261 extern void StringToRandom(
1262                         XrmValuePtr args,
1263                         Cardinal *num_args,
1264                         XrmValue *from_val,
1265                         XrmValue *to_val) ;
1266 extern void UpdatePreferencesDialog (
1267                         FileMgrData * file_mgr_data) ;
1268
1269 /* prototype for PrefsP.c */
1270
1271 extern void ShowPreferencesDialog(
1272                         Widget w,
1273                         XtPointer client_data,
1274                         XtPointer callback) ;
1275
1276 /* prototype for Trash.c */
1277
1278 extern Boolean TrashIsInitialized(
1279                         void ) ;
1280 extern Boolean InitializeTrash(
1281                         Boolean enableVerifyPrompt);
1282 extern void TrashCreateDialog(
1283                         Display *display) ;
1284 extern void TrashDisplayHandler(
1285                         Tt_message msg);
1286 extern void TrashEmptyHandler(
1287                         Tt_message msg);
1288 extern void TrashRemoveHandler(
1289                         Tt_message msg);
1290 extern void TrashEmpty( void );
1291 extern void TrashRestoreHandler(
1292                         Tt_message msg);
1293 extern void TrashRemoveNoConfirmHandler(
1294                         Tt_message msg);
1295 extern Widget CreateTrashMenu(
1296                         Widget mainw,
1297                         FileMgrRec *file_mgr_rec) ;
1298 extern void SensitizeTrashBtns( void ) ;
1299 extern void DropOnTrashCan(
1300                         int file_count,
1301                         char **host_set,
1302                         char **file_set,
1303                         DtDndDropCallbackStruct *parameters) ;
1304 extern void MoveOutOfTrashCan(
1305                         FileMgrData *file_mgr_data,
1306                         FileMgrRec *file_mgr_rec,
1307                         Window w,
1308                         int file_count,
1309                         char **host_set,
1310                         char **file_set,
1311                         Position drop_x,
1312                         Position drop_y);
1313 extern void Restore(
1314                         Widget w,
1315                         XtPointer client_data,
1316                         XtPointer call_data ) ;
1317 extern void ConfirmRemove(
1318                         Widget w,
1319                         XtPointer client_data,
1320                         XtPointer call_data ) ;
1321 extern void Remove(
1322                         Widget w,
1323                         XtPointer client_data,
1324                         XtPointer call_data ) ;
1325 extern Boolean FileFromTrash(
1326                         char *filename) ;
1327 extern int CheckDeletePermission(
1328                         char *dir,
1329                         char *file);
1330 extern int EraseObject(char *file_name);
1331
1332 /* prototype for Desktop.c */
1333
1334 extern void InitializeDesktopWindows(
1335                         int number_cache,
1336                         Display *display) ;
1337 extern void CheckDesktop( void ) ;
1338 extern void DesktopObjectRemoved(
1339                         DesktopRec *desktopWindow ) ;
1340 extern void DesktopObjectChanged(
1341                         DesktopRec *desktopWindow ) ;
1342 extern FileViewData * DropOnDesktopHotspot(
1343                         Window win,
1344                         Position drop_x,
1345                         Position drop_y,
1346                         DirectorySet **directory_data,
1347                         DesktopRec *desktopWindow) ;
1348 extern Boolean FileMoveCopyDesktop(
1349                         FileViewData *file_view_data,
1350                         char *directory,
1351                         char **host_set,
1352                         char **file_set,
1353                         int file_count,
1354                         unsigned int modifiers,
1355                         DesktopRec *desktopWindow,
1356                         void (*finish_callback)(),
1357                         XtPointer callback_data);
1358 extern void SaveDesktopInfo(
1359                         int session) ;
1360 extern void LoadDesktopInfo(
1361                         char *session) ;
1362 extern void RemoveDT(
1363                         Widget w,
1364                         XtPointer client_data,
1365                         XtPointer call_data) ;
1366 #ifdef SUN_PERF
1367 extern void RemoveMovedObjectFromDT(
1368                         Widget w,
1369                         XtPointer client_data,
1370                         int  file_cnt,
1371                         char **file_list) ;
1372 #endif /* SUN_PERF */
1373
1374 extern void DeselectAllDTFiles(
1375                         WorkspaceRec *workspaceData) ;
1376 extern void DeselectDTFile(
1377                         WorkspaceRec *workspaceData,
1378                         DesktopRec *desktopWindow) ;
1379 extern void DTActionCallback(
1380                         Widget w,
1381                         XtPointer client_data,
1382                         XtPointer call_data) ;
1383 extern void RunDTCommand(
1384                         char *command,
1385                         DesktopRec *desktopWindow,
1386                         DtDndDropCallbackStruct *parameters) ;
1387 extern char * IsAFileOnDesktop(
1388                         DtString message,
1389                         int *number) ;
1390 extern char * IsAFileOnDesktop2(
1391                         char **file_set,
1392                         int file_count,
1393                         int *number,
1394                         Boolean *IsToolBox) ;
1395 extern void ProcessDTSelection(
1396                         DesktopRec *desktopRec,
1397                         XButtonEvent *event) ;
1398 extern void UnpostDTTextField(void) ;
1399 extern Boolean DTFileIsSelected(
1400                         DesktopRec *desktopRec,
1401                         FileViewData *fileViewData) ;
1402 extern void InitializeDesktopGrid(
1403                         int displayWidth,
1404                         int displayHeight) ;
1405 extern void RegisterInGrid(
1406                         int width,
1407                         int height,
1408                         int rX,
1409                         int rY,
1410                         int workspace,
1411                         Boolean type) ;
1412 extern void PutOnDTCB(
1413                         Widget w,
1414                         XtPointer client_data,
1415                         XtPointer call_data) ;
1416 extern void SetupDesktopWindow(
1417                         Display *display,
1418                         FileMgrData *file_mgr_data,
1419                         FileMgrRec *file_mgr_rec,
1420                         char *file_name,
1421                         char *host_name,
1422                         char *directory_name,
1423                         int root_x,
1424                         int root_y,
1425                         char *type,
1426                         int EndIndex) ;
1427 extern void CleanUpWSName(
1428                         char *workspace_name) ;
1429 extern void CheckDesktopMarquee(
1430                         int x,
1431                         int y,
1432                         int width,
1433                         int height) ;
1434 #ifdef SHAPE
1435 extern void GenerateShape( DesktopRec *desktopWindow );
1436 #endif
1437 extern void RegisterIconDropsDT(DesktopRec *desktopWindow) ;
1438 extern void WorkSpaceRemoved(
1439                          Widget w,
1440                          Atom atom_name,
1441                          int type,
1442                          XtPointer client_data );
1443
1444 /* prototype for HelpCB.c */
1445 XtPointer LocateRecordStructure(
1446                         Widget w) ;
1447
1448 /* prototype for FileOp.c */
1449 extern int PipeRead(
1450                         int fd,
1451                         void *buf,
1452                         int len) ;
1453 extern int PipeWriteString(
1454                         int fd,
1455                         char *s) ;
1456 extern char * PipeReadString(
1457                         int fd) ;
1458 extern void FileOpError(
1459                         Widget w,
1460                         char *message1,
1461                         char *message2) ;
1462 extern void ChangeIconName(
1463                         Widget w,
1464                         XtPointer client_data,
1465                         XmTextVerifyCallbackStruct *call_data) ;
1466 extern void ChangeIconNameDT(
1467                         Widget w,
1468                         XtPointer client_data,
1469                         XtPointer call_data) ;
1470 extern void MakeFile(
1471                         Widget w,
1472                         char *host_name,
1473                         char *directory_name,
1474                         char *new_name,
1475                         unsigned char type,
1476                         void (*finish_callback)(),
1477                         XtPointer callback_data) ;
1478 extern Boolean MakeFilesFromBuffers(
1479                              FileMgrData *file_mgr_data,
1480                              char *directory,
1481                              char *host,
1482                              char **file_set,
1483                              char **host_set,
1484                              BufferInfo *buffer_set,
1485                              int num_of_buffers,
1486                              void (*finish_callback)(),
1487                              XtPointer callback_data); 
1488 extern Boolean MakeFilesFromBuffersDT(
1489                              FileViewData *file_view_data,
1490                              char *directory,
1491                              char **file_set,
1492                              char **host_set,
1493                              BufferInfo *buffer_set,
1494                              int num_of_buffers,
1495                              DesktopRec *desktopWindow,
1496                              void (*finish_callback)(),
1497                              XtPointer callback_data); 
1498
1499 /* prototype for fsDialog.c */
1500 extern Boolean fsDialogAvailable(const String      path,
1501                                        dtFSData  * fsDialogData);
1502
1503 /* prototype for Utils.c */
1504 extern char *
1505 ResolveLocalPathName(
1506      char *hostname,
1507      char *directory_name,
1508      char *file_name,
1509      char *local_hostname,
1510      Tt_status *tt_status);
1511 extern char * ResolveTranslationString(
1512      char * originalString,
1513      char * addressString );
1514
1515 /* prototype for OverWrite.c */
1516 extern void
1517 create_replace_rename_dialog(
1518      Widget          parent_widget,
1519      int             mode,
1520      String          directory,
1521      String          file,
1522      int             filop_confirm_fd,
1523       ActionAreaDefn  actions,
1524       Boolean         Same);
1525
1526 extern void
1527 create_replace_merge_dialog(
1528      Widget          parent_widget,
1529      int             mode,
1530      String          directory,
1531      String          file,
1532      int             filop_confirm_fd,
1533      ActionAreaDefn  actions);
1534
1535 extern void
1536 create_multicollide_dialog(
1537      Widget          parent_widget,
1538      int             mode,
1539      int             nSelected,
1540      int             nCollisions,
1541      String          destination,
1542      String        * fileList,
1543      int             filop_confirm_fd,
1544      ActionAreaDefn  actions,
1545      Boolean         Same);
1546
1547 extern void
1548 replace_rename_cancel_callback(
1549      Widget    w,
1550      XtPointer client_data,
1551      XtPointer call_data);
1552
1553 extern void
1554 replace_rename_ok_callback(
1555      Widget    w,
1556      XtPointer client_data,
1557      XtPointer call_data);
1558
1559 extern void
1560 buffer_replace_rename_ok_callback(
1561      Widget    w,
1562      XtPointer client_data,
1563      XtPointer call_data);
1564
1565 extern void
1566 replace_merge_cancel_callback(
1567      Widget    w,
1568      XtPointer client_data,
1569      XtPointer call_data);
1570
1571 extern void
1572 replace_merge_ok_callback(
1573      Widget    w,
1574      XtPointer client_data,
1575      XtPointer call_data);
1576
1577 extern void
1578 multicollide_cancel_callback(
1579      Widget w,
1580      XtPointer client_data,
1581      XtPointer call_data);
1582
1583 extern void
1584 multicollide_ok_callback(
1585      Widget w,
1586      XtPointer client_data,
1587      XtPointer call_data);
1588
1589 extern void
1590 buffer_multicollide_ok_callback(
1591      Widget w,
1592      XtPointer client_data,
1593      XtPointer call_data);
1594
1595 /* From SharedProcs.c - needs DesktopRec */
1596 extern void _DtBuildActionArgsWithDTSelectedFiles(
1597                         DesktopRec **selection_list,
1598                         int selected_count,
1599                         DtActionArg **action_args,
1600                         int *arg_count) ;
1601
1602
1603 /* From DtWidget */
1604 extern void _DtIconGetTextExtent_r(Widget widget, XRectangle *clip);
1605
1606 /* From DtSvc */
1607 extern Pixmap _DtGetPixmap(
1608         Screen *screen,
1609         char *image_name,
1610         Pixel foreground,
1611         Pixel background );
1612
1613  /*
1614  * macro to get message catalog strings
1615  */
1616
1617 #ifndef NO_MESSAGE_CATALOG
1618 # ifdef __ultrix
1619 #  define _CLIENT_CAT_NAME "dtfile.cat"
1620 # else  /* __ultrix */
1621 #  define _CLIENT_CAT_NAME "dtfile"
1622 # endif /* __ultrix */
1623 extern char *_DtGetMessage(char *filename, int set, int n, char *s);
1624 # define GETMESSAGE(set, number, string)\
1625     (_DtGetMessage(_CLIENT_CAT_NAME, set, number, string))
1626 #else
1627 # define GETMESSAGE(set, number, string)\
1628     string
1629 #endif
1630
1631 #endif /* _Main_h */
1632 /* DON'T ADD ANYTHING AFTER THIS #endif */