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
b1fca21f
Commit
b1fca21f
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 IHTMLOptionElement::get_value implementation.
parent
b14ba8aa
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
2 deletions
+51
-2
htmloption.c
dlls/mshtml/htmloption.c
+29
-2
nsiface.idl
dlls/mshtml/nsiface.idl
+22
-0
No files found.
dlls/mshtml/htmloption.c
View file @
b1fca21f
...
...
@@ -39,6 +39,8 @@ typedef struct {
HTMLElement
element
;
const
IHTMLOptionElementVtbl
*
lpHTMLOptionElementVtbl
;
nsIDOMHTMLOptionElement
*
nsoption
;
}
HTMLOptionElement
;
#define HTMLOPTION(x) ((IHTMLOptionElement*) &(x)->lpHTMLOptionElementVtbl)
...
...
@@ -126,8 +128,24 @@ static HRESULT WINAPI HTMLOptionElement_put_value(IHTMLOptionElement *iface, BST
static
HRESULT
WINAPI
HTMLOptionElement_get_value
(
IHTMLOptionElement
*
iface
,
BSTR
*
p
)
{
HTMLOptionElement
*
This
=
HTMLOPTION_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsAString
value_str
;
const
PRUnichar
*
value
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsAString_Init
(
&
value_str
,
NULL
);
nsres
=
nsIDOMHTMLOptionElement_GetValue
(
This
->
nsoption
,
&
value_str
);
if
(
NS_SUCCEEDED
(
nsres
))
{
nsAString_GetData
(
&
value_str
,
&
value
,
NULL
);
*
p
=
SysAllocString
(
value
);
}
else
{
ERR
(
"GetValue failed: %08x
\n
"
,
nsres
);
*
p
=
NULL
;
}
nsAString_Finish
(
&
value_str
);
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLOptionElement_put_defaultSelected
(
IHTMLOptionElement
*
iface
,
VARIANT_BOOL
v
)
...
...
@@ -232,6 +250,10 @@ static HRESULT HTMLOptionElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static
void
HTMLOptionElement_destructor
(
HTMLDOMNode
*
iface
)
{
HTMLOptionElement
*
This
=
HTMLOPTION_NODE_THIS
(
iface
);
if
(
This
->
nsoption
)
nsIDOMHTMLOptionElement_Release
(
This
->
nsoption
);
HTMLElement_destructor
(
&
This
->
element
.
node
);
}
...
...
@@ -245,10 +267,15 @@ static const NodeImplVtbl HTMLOptionElementImplVtbl = {
HTMLElement
*
HTMLOptionElement_Create
(
nsIDOMHTMLElement
*
nselem
)
{
HTMLOptionElement
*
ret
=
mshtml_alloc
(
sizeof
(
HTMLOptionElement
));
nsresult
nsres
;
ret
->
lpHTMLOptionElementVtbl
=
&
HTMLOptionElementVtbl
;
ret
->
element
.
node
.
vtbl
=
&
HTMLOptionElementImplVtbl
;
nsres
=
nsIDOMHTMLElement_QueryInterface
(
nselem
,
&
IID_nsIDOMHTMLOptionElement
,
(
void
**
)
&
ret
->
nsoption
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"Could not get nsIDOMHTMLOptionElement interface: %08x
\n
"
,
nsres
);
return
&
ret
->
element
;
}
...
...
dlls/mshtml/nsiface.idl
View file @
b1fca21f
...
...
@@ -1078,6 +1078,28 @@ interface nsIDOMHTMLInputElement : nsIDOMHTMLElement
[
object,
uuid(a6cf9092-15b3-11d2-932e-00805f8add32)
/* FROZEN */
]
interface nsIDOMHTMLOptionElement : nsIDOMHTMLElement
{
nsresult GetForm(nsIDOMHTMLFormElement **aForm);
nsresult GetDefaultSelected(PRBool *aDefaultSelected);
nsresult SetDefaultSelected(PRBool aDefaultSelected);
nsresult GetText(nsAString *aText);
nsresult GetIndex(PRInt32 *aIndex);
nsresult GetDisabled(PRBool *aDisabled);
nsresult SetDisabled(PRBool aDisabled);
nsresult GetLabel(nsAString *aLabel);
nsresult SetLabel(const nsAString *aLabel);
nsresult GetSelected(PRBool *aSelected);
nsresult SetSelected(PRBool aSelected);
nsresult GetValue(nsAString *aValue);
nsresult SetValue(const nsAString *aValue);
}
[
object,
uuid(a6cf9090-15b3-11d2-932e-00805f8add32)
/* FROZEN */
]
...
...
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