source: trunk/dll/dircnrs.h@ 1878

Last change on this file since 1878 was 1871, checked in by Gregg Young, 10 years ago

Create CollapseAll and modify ExpandAll to reduce code overhead both to try and speed drive expansion. Change ExpandAll to allow it to loop in UM_EXPAND until until drive is completely expanded. Changes were need to work with Flesh, Stubby and UnFlesh being moved to a thread. Add code for Flesh to skip the directory entry added by Stubby (eliminate use of NULL/Nullstr pszFileNames by Stubby). Add code in Stubby to insert a complete container item. Add a flag to indicate when a directory needed to be Fleshed. Get expand and switch code to work with Flesh, UnFlesh and Stubby running on a thread. Loop and idle ExpandAll; Move tree expand to a thread; Have ShowTreeRec wait for the Flesh thread. Add a correction factor so directories don't get placed above the top of the tree container when a large drive has been expanded. Debug is mostly still in but all turned off.

  • Property svn:eolstyle set to native
  • Property svn:keywords set to Id
File size: 5.6 KB
Line 
1
2/***********************************************************************
3
4 $Id: dircnrs.h 1871 2015-09-20 22:57:02Z gyoung $
5
6 dircnrs common definitions
7
8 Copyright (c) 1993-98 M. Kimes
9 Copyright (c) 2001, 2015 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 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
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
43typedef struct _CNRITEM
44{ /* CONTAINER RECORD STRUCTURE must be first*/
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;
63 BOOL fleshed;
64 struct _CNRITEM *pciPrevious; // Address of pci we are linked to
65}
66CNRITEM, *PCNRITEM;
67
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
74#define CNRITEM_EASDIFFER 0x00200000 // file EAs are different
75
76#define EXTRA_RECORD_BYTES (sizeof(CNRITEM) - sizeof(MINIRECORDCORE))
77
78typedef 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}
95MASK;
96
97typedef 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}
105DETAILS_SETTINGS;
106
107typedef 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;
145 DETAILS_SETTINGS ds;
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}
157DIRCNRDATA;
158
159MRESULT EXPENTRY DirClientWndProc(HWND hwnd, ULONG msg, MPARAM mp1,
160 MPARAM mp2);
161HWND StartDirCnr(HWND hwndParent, CHAR * directory, HWND hwndRestore,
162 ULONG flags);
163MRESULT EXPENTRY DirTextProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
164MRESULT EXPENTRY DirFolderProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
165MRESULT EXPENTRY DirMaxProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
166MRESULT EXPENTRY DirObjWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
167
168MRESULT EXPENTRY SearchContainer(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
169
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
179// Data declarations
180extern HWND DirCnrMenu;
181extern HWND hwndAttr;
182extern HWND hwndDate;
183extern INT sortFlags;
184
185#endif // DIRCNRS_H
Note: See TracBrowser for help on using the repository browser.