- Sync objsel, ntprint, netapi32, mshtml with Wine head

svn path=/trunk/; revision=39765
This commit is contained in:
Dmitry Chapyshev 2009-02-26 10:32:48 +00:00
parent fac8159392
commit 8dd9b00120
27 changed files with 177 additions and 128 deletions

View file

@ -0,0 +1,59 @@
/*
* Copyright 2009 Aurimas Fišeras <aurimas@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/* UTF-8 */
#pragma code_page(65001)
LANGUAGE LANG_LITHUANIAN, SUBLANG_NEUTRAL
STRINGTABLE DISCARDABLE
{
IDS_HTMLDISABLED "HTML atvaizdavimas yra išjungtas."
IDS_HTMLDOCUMENT "HTML dokumentas"
IDS_DOWNLOADING "Atsiunčiama..."
IDS_INSTALLING "Įdiegiama..."
}
ID_DWL_DIALOG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 260, 85
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Wine Gecko diegimo programa"
FONT 8, "MS Shell Dlg"
{
LTEXT "Ši programa mėgina parodyti HTML puslapį. Šiam puslapiui parodyti reikia, kad būtų " \
"įdiegtas Gecko (Mozilla HTML variklis). Spauskite įdiegti, jei norite, kad Wine " \
"automatiškai atsiųstų ir įdiegtų Gecko.", ID_DWL_STATUS, 10, 10, 240, 30, SS_LEFT
CONTROL "Eiga", ID_DWL_PROGRESS, PROGRESS_CLASSA, WS_BORDER|PBS_SMOOTH, 10, 40, 240, 12
DEFPUSHBUTTON "&Įdiegti", ID_DWL_INSTALL, 200, 60, 50, 15, WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Atsisakyti", IDCANCEL, 140, 60, 50, 15, WS_GROUP | WS_TABSTOP
}
IDD_HYPERLINK DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 250, 65
STYLE DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Saitas"
FONT 8, "MS Shell Dlg"
{
GROUPBOX "Saito informacija", -1, 5, 5, 190, 55
LTEXT "&Tipas:", -1, 10, 22, 20, 10
COMBOBOX IDC_TYPE, 35, 20, 45, 100, WS_TABSTOP | WS_GROUP | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_HASSTRINGS
LTEXT "&URL:", -1, 10, 42, 20, 10
EDITTEXT IDC_URL, 35, 40, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
PUSHBUTTON "Gerai", IDOK, 200, 10, 45, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "Atsisakyti", IDCANCEL, 200, 28, 45, 14, WS_GROUP | WS_TABSTOP
}
#pragma code_page(default)

View file

@ -38,7 +38,7 @@ typedef struct {
const IHTMLAnchorElementVtbl *lpHTMLAnchorElementVtbl;
} HTMLAnchorElement;
#define HTMLANCHOR(x) ((IHTMLAnchorElement*) &(x)->lpHTMLAnchorElementVtbl)
#define HTMLANCHOR(x) (&(x)->lpHTMLAnchorElementVtbl)
#define HTMLANCHOR_THIS(iface) DEFINE_THIS(HTMLAnchorElement, HTMLAnchorElement, iface)

View file

@ -42,7 +42,7 @@ typedef struct {
nsIDOMHTMLBodyElement *nsbody;
} HTMLBodyElement;
#define HTMLBODY(x) ((IHTMLBodyElement*) &(x)->lpHTMLBodyElementVtbl)
#define HTMLBODY(x) (&(x)->lpHTMLBodyElementVtbl)
static BOOL variant_to_nscolor(const VARIANT *v, nsAString *nsstr)
{

View file

@ -37,7 +37,7 @@ struct HTMLCommentElement {
const IHTMLCommentElementVtbl *lpIHTMLCommentElementVtbl;
};
#define HTMLCOMMENT(x) ((IHTMLCommentElement*) &(x)->lpIHTMLCommentElementVtbl)
#define HTMLCOMMENT(x) (&(x)->lpIHTMLCommentElementVtbl)
#define HTMLCOMMENT_THIS(iface) DEFINE_THIS(HTMLCommentElement, IHTMLCommentElement, iface)

View file

@ -128,8 +128,10 @@ static HRESULT WINAPI HTMLCurrentStyle_Invoke(IHTMLCurrentStyle *iface, DISPID d
static HRESULT WINAPI HTMLCurrentStyle_get_position(IHTMLCurrentStyle *iface, BSTR *p)
{
HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_POSITION, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_styleFloat(IHTMLCurrentStyle *iface, BSTR *p)
@ -156,43 +158,45 @@ static HRESULT WINAPI HTMLCurrentStyle_get_backgroundColor(IHTMLCurrentStyle *if
static HRESULT WINAPI HTMLCurrentStyle_get_fontFamily(IHTMLCurrentStyle *iface, BSTR *p)
{
HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_FONT_FAMILY, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_fontStyle(IHTMLCurrentStyle *iface, BSTR *p)
{
HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_FONT_STYLE, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_fontVariant(IHTMLCurrentStyle *iface, BSTR *p)
{
HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_FONT_VARIANT, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_fontWeight(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_FONT_WEIGHT, p, ATTR_STR_TO_INT);
}
static HRESULT WINAPI HTMLCurrentStyle_get_fontSize(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_FONT_SIZE, p, 0);
}
static HRESULT WINAPI HTMLCurrentStyle_get_backgroundImage(IHTMLCurrentStyle *iface, BSTR *p)
{
HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_BACKGROUND_IMAGE, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_backgroundPositionX(IHTMLCurrentStyle *iface, VARIANT *p)
@ -247,29 +251,29 @@ static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomColor(IHTMLCurrentStyle *
static HRESULT WINAPI HTMLCurrentStyle_get_borderTopStyle(IHTMLCurrentStyle *iface, BSTR *p)
{
HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_TOP_STYLE, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_borderRightStyle(IHTMLCurrentStyle *iface, BSTR *p)
{
HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_RIGHT_STYLE, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomStyle(IHTMLCurrentStyle *iface, BSTR *p)
{
HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_BOTTOM_STYLE, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftStyle(IHTMLCurrentStyle *iface, BSTR *p)
{
HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_LEFT_STYLE, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_borderTopWidth(IHTMLCurrentStyle *iface, VARIANT *p)
@ -303,36 +307,36 @@ static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftWidth(IHTMLCurrentStyle *if
static HRESULT WINAPI HTMLCurrentStyle_get_left(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_LEFT, p, 0);
}
static HRESULT WINAPI HTMLCurrentStyle_get_top(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_TOP, p, 0);
}
static HRESULT WINAPI HTMLCurrentStyle_get_width(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_WIDTH, p, 0);
}
static HRESULT WINAPI HTMLCurrentStyle_get_height(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_HEIGHT, p, 0);
}
static HRESULT WINAPI HTMLCurrentStyle_get_paddingLeft(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_PADDING_LEFT, p, 0);
}
static HRESULT WINAPI HTMLCurrentStyle_get_paddingTop(IHTMLCurrentStyle *iface, VARIANT *p)
@ -359,15 +363,15 @@ static HRESULT WINAPI HTMLCurrentStyle_get_paddingBottom(IHTMLCurrentStyle *ifac
static HRESULT WINAPI HTMLCurrentStyle_get_textAlign(IHTMLCurrentStyle *iface, BSTR *p)
{
HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_TEXT_ALIGN, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_textDecoration(IHTMLCurrentStyle *iface, BSTR *p)
{
HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_TEXT_DECORATION, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_display(IHTMLCurrentStyle *iface, BSTR *p)
@ -389,8 +393,8 @@ static HRESULT WINAPI HTMLCurrentStyle_get_visibility(IHTMLCurrentStyle *iface,
static HRESULT WINAPI HTMLCurrentStyle_get_zIndex(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_Z_INDEX, p, ATTR_STR_TO_INT);
}
static HRESULT WINAPI HTMLCurrentStyle_get_letterSpacing(IHTMLCurrentStyle *iface, VARIANT *p)
@ -417,8 +421,8 @@ static HRESULT WINAPI HTMLCurrentStyle_get_textIndent(IHTMLCurrentStyle *iface,
static HRESULT WINAPI HTMLCurrentStyle_get_verticalAlign(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_VERTICAL_ALIGN, p, 0);
}
static HRESULT WINAPI HTMLCurrentStyle_get_backgroundAttachment(IHTMLCurrentStyle *iface, BSTR *p)
@ -438,8 +442,8 @@ static HRESULT WINAPI HTMLCurrentStyle_get_marginTop(IHTMLCurrentStyle *iface, V
static HRESULT WINAPI HTMLCurrentStyle_get_marginRight(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_RIGHT, p, 0);
}
static HRESULT WINAPI HTMLCurrentStyle_get_marginBottom(IHTMLCurrentStyle *iface, VARIANT *p)
@ -536,8 +540,8 @@ static HRESULT WINAPI HTMLCurrentStyle_get_pageBreakAfter(IHTMLCurrentStyle *ifa
static HRESULT WINAPI HTMLCurrentStyle_get_cursor(IHTMLCurrentStyle *iface, BSTR *p)
{
HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_CURSOR, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_tableLayout(IHTMLCurrentStyle *iface, BSTR *p)

View file

@ -38,7 +38,7 @@ typedef struct {
const IHTMLGenericElementVtbl *lpHTMLGenericElementVtbl;
} HTMLGenericElement;
#define HTMLGENERIC(x) ((IHTMLGenericElement*) &(x)->lpHTMLGenericElementVtbl)
#define HTMLGENERIC(x) (&(x)->lpHTMLGenericElementVtbl)
#define HTMLGENERIC_THIS(iface) DEFINE_THIS(HTMLGenericElement, HTMLGenericElement, iface)

View file

@ -41,7 +41,7 @@ typedef struct {
HTMLDocument *content_doc;
} HTMLIFrame;
#define HTMLFRAMEBASE2(x) ((IHTMLFrameBase2*) &(x)->lpIHTMLFrameBase2Vtbl)
#define HTMLFRAMEBASE2(x) (&(x)->lpIHTMLFrameBase2Vtbl)
#define HTMLFRAMEBASE2_THIS(iface) DEFINE_THIS(HTMLIFrame, IHTMLFrameBase2, iface)

View file

@ -39,7 +39,7 @@ typedef struct {
nsIDOMHTMLImageElement *nsimg;
} HTMLImgElement;
#define HTMLIMG(x) ((IHTMLImgElement*) &(x)->lpHTMLImgElementVtbl)
#define HTMLIMG(x) (&(x)->lpHTMLImgElementVtbl)
#define HTMLIMG_THIS(iface) DEFINE_THIS(HTMLImgElement, HTMLImgElement, iface)

View file

@ -41,7 +41,7 @@ typedef struct {
} HTMLInputElement;
#define HTMLINPUT(x) ((IHTMLInputElement*) &(x)->lpHTMLInputElementVtbl)
#define HTMLINPUTTEXT(x) ((IHTMLInputTextElement*) &(x)->lpHTMLInputTextElementVtbl)
#define HTMLINPUTTEXT(x) (&(x)->lpHTMLInputTextElementVtbl)
#define HTMLINPUT_THIS(iface) DEFINE_THIS(HTMLInputElement, HTMLInputElement, iface)

View file

@ -39,7 +39,7 @@ typedef struct {
nsIDOMHTMLOptionElement *nsoption;
} HTMLOptionElement;
#define HTMLOPTION(x) ((IHTMLOptionElement*) &(x)->lpHTMLOptionElementVtbl)
#define HTMLOPTION(x) (&(x)->lpHTMLOptionElementVtbl)
#define HTMLOPTION_THIS(iface) DEFINE_THIS(HTMLOptionElement, HTMLOptionElement, iface)

View file

@ -39,7 +39,7 @@ typedef struct {
nsIDOMHTMLScriptElement *nsscript;
} HTMLScriptElement;
#define HTMLSCRIPT(x) ((IHTMLScriptElement*) &(x)->lpHTMLScriptElementVtbl)
#define HTMLSCRIPT(x) (&(x)->lpHTMLScriptElementVtbl)
#define HTMLSCRIPT_THIS(iface) DEFINE_THIS(HTMLScriptElement, HTMLScriptElement, iface)

View file

@ -83,6 +83,8 @@ static const WCHAR attrMarginLeft[] =
{'m','a','r','g','i','n','-','l','e','f','t',0};
static const WCHAR attrMarginRight[] =
{'m','a','r','g','i','n','-','r','i','g','h','t',0};
static const WCHAR attrMinHeight[] =
{'m','i','n','-','h','e','i','g','h','t',0};
static const WCHAR attrOverflow[] =
{'o','v','e','r','f','l','o','w',0};
static const WCHAR attrPaddingLeft[] =
@ -132,6 +134,7 @@ static const struct{
{attrMargin, DISPID_IHTMLSTYLE_MARGIN},
{attrMarginLeft, DISPID_IHTMLSTYLE_MARGINLEFT},
{attrMarginRight, DISPID_IHTMLSTYLE_MARGINRIGHT},
{attrMinHeight, DISPID_IHTMLSTYLE4_MINHEIGHT},
{attrOverflow, DISPID_IHTMLSTYLE_OVERFLOW},
{attrPaddingLeft, DISPID_IHTMLSTYLE_PADDINGLEFT},
{attrPosition, DISPID_IHTMLSTYLE2_POSITION},
@ -209,10 +212,6 @@ static LPWSTR fix_url_value(LPCWSTR val)
return ret;
}
#define ATTR_FIX_PX 1
#define ATTR_FIX_URL 2
#define ATTR_STR_TO_INT 4
HRESULT set_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, LPCWSTR value, DWORD flags)
{
nsAString str_name, str_value, str_empty;
@ -242,7 +241,7 @@ HRESULT set_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, LPCW
return S_OK;
}
static HRESULT set_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, VARIANT *value, DWORD flags)
HRESULT set_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, VARIANT *value, DWORD flags)
{
switch(V_VT(value)) {
case VT_NULL:
@ -251,6 +250,13 @@ static HRESULT set_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_
case VT_BSTR:
return set_nsstyle_attr(nsstyle, sid, V_BSTR(value), flags);
case VT_I4: {
WCHAR str[14];
static const WCHAR format[] = {'%','d',0};
wsprintfW(str, format, V_I4(value));
return set_nsstyle_attr(nsstyle, sid, str, flags);
}
default:
FIXME("not implemented vt %d\n", V_VT(value));
return E_NOTIMPL;
@ -301,7 +307,7 @@ HRESULT get_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, BSTR
return S_OK;
}
static HRESULT get_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, VARIANT *p, DWORD flags)
HRESULT get_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, VARIANT *p, DWORD flags)
{
nsAString str_value;
const PRUnichar *value;
@ -1121,8 +1127,8 @@ static HRESULT WINAPI HTMLStyle_put_marginRight(IHTMLStyle *iface, VARIANT v)
static HRESULT WINAPI HTMLStyle_get_marginRight(IHTMLStyle *iface, VARIANT *p)
{
HTMLStyle *This = HTMLSTYLE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_RIGHT, p, 0);
}
static HRESULT WINAPI HTMLStyle_put_marginBottom(IHTMLStyle *iface, VARIANT v)
@ -1186,8 +1192,8 @@ static HRESULT WINAPI HTMLStyle_get_margin(IHTMLStyle *iface, BSTR *p)
static HRESULT WINAPI HTMLStyle_get_marginLeft(IHTMLStyle *iface, VARIANT *p)
{
HTMLStyle *This = HTMLSTYLE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_LEFT, p, 0);
}
static HRESULT WINAPI HTMLStyle_put_paddingTop(IHTMLStyle *iface, VARIANT v)
@ -2163,7 +2169,7 @@ static HRESULT WINAPI HTMLStyle_setAttribute(IHTMLStyle *iface, BSTR strAttribut
if(lFlags == 1)
FIXME("Parameter lFlags ignored\n");
hres = HTMLStyle_GetIDsOfNames(iface, &IID_NULL, (LPOLESTR*)&strAttributeName, 1,
hres = HTMLStyle_GetIDsOfNames(iface, &IID_NULL, &strAttributeName, 1,
LOCALE_USER_DEFAULT, &dispid);
if(hres == S_OK)
{
@ -2205,7 +2211,7 @@ static HRESULT WINAPI HTMLStyle_getAttribute(IHTMLStyle *iface, BSTR strAttribut
if(lFlags == 1)
FIXME("Parameter lFlags ignored\n");
hres = HTMLStyle_GetIDsOfNames(iface, &IID_NULL, (LPOLESTR*)&strAttributeName, 1,
hres = HTMLStyle_GetIDsOfNames(iface, &IID_NULL, &strAttributeName, 1,
LOCALE_USER_DEFAULT, &dispid);
if(hres == S_OK)
{

View file

@ -59,6 +59,7 @@ typedef enum {
STYLEID_MARGIN,
STYLEID_MARGIN_LEFT,
STYLEID_MARGIN_RIGHT,
STYLEID_MIN_HEIGHT,
STYLEID_OVERFLOW,
STYLEID_PADDING_LEFT,
STYLEID_POSITION,
@ -76,3 +77,10 @@ void HTMLStyle3_Init(HTMLStyle*);
HRESULT get_nsstyle_attr(nsIDOMCSSStyleDeclaration*,styleid_t,BSTR*);
HRESULT set_nsstyle_attr(nsIDOMCSSStyleDeclaration*,styleid_t,LPCWSTR,DWORD);
HRESULT set_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, VARIANT *value, DWORD flags);
HRESULT get_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, VARIANT *p, DWORD flags);
#define ATTR_FIX_PX 1
#define ATTR_FIX_URL 2
#define ATTR_STR_TO_INT 4

View file

@ -409,15 +409,19 @@ static HRESULT WINAPI HTMLStyle4_get_textOverflow(IHTMLStyle4 *iface, BSTR *p)
static HRESULT WINAPI HTMLStyle4_put_minHeight(IHTMLStyle4 *iface, VARIANT v)
{
HTMLStyle *This = HTMLSTYLE4_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
return set_nsstyle_attr_var(This->nsstyle, STYLEID_MIN_HEIGHT, &v, 0);
}
static HRESULT WINAPI HTMLStyle4_get_minHeight(IHTMLStyle4 *iface, VARIANT *p)
{
HTMLStyle *This = HTMLSTYLE4_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_MIN_HEIGHT, p, 0);
}
static const IHTMLStyle4Vtbl HTMLStyle4Vtbl = {

View file

@ -40,7 +40,7 @@ typedef struct {
nsIDOMHTMLTableElement *nstable;
} HTMLTable;
#define HTMLTABLE(x) ((IHTMLTable*) &(x)->lpHTMLTableVtbl)
#define HTMLTABLE(x) (&(x)->lpHTMLTableVtbl)
#define HTMLTABLE_THIS(iface) DEFINE_THIS(HTMLTable, HTMLTable, iface)

View file

@ -39,7 +39,7 @@ typedef struct {
nsIDOMHTMLTableRowElement *nsrow;
} HTMLTableRow;
#define HTMLTABLEROW(x) ((IHTMLTableRow*) &(x)->lpHTMLTableRowVtbl)
#define HTMLTABLEROW(x) (&(x)->lpHTMLTableRowVtbl)
#define HTMLTABLEROW_THIS(iface) DEFINE_THIS(HTMLTableRow, HTMLTableRow, iface)

View file

@ -37,7 +37,7 @@ struct HTMLDOMTextNode {
const IHTMLDOMTextNodeVtbl *lpIHTMLDOMTextNodeVtbl;
};
#define HTMLTEXT(x) ((IHTMLDOMTextNode*) &(x)->lpIHTMLDOMTextNodeVtbl)
#define HTMLTEXT(x) (&(x)->lpIHTMLDOMTextNodeVtbl)
#define HTMLTEXT_THIS(iface) DEFINE_THIS(HTMLDOMTextNode, IHTMLDOMTextNode, iface)

View file

@ -54,11 +54,6 @@ static const WCHAR mshtml_keyW[] =
'\\','W','i','n','e',
'\\','M','S','H','T','M','L',0};
static const CHAR mshtml_keyA[] =
{'S','o','f','t','w','a','r','e',
'\\','W','i','n','e',
'\\','M','S','H','T','M','L',0};
static HWND install_dialog = NULL;
static LPWSTR tmp_file_name = NULL;
static HANDLE tmp_file = INVALID_HANDLE_VALUE;
@ -224,18 +219,23 @@ static BOOL install_from_unix_file(const char *file_name)
static BOOL install_from_registered_dir(void)
{
char *file_name;
HKEY hkey;
DWORD res, type, size = MAX_PATH;
BOOL ret;
file_name = heap_alloc(size+sizeof(GECKO_FILE_NAME));
/* @@ Wine registry key: HKCU\Software\Wine\MSHTML */
res = RegGetValueA(HKEY_CURRENT_USER, mshtml_keyA, "GeckoCabDir", RRF_RT_ANY, &type, (PBYTE)file_name, &size);
res = RegOpenKeyW(HKEY_CURRENT_USER, mshtml_keyW, &hkey);
if(res != ERROR_SUCCESS)
return FALSE;
file_name = heap_alloc(size+sizeof(GECKO_FILE_NAME));
res = RegQueryValueExA(hkey, "GeckoCabDir", NULL, &type, (PBYTE)file_name, &size);
if(res == ERROR_MORE_DATA) {
file_name = heap_realloc(file_name, size+sizeof(GECKO_FILE_NAME));
res = RegGetValueA(HKEY_CURRENT_USER, mshtml_keyA, "GeckoCabDir", RRF_RT_ANY, &type, (PBYTE)file_name, &size);
res = RegQueryValueExA(hkey, "GeckoCabDir", NULL, &type, (PBYTE)file_name, &size);
}
if(res != ERROR_SUCCESS || (type != REG_SZ && type != REG_EXPAND_SZ)) {
RegCloseKey(hkey);
if(res != ERROR_SUCCESS || type != REG_SZ) {
heap_free(file_name);
return FALSE;
}

View file

@ -39,9 +39,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
* common ProtocolFactory implementation
*/
#define PROTOCOLINFO(x) ((IInternetProtocolInfo*) &(x)->lpInternetProtocolInfoVtbl)
#define CLASSFACTORY(x) ((IClassFactory*) &(x)->lpClassFactoryVtbl)
#define CLASSFACTORY(x) (&(x)->lpClassFactoryVtbl)
#define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpInternetProtocolVtbl)
#define PROTOCOLINFO(x) ((IInternetProtocolInfo*) &(x)->lpInternetProtocolInfoVtbl)
typedef struct {
const IInternetProtocolInfoVtbl *lpInternetProtocolInfoVtbl;

View file

@ -43,6 +43,7 @@
#include "Hu.rc"
#include "Ja.rc"
#include "Ko.rc"
#include "Lt.rc"
#include "Nl.rc"
#include "No.rc"
#include "Pl.rc"

View file

@ -63,9 +63,9 @@ typedef struct {
} ScriptHost;
#define ACTSCPSITE(x) ((IActiveScriptSite*) &(x)->lpIActiveScriptSiteVtbl)
#define ACTSCPPOLL(x) ((IActiveScriptSiteInterruptPoll*) &(x)->lpIActiveScriptSiteInterruptPollVtbl)
#define ACTSCPWIN(x) ((IActiveScriptSiteWindow*) &(x)->lpIActiveScriptSiteWindowVtbl)
#define ACTSCPDBG32(x) ((IActiveScriptSiteDebug32*) &(x)->lpIActiveScriptSiteDebug32Vtbl)
#define ACTSCPPOLL(x) (&(x)->lpIActiveScriptSiteInterruptPollVtbl)
#define ACTSCPWIN(x) (&(x)->lpIActiveScriptSiteWindowVtbl)
#define ACTSCPDBG32(x) (&(x)->lpIActiveScriptSiteDebug32Vtbl)
static BOOL init_script_engine(ScriptHost *script_host)
{

View file

@ -176,31 +176,6 @@ const NBNameCacheEntry *NBNameCacheFindEntry(struct NBNameCache *cache,
return ret;
}
BOOL NBNameCacheUpdateNBName(struct NBNameCache *cache,
const UCHAR name[NCBNAMSZ], const UCHAR nbname[NCBNAMSZ])
{
BOOL ret;
if (cache)
{
NBNameCacheNode **node;
EnterCriticalSection(&cache->cs);
node = NBNameCacheWalk(cache, (const char *)name);
if (node && *node && (*node)->entry)
{
memcpy((*node)->entry->nbname, nbname, NCBNAMSZ);
ret = TRUE;
}
else
ret = FALSE;
LeaveCriticalSection(&cache->cs);
}
else
ret = FALSE;
return ret;
}
void NBNameCacheDestroy(struct NBNameCache *cache)
{
if (cache)

View file

@ -68,15 +68,6 @@ BOOL NBNameCacheAddEntry(struct NBNameCache *cache, NBNameCacheEntry *entry);
const NBNameCacheEntry *NBNameCacheFindEntry(struct NBNameCache *cache,
const UCHAR name[NCBNAMSZ]);
/* If the entry with name name is in the cache, updates its nbname member to
* nbname. The entry's expire time is implicitly updated to entryExpireTimeMS
* + the current time in MS, since getting the NetBIOS name meant validating
* the name and address anyway.
* Returns TRUE on success or FALSE on failure.
*/
BOOL NBNameCacheUpdateNBName(struct NBNameCache *cache,
const UCHAR name[NCBNAMSZ], const UCHAR nbname[NCBNAMSZ]);
void NBNameCacheDestroy(struct NBNameCache *cache);
#endif /* ndef __WINE_NBNAMECACHE_H */

View file

@ -102,7 +102,7 @@ HANDLE WINAPI PSetupCreateMonitorInfo(LPVOID unknown1, LPVOID unknown2,LPVOID u
}
TRACE("=> %p (%u monitors installed)\n", mi, mi->installed);
return (HANDLE) mi;
return mi;
}
/*****************************************************
@ -112,7 +112,7 @@ HANDLE WINAPI PSetupCreateMonitorInfo(LPVOID unknown1, LPVOID unknown2,LPVOID u
VOID WINAPI PSetupDestroyMonitorInfo(HANDLE monitorinfo)
{
monitorinfo_t * mi = (monitorinfo_t *) monitorinfo;
monitorinfo_t * mi = monitorinfo;
TRACE("(%p)\n", mi);
if (mi) {
@ -144,7 +144,7 @@ VOID WINAPI PSetupDestroyMonitorInfo(HANDLE monitorinfo)
BOOL WINAPI PSetupEnumMonitor(HANDLE monitorinfo, DWORD index, LPWSTR buffer, LPDWORD psize)
{
monitorinfo_t * mi = (monitorinfo_t *) monitorinfo;
monitorinfo_t * mi = monitorinfo;
LPWSTR nameW;
DWORD len;

View file

@ -41,7 +41,7 @@ static HRESULT WINAPI OBJSEL_IClassFactory_QueryInterface(
if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IClassFactory))
{
*ppvObj = (LPVOID)iface;
*ppvObj = iface;
IClassFactory_AddRef(iface);
return S_OK;
}

View file

@ -72,7 +72,7 @@ HRESULT WINAPI DllCanUnloadNow(void)
/**********************************************************************
* OBJSEL_IDsObjectPicker_Destroy (also IUnknown)
*/
static VOID WINAPI OBJSEL_IDsObjectPicker_Destroy(IDsObjectPickerImpl *This)
static VOID OBJSEL_IDsObjectPicker_Destroy(IDsObjectPickerImpl *This)
{
HeapFree(GetProcessHeap(),
0,
@ -142,7 +142,7 @@ static HRESULT WINAPI OBJSEL_IDsObjectPicker_QueryInterface(
if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IDsObjectPicker))
{
*ppvObj = (LPVOID)iface;
*ppvObj = iface;
OBJSEL_IDsObjectPicker_AddRef(iface);
return S_OK;
}

View file

@ -34,6 +34,7 @@
#include "objsel.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "initguid.h"
@ -168,7 +169,7 @@ static HRESULT register_interfaces(struct regsvr_interface const *list) {
KEY_READ | KEY_WRITE, NULL, &key, NULL);
if (res != ERROR_SUCCESS) goto error_close_iid_key;
wsprintfW(buf, fmt, list->num_methods);
sprintfW(buf, fmt, list->num_methods);
res = RegSetValueExW(key, NULL, 0, REG_SZ,
(CONST BYTE*)buf,
(lstrlenW(buf) + 1) * sizeof(WCHAR));