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