home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / FILEDLG6.ZIP / SOURCE.ZIP / OPENDATA.H < prev    next >
Text File  |  1990-11-12  |  4KB  |  70 lines

  1. /****************************************************************************
  2.  * OPENDATA.H                                                               *
  3.  *                                                                          *
  4.  *  This header file contains the definition of the data structure used     *
  5.  *  to hold static data for the open file and find file dialog boxes.       *
  6.  *                                                                          *
  7.  *  Modifications --                                                        *
  8.  *      21-Sep-1989 : Initial version.                                      *
  9.  *      11-Oct-1990 : Added pszCurDir, iFirstChar and bitmap handles.       *
  10.  *      15-Oct-1990 : Added vars used to control file finder thread.        *
  11.  *                                                                          *
  12.  * (c)Copyright 1990 Rick Yoder                                             *
  13.  ****************************************************************************/
  14.  
  15.     typedef enum { /* Constants used to control search thread */
  16.         CANCEL,         /* Cancel search */
  17.         CONTINUE,       /* Continue search */
  18.         TERMINATE,      /* Terminate search thread */
  19.         ERROR           /* Error occurred. Cancel search. */
  20.         } THDCONTROL;
  21.  
  22.     typedef struct {
  23.         PSZ     pszTitle;           // dialog box title
  24.         PSZ     pszIns;             // dialog box instructions
  25.         void (EXPENTRY *pfnHelpProc)(HWND hDlg); // ptr to help procedure
  26.         PSZ     pszFile;            // ptr to name of opened file
  27.         PHFILE  phf;                // ptr to file handle
  28.         ULONG   ulFileSize;         // initial file size
  29.         PUSHORT pusAction;          // action taken on open
  30.         USHORT  usAttribute;        // file attribute
  31.         USHORT  fsOpenFlags;        // open flags
  32.         USHORT  fsOpenMode;         // open mode
  33.         ULONG   ulReserved;         // reserved
  34.         PSZ     pszShowSpec;        // file spec of files to be listed
  35.         USHORT  usShowAttr;         // attributes of files to be listed
  36.         USHORT  usMaxPathLen;       // maximum path name length
  37.         PSZ     pszScratch;         // ptr to scratch data area
  38.         HMODULE hmod;               // handle to resource module
  39.         USHORT  usSelectDrive;      // current selected item in drive list box
  40.         USHORT  usSelectDir;        // current selected item in dir list box
  41.         USHORT  usSelectFile;       // current selected item in file list box
  42.         USHORT  usSelectFind;       // current selected item in find list box
  43.         USHORT  usFocus;            // control to which focus is to be returned
  44.                                     //  after an unsuccesful open attempt.
  45.         PSZ     pszCurDir;          // pointer to current directory string.
  46.         USHORT  iFirstChar;         // index of first character of current
  47.                                     //  directory string that is to be displayed.
  48.         HBITMAP hbmLeft;            // Left arrow bitmap handle.
  49.         HBITMAP hbmLeftPressed;     // Pressed left arrow bitmap handle.
  50.         HBITMAP hbmLeftDisabled;    // Disabled left arrow bitmap handle.
  51.         HBITMAP hbmRight;           // Right arrow bitmap handle.
  52.         HBITMAP hbmRightPressed;    // Pressed right arrow bitmap handle.
  53.         HBITMAP hbmRightDisabled;   // Disabled right arrow bitmap handle.
  54.  
  55.         /* Vars used by file find thread */
  56.         SEL     selStack;           // Selector for search thread stack.
  57.         ULONG   semTrigger;         // Semaphore to start search thread.
  58.         ULONG   semTerminate;       // Signals when search thread terminated.
  59.         ULONG   semAdd;             // Signals when item added to list box.
  60.         HWND    hDlg;               // Handle to dialog box window.
  61.         ULONG   ulDriveList;        // List of drives to be searched.
  62.         PSZ     pszPattern;         // Ptr to file search pattern.
  63.         PSZ     pszScratch2;        // Ptr to scratch data area.
  64.         USHORT  usFindCount;        // Number of files found.
  65.         volatile THDCONTROL fControl; // Used to control search thread.
  66.         TID     tid;                // Thread id of search thread.
  67.         } DATA;
  68.  
  69.     typedef DATA * PDATA;
  70.