source: trunk/dll/dircnrs.h@ 1844

Last change on this file since 1844 was 1682, checked in by Gregg Young, 13 years ago

Added optional confirmation dialogs for delete move and copy to compare dir Ticket 277; Added EA compare option to compare dir Ticket 80; Minor code cleanup.

  • Property svn:eolstyle set to native
  • Property svn:keywords set to Id
File size: 5.3 KB
Line 
1
2/***********************************************************************
3
4 $Id: dircnrs.h 1682 2013-01-07 00:36:38Z 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
41typedef 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}
62CNRITEM, *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#define CNRITEM_EASDIFFER 0x00200000 // file EAs are different
71
72#define EXTRA_RECORD_BYTES (sizeof(CNRITEM) - sizeof(MINIRECORDCORE))
73
74typedef struct
75{
76 CHAR szMask[CCHMAXPATH];
77 CHAR szMaskCopy[CCHMAXPATH];
78 CHAR *pszMasks[26];
79 ULONG attrFile;
80 ULONG antiattr;
81 BOOL fNoAttribs;
82 BOOL fShowDirs;
83 BOOL fNoDirs;
84 BOOL fIsTree;
85 BOOL fIsSeeAll;
86 BOOL fFilesIncluded;
87 BOOL fText;
88 CHAR szText[256];
89 CHAR prompt[80];
90}
91MASK;
92
93typedef struct DETAILS_SETTINGS
94{
95 BOOL detailsladate, detailslatime, detailscrdate, detailscrtime,
96 detailslongname, detailsea, detailssize, detailssubject,
97 detailslwdate, detailslwtime, detailsattr, detailsicon,
98 fSubjectInLeftPane, fSubjectLengthMax;
99 ULONG SubjectDisplayWidth;
100}
101DETAILS_SETTINGS;
102
103typedef struct DIRCNRDATA
104{
105 USHORT size;
106 USHORT id;
107 INT type;
108 ULONG flWindowAttr;
109 HWND hwndParent;
110 HWND hwndCnr;
111 HWND hwndObject;
112 HWND hwndFrame;
113 HWND hwndClient;
114 HWND hwndLastMenu;
115 HWND hwndExtract;
116 HWND hwndLastDirCnr;
117 HWND hwndRestore;
118 CHAR directory[CCHMAXPATH];
119 CHAR previous[CCHMAXPATH];
120 ULONG fg, bg, hifg, hibg, border;
121 PFNWP oldproc;
122 CHAR font[CCHMAXPATH];
123 MASK mask;
124 ULONGLONG ullTotalBytes;
125 ULONGLONG selectedbytes;
126 ULONG selectedfiles;
127 ULONG totalfiles;
128 BOOL cnremphasized;
129 BOOL dontclose;
130 ARC_TYPE *info;
131 CHAR arcname[CCHMAXPATH];
132 CHAR command[257];
133 CHAR stopflag;
134 CHAR workdir[CCHMAXPATH];
135 CHAR lastfilename[CCHMAXPATH];
136 BOOL namecanchange;
137 BOOL fmoving;
138 BOOL amextracted;
139 INT lasthelp;
140 INT sortFlags;
141 DETAILS_SETTINGS ds;
142 CHAR **lastselection;
143 USHORT shiftstate;
144 USHORT suspendview;
145 CHAR szCommonName[CCHMAXPATH];
146 ULONG lasttime;
147 BOOL arcfilled;
148 HMTX filling;
149 BOOL firsttree;
150 ULONG lastattr;
151 ULONG ulItemsToUnHilite;
152}
153DIRCNRDATA;
154
155MRESULT EXPENTRY DirClientWndProc(HWND hwnd, ULONG msg, MPARAM mp1,
156 MPARAM mp2);
157HWND StartDirCnr(HWND hwndParent, CHAR * directory, HWND hwndRestore,
158 ULONG flags);
159MRESULT EXPENTRY DirTextProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
160MRESULT EXPENTRY DirFolderProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
161MRESULT EXPENTRY DirMaxProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
162MRESULT EXPENTRY DirObjWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
163
164MRESULT EXPENTRY SearchContainer(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
165
166// 05 Jan 08 SHL fixme for dircnrs.c globals to be here
167
168#ifdef DEFINE_GLOBALS
169#define DATADEF
170#pragma data_seg(GLOBAL1)
171#else
172#define DATADEF extern
173#endif
174
175// Data declarations
176extern HWND DirCnrMenu;
177extern HWND hwndAttr;
178extern HWND hwndDate;
179extern INT sortFlags;
180
181#endif // DIRCNRS_H
Note: See TracBrowser for help on using the repository browser.