source: trunk/dll/misc.h@ 1409

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

Rename some container ini keys consolidate inline code in WriteDetailsSwitches, LoadDetailsSwitches and RemoveCnrSwitches (Ticket 343, 345, 347) Save changes to detail switches for compare directories (Ticket 346). Move additional messages to PCSZs (Ticket 6). Comments and minor code clean up.

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