source: trunk/dll/misc.h@ 1400

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

Remainder of changes to rename commafmt.h/c (Ticket 28, 82); Additional strings moved to PCSZs in init.c (Ticket 6); Added WriteDetailsSwitches used it and LoadDetailsSwitches to consolidate inline code (Ticket 343, 344)

  • Property svn:eolstyle set to native
  • Property svn:keywords set to Id
File size: 3.4 KB
Line 
1
2/***********************************************************************
3
4 $Id: misc.h 1400 2009-03-08 17:50:25Z 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);
55VOID WriteDetailsSwitches(PCSZ keyroot, DETAILS_SETTINGS *pds);
56VOID LoadLibPath(PSZ str, LONG len);
57VOID OpenEdit(HWND hwnd);
58VOID PaintRecessedWindow(HWND hwnd, HPS hps, BOOL outtie, BOOL dbl);
59void PaintSTextWindow(HWND hwnd, HPS hps);
60VOID PortholeInit(HWND hwndNew, MPARAM mp1, MPARAM mp2);
61BOOL PostMsg(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
62VOID QuickPopup(HWND hwnd, DIRCNRDATA * dcd, HWND hwndMenu, USHORT id);
63void SayFilter(HWND hwnd, MASK * mask, BOOL archive);
64void SaySort(HWND hwnd, INT sortflags, BOOL archive);
65void SayView(HWND hwnd, ULONG flWindowAttr);
66BOOL SetCnrCols(HWND hwndCnr, BOOL compare);
67VOID SetConditionalCascade(HWND hwndMenu, USHORT id, USHORT def);
68VOID SetDetailsSwitches(HWND hwnd, DETAILS_SETTINGS * pds);
69BOOL SetMenuCheck(HWND hwndMenu, USHORT id, BOOL * bool, BOOL toggle,
70 PCSZ savename);
71VOID SetShiftState(VOID);
72VOID SetSortChecks(HWND hwndMenu, INT sortflags);
73VOID SetSysMenu(HWND hwndSysMenu);
74void SetViewMenu(HWND hwndMenu, ULONG flWindowAttr);
75VOID SetupCommandMenu(HWND hwndMenu, HWND hwndCnr);
76void SetupWinList(HWND hwndMenu, HWND hwndTop, HWND hwndFrame);
77BOOL SwitchCommand(HWND hwndMenu, USHORT cmd);
78BOOL ViewHelp(PCSZ filename);
79VOID disable_menuitem(HWND hwndMenu, USHORT id, BOOL enable);
80
81// Data declarations
82extern HWND CollectorDirMenu;
83extern HWND CollectorFileMenu;
84extern HWND DirMenu;
85extern HWND FileMenu;
86extern HWND TreeMenu;
87extern BOOL fDefaultDeletePerm;
88extern BOOL fWorkPlace;
89extern ULONG numswitches;
90extern HSWITCH switches[499];
91
92#endif // MISC_H
Note: See TracBrowser for help on using the repository browser.