Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6d54716f
Commit
6d54716f
authored
Apr 15, 2005
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 15, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- More implementation of view
- Added IOleInPlaceActiveObject
parent
9117e1c4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
149 additions
and
24 deletions
+149
-24
htmldoc.c
dlls/mshtml/htmldoc.c
+5
-0
mshtml_private.h
dlls/mshtml/mshtml_private.h
+18
-15
oleobj.c
dlls/mshtml/oleobj.c
+94
-0
view.c
dlls/mshtml/view.c
+32
-9
No files found.
dlls/mshtml/htmldoc.c
View file @
6d54716f
...
@@ -76,6 +76,9 @@ static HRESULT WINAPI HTMLDocument_QueryInterface(IHTMLDocument2 *iface, REFIID
...
@@ -76,6 +76,9 @@ static HRESULT WINAPI HTMLDocument_QueryInterface(IHTMLDocument2 *iface, REFIID
}
else
if
(
IsEqualGUID
(
&
IID_IOleDocumentView
,
riid
))
{
}
else
if
(
IsEqualGUID
(
&
IID_IOleDocumentView
,
riid
))
{
TRACE
(
"(%p)->(IID_IOleDocumentView, %p)
\n
"
,
This
,
ppvObject
);
TRACE
(
"(%p)->(IID_IOleDocumentView, %p)
\n
"
,
This
,
ppvObject
);
*
ppvObject
=
DOCVIEW
(
This
);
*
ppvObject
=
DOCVIEW
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IOleInPlaceActiveObject
,
riid
))
{
TRACE
(
"(%p)->(IID_IOleInPlaceActiveObject, %p)
\n
"
,
This
,
ppvObject
);
*
ppvObject
=
ACTOBJ
(
This
);
}
}
if
(
*
ppvObject
)
{
if
(
*
ppvObject
)
{
...
@@ -107,6 +110,8 @@ static ULONG WINAPI HTMLDocument_Release(IHTMLDocument2 *iface)
...
@@ -107,6 +110,8 @@ static ULONG WINAPI HTMLDocument_Release(IHTMLDocument2 *iface)
IOleClientSite_Release
(
This
->
client
);
IOleClientSite_Release
(
This
->
client
);
if
(
This
->
ipsite
)
if
(
This
->
ipsite
)
IOleInPlaceSite_Release
(
This
->
ipsite
);
IOleInPlaceSite_Release
(
This
->
ipsite
);
if
(
This
->
frame
)
IOleInPlaceFrame_Release
(
This
->
frame
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
}
...
...
dlls/mshtml/mshtml_private.h
View file @
6d54716f
...
@@ -17,30 +17,33 @@
...
@@ -17,30 +17,33 @@
*/
*/
typedef
struct
{
typedef
struct
{
IHTMLDocument2Vtbl
*
lpHTMLDocument2Vtbl
;
IHTMLDocument2Vtbl
*
lpHTMLDocument2Vtbl
;
IPersistMonikerVtbl
*
lpPersistMonikerVtbl
;
IPersistMonikerVtbl
*
lpPersistMonikerVtbl
;
IPersistFileVtbl
*
lpPersistFileVtbl
;
IPersistFileVtbl
*
lpPersistFileVtbl
;
IMonikerPropVtbl
*
lpMonikerPropVtbl
;
IMonikerPropVtbl
*
lpMonikerPropVtbl
;
IOleObjectVtbl
*
lpOleObjectVtbl
;
IOleObjectVtbl
*
lpOleObjectVtbl
;
IOleDocumentVtbl
*
lpOleDocumentVtbl
;
IOleDocumentVtbl
*
lpOleDocumentVtbl
;
IOleDocumentViewVtbl
*
lpOleDocumentViewVtbl
;
IOleDocumentViewVtbl
*
lpOleDocumentViewVtbl
;
IOleInPlaceActiveObjectVtbl
*
lpOleInPlaceActiveObjectVtbl
;
ULONG
ref
;
ULONG
ref
;
IOleClientSite
*
client
;
IOleClientSite
*
client
;
IOleInPlaceSite
*
ipsite
;
IOleInPlaceSite
*
ipsite
;
IOleInPlaceFrame
*
frame
;
HWND
hwnd
;
HWND
hwnd
;
}
HTMLDocument
;
}
HTMLDocument
;
#define HTMLDOC(x) ((IHTMLDocument2*) &(x)->lpHTMLDocument2Vtbl)
#define HTMLDOC(x) ((IHTMLDocument2*) &(x)->lpHTMLDocument2Vtbl)
#define PERSIST(x) ((IPersist*) &(x)->lpPersistFileVtbl)
#define PERSIST(x) ((IPersist*) &(x)->lpPersistFileVtbl)
#define PERSISTMON(x) ((IPersistMoniker*) &(x)->lpPersistMonikerVtbl)
#define PERSISTMON(x) ((IPersistMoniker*) &(x)->lpPersistMonikerVtbl)
#define PERSISTFILE(x) ((IPersistFile*) &(x)->lpPersistFileVtbl)
#define PERSISTFILE(x) ((IPersistFile*) &(x)->lpPersistFileVtbl)
#define MONPROP(x) ((IMonikerProp*) &(x)->lpMonikerPropVtbl)
#define MONPROP(x) ((IMonikerProp*) &(x)->lpMonikerPropVtbl)
#define OLEOBJ(x) ((IOleObject*) &(x)->lpOleObjectVtbl)
#define OLEOBJ(x) ((IOleObject*) &(x)->lpOleObjectVtbl)
#define OLEDOC(x) ((IOleDocument*) &(x)->lpOleDocumentVtbl)
#define OLEDOC(x) ((IOleDocument*) &(x)->lpOleDocumentVtbl)
#define DOCVIEW(x) ((IOleDocumentView*) &(x)->lpOleDocumentViewVtbl)
#define DOCVIEW(x) ((IOleDocumentView*) &(x)->lpOleDocumentViewVtbl)
#define ACTOBJ(x) ((IOleInPlaceActiveObject*) &(x)->lpOleInPlaceActiveObjectVtbl)
HRESULT
HTMLDocument_Create
(
IUnknown
*
,
REFIID
,
void
**
);
HRESULT
HTMLDocument_Create
(
IUnknown
*
,
REFIID
,
void
**
);
...
...
dlls/mshtml/oleobj.c
View file @
6d54716f
...
@@ -374,10 +374,104 @@ static IOleDocumentVtbl OleDocumentVtbl = {
...
@@ -374,10 +374,104 @@ static IOleDocumentVtbl OleDocumentVtbl = {
OleDocument_EnumViews
OleDocument_EnumViews
};
};
/**********************************************************
* IOleInPlaceActiveObject implementation
*/
#define ACTOBJ_THIS \
HTMLDocument* const This=(HTMLDocument*)((char*)(iface)-offsetof(HTMLDocument,lpOleInPlaceActiveObjectVtbl));
static
HRESULT
WINAPI
OleInPlaceActiveObject_QueryInterface
(
IOleInPlaceActiveObject
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
ACTOBJ_THIS
return
IHTMLDocument2_QueryInterface
(
HTMLDOC
(
This
),
riid
,
ppvObject
);
}
static
ULONG
WINAPI
OleInPlaceActiveObject_AddRef
(
IOleInPlaceActiveObject
*
iface
)
{
ACTOBJ_THIS
return
IHTMLDocument2_AddRef
(
HTMLDOC
(
This
));
}
static
ULONG
WINAPI
OleInPlaceActiveObject_Release
(
IOleInPlaceActiveObject
*
iface
)
{
ACTOBJ_THIS
return
IHTMLDocument2_Release
(
HTMLDOC
(
This
));
}
static
HRESULT
WINAPI
OleInPlaceActiveObject_GetWindow
(
IOleInPlaceActiveObject
*
iface
,
HWND
*
phwnd
)
{
ACTOBJ_THIS
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
phwnd
);
if
(
!
phwnd
)
return
E_INVALIDARG
;
*
phwnd
=
This
->
hwnd
;
return
S_OK
;
}
static
HRESULT
WINAPI
OleInPlaceActiveObject_ContextSensitiveHelp
(
IOleInPlaceActiveObject
*
iface
,
BOOL
fEnterMode
)
{
ACTOBJ_THIS
FIXME
(
"(%p)->(%x)
\n
"
,
This
,
fEnterMode
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
OleInPlaceActiveObject_TranslateAccelerator
(
IOleInPlaceActiveObject
*
iface
,
LPMSG
lpmsg
)
{
ACTOBJ_THIS
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
lpmsg
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
OleInPlaceActiveObject_OnFrameWindowActivate
(
IOleInPlaceActiveObject
*
iface
,
BOOL
fActivate
)
{
ACTOBJ_THIS
FIXME
(
"(%p)->(%x)
\n
"
,
This
,
fActivate
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
OleInPlaceActiveObject_OnDocWindowActivate
(
IOleInPlaceActiveObject
*
iface
,
BOOL
fActivate
)
{
ACTOBJ_THIS
FIXME
(
"(%p)->(%x)
\n
"
,
This
,
fActivate
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
OleInPlaceActiveObject_ResizeBorder
(
IOleInPlaceActiveObject
*
iface
,
LPCRECT
prcBorder
,
IOleInPlaceUIWindow
*
pUIWindow
,
BOOL
fFrameWindow
)
{
ACTOBJ_THIS
FIXME
(
"(%p)->(%p %p %x)
\n
"
,
This
,
prcBorder
,
pUIWindow
,
fFrameWindow
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
OleInPlaceActiveObject_EnableModeless
(
IOleInPlaceActiveObject
*
iface
,
BOOL
fEnable
)
{
ACTOBJ_THIS
FIXME
(
"(%p)->(%x)
\n
"
,
This
,
fEnable
);
return
E_NOTIMPL
;
}
static
IOleInPlaceActiveObjectVtbl
OleInPlaceActiveObjectVtbl
=
{
OleInPlaceActiveObject_QueryInterface
,
OleInPlaceActiveObject_AddRef
,
OleInPlaceActiveObject_Release
,
OleInPlaceActiveObject_GetWindow
,
OleInPlaceActiveObject_ContextSensitiveHelp
,
OleInPlaceActiveObject_TranslateAccelerator
,
OleInPlaceActiveObject_OnFrameWindowActivate
,
OleInPlaceActiveObject_OnDocWindowActivate
,
OleInPlaceActiveObject_ResizeBorder
,
OleInPlaceActiveObject_EnableModeless
};
void
HTMLDocument_OleObj_Init
(
HTMLDocument
*
This
)
void
HTMLDocument_OleObj_Init
(
HTMLDocument
*
This
)
{
{
This
->
lpOleObjectVtbl
=
&
OleObjectVtbl
;
This
->
lpOleObjectVtbl
=
&
OleObjectVtbl
;
This
->
lpOleDocumentVtbl
=
&
OleDocumentVtbl
;
This
->
lpOleDocumentVtbl
=
&
OleDocumentVtbl
;
This
->
lpOleInPlaceActiveObjectVtbl
=
&
OleInPlaceActiveObjectVtbl
;
This
->
client
=
NULL
;
This
->
client
=
NULL
;
}
}
dlls/mshtml/view.c
View file @
6d54716f
...
@@ -40,6 +40,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
...
@@ -40,6 +40,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
static
const
WCHAR
wszInternetExplorer_Server
[]
=
static
const
WCHAR
wszInternetExplorer_Server
[]
=
{
'I'
,
'n'
,
't'
,
'e'
,
'r'
,
'n'
,
'e'
,
't'
,
' '
,
'E'
,
'x'
,
'p'
,
'l'
,
'o'
,
'r'
,
'e'
,
'r'
,
'_'
,
'S'
,
'e'
,
'r'
,
'v'
,
'e'
,
'r'
,
0
};
{
'I'
,
'n'
,
't'
,
'e'
,
'r'
,
'n'
,
'e'
,
't'
,
' '
,
'E'
,
'x'
,
'p'
,
'l'
,
'o'
,
'r'
,
'e'
,
'r'
,
'_'
,
'S'
,
'e'
,
'r'
,
'v'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
wszHTML_Document
[]
=
{
'H'
,
'T'
,
'M'
,
'L'
,
' '
,
'D'
,
'o'
,
'c'
,
'u'
,
'm'
,
'e'
,
'n'
,
't'
,
0
};
static
ATOM
serverwnd_class
=
0
;
static
ATOM
serverwnd_class
=
0
;
...
@@ -206,8 +208,12 @@ static HRESULT WINAPI OleDocumentView_SetRectComplex(IOleDocumentView *iface, LP
...
@@ -206,8 +208,12 @@ static HRESULT WINAPI OleDocumentView_SetRectComplex(IOleDocumentView *iface, LP
static
HRESULT
WINAPI
OleDocumentView_Show
(
IOleDocumentView
*
iface
,
BOOL
fShow
)
static
HRESULT
WINAPI
OleDocumentView_Show
(
IOleDocumentView
*
iface
,
BOOL
fShow
)
{
{
DOCVIEW_THIS
DOCVIEW_THIS
FIXME
(
"(%p)->(%x)
\n
"
,
This
,
fShow
);
TRACE
(
"(%p)->(%x)
\n
"
,
This
,
fShow
);
return
E_NOTIMPL
;
if
(
This
->
hwnd
)
ShowWindow
(
This
->
hwnd
,
fShow
);
return
S_OK
;
}
}
static
HRESULT
WINAPI
OleDocumentView_UIActivate
(
IOleDocumentView
*
iface
,
BOOL
fUIActivate
)
static
HRESULT
WINAPI
OleDocumentView_UIActivate
(
IOleDocumentView
*
iface
,
BOOL
fUIActivate
)
...
@@ -244,8 +250,6 @@ static HRESULT WINAPI OleDocumentView_UIActivate(IOleDocumentView *iface, BOOL f
...
@@ -244,8 +250,6 @@ static HRESULT WINAPI OleDocumentView_UIActivate(IOleDocumentView *iface, BOOL f
WARN
(
"GetWindowContext failed: %08lx
\n
"
,
hres
);
WARN
(
"GetWindowContext failed: %08lx
\n
"
,
hres
);
return
hres
;
return
hres
;
}
}
if
(
pIPFrame
)
IOleInPlaceFrame_Release
(
pIPFrame
);
if
(
pIPWnd
)
if
(
pIPWnd
)
IOleInPlaceUIWindow_Release
(
pIPWnd
);
IOleInPlaceUIWindow_Release
(
pIPWnd
);
TRACE
(
"got window context: %p %p {%ld %ld %ld %ld} {%ld %ld %ld %ld} {%d %x %p %p %d}
\n
"
,
TRACE
(
"got window context: %p %p {%ld %ld %ld %ld} {%ld %ld %ld %ld} {%d %x %p %p %d}
\n
"
,
...
@@ -283,16 +287,23 @@ static HRESULT WINAPI OleDocumentView_UIActivate(IOleDocumentView *iface, BOOL f
...
@@ -283,16 +287,23 @@ static HRESULT WINAPI OleDocumentView_UIActivate(IOleDocumentView *iface, BOOL f
hres
=
IOleInPlaceSite_OnUIActivate
(
This
->
ipsite
);
hres
=
IOleInPlaceSite_OnUIActivate
(
This
->
ipsite
);
if
(
SUCCEEDED
(
hres
))
{
if
(
SUCCEEDED
(
hres
))
{
/* IOleInPlaceFrame_SetActiveObject(pIPFrame, ACTOBJ(This->pDoc), wszHTMLDocument); */
IOleInPlaceFrame_SetActiveObject
(
pIPFrame
,
ACTOBJ
(
This
),
wszHTML_Document
);
}
else
{
}
else
{
FIXME
(
"OnUIActivate failed: %08lx
\n
"
,
hres
);
FIXME
(
"OnUIActivate failed: %08lx
\n
"
,
hres
);
DestroyWindow
(
hwnd
);
DestroyWindow
(
hwnd
);
return
hres
;
return
hres
;
}
}
if
(
This
->
frame
)
IOleInPlaceFrame_Release
(
This
->
frame
);
This
->
frame
=
pIPFrame
;
This
->
hwnd
=
hwnd
;
This
->
hwnd
=
hwnd
;
}
else
{
}
else
{
FIXME
(
"deactivating is not supported
\n
"
);
static
const
WCHAR
wszEmpty
[]
=
{
0
};
return
E_NOTIMPL
;
if
(
This
->
frame
)
IOleInPlaceFrame_SetActiveObject
(
This
->
frame
,
NULL
,
wszEmpty
);
if
(
This
->
ipsite
)
IOleInPlaceSite_OnUIDeactivate
(
This
->
ipsite
,
FALSE
);
}
}
return
S_OK
;
return
S_OK
;
}
}
...
@@ -307,8 +318,19 @@ static HRESULT WINAPI OleDocumentView_Open(IOleDocumentView *iface)
...
@@ -307,8 +318,19 @@ static HRESULT WINAPI OleDocumentView_Open(IOleDocumentView *iface)
static
HRESULT
WINAPI
OleDocumentView_CloseView
(
IOleDocumentView
*
iface
,
DWORD
dwReserved
)
static
HRESULT
WINAPI
OleDocumentView_CloseView
(
IOleDocumentView
*
iface
,
DWORD
dwReserved
)
{
{
DOCVIEW_THIS
DOCVIEW_THIS
FIXME
(
"(%p)->(%lx)
\n
"
,
This
,
dwReserved
);
TRACE
(
"(%p)->(%lx)
\n
"
,
This
,
dwReserved
);
return
E_NOTIMPL
;
if
(
dwReserved
)
WARN
(
"dwReserved = %ld
\n
"
,
dwReserved
);
/* NOTE:
* Windows implementation calls QueryInterface(IID_IOleCommandTarget),
* QueryInterface(IID_IOleControlSite) and KillTimer
*/
IOleDocumentView_Show
(
iface
,
FALSE
);
return
S_OK
;
}
}
static
HRESULT
WINAPI
OleDocumentView_SaveViewState
(
IOleDocumentView
*
iface
,
LPSTREAM
pstm
)
static
HRESULT
WINAPI
OleDocumentView_SaveViewState
(
IOleDocumentView
*
iface
,
LPSTREAM
pstm
)
...
@@ -357,5 +379,6 @@ void HTMLDocument_View_Init(HTMLDocument *This)
...
@@ -357,5 +379,6 @@ void HTMLDocument_View_Init(HTMLDocument *This)
This
->
lpOleDocumentViewVtbl
=
&
OleDocumentViewVtbl
;
This
->
lpOleDocumentViewVtbl
=
&
OleDocumentViewVtbl
;
This
->
ipsite
=
NULL
;
This
->
ipsite
=
NULL
;
This
->
frame
=
NULL
;
This
->
hwnd
=
NULL
;
This
->
hwnd
=
NULL
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment