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