2 * Openwide -- control Windows common dialog
4 * Copyright (c) 2000 Luke Hudson
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 #ifndef LINGO_OPENWIDE_INC_H
29 #define LINGO_OPENWIDE_INC_H
35 #define DLLPROC LibMain
37 #define DLLPROC DllMain
40 typedef struct OWSubClassData
45 } OWSubClassData
, *POWSubClassData
;
48 typedef struct FindChildData
{
52 } FindChildData
, *PFindChildData
;
55 typedef struct FavLink
57 //struct FavLink * next;
60 char szFav
[MAX_PATH
+4];
63 typedef int (*FPFaveIter
)(PFavLink pFav
, void * pData
);
65 extern HINSTANCE ghInst
;
66 extern HHOOK ghMsgHook
, ghSysMsgHook
;
67 extern HANDLE ghMutex
;
68 extern OWSharedData gOwShared
;
72 void closeSharedMem(void);
73 BOOL DLLEXPORT WINAPI
DLLPROC(HINSTANCE hDLLInst
, DWORD fdwReason
, LPVOID lpvReserved
);
74 int getSharedData(void);
75 int initSharedMem(void);
76 int openSharedMem(void);
77 int openWide(HWND hwnd
);
78 void releaseSharedMem(void);
79 void CALLBACK
timerProc(HWND hwnd
, UINT uMsg
, UINT uID
, DWORD dwTime
);
83 HWND
findChildWindow(HWND hwParent
, UINT uID
, const char *szClass
);
84 int focusDlgItem(HWND hwnd
, int iFocus
);
85 WORD
focusToCtlID(int iFocus
);
86 BOOL CALLBACK
fpEnumChildren(HWND hwnd
, LPARAM lParam
);
87 HWND
getChildWinFromPt(HWND hwnd
);
88 void releaseMutex(void);
89 int subclass(HWND hwnd
, WNDPROC wpNew
, LPARAM lpData
);
90 int unsubclass(HWND hwnd
);
91 WORD
viewToCmdID(int iView
);
92 BOOL
waitForMutex(void);