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
d4b05232
Commit
d4b05232
authored
Dec 06, 2010
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 07, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use an iface instead of a vtbl pointer in HTMLSelectionObject.
parent
99a0da24
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
22 deletions
+21
-22
selection.c
dlls/mshtml/selection.c
+21
-22
No files found.
dlls/mshtml/selection.c
View file @
d4b05232
...
...
@@ -33,7 +33,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
mshtml
);
typedef
struct
{
const
IHTMLSelectionObjectVtbl
*
lpHTMLSelectionObjectVtbl
;
IHTMLSelectionObject
IHTMLSelectionObject_iface
;
LONG
ref
;
...
...
@@ -43,26 +43,27 @@ typedef struct {
struct
list
entry
;
}
HTMLSelectionObject
;
#define HTMLSELOBJ(x) ((IHTMLSelectionObject*) &(x)->lpHTMLSelectionObjectVtbl)
#define HTMLSELOBJ_THIS(iface) DEFINE_THIS(HTMLSelectionObject, HTMLSelectionObject, iface)
static
inline
HTMLSelectionObject
*
impl_from_IHTMLSelectionObject
(
IHTMLSelectionObject
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
HTMLSelectionObject
,
IHTMLSelectionObject_iface
);
}
static
HRESULT
WINAPI
HTMLSelectionObject_QueryInterface
(
IHTMLSelectionObject
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
HTMLSelectionObject
*
This
=
HTMLSELOBJ_THIS
(
iface
);
HTMLSelectionObject
*
This
=
impl_from_IHTMLSelectionObject
(
iface
);
*
ppv
=
NULL
;
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
{
TRACE
(
"(%p)->(IID_IUnknown %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLSELOBJ
(
This
)
;
*
ppv
=
&
This
->
IHTMLSelectionObject_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IDispatch
,
riid
))
{
TRACE
(
"(%p)->(IID_IUnknown %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLSELOBJ
(
This
)
;
*
ppv
=
&
This
->
IHTMLSelectionObject_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLSelectionObject
,
riid
))
{
TRACE
(
"(%p)->(IID_IUnknown %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLSELOBJ
(
This
)
;
*
ppv
=
&
This
->
IHTMLSelectionObject_iface
;
}
if
(
*
ppv
)
{
...
...
@@ -76,7 +77,7 @@ static HRESULT WINAPI HTMLSelectionObject_QueryInterface(IHTMLSelectionObject *i
static
ULONG
WINAPI
HTMLSelectionObject_AddRef
(
IHTMLSelectionObject
*
iface
)
{
HTMLSelectionObject
*
This
=
HTMLSELOBJ_THIS
(
iface
);
HTMLSelectionObject
*
This
=
impl_from_IHTMLSelectionObject
(
iface
);
LONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
...
...
@@ -86,7 +87,7 @@ static ULONG WINAPI HTMLSelectionObject_AddRef(IHTMLSelectionObject *iface)
static
ULONG
WINAPI
HTMLSelectionObject_Release
(
IHTMLSelectionObject
*
iface
)
{
HTMLSelectionObject
*
This
=
HTMLSELOBJ_THIS
(
iface
);
HTMLSelectionObject
*
This
=
impl_from_IHTMLSelectionObject
(
iface
);
LONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
...
...
@@ -104,7 +105,7 @@ static ULONG WINAPI HTMLSelectionObject_Release(IHTMLSelectionObject *iface)
static
HRESULT
WINAPI
HTMLSelectionObject_GetTypeInfoCount
(
IHTMLSelectionObject
*
iface
,
UINT
*
pctinfo
)
{
HTMLSelectionObject
*
This
=
HTMLSELOBJ_THIS
(
iface
);
HTMLSelectionObject
*
This
=
impl_from_IHTMLSelectionObject
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
pctinfo
);
return
E_NOTIMPL
;
}
...
...
@@ -112,7 +113,7 @@ static HRESULT WINAPI HTMLSelectionObject_GetTypeInfoCount(IHTMLSelectionObject
static
HRESULT
WINAPI
HTMLSelectionObject_GetTypeInfo
(
IHTMLSelectionObject
*
iface
,
UINT
iTInfo
,
LCID
lcid
,
ITypeInfo
**
ppTInfo
)
{
HTMLSelectionObject
*
This
=
HTMLSELOBJ_THIS
(
iface
);
HTMLSelectionObject
*
This
=
impl_from_IHTMLSelectionObject
(
iface
);
FIXME
(
"(%p)->(%u %u %p)
\n
"
,
This
,
iTInfo
,
lcid
,
ppTInfo
);
return
E_NOTIMPL
;
}
...
...
@@ -121,7 +122,7 @@ static HRESULT WINAPI HTMLSelectionObject_GetIDsOfNames(IHTMLSelectionObject *if
LPOLESTR
*
rgszNames
,
UINT
cNames
,
LCID
lcid
,
DISPID
*
rgDispId
)
{
HTMLSelectionObject
*
This
=
HTMLSELOBJ_THIS
(
iface
);
HTMLSelectionObject
*
This
=
impl_from_IHTMLSelectionObject
(
iface
);
FIXME
(
"(%p)->(%s %p %u %u %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
rgszNames
,
cNames
,
lcid
,
rgDispId
);
return
E_NOTIMPL
;
...
...
@@ -131,7 +132,7 @@ static HRESULT WINAPI HTMLSelectionObject_Invoke(IHTMLSelectionObject *iface, DI
REFIID
riid
,
LCID
lcid
,
WORD
wFlags
,
DISPPARAMS
*
pDispParams
,
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
{
HTMLSelectionObject
*
This
=
HTMLSELOBJ_THIS
(
iface
);
HTMLSelectionObject
*
This
=
impl_from_IHTMLSelectionObject
(
iface
);
FIXME
(
"(%p)->(%d %s %d %d %p %p %p %p)
\n
"
,
This
,
dispIdMember
,
debugstr_guid
(
riid
),
lcid
,
wFlags
,
pDispParams
,
pVarResult
,
pExcepInfo
,
puArgErr
);
return
E_NOTIMPL
;
...
...
@@ -139,7 +140,7 @@ static HRESULT WINAPI HTMLSelectionObject_Invoke(IHTMLSelectionObject *iface, DI
static
HRESULT
WINAPI
HTMLSelectionObject_createRange
(
IHTMLSelectionObject
*
iface
,
IDispatch
**
range
)
{
HTMLSelectionObject
*
This
=
HTMLSELOBJ_THIS
(
iface
);
HTMLSelectionObject
*
This
=
impl_from_IHTMLSelectionObject
(
iface
);
IHTMLTxtRange
*
range_obj
=
NULL
;
nsIDOMRange
*
nsrange
=
NULL
;
HRESULT
hres
;
...
...
@@ -189,21 +190,21 @@ static HRESULT WINAPI HTMLSelectionObject_createRange(IHTMLSelectionObject *ifac
static
HRESULT
WINAPI
HTMLSelectionObject_empty
(
IHTMLSelectionObject
*
iface
)
{
HTMLSelectionObject
*
This
=
HTMLSELOBJ_THIS
(
iface
);
HTMLSelectionObject
*
This
=
impl_from_IHTMLSelectionObject
(
iface
);
FIXME
(
"(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
HTMLSelectionObject_clear
(
IHTMLSelectionObject
*
iface
)
{
HTMLSelectionObject
*
This
=
HTMLSELOBJ_THIS
(
iface
);
HTMLSelectionObject
*
This
=
impl_from_IHTMLSelectionObject
(
iface
);
FIXME
(
"(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
HTMLSelectionObject_get_type
(
IHTMLSelectionObject
*
iface
,
BSTR
*
p
)
{
HTMLSelectionObject
*
This
=
HTMLSELOBJ_THIS
(
iface
);
HTMLSelectionObject
*
This
=
impl_from_IHTMLSelectionObject
(
iface
);
PRBool
collapsed
=
TRUE
;
static
const
WCHAR
wszNone
[]
=
{
'N'
,
'o'
,
'n'
,
'e'
,
0
};
...
...
@@ -219,8 +220,6 @@ static HRESULT WINAPI HTMLSelectionObject_get_type(IHTMLSelectionObject *iface,
return
S_OK
;
}
#undef HTMLSELOBJ_THIS
static
const
IHTMLSelectionObjectVtbl
HTMLSelectionObjectVtbl
=
{
HTMLSelectionObject_QueryInterface
,
HTMLSelectionObject_AddRef
,
...
...
@@ -243,14 +242,14 @@ HRESULT HTMLSelectionObject_Create(HTMLDocumentNode *doc, nsISelection *nsselect
if
(
!
selection
)
return
E_OUTOFMEMORY
;
selection
->
lpHTMLSelectionObject
Vtbl
=
&
HTMLSelectionObjectVtbl
;
selection
->
IHTMLSelectionObject_iface
.
lp
Vtbl
=
&
HTMLSelectionObjectVtbl
;
selection
->
ref
=
1
;
selection
->
nsselection
=
nsselection
;
/* We shouldn't call AddRef here */
selection
->
doc
=
doc
;
list_add_head
(
&
doc
->
selection_list
,
&
selection
->
entry
);
*
ret
=
HTMLSELOBJ
(
selection
)
;
*
ret
=
&
selection
->
IHTMLSelectionObject_iface
;
return
S_OK
;
}
...
...
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