| [907] | 1 |  | 
|---|
|  | 2 | /*********************************************************************** | 
|---|
|  | 3 |  | 
|---|
| [1195] | 4 | $Id: dircnrs.h 1411 2009-03-29 20:33:07Z stevenhl $ | 
|---|
| [907] | 5 |  | 
|---|
|  | 6 | dircnrs common definitions | 
|---|
|  | 7 |  | 
|---|
|  | 8 | Copyright (c) 1993-98 M. Kimes | 
|---|
|  | 9 | Copyright (c) 2001, 2008 Steven H. Levine | 
|---|
|  | 10 |  | 
|---|
|  | 11 | 05 Jan 08 SHL Move dircnrs.c definitions here | 
|---|
| [940] | 12 | 13 Jan 08 GKY Add variables to DIRCNRDATA struct for Subjectwidth/Subjectleft. | 
|---|
| [1065] | 13 | 11 Jul 08 JBS Ticket 230: Simplified code and eliminated some local variables by incorporating | 
|---|
|  | 14 | all the details view settings (both the global variables and those in the | 
|---|
|  | 15 | DIRCNRDATA struct) into a new struct: DETAILS_SETTINGS. | 
|---|
| [907] | 16 |  | 
|---|
|  | 17 | ***********************************************************************/ | 
|---|
|  | 18 |  | 
|---|
|  | 19 | #if !defined(DIRCNRS_H) | 
|---|
|  | 20 |  | 
|---|
|  | 21 | #define DIRCNRS_H | 
|---|
|  | 22 |  | 
|---|
|  | 23 | #if !defined(OS2_INCLUDED) | 
|---|
|  | 24 | #define INCL_WINSTDCNR                  // avl.h | 
|---|
|  | 25 | #define INCL_LONGLONG | 
|---|
|  | 26 | #include <os2.h> | 
|---|
|  | 27 | #else | 
|---|
|  | 28 | #if !defined(INCL_WINSTDCNR) | 
|---|
|  | 29 | #error INCL_WINSTDCNR required by dircnrs.h | 
|---|
|  | 30 | #endif | 
|---|
|  | 31 | #if !defined(INCL_LONGLONG) | 
|---|
|  | 32 | #error INCL_LONGLONG required | 
|---|
|  | 33 | #endif | 
|---|
|  | 34 | #endif | 
|---|
|  | 35 |  | 
|---|
|  | 36 | #include "avl.h"                        // ARC_TYPE | 
|---|
|  | 37 |  | 
|---|
|  | 38 | #define CBLIST_TO_EASIZE(cb) ((cb) > 4 ? (cb) / 2 : 0)  // FILEFINDBUF4L.cbList to logical EA size | 
|---|
|  | 39 |  | 
|---|
|  | 40 | typedef struct _CNRITEM | 
|---|
|  | 41 | {                               /* CONTAINER RECORD STRUCTURE */ | 
|---|
|  | 42 | MINIRECORDCORE rc;            /* Base information */ | 
|---|
|  | 43 | HWND hwndCnr;                 /* The container holding this record */ | 
|---|
|  | 44 | PSZ pszFileName;              // Points to buffer holding full pathname or NullStr | 
|---|
|  | 45 | PSZ pszDisplayName;           // Points to displayable part of path name  - used by CFA_STRING | 
|---|
|  | 46 | CHAR *pszSubject;             // Points subject buffer or Nullstr - used by fm/2 and by CFA_STRING | 
|---|
|  | 47 | CHAR *pszDispAttr;            // Points to szDispAttr - required by CFA_STRING | 
|---|
|  | 48 | CDATE date;                   /* Last write date of file */ | 
|---|
|  | 49 | CTIME time;                   /* Last write time of file */ | 
|---|
|  | 50 | CDATE ladate;                 /* Last access date of file */ | 
|---|
|  | 51 | CTIME latime;                 /* Last access time of file */ | 
|---|
|  | 52 | CDATE crdate;                 /* Creation date of file */ | 
|---|
|  | 53 | CTIME crtime;                 /* Creation time of file */ | 
|---|
|  | 54 | CHAR *pszLongName;            // Points to long name buffer - used by code and by CFA_STRING | 
|---|
|  | 55 | CHAR *pszFmtFileSize;         // Comma formatted file size for large file support | 
|---|
|  | 56 | ULONGLONG cbFile;             /* File size */ | 
|---|
|  | 57 | ULONGLONG easize;             // Size of EAs - dirsize uses this - hack cough | 
|---|
|  | 58 | ULONG attrFile;               /* Attributes of this file */ | 
|---|
|  | 59 | ULONG flags; | 
|---|
|  | 60 | } | 
|---|
|  | 61 | CNRITEM, *PCNRITEM; | 
|---|
|  | 62 |  | 
|---|
| [1222] | 63 | // Compare directory flags | 
|---|
|  | 64 | #define CNRITEM_SMALLER   0x00010000    // file exists in both containers and this one is smaller | 
|---|
|  | 65 | #define CNRITEM_LARGER    0x00020000 | 
|---|
|  | 66 | #define CNRITEM_NEWER     0x00040000 | 
|---|
|  | 67 | #define CNRITEM_OLDER     0x00080000 | 
|---|
|  | 68 | #define CNRITEM_EXISTS    0x00100000    // file exists in both containers | 
|---|
|  | 69 |  | 
|---|
|  | 70 | #define EXTRA_RECORD_BYTES      (sizeof(CNRITEM) - sizeof(MINIRECORDCORE)) | 
|---|
|  | 71 |  | 
|---|
| [907] | 72 | typedef struct | 
|---|
|  | 73 | { | 
|---|
|  | 74 | CHAR szMask[CCHMAXPATH]; | 
|---|
|  | 75 | CHAR szMaskCopy[CCHMAXPATH]; | 
|---|
|  | 76 | CHAR *pszMasks[26]; | 
|---|
|  | 77 | ULONG attrFile; | 
|---|
|  | 78 | ULONG antiattr; | 
|---|
|  | 79 | BOOL fNoAttribs; | 
|---|
|  | 80 | BOOL fShowDirs; | 
|---|
|  | 81 | BOOL fNoDirs; | 
|---|
|  | 82 | BOOL fIsTree; | 
|---|
|  | 83 | BOOL fIsSeeAll; | 
|---|
|  | 84 | BOOL fFilesIncluded; | 
|---|
|  | 85 | BOOL fText; | 
|---|
|  | 86 | CHAR szText[256]; | 
|---|
|  | 87 | CHAR prompt[80]; | 
|---|
|  | 88 | } | 
|---|
|  | 89 | MASK; | 
|---|
|  | 90 |  | 
|---|
| [1065] | 91 | typedef struct DETAILS_SETTINGS | 
|---|
|  | 92 | { | 
|---|
|  | 93 | BOOL detailsladate, detailslatime, detailscrdate, detailscrtime, | 
|---|
|  | 94 | detailslongname, detailsea, detailssize, detailssubject, | 
|---|
|  | 95 | detailslwdate, detailslwtime, detailsattr, detailsicon, | 
|---|
|  | 96 | fSubjectInLeftPane, fSubjectLengthMax; | 
|---|
|  | 97 | ULONG SubjectDisplayWidth; | 
|---|
|  | 98 | } | 
|---|
|  | 99 | DETAILS_SETTINGS; | 
|---|
|  | 100 |  | 
|---|
| [907] | 101 | typedef struct DIRCNRDATA | 
|---|
|  | 102 | { | 
|---|
|  | 103 | USHORT size; | 
|---|
|  | 104 | USHORT id; | 
|---|
|  | 105 | INT type; | 
|---|
|  | 106 | ULONG flWindowAttr; | 
|---|
|  | 107 | HWND hwndParent; | 
|---|
|  | 108 | HWND hwndCnr; | 
|---|
|  | 109 | HWND hwndObject; | 
|---|
|  | 110 | HWND hwndFrame; | 
|---|
|  | 111 | HWND hwndClient; | 
|---|
|  | 112 | HWND hwndLastMenu; | 
|---|
|  | 113 | HWND hwndExtract; | 
|---|
|  | 114 | HWND hwndLastDirCnr; | 
|---|
|  | 115 | HWND hwndRestore; | 
|---|
|  | 116 | CHAR directory[CCHMAXPATH]; | 
|---|
|  | 117 | CHAR previous[CCHMAXPATH]; | 
|---|
|  | 118 | ULONG fg, bg, hifg, hibg, border; | 
|---|
|  | 119 | PFNWP oldproc; | 
|---|
|  | 120 | CHAR font[CCHMAXPATH]; | 
|---|
|  | 121 | MASK mask; | 
|---|
|  | 122 | ULONGLONG ullTotalBytes; | 
|---|
|  | 123 | ULONGLONG selectedbytes; | 
|---|
|  | 124 | ULONG selectedfiles; | 
|---|
|  | 125 | ULONG totalfiles; | 
|---|
|  | 126 | BOOL cnremphasized; | 
|---|
|  | 127 | BOOL dontclose; | 
|---|
|  | 128 | ARC_TYPE *info; | 
|---|
|  | 129 | CHAR arcname[CCHMAXPATH]; | 
|---|
|  | 130 | CHAR command[257]; | 
|---|
|  | 131 | CHAR stopflag; | 
|---|
|  | 132 | CHAR workdir[CCHMAXPATH]; | 
|---|
|  | 133 | CHAR lastfilename[CCHMAXPATH]; | 
|---|
|  | 134 | BOOL namecanchange; | 
|---|
|  | 135 | BOOL fmoving; | 
|---|
|  | 136 | BOOL amextracted; | 
|---|
|  | 137 | INT lasthelp; | 
|---|
|  | 138 | INT sortFlags; | 
|---|
| [1065] | 139 | DETAILS_SETTINGS ds; | 
|---|
| [907] | 140 | CHAR **lastselection; | 
|---|
|  | 141 | USHORT shiftstate; | 
|---|
|  | 142 | USHORT suspendview; | 
|---|
|  | 143 | CHAR szCommonName[CCHMAXPATH]; | 
|---|
|  | 144 | ULONG lasttime; | 
|---|
|  | 145 | BOOL arcfilled; | 
|---|
|  | 146 | HMTX filling; | 
|---|
|  | 147 | BOOL firsttree; | 
|---|
|  | 148 | ULONG lastattr; | 
|---|
|  | 149 | ULONG ulItemsToUnHilite; | 
|---|
|  | 150 | } | 
|---|
|  | 151 | DIRCNRDATA; | 
|---|
|  | 152 |  | 
|---|
|  | 153 | MRESULT EXPENTRY DirClientWndProc(HWND hwnd, ULONG msg, MPARAM mp1, | 
|---|
|  | 154 | MPARAM mp2); | 
|---|
|  | 155 | HWND StartDirCnr(HWND hwndParent, CHAR * directory, HWND hwndRestore, | 
|---|
|  | 156 | ULONG flags); | 
|---|
|  | 157 | MRESULT EXPENTRY DirTextProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2); | 
|---|
|  | 158 | MRESULT EXPENTRY DirFolderProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2); | 
|---|
|  | 159 | MRESULT EXPENTRY DirMaxProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2); | 
|---|
|  | 160 | MRESULT EXPENTRY DirObjWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2); | 
|---|
|  | 161 |  | 
|---|
| [1411] | 162 | MRESULT EXPENTRY SearchContainer(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2); | 
|---|
|  | 163 |  | 
|---|
| [907] | 164 | // 05 Jan 08 SHL fixme for dircnrs.c globals to be here | 
|---|
|  | 165 |  | 
|---|
|  | 166 | #ifdef DEFINE_GLOBALS | 
|---|
|  | 167 | #define DATADEF | 
|---|
|  | 168 | #pragma data_seg(GLOBAL1) | 
|---|
|  | 169 | #else | 
|---|
|  | 170 | #define DATADEF extern | 
|---|
|  | 171 | #endif | 
|---|
|  | 172 |  | 
|---|
| [1206] | 173 | // Data declarations | 
|---|
|  | 174 | extern HWND DirCnrMenu; | 
|---|
|  | 175 | extern HWND hwndAttr; | 
|---|
|  | 176 | extern HWND hwndDate; | 
|---|
|  | 177 | extern INT sortFlags; | 
|---|
|  | 178 |  | 
|---|
| [907] | 179 | #endif // DIRCNRS_H | 
|---|