home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / XAP / XFILEMAN / XFILEMAN.TAR / xfilemanager / global.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-09-22  |  19.0 KB  |  789 lines

  1. /*
  2.  * Copyright 1993 by Ove Kalkan, Cremlingen, Germany
  3.  *
  4.  * Permission to use, copy, modify, distribute and sell this software and it's
  5.  * documentation for any purpose is hereby granted without fee, rpovided that
  6.  * the above copyright notice and this permission appear in supporting
  7.  * documentation, and that the name of Ove Kalkan not to be used in
  8.  * advertising or publicity pertaining to distributiopn of the software without
  9.  * specific, written prior permission. Ove Kalkan makes no representations
  10.  * about the suitability of this software for any purpose. It is provided
  11.  * as is without express or implied warranty.
  12.  *
  13.  * OVE KALKAN DISPLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  14.  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABLILITY AND FITNESS, IN NO
  15.  * EVENT SHALL OVE KALKAN BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  16.  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  17.  * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  18.  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  19.  * PERFORMANCE OF THIS SOFTWARE.
  20.  *
  21.  * $Header: filename,v 1.0 yyyy/mm/dd hh:mm:ss loginname Exp $
  22.  */
  23.  
  24. /*
  25.  * This file contains all functions and is included in all sources
  26.  */
  27.  
  28. #ifndef    GLOBAL_H
  29. #define    GLOBAL_H
  30.  
  31. #define    VERSION    "0.5.0Beta"
  32.  
  33. /*
  34.  * global includes
  35.  */
  36. #ifdef ISC
  37. #define    _POSIX_SOURCE
  38. #endif
  39.  
  40. #include <stdio.h>
  41. #ifndef Mips
  42. #ifndef BSD43
  43. #include <unistd.h>
  44. #include <stdlib.h>
  45. #endif
  46. #endif
  47.  
  48. #include <fcntl.h>
  49.  
  50. #include <signal.h>
  51. #include <sys/wait.h>
  52.  
  53. #include <sys/types.h>
  54. #include <sys/stat.h>
  55.  
  56. #ifdef NODIRENT
  57. #include <sys/dir.h>
  58. #else
  59. #include <dirent.h>
  60. #endif
  61.  
  62. #include <grp.h>
  63. #include <pwd.h>
  64.  
  65. #include <time.h>
  66.  
  67. #ifdef    hpux
  68. #include <symlink.h>
  69. #endif
  70.  
  71. #ifndef SIGCHLD
  72. #ifdef SIGCLD
  73. #define    SIGCHLD SIGCLD
  74. #endif
  75. #endif
  76.  
  77. #ifndef MYSIGTYPE
  78. #define    MYSIGTYPE    void
  79. #endif
  80.  
  81. #include <X11/X.h>
  82. #include <X11/Intrinsic.h>
  83. #include <X11/StringDefs.h>
  84. #include <X11/extensions/shape.h>
  85.  
  86. #include <X11/Shell.h>
  87. #include <X11/Xaw/Box.h>
  88. #include <X11/Xaw/Form.h>
  89. #include <X11/Xaw/Simple.h>
  90. #include <X11/Xaw/AsciiText.h>
  91. #include <X11/Xaw/Command.h>
  92. #include <X11/Xaw/Label.h>
  93. #include <X11/Xaw/Toggle.h>
  94. #include <X11/Xaw/Viewport.h>
  95. #include <X11/Xaw/Paned.h>
  96. #include <X11/Xaw/SimpleMenu.h>
  97. #include <X11/Xaw/MenuButton.h>
  98. #include <X11/Xaw/SmeLine.h>
  99. #include <X11/Xaw/SmeBSB.h>
  100.  
  101. #include "Clock.h"
  102. #include "Icon.h"
  103. #include "IconB.h"
  104.  
  105. #ifdef    HAVE_XPM
  106. #include <X11/xpm.h>
  107. #endif
  108.  
  109. #include "struct.h"
  110. #include "config.h"
  111.  
  112. #ifdef    HAS_QUOTA
  113. #if defined(hpux) || defined(ultrix)
  114. #include <sys/quota.h>
  115. #endif
  116. #ifdef linux
  117. #endif
  118. #endif
  119.  
  120.  
  121. #ifndef S_IRUSR
  122. #define S_IRUSR S_IREAD
  123. #define S_IWUSR S_IWRITE
  124. #define S_IXUSR S_IEXEC
  125. #define S_IRGRP (S_IRUSR >> 3)
  126. #define S_IWGRP (S_IWUSR >> 3)
  127. #define S_IXGRP (S_IXUSR >> 3)
  128. #define S_IROTH (S_IRUSR >> 6)
  129. #define S_IXOTH (S_IXUSR >> 6)
  130. #define S_IWOTH (S_IWUSR >> 6)
  131. #define S_ISDIR(x) ((x) & S_IFDIR)
  132. #define S_ISCHR(x) ((x) & S_IFCHR)
  133. #define S_ISBLK(x) ((x) & S_IFBLK)
  134. #endif
  135.  
  136. /*
  137.  * Function Prototypes
  138.  */
  139.  
  140. /* about.c */
  141. extern    void        initAbout    (void);
  142.  
  143. /* action.c */
  144. extern    void        hide_dialog    (void);
  145. extern    void        hide_idialog    (void);
  146. extern    void        setSize        (void);
  147. extern    void        WARNING        (char *text);
  148. extern    void        init_goto    (void);
  149. extern    void        gotoDir        (void);
  150. extern    void        init_root    (void);
  151. extern    void        init_quit    (void);
  152. extern    Widget        makeDialog    (Dimension text,
  153.                      char *label1,
  154.                      char *label2,
  155.                      char *text1,
  156.                      char *text2,
  157.                      char *title,
  158.                      Boolean cancel,
  159.                      Boolean OVERRIDE,
  160.                      Pixmap icon);
  161. extern    void        quit_all    (void);
  162. extern    void        init_info    (void);
  163. extern    void        apply_cb    (void);
  164. extern    void        reset_cb    (void);
  165. extern    void        getFilter    (Folder_Glyph *folder);
  166. extern    void        apply_filter    (Widget w,
  167.                      XtPointer c,
  168.                      XtPointer s);
  169. #ifndef COHERENT
  170. extern    void        call_link_cb    (void);
  171. #endif
  172.  
  173. /* action_copy.c */
  174. extern    void        init_copy    (char *from,
  175.                      char *to);
  176. extern    void        exec_copy_cb    (void);
  177. extern    void        exec_copy    (char *from,
  178.                      char *to);
  179.  
  180. /* action_delete.c */
  181. extern    void        init_delete    (char *file);
  182. extern    void        exec_delete_cb    (void);
  183. extern    void        exec_delete    (char *file);
  184.  
  185. /* action_exec.c */
  186. extern    void        init_exec    (char *prog,
  187.                      char *file);
  188. extern    void        exec_exec_cb    (void);
  189. extern    void        exec_exec    (char *prog,
  190.                      char *file);
  191. extern    int        SYSTEM        (char *cmd);
  192.  
  193. /* action_link.c */
  194. extern    void        init_link    (char *from,
  195.                      char *to);
  196. extern    void        exec_link_cb    (void);
  197. extern    void        exec_link    (char *from,
  198.                      char *to);
  199.  
  200. /* action_move.c */
  201. extern    void        init_move    (char *from,
  202.                      char *to);
  203. extern    void        exec_move_cb    (void);
  204. extern    void        exec_move    (char *from,
  205.                      char *to);
  206.  
  207. /* action_newdir.c */
  208. extern    void        init_newdir    (char *file);
  209. extern    void        exec_newdir    (void);
  210.  
  211. /* customize.c */
  212. extern    Boolean        readCustomSettings    (void);
  213. extern    void        loadTypeIcons    (void);
  214.  
  215. /* devices.c */
  216. extern    Widget        CreateDeviceBox    (Widget bar,
  217.                      Widget ref);
  218. extern    void        ReadDeviceFile    (void);
  219. extern    void        LoadDeviceIcons (Widget toplevel);
  220. extern    XtActionProc    RefreshDevices    (Widget w,
  221.                      XExposeEvent *e,
  222.                      String *s,
  223.                      Cardinal *c);
  224.  
  225. /* dir.c */
  226. extern    void        fillDir        (Dir_Glyph *dir);
  227. extern    int        compareGlyph    (Dir_Glyph *da,
  228.                      Dir_Glyph *db);
  229. extern    void        showDir        (Widget    window,
  230.                      Dir_Glyph *dir,
  231.                      Dimension x,
  232.                      Dimension y,
  233.                      Dimension *lx,
  234.                      Dimension *ly,
  235.                      Dimension hs,
  236.                      Dimension he);
  237. extern    String        getPath        (Dir_Glyph *dir);
  238. extern    int        getFlags    (struct stat *buf);
  239.  
  240. /* file.c */
  241. extern    void        fillFolder    (Folder_Glyph *folder);
  242. extern    int        compareFGluph    (File_Glyph *da,
  243.                      File_Glyph *db);
  244. extern    void        showFolder    (Widget window,
  245.                      Folder_Glyph *folder,
  246.                      Dimension x,
  247.                      Dimension y,
  248.                      Dimension *lx,
  249.                      Dimension *ly,
  250.                      Dimension hs,
  251.                      Dimension he);
  252. extern    int        tryCommands    (File_Glyph *file);
  253. extern    Boolean        ifFilter    (Folder_Glyph *folder,
  254.                      char *file);
  255.  
  256. /* folder.c */
  257. extern    void        newFolder    (Dir_Glyph *dir);
  258. extern    void        makeFolderWindow(Widget parent,
  259.                      Folder_Glyph *folder,
  260.                      Dimension id);
  261. extern    void        hideFolder    (Widget w,
  262.                      XtPointer client,
  263.                      XtPointer call);
  264. extern    void        refreshFolderByPathname    (char *path);
  265. extern    void        updateFolder    (Folder_Glyph *folder);
  266.  
  267. /* grab.c */
  268. extern    XtActionProc    leaveWindow    (Widget w,
  269.                      XLeaveWindowEvent *e, 
  270.                      String *s,
  271.                      Cardinal *c);
  272. extern    XtActionProc    enterWindow    (Widget w,
  273.                      XEnterWindowEvent *e, 
  274.                      String *s,
  275.                      Cardinal *c);
  276.  
  277. /* graph.c */
  278. extern    void        makeCursor    (void);
  279. extern    void        drawDir        (Widget window,
  280.                      Dir_Glyph *dir,
  281.                      Boolean selected,
  282.                      Boolean back);
  283. extern    void        drawFile    (Folder_Glyph *folder,
  284.                      int entry,
  285.                      Boolean selected,
  286.                      Boolean back);
  287. extern    void        drawWSE        (WS_Glyph *ws,
  288.                      Dimension entry,
  289.                      Boolean selected,
  290.                      Boolean back);
  291. extern    void        loadIcons    (void);
  292. extern    Pixmap        ReadPixmapFromFile    (char *file,
  293.                      int *w,
  294.                      int *h);
  295.  
  296. /* iconbar.c */
  297. extern    void        makeIconBar    (Folder_Glyph *fo,
  298.                      Widget parent,
  299.                      Widget left,
  300.                      Boolean HIDE,
  301.                      Boolean buttons);
  302.  
  303. /* main.c */
  304. extern    void        main        (int agrc,
  305.                      char **argv);
  306. extern    void        createWidgets    (Widget parent);
  307. extern    void        FATAL_ERROR    (char *message);
  308. extern    XtActionProc     refresh_files    (Widget w,
  309.                      XExposeEvent *e,
  310.                      String *s,
  311.                      Cardinal *c);
  312. extern    XtActionProc     refresh_dirs    (Widget w,
  313.                      XExposeEvent *e,
  314.                      String *s,
  315.                      Cardinal *c);
  316. extern    Dir_Glyph    *getGlyph    (Dir_Glyph *d,
  317.                      Dimension x,
  318.                      Dimension y);
  319. MYSIGTYPE        signal_handler    (int sig);
  320. #ifdef HAS_QUOTA
  321. extern    void        showQuota    (Widget w);
  322. #endif
  323. #ifdef    HAS_NO_STRRSTR    /* Linux libc.so.4.4.1 doesn't have this function */
  324. extern    char        *strrstr    (char *vs,
  325.                      char *ve);
  326. #endif
  327.  
  328. /* menu.c */
  329. extern    void        makeMenu    (Widget parent);
  330. extern    char        *getString    (void);
  331. extern    char        *getMulti    (void);
  332. extern    void        start_move    (void);
  333. extern    void        start_copy    (void);
  334. extern    void        start_delete    (void);
  335. extern    void        start_newdir    (void);
  336. extern    void        start_exec    (void);
  337. extern    void        start_quit    (void);
  338. extern    void        start_about    (void);
  339. extern    void        start_info    (void);
  340. extern    void        start_goto    (void);
  341. extern    void        start_root    (void);
  342. extern    void        start_WSedit    (void);
  343. extern    void        start_WSdelete    (void);
  344. extern    void        start_filter    (Widget w, XtPointer c, XtPointer s);
  345. #ifndef COHERENT
  346. extern    void        start_link    (void);
  347. #endif
  348.  
  349. /* merger.c */
  350. extern    void        start_merger    (void);
  351.  
  352. /* multi.c */
  353. extern    XtActionProc    startMulti    (Widget w,
  354.                      XButtonEvent *e,
  355.                      String *s,
  356.                      Cardinal *c);
  357. extern    XtActionProc    followMulti    (Widget w,
  358.                      XButtonEvent *e,
  359.                      String *s,
  360.                      Cardinal *c);
  361. extern    XtActionProc    endMulti    (Widget w,
  362.                      XButtonEvent *e,
  363.                      String *s,
  364.                      Cardinal *c);
  365. extern    XtActionProc    clearMulti    (Widget w,
  366.                      XEvent *e,
  367.                      String *s,
  368.                      Cardinal *c);
  369. extern    XtActionProc    refreshMulti    (Widget w,
  370.                      XEvent *e,
  371.                      String *s,
  372.                      Cardinal *c);
  373.  
  374. /* popup.c */
  375. extern    XtActionProc    startPopup    (Widget w,
  376.                      XButtonEvent *e,
  377.                      String *s,
  378.                      Cardinal *c);
  379. extern    XtActionProc    hidePopup    (Widget w,
  380.                      XEvent *e,
  381.                      String *s,
  382.                      Cardinal *c);
  383. extern    XtActionProc    startCustom    (Widget w,
  384.                      XEnterWindowEvent *e,
  385.                      String *s,
  386.                      Cardinal *c);
  387. extern    void        readMenu    (void);
  388. extern    void        startExecPopup    (Widget w,
  389.                      XtPointer client,
  390.                      XtPointer call);
  391.  
  392. /* single.c */
  393. extern    XtActionProc    startSingle    (Widget w,
  394.                      XButtonEvent *e,
  395.                      String *s,
  396.                      Cardinal *c);
  397. extern    XtActionProc    followSingle    (Widget w,
  398.                      XButtonEvent *e,
  399.                      String *s,
  400.                      Cardinal *c);
  401. extern    XtActionProc    endSingle    (Widget w,
  402.                      XButtonEvent *e,
  403.                      String *s,
  404.                      Cardinal *c);
  405. extern    XtActionProc    clearSingle    (Widget w,
  406.                      XEvent *e,
  407.                      String *s,
  408.                      Cardinal *c);
  409. extern    XtActionProc    followFile    (Widget w,
  410.                      XMotionEvent *e,
  411.                      String *s,
  412.                      Cardinal *c);
  413. extern    XtActionProc    followDir    (Widget w,
  414.                      XMotionEvent *e,
  415.                      String *s,
  416.                      Cardinal *c);
  417. extern    XtActionProc    followWS    (Widget w,
  418.                      XMotionEvent *e,
  419.                      String *s,
  420.                      Cardinal *c);
  421. extern    XtActionProc    refresh_icon    (Widget w,
  422.                      XExposeEvent *e,
  423.                      String *s,
  424.                      Cardinal *c);
  425.  
  426. /* tar.c */
  427. extern    void        fillTar        (Folder_Glyph *folder);
  428. extern    void        fillCTar    (Folder_Glyph *folder);
  429. extern    void        readTar        (Folder_Glyph *folder,
  430.                      FILE *pipe);
  431. extern    void        start_extract    (void);
  432.  
  433. /* workspace.c */
  434. extern    void        makeWorkspaceWindow    (Widget parent,
  435.                      WS_Glyph *ws);
  436. extern    XtActionProc    resetWS        (Widget w,
  437.                      XConfigureEvent *e,
  438.                      String *s,
  439.                      Cardinal *c);
  440. extern    XtActionProc    refreshWS    (Widget w,
  441.                      XExposeEvent *e,
  442.                      String *s,
  443.                      Cardinal *c);
  444. extern    void        addWSEtoWS    (WS_Glyph *ws,
  445.                      char *label,
  446.                      char *file,
  447.                      char *icon,
  448.                      Boolean can_arg,
  449.                      Boolean must_arg,
  450.                      Boolean do_ask,
  451.                      int x,
  452.                      int y);
  453. extern    void        readWorkspace    (WS_Glyph *ws,
  454.                      char *file);
  455. extern    void        init_editWSE    (void);
  456. extern    void        init_deleteWSE    (void);
  457. extern    void        saveWorkspace    (WS_Glyph *ws);
  458. extern    void        hide_wsshell    (void);
  459. extern    void        reset_wsshell    (void);
  460. extern    void        save_wsshell    (void);
  461. extern    void        apply_wsshell    (void);
  462. extern    void        wse_delete_cb    (void);
  463. extern    void        PlaceWorkspaceIcons    (void);
  464.  
  465.  
  466. /*
  467.  * Globale variablen
  468.  */
  469. #ifndef MAIN
  470. /*
  471.  * All global variables that are shared between several objects are declared in
  472.  * the main section of this file.
  473.  * Any local varaible is declared as static on top of each file.
  474.  */
  475. extern    XtAppContext    app_context;
  476.  
  477. extern    Widget        toplevel;
  478. extern    Widget        dir_area;
  479. extern    Widget        merge_field;
  480. extern    Widget        dialog;
  481. extern    Widget        info_shell;
  482. extern    Widget        text_1, text_2, text_3, text_4;
  483. extern    Widget        tog[];
  484. #ifdef    HAS_QUOTA
  485. extern    Widget        quota_label;
  486. #endif
  487. extern    Widget        ws_move_shell;
  488. extern    Widget        merge_window;
  489.  
  490. extern    Cursor        def_cursor;
  491. extern    Cursor        file_cursor;
  492. extern    Cursor        busy_cursor;
  493.  
  494. extern    Pixmap        Icon_Warning_PM;
  495. extern    Pixmap        Icon_Info_PM;
  496. extern    Pixmap        Icon_Help_PM;
  497. extern    Pixmap        Icon_Filter_PM;
  498. extern    Pixmap        Icon_Copy_PM;
  499. extern    Pixmap        Icon_Delete_PM;
  500. extern    Pixmap        Icon_Exec_PM;
  501. extern    Pixmap        Icon_Link_PM;
  502. extern    Pixmap        Icon_Move_PM;
  503. extern    Pixmap        Icon_Newdir_PM;
  504. extern    Pixmap        Icon_Hide_PM;
  505. extern    Pixmap        Icon_WSE_PM;
  506. extern    Pixmap        Icon_WSD_PM;
  507. extern    Pixmap        Icon_Goto_PM;
  508. extern    Pixmap        Icon_Root_PM;
  509. extern    Pixmap        Icon_Pack_PM;
  510. extern    Pixmap        Icon_Unpack_PM;
  511.  
  512. extern    Pixmap        Dir_Opened_PM;
  513. extern    Pixmap        Dir_Closed_PM;
  514. extern    Pixmap        Dir_Locked_PM;
  515.  
  516. extern    Pixmap        File_Root_PM;
  517. extern    Pixmap        File_Tar_PM;
  518. extern    Pixmap        File_CTar_PM;
  519. extern    Pixmap        File_Plain_PM;
  520. extern    Pixmap        File_Link_PM;
  521. extern    Pixmap        File_DLink_PM;
  522. extern    Pixmap        File_Lock_PM;
  523. extern    Pixmap        File_Ghost_PM;
  524. extern    Pixmap        File_Exec_PM;
  525. extern    Pixmap        Shape_Exec_PM;
  526.  
  527. extern    Pixmap        smap;
  528. extern    GC        line_gc;
  529. extern    GC        back_gc;
  530. extern    GC        selc_gc;
  531. extern    GC        white_gc;
  532.  
  533. extern    Boolean        FILE_CHANGED;
  534. extern    Boolean        DIR_CHANGED;
  535.  
  536. extern    WS_Glyph    workspace;
  537. extern    Dir_Glyph    root;
  538. extern    Folder_Glyph    *folders[];
  539. extern    Dimension    folder_count;
  540. extern    Folder_Glyph    *folder;        /* The folder the mouse is within or NULL */
  541.  
  542. extern    Folder_Glyph    *last_fo;
  543. extern    Dimension    last_v;
  544. extern    Dimension    last_y;
  545. extern    Dir_Glyph    *last_g;
  546. extern    WS_Glyph    *last_ws;
  547. extern    Dimension    last_w;
  548.  
  549. extern    WS_Glyph    *selc_ws;
  550. extern    Dimension    selc_w;
  551. extern    Folder_Glyph    *selc_fo;
  552. extern    Dimension    selc_f;
  553. extern    Dir_Glyph    *selc_g;
  554. extern    Folder_Glyph    *multi_fo;
  555. extern    Dimension    multi_vs, multi_ve;
  556.  
  557. extern    Boolean        MULTI;            /* Wenn Multi-Selection dann TRUE */
  558. extern    Boolean        GRAB;
  559. extern    Boolean        WORKSPACE_CHANGED;
  560. extern    Boolean        REFRESH;
  561. extern    Boolean        NO_MULTI;
  562.  
  563. extern    char        link_target[];        /* Fuer action.c */
  564. extern    char        *oldfile;
  565.  
  566. extern    xfm_struct    defaults;
  567. extern    Suffix_Glyph    *filetypes;
  568. extern    Dimension    max_filetypes;
  569.  
  570. extern    Pixmap        pmaps[];        /* fuer customize.c */
  571. extern    int        pcount;
  572. extern    Dimension    typelength;
  573.  
  574. extern    Widget        ws_bar;
  575. extern    Widget        icon_bar;
  576. extern    Widget        icon_left;
  577.  
  578. #else
  579. /*
  580.  * This part is only included by main.c
  581.  */
  582.     XtAppContext    app_context;        /* the application context */
  583.  
  584.     Widget        toplevel;        /* The toplevel widget */
  585.     Widget        dir_area;        /* the simple for the directory tree */
  586.     Widget        merge_field;        /* Das Text-Feld fuer das Merge */
  587. static    Widget        dir_vp;            /* viewport for the dir_are-widget */
  588.     Widget        dialog = NULL;        /* Dialog-shell for all small dialogs */
  589.     Widget        info_shell = NULL;    /* Dialog-shell for the file-info-window */
  590.     Widget        text_1, text_2, text_3, text_4;    /* The text-field of info_shell */
  591.     Widget        tog[9];            /* File-rights toggles */
  592. #ifdef    HAS_QUOTA
  593.     Widget        quota_label;        /* label to show to quotas */
  594. #endif
  595.     Widget        merge_window = NULL;
  596.     Widget        ws_move_shell = NULL;    /* The window for the icon moving */
  597.  
  598.     Cursor        def_cursor;        /* Normal cursor */
  599.     Cursor        file_cursor;        /* Cursor for darg&drop actions */
  600.     Cursor        busy_cursor;        /* the sleep cursor */
  601.  
  602.     Pixmap        Icon_Warning_PM;
  603.     Pixmap        Icon_Info_PM;
  604.     Pixmap        Icon_Help_PM;
  605.     Pixmap        Icon_Filter_PM;
  606.     Pixmap        Icon_Copy_PM;
  607.     Pixmap        Icon_Delete_PM;
  608.     Pixmap        Icon_Exec_PM;
  609.     Pixmap        Icon_Link_PM;
  610.     Pixmap        Icon_Move_PM;
  611.     Pixmap        Icon_Newdir_PM;
  612.     Pixmap        Icon_Hide_PM;
  613.     Pixmap        Icon_WSE_PM;
  614.     Pixmap        Icon_WSD_PM;
  615.     Pixmap        Icon_Goto_PM;
  616.     Pixmap        Icon_Root_PM;
  617.     Pixmap        Icon_Pack_PM;
  618.     Pixmap        Icon_Unpack_PM;
  619.  
  620.     Pixmap        Dir_Opened_PM;
  621.     Pixmap        Dir_Closed_PM;
  622.     Pixmap        Dir_Locked_PM;
  623.  
  624.     Pixmap        File_Root_PM;
  625.     Pixmap        File_Tar_PM;
  626.     Pixmap        File_CTar_PM;
  627.     Pixmap        File_Plain_PM;
  628.     Pixmap        File_Link_PM;
  629.     Pixmap        File_DLink_PM;
  630.     Pixmap        File_Lock_PM;
  631.     Pixmap        File_Ghost_PM;
  632.     Pixmap        File_Exec_PM;
  633.     Pixmap        Shape_Exec_PM;
  634.  
  635.     Pixmap        smap;            /* When loading icons, this pixmap contains the shape of the icon */
  636.  
  637.     GC        line_gc;        /* Font and Color to display filenames when unselected */
  638.     GC        back_gc;        /* the backgroundcolor */
  639.     GC        selc_gc;        /* the background for selected files */
  640.     GC        white_gc;        /* the foregroundcolor for selected files */
  641.  
  642.     Boolean        FILE_CHANGED = FALSE;    /* If the file-folder has changed -> refresh_files */
  643.     Boolean        DIR_CHANGED = FALSE;    /* same as above but for directories */
  644.  
  645.     WS_Glyph    workspace;        /* The workspace */
  646.     Dir_Glyph    root;            /* The root-dir of the directory tree */
  647.     Folder_Glyph    *folders[MAX_FOLDERS];    /* All folder-windows */
  648.     Dimension    folder_count = 0;    /* Number of folders */
  649.     Folder_Glyph    *folder = NULL;        /* The folder the mouse is within or NULL */
  650.  
  651.     Folder_Glyph    *last_fo = NULL;    /* Needed to follow the mouse */
  652.     Dimension    last_v = 16000;
  653.     Dimension    last_y = 16000;
  654.     Dir_Glyph    *last_g = NULL;
  655.     WS_Glyph    *last_ws = NULL;
  656.     Dimension    last_w = 16000;
  657.  
  658.     WS_Glyph    *selc_ws = NULL;    /* Needed for single-selections */
  659.     Dimension    selc_w = 16000;
  660.     Folder_Glyph    *selc_fo = NULL;
  661.     Dimension    selc_f = 16000;
  662.     Dir_Glyph    *selc_g = NULL;
  663.  
  664.     Folder_Glyph    *multi_fo = NULL;    /* For multi-selections */
  665.     Dimension    multi_vs = 16000;    /* Start */
  666.     Dimension    multi_ve = 16000;    /* End */
  667.  
  668.     Boolean        MULTI = FALSE;        /* True when using multiselections */
  669.     Boolean        GRAB = FALSE;        /* True when doing drag&drop */
  670.     Boolean        WORKSPACE_CHANGED = FALSE;    /* If the workspace has been modified */
  671.     Boolean        REFRESH = FALSE;    /* Don't know for what it's been used */
  672.     Boolean        NO_MULTI = FALSE;    /* Keine Multi-Operation */
  673.  
  674.     char        link_target[255];    /* action.c */
  675.     char        *oldfile = NULL;
  676.  
  677.     xfm_struct    defaults;        /* The resource-container */
  678.     Suffix_Glyph    *filetypes = NULL;    /* The file-type definitions */
  679.     Dimension    max_filetypes = 0;    /* Number of filetypes */
  680.  
  681.     Pixmap        pmaps[100];        /* fuer customize.c */
  682.     int        pcount = 0;
  683.     Dimension    typelength = 10;
  684.  
  685.     Widget        ws_bar = NULL;
  686.     Widget        icon_bar = NULL;
  687.     Widget        icon_left = NULL;
  688.  
  689. static    Atom        wm_delete_window;    /* Atom zum Abfangen des Closebuttons */
  690. static    int        label_height;         /* Hoehe des Folder.labels */
  691. static    int        vp_width;        /* Breite des Dir-Viewports */
  692.  
  693. /*
  694.  * Den Actionsrec erzeugen
  695.  */
  696. static XtActionsRec actions[] =
  697. {
  698.     {"start-custom",
  699.         (XtActionProc) startCustom
  700.     },
  701.     {"start-popup",
  702.         (XtActionProc) startPopup
  703.     },
  704.     {"hide-popup",
  705.         (XtActionProc) hidePopup
  706.     },
  707.     {"refresh-dirs",
  708.         (XtActionProc) refresh_dirs
  709.     },
  710.     {"refresh-devices",
  711.         (XtActionProc) RefreshDevices
  712.     },
  713.     {"refresh-files",
  714.         (XtActionProc) refresh_files
  715.     },
  716.     {"refresh-ws",
  717.         (XtActionProc) refreshWS
  718.     },
  719.     {"reset-ws",
  720.         (XtActionProc) resetWS
  721.     },
  722.     {"refresh-icon",
  723.         (XtActionProc) refresh_icon
  724.     },
  725.     {"clear-single",
  726.         (XtActionProc) clearSingle
  727.     },
  728.     {"start-single",
  729.         (XtActionProc) startSingle
  730.     },
  731.     {"follow-single",
  732.         (XtActionProc) followSingle
  733.     },
  734.     {"end-single",
  735.         (XtActionProc) endSingle
  736.     },
  737.     {"clear-multi",
  738.         (XtActionProc) clearMulti
  739.     },
  740.     {"start-multi",
  741.         (XtActionProc) startMulti
  742.     },
  743.     {"follow-multi",
  744.         (XtActionProc) followMulti
  745.     },
  746.     {"end-multi",
  747.         (XtActionProc) endMulti
  748.     },
  749.     {"refresh-multi",
  750.         (XtActionProc) refreshMulti
  751.     },
  752.     {"leave-window",
  753.         (XtActionProc) leaveWindow
  754.     },
  755.     {"enter-window",
  756.         (XtActionProc) enterWindow
  757.     },
  758.     {"start-copy",
  759.         (XtActionProc) start_copy
  760.     },
  761.     {"start-move",
  762.         (XtActionProc) start_move
  763.     },
  764.     {"start-delete",
  765.         (XtActionProc) start_delete
  766.     },
  767.     {"start-exec",
  768.         (XtActionProc) start_exec
  769.     },
  770.     {"start-info",
  771.         (XtActionProc) start_info
  772.     },
  773. };
  774.  
  775. #endif
  776.  
  777. /*
  778.  * Fuer das Debuggen
  779.  */
  780. #ifdef DEBUG
  781. /*
  782.  * Function prototypes
  783.  */
  784. extern    void    debug (const char *format, __va_list list);
  785. #endif
  786.  
  787. #endif
  788.  
  789.