[BROWSEUI]

- Set the prototypes to be long instead of LONG. This only worked in rbuild previously because WIDL incorrectly generates a LONG for long types.
- define SHANDLE_PTR and use it in IWebBrowserApp::get_HWND
- Along with fixing WIDL, __WINESRC__ and __ROS_LONG64__ should be removed as part of a future fix.
- Should now build with both rbuild and msvc

svn path=/trunk/; revision=52364
This commit is contained in:
Ged Murphy 2011-06-19 12:46:15 +00:00
parent 80aa713b95
commit fbbd6d9218
3 changed files with 42 additions and 31 deletions

View file

@ -124,8 +124,6 @@ TODO:
"language='*'\"")
#endif // __GNUC__
#define SHANDLE_PTR LONG
struct categoryCacheHeader
{
long dwSize; // size of header only
@ -156,7 +154,6 @@ SHSTDAPI_(void *) SHAlloc(SIZE_T cb);
extern HRESULT CreateInternetToolbar(REFIID riid, void **ppv);
#ifdef SetWindowLongPtr
#undef SetWindowLongPtr
inline LONG_PTR SetWindowLongPtr(HWND hWnd, int nIndex, LONG_PTR dwNewLong)
@ -556,19 +553,29 @@ public:
virtual HRESULT STDMETHODCALLTYPE get_Document(IDispatch **ppDisp);
virtual HRESULT STDMETHODCALLTYPE get_TopLevelContainer(VARIANT_BOOL *pBool);
virtual HRESULT STDMETHODCALLTYPE get_Type(BSTR *Type);
virtual HRESULT STDMETHODCALLTYPE get_Left(LONG *pl);
virtual HRESULT STDMETHODCALLTYPE put_Left(LONG Left);
virtual HRESULT STDMETHODCALLTYPE get_Top(LONG *pl);
virtual HRESULT STDMETHODCALLTYPE put_Top(LONG Top);
virtual HRESULT STDMETHODCALLTYPE get_Width(LONG *pl);
virtual HRESULT STDMETHODCALLTYPE put_Width(LONG Width);
virtual HRESULT STDMETHODCALLTYPE get_Height(LONG *pl);
virtual HRESULT STDMETHODCALLTYPE put_Height(LONG Height);
// WIDL temp hack : when the interface contains 'long' WIDL writes it out as a 'LONG'
// Setting the prototype to LONG in this class breaks building with MSVC so we use
// the correct 'long' type here and temp hack it for WIDL generated prototypes.
#ifdef __WIDL_EXDISP_H
#define long LONG
#endif
virtual HRESULT STDMETHODCALLTYPE get_Left(long *pl);
virtual HRESULT STDMETHODCALLTYPE put_Left(long Left);
virtual HRESULT STDMETHODCALLTYPE get_Top(long *pl);
virtual HRESULT STDMETHODCALLTYPE put_Top(long Top);
virtual HRESULT STDMETHODCALLTYPE get_Width(long *pl);
virtual HRESULT STDMETHODCALLTYPE put_Width(long Width);
virtual HRESULT STDMETHODCALLTYPE get_Height(long *pl);
virtual HRESULT STDMETHODCALLTYPE put_Height(long Height);
#ifdef __WIDL_EXDISP_H
#undef long
#endif
virtual HRESULT STDMETHODCALLTYPE get_LocationName(BSTR *LocationName);
virtual HRESULT STDMETHODCALLTYPE get_LocationURL(BSTR *LocationURL);
virtual HRESULT STDMETHODCALLTYPE get_Busy(VARIANT_BOOL *pBool);
// *** IWebBrowser2 methods ***
// *** IWebBrowserApp methods ***
virtual HRESULT STDMETHODCALLTYPE Quit();
virtual HRESULT STDMETHODCALLTYPE ClientToWindow(int *pcx, int *pcy);
virtual HRESULT STDMETHODCALLTYPE PutProperty(BSTR Property, VARIANT vtValue);
@ -2546,47 +2553,51 @@ HRESULT STDMETHODCALLTYPE CShellBrowser::get_Type(BSTR *Type)
{
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE CShellBrowser::get_Left(LONG *pl)
#ifdef __WIDL_EXDISP_H
#define long LONG
#endif
HRESULT STDMETHODCALLTYPE CShellBrowser::get_Left(long *pl)
{
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE CShellBrowser::put_Left(LONG Left)
HRESULT STDMETHODCALLTYPE CShellBrowser::put_Left(long Left)
{
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE CShellBrowser::get_Top(LONG *pl)
HRESULT STDMETHODCALLTYPE CShellBrowser::get_Top(long *pl)
{
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE CShellBrowser::put_Top(LONG Top)
HRESULT STDMETHODCALLTYPE CShellBrowser::put_Top(long Top)
{
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE CShellBrowser::get_Width(LONG *pl)
HRESULT STDMETHODCALLTYPE CShellBrowser::get_Width(long *pl)
{
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE CShellBrowser::put_Width(LONG Width)
HRESULT STDMETHODCALLTYPE CShellBrowser::put_Width(long Width)
{
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE CShellBrowser::get_Height(LONG *pl)
HRESULT STDMETHODCALLTYPE CShellBrowser::get_Height(long *pl)
{
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE CShellBrowser::put_Height(LONG Height)
HRESULT STDMETHODCALLTYPE CShellBrowser::put_Height(long Height)
{
return E_NOTIMPL;
}
#ifdef __WIDL_EXDISP_H
#undef long
#endif
HRESULT STDMETHODCALLTYPE CShellBrowser::get_LocationName(BSTR *LocationName)
{
return E_NOTIMPL;

View file

@ -77,10 +77,18 @@
#if defined(_WIN64)
#define __int3264 __int64
typedef __int64 SHANDLE_PTR;
typedef unsigned __int64 HANDLE_PTR;
typedef unsigned int UHALF_PTR, *PUHALF_PTR;
typedef int HALF_PTR, *PHALF_PTR;
#define ADDRESS_TAG_BIT 0x40000000000UI64
#else /* !_WIN64 */
#define __int3264 __int32
#define ADDRESS_TAG_BIT 0x80000000UL
typedef unsigned short UHALF_PTR, *PUHALF_PTR;
typedef short HALF_PTR, *PHALF_PTR;
typedef long SHANDLE_PTR;
typedef unsigned long HANDLE_PTR;
#define HandleToUlong( h ) ((ULONG)(ULONG_PTR)(h) )
#define HandleToLong( h ) ((LONG)(LONG_PTR) (h) )
#define ULongToHandle( h) ((HANDLE)(ULONG_PTR) (h))
@ -183,14 +191,6 @@ typedef unsigned long UINT_PTR, *PUINT_PTR;
typedef unsigned long ULONG_PTR, *PULONG_PTR;
#endif
typedef unsigned short UHALF_PTR, *PUHALF_PTR;
typedef short HALF_PTR, *PHALF_PTR;
#ifndef HANDLE_PTR_DEFINED
#define HANDLE_PTR_DEFINED
typedef unsigned long HANDLE_PTR;
#endif
#endif /* !_WIN64 */
typedef ULONG_PTR SIZE_T, *PSIZE_T;

View file

@ -224,7 +224,7 @@ interface IWebBrowserApp : IWebBrowser
[id(302)] HRESULT PutProperty([in] BSTR Property, [in] VARIANT vtValue);
[id(303)] HRESULT GetProperty([in] BSTR Property, [out, retval] VARIANT *pvtValue);
[id(0), propget] HRESULT Name([out, retval] BSTR* Name);
[id(DISPID_HWND), propget] HRESULT HWND([out, retval] long *pHWND);
[id(DISPID_HWND), propget] HRESULT HWND([out, retval] SHANDLE_PTR *pHWND);
[id(400), propget] HRESULT FullName([out, retval] BSTR* FullName);
[id(401), propget] HRESULT Path([out, retval] BSTR* Path);
[id(402), propget] HRESULT Visible([out, retval] VARIANT_BOOL* pBool);