source: trunk/dll/dircnrs.h@ 1330

Last change on this file since 1330 was 1222, checked in by John Small, 17 years ago

Ticket 187: Moved typedef's and some #define's from fm3dll.h

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