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
24 #define LINGO_OPENWIDE_INC_H
30 #define DLLPROC LibMain
32 #define DLLPROC DllMain
35 typedef struct OWSubClassData
40 } OWSubClassData
, *POWSubClassData
;
43 typedef struct FindChildData
{
47 } FindChildData
, *PFindChildData
;
50 typedef struct FavLink
52 //struct FavLink * next;
55 char szFav
[MAX_PATH
+4];
58 typedef int (*FPFaveIter
)(PFavLink pFav
, void * pData
);
60 extern HINSTANCE ghInst
;
61 extern HHOOK ghMsgHook
, ghSysMsgHook
;
62 extern HANDLE ghMutex
;
63 extern OWSharedData gOwShared
;
67 void closeSharedMem(void);
68 BOOL DLLEXPORT WINAPI
DLLPROC(HINSTANCE hDLLInst
, DWORD fdwReason
, LPVOID lpvReserved
);
69 int getSharedData(void);
70 int initSharedMem(void);
71 int openSharedMem(void);
72 int openWide(HWND hwnd
);
73 void releaseSharedMem(void);
74 void CALLBACK
timerProc(HWND hwnd
, UINT uMsg
, UINT uID
, DWORD dwTime
);
78 HWND
findChildWindow(HWND hwParent
, UINT uID
, const char *szClass
);
79 int focusDlgItem(HWND hwnd
, int iFocus
);
80 WORD
focusToCtlID(int iFocus
);
81 BOOL CALLBACK
fpEnumChildren(HWND hwnd
, LPARAM lParam
);
82 HWND
getChildWinFromPt(HWND hwnd
);
83 void releaseMutex(void);
84 int subclass(HWND hwnd
, WNDPROC wpNew
, LPARAM lpData
);
85 int unsubclass(HWND hwnd
);
86 WORD
viewToCmdID(int iView
);
87 BOOL
waitForMutex(void);