Main.h 55 KB

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