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
954d4477
Commit
954d4477
authored
Oct 13, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 15, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLWindow2::get_option implementation.
parent
697d6530
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
151 additions
and
3 deletions
+151
-3
htmldoc.c
dlls/mshtml/htmldoc.c
+7
-1
htmloption.c
dlls/mshtml/htmloption.c
+121
-0
htmlwindow.c
dlls/mshtml/htmlwindow.c
+10
-2
mshtml_private.h
dlls/mshtml/mshtml_private.h
+13
-0
No files found.
dlls/mshtml/htmldoc.c
View file @
954d4477
...
...
@@ -174,6 +174,11 @@ static ULONG WINAPI HTMLDocument_Release(IHTMLDocument2 *iface)
if
(
This
->
hwnd
)
DestroyWindow
(
This
->
hwnd
);
if
(
This
->
option_factory
)
{
This
->
option_factory
->
doc
=
NULL
;
IHTMLOptionElementFactory_Release
(
HTMLOPTFACTORY
(
This
->
option_factory
));
}
if
(
This
->
window
)
IHTMLWindow2_Release
(
HTMLWINDOW2
(
This
->
window
));
...
...
@@ -736,7 +741,7 @@ static HRESULT WINAPI HTMLDocument_execCommandShowHelp(IHTMLDocument2 *iface, BS
}
static
HRESULT
WINAPI
HTMLDocument_createElement
(
IHTMLDocument2
*
iface
,
BSTR
eTag
,
IHTMLElement
**
newElem
)
IHTMLElement
**
newElem
)
{
FIXME
(
"(%p)->(%s %p)
\n
"
,
iface
,
debugstr_w
(
eTag
),
newElem
);
return
E_NOTIMPL
;
...
...
@@ -1175,6 +1180,7 @@ HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject)
ret
->
nodes
=
NULL
;
ret
->
readystate
=
READYSTATE_UNINITIALIZED
;
ret
->
window
=
NULL
;
ret
->
option_factory
=
NULL
;
list_init
(
&
ret
->
selection_list
);
list_init
(
&
ret
->
range_list
);
...
...
dlls/mshtml/htmloption.c
View file @
954d4477
...
...
@@ -251,3 +251,124 @@ HTMLElement *HTMLOptionElement_Create(nsIDOMHTMLElement *nselem)
return
&
ret
->
element
;
}
#define HTMLOPTFACTORY_THIS(iface) DEFINE_THIS(HTMLOptionElementFactory, HTMLOptionElementFactory, iface)
static
HRESULT
WINAPI
HTMLOptionElementFactory_QueryInterface
(
IHTMLOptionElementFactory
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
HTMLOptionElementFactory
*
This
=
HTMLOPTFACTORY_THIS
(
iface
);
*
ppv
=
NULL
;
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
{
TRACE
(
"(%p)->(IID_IUnknown %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLOPTFACTORY
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IDispatch
,
riid
))
{
TRACE
(
"(%p)->(IID_IDispatch %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLOPTFACTORY
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLOptionElementFactory
,
riid
))
{
TRACE
(
"(%p)->(IID_IHTMLOptionElementFactory %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLOPTFACTORY
(
This
);
}
if
(
*
ppv
)
{
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
}
WARN
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
HTMLOptionElementFactory_AddRef
(
IHTMLOptionElementFactory
*
iface
)
{
HTMLOptionElementFactory
*
This
=
HTMLOPTFACTORY_THIS
(
iface
);
LONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
HTMLOptionElementFactory_Release
(
IHTMLOptionElementFactory
*
iface
)
{
HTMLOptionElementFactory
*
This
=
HTMLOPTFACTORY_THIS
(
iface
);
LONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
)
mshtml_free
(
This
);
return
ref
;
}
static
HRESULT
WINAPI
HTMLOptionElementFactory_GetTypeInfoCount
(
IHTMLOptionElementFactory
*
iface
,
UINT
*
pctinfo
)
{
HTMLOptionElementFactory
*
This
=
HTMLOPTFACTORY_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
pctinfo
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
HTMLOptionElementFactory_GetTypeInfo
(
IHTMLOptionElementFactory
*
iface
,
UINT
iTInfo
,
LCID
lcid
,
ITypeInfo
**
ppTInfo
)
{
HTMLOptionElementFactory
*
This
=
HTMLOPTFACTORY_THIS
(
iface
);
FIXME
(
"(%p)->(%u %u %p)
\n
"
,
This
,
iTInfo
,
lcid
,
ppTInfo
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
HTMLOptionElementFactory_GetIDsOfNames
(
IHTMLOptionElementFactory
*
iface
,
REFIID
riid
,
LPOLESTR
*
rgszNames
,
UINT
cNames
,
LCID
lcid
,
DISPID
*
rgDispId
)
{
HTMLOptionElementFactory
*
This
=
HTMLOPTFACTORY_THIS
(
iface
);
FIXME
(
"(%p)->(%s %p %u %u %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
rgszNames
,
cNames
,
lcid
,
rgDispId
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
HTMLOptionElementFactory_Invoke
(
IHTMLOptionElementFactory
*
iface
,
DISPID
dispIdMember
,
REFIID
riid
,
LCID
lcid
,
WORD
wFlags
,
DISPPARAMS
*
pDispParams
,
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
{
HTMLOptionElementFactory
*
This
=
HTMLOPTFACTORY_THIS
(
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
;
}
static
HRESULT
WINAPI
HTMLOptionElementFactory_create
(
IHTMLOptionElementFactory
*
iface
,
VARIANT
text
,
VARIANT
value
,
VARIANT
defaultselected
,
VARIANT
selected
,
IHTMLOptionElement
**
optelem
)
{
HTMLOptionElementFactory
*
This
=
HTMLOPTFACTORY_THIS
(
iface
);
FIXME
(
"(%p)->(v v v v %p)
\n
"
,
This
,
optelem
);
return
E_NOTIMPL
;
}
#undef HTMLOPTFACTORY_THIS
static
const
IHTMLOptionElementFactoryVtbl
HTMLOptionElementFactoryVtbl
=
{
HTMLOptionElementFactory_QueryInterface
,
HTMLOptionElementFactory_AddRef
,
HTMLOptionElementFactory_Release
,
HTMLOptionElementFactory_GetTypeInfoCount
,
HTMLOptionElementFactory_GetTypeInfo
,
HTMLOptionElementFactory_GetIDsOfNames
,
HTMLOptionElementFactory_Invoke
,
HTMLOptionElementFactory_create
};
HTMLOptionElementFactory
*
HTMLOptionElementFactory_Create
(
HTMLDocument
*
doc
)
{
HTMLOptionElementFactory
*
ret
;
ret
=
mshtml_alloc
(
sizeof
(
HTMLOptionElementFactory
));
ret
->
lpHTMLOptionElementFactoryVtbl
=
&
HTMLOptionElementFactoryVtbl
;
ret
->
ref
=
1
;
ret
->
doc
=
doc
;
return
ret
;
}
dlls/mshtml/htmlwindow.c
View file @
954d4477
...
...
@@ -534,8 +534,16 @@ static HRESULT WINAPI HTMLWindow2_get_screen(IHTMLWindow2 *iface, IHTMLScreen **
static
HRESULT
WINAPI
HTMLWindow2_get_Option
(
IHTMLWindow2
*
iface
,
IHTMLOptionElementFactory
**
p
)
{
HTMLWindow
*
This
=
HTMLWINDOW2_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
if
(
!
This
->
doc
->
option_factory
)
This
->
doc
->
option_factory
=
HTMLOptionElementFactory_Create
(
This
->
doc
);
*
p
=
HTMLOPTFACTORY
(
This
->
doc
->
option_factory
);
IHTMLOptionElementFactory_AddRef
(
*
p
);
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLWindow2_focus
(
IHTMLWindow2
*
iface
)
...
...
dlls/mshtml/mshtml_private.h
View file @
954d4477
...
...
@@ -94,6 +94,14 @@ struct ConnectionPoint {
ConnectionPoint
*
next
;
};
typedef
struct
{
const
IHTMLOptionElementFactoryVtbl
*
lpHTMLOptionElementFactoryVtbl
;
LONG
ref
;
HTMLDocument
*
doc
;
}
HTMLOptionElementFactory
;
struct
HTMLDocument
{
const
IHTMLDocument2Vtbl
*
lpHTMLDocument2Vtbl
;
const
IHTMLDocument3Vtbl
*
lpHTMLDocument3Vtbl
;
...
...
@@ -152,6 +160,8 @@ struct HTMLDocument {
ConnectionPoint
cp_htmldocevents2
;
ConnectionPoint
cp_propnotif
;
HTMLOptionElementFactory
*
option_factory
;
struct
list
selection_list
;
struct
list
range_list
;
...
...
@@ -330,6 +340,8 @@ typedef struct {
#define HTMLTEXTCONT(x) ((IHTMLTextContainer*) &(x)->lpHTMLTextContainerVtbl)
#define HTMLOPTFACTORY(x) ((IHTMLOptionElementFactory*) &(x)->lpHTMLOptionElementFactoryVtbl)
#define DEFINE_THIS2(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,ifc)))
#define DEFINE_THIS(cls,ifc,iface) DEFINE_THIS2(cls,lp ## ifc ## Vtbl,iface)
...
...
@@ -338,6 +350,7 @@ HRESULT HTMLLoadOptions_Create(IUnknown*,REFIID,void**);
HTMLWindow
*
HTMLWindow_Create
(
HTMLDocument
*
);
HTMLWindow
*
nswindow_to_window
(
const
nsIDOMWindow
*
);
HTMLOptionElementFactory
*
HTMLOptionElementFactory_Create
(
HTMLDocument
*
);
void
setup_nswindow
(
HTMLWindow
*
);
void
HTMLDocument_HTMLDocument3_Init
(
HTMLDocument
*
);
...
...
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