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