source: trunk/dll/misc.h@ 1444

Last change on this file since 1444 was 1444, checked in by Gregg Young, 16 years ago

Rework of drivebar to rescan all drives and refresh media buttons and menu items grey out inappropriate menu items. Streamline Tree scan code and use semaphores to serialize access. Add NOEASUPPORT and LOCALHD driveflag; .LONGNAME usage fixes; (Tickets 377-386)

  • Property svn:eolstyle set to native
  • Property svn:keywords set to Id
File size: 3.7 KB
Line 
1
2/***********************************************************************
3
4 $Id: misc.h 1444 2009-07-22 23:24:23Z gyoung $
5
6 Misc utility functions
7
8 Copyright (c) 1993-98 M. Kimes
9 Copyright (c) 2008, 2009 Steven H. Levine
10
11 17 Jul 08 SHL Baseline
12 08 Mar 09 GKY Add WriteDetailsSwitches and use LoadDetailsSwitches to replace in line code
13 22 Jul 09 GKY Check if drives support EAs add driveflag for this
14 22 Jul 09 GKY Allow .LONGNAME to be displayed for FAT drives.
15
16***********************************************************************/
17
18#if !defined(MISC_H)
19#define MISC_H
20
21#if !defined(OS2_INCLUDED)
22#include <os2.h>
23#endif
24
25#include "dircnrs.h" // typedef for DETAILS_SETTINGS
26
27#ifdef FORTIFY
28INT GetTidForThread(VOID);
29INT GetTidForWindow(HWND hwnd);
30#endif
31
32SHORT AddToListboxBottom(HWND hwnd, PCSZ str);
33BOOL AdjustCnrColRO(HWND hwndCnr, PCSZ title, BOOL readonly, BOOL toggle);
34BOOL AdjustCnrColVis(HWND hwndCnr, PCSZ title, BOOL visible, BOOL toggle);
35VOID AdjustCnrColsForFSType(HWND hwndCnr, PCSZ directory, DETAILS_SETTINGS *pds, BOOL compare);
36VOID AdjustCnrColsForPref(HWND hwndCnr, PCSZ directory, DETAILS_SETTINGS *pds,
37 BOOL compare);
38VOID AdjustDetailsSwitches(HWND hwnd, HWND hwndMenu, USHORT cmd,
39 PCSZ directory, PCSZ keyroot, DETAILS_SETTINGS * pds,
40 BOOL compare);
41void BoxWindow(HWND hwnd, HPS hps, LONG color);
42void Broadcast(HAB hab, HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
43INT CheckDriveSpaceAvail(PCSZ pTargetPath, ULONGLONG ullSpaceNeeded,
44 ULONGLONG ullFreeSpaceWhenComplete);
45HWND CheckMenu(HWND hwnd, HWND * hwndMenu, USHORT id);
46MRESULT CnrDirectEdit(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
47PMINIRECORDCORE CurrentRecord(HWND hwndCnr);
48void DrawTargetEmphasis(HWND hwnd, BOOL on);
49void EmphasizeButton(HWND hwnd, BOOL on);
50INT ExecFile(HWND hwnd, PCSZ filename);
51HWND FindDirCnr(HWND hwndParent);
52VOID FixSwitchList(HWND hwnd, PCSZ text);
53char *GetCmdSpec(BOOL dos);
54VOID HeapThread(VOID * dummy);
55BOOL IsFm2Window(HWND hwnd, BOOL chkTid);
56VOID LoadDetailsSwitches(PCSZ keyroot, DETAILS_SETTINGS *pds, BOOL state);
57VOID WriteDetailsSwitches(PCSZ keyroot, DETAILS_SETTINGS *pds, BOOL state);
58VOID RemoveCnrSwitches(PCSZ keyroot, PCSZ statename);
59VOID RemoveOldCnrSwitches(PCSZ szPrefix, ULONG ulTemp);
60VOID LoadLibPath(PSZ str, LONG len);
61VOID OpenEdit(HWND hwnd);
62VOID PaintRecessedWindow(HWND hwnd, HPS hps, BOOL outtie, BOOL dbl);
63void PaintSTextWindow(HWND hwnd, HPS hps);
64VOID PortholeInit(HWND hwndNew, MPARAM mp1, MPARAM mp2);
65BOOL PostMsg(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
66VOID QuickPopup(HWND hwnd, DIRCNRDATA * dcd, HWND hwndMenu, USHORT id);
67void SayFilter(HWND hwnd, MASK * mask, BOOL archive);
68void SaySort(HWND hwnd, INT sortflags, BOOL archive);
69void SayView(HWND hwnd, ULONG flWindowAttr);
70BOOL SetCnrCols(HWND hwndCnr, BOOL compare);
71VOID SetConditionalCascade(HWND hwndMenu, USHORT id, USHORT def);
72VOID SetDetailsSwitches(HWND hwnd, DETAILS_SETTINGS * pds);
73BOOL SetMenuCheck(HWND hwndMenu, USHORT id, BOOL * bool, BOOL toggle,
74 PCSZ savename);
75VOID SetShiftState(VOID);
76VOID SetSortChecks(HWND hwndMenu, INT sortflags);
77VOID SetSysMenu(HWND hwndSysMenu);
78void SetViewMenu(HWND hwndMenu, ULONG flWindowAttr);
79VOID SetupCommandMenu(HWND hwndMenu, HWND hwndCnr);
80void SetupWinList(HWND hwndMenu, HWND hwndTop, HWND hwndFrame);
81BOOL SwitchCommand(HWND hwndMenu, USHORT cmd);
82BOOL ViewHelp(PCSZ filename);
83VOID disable_menuitem(HWND hwndMenu, USHORT id, BOOL enable);
84
85// Data declarations
86extern HWND CollectorDirMenu;
87extern HWND CollectorFileMenu;
88extern HWND DirMenu;
89extern HWND FileMenu;
90extern HWND TreeMenu;
91extern BOOL fDefaultDeletePerm;
92extern BOOL fWorkPlace;
93extern ULONG numswitches;
94extern HSWITCH switches[499];
95
96#endif // MISC_H
Note: See TracBrowser for help on using the repository browser.