2008-10-06 14:47:58 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2008 Jacek Caban for CodeWeavers
|
|
|
|
*
|
|
|
|
* 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
|
|
|
|
*/
|
|
|
|
|
2008-12-30 20:23:56 +00:00
|
|
|
struct HTMLStyle {
|
2008-10-06 14:47:58 +00:00
|
|
|
DispatchEx dispex;
|
|
|
|
const IHTMLStyleVtbl *lpHTMLStyleVtbl;
|
|
|
|
const IHTMLStyle2Vtbl *lpHTMLStyle2Vtbl;
|
2009-02-03 08:21:32 +00:00
|
|
|
const IHTMLStyle3Vtbl *lpHTMLStyle3Vtbl;
|
2009-02-03 08:42:25 +00:00
|
|
|
const IHTMLStyle4Vtbl *lpHTMLStyle4Vtbl;
|
2008-10-06 14:47:58 +00:00
|
|
|
|
|
|
|
LONG ref;
|
|
|
|
|
|
|
|
nsIDOMCSSStyleDeclaration *nsstyle;
|
2008-12-30 20:23:56 +00:00
|
|
|
};
|
2008-10-06 14:47:58 +00:00
|
|
|
|
|
|
|
#define HTMLSTYLE(x) ((IHTMLStyle*) &(x)->lpHTMLStyleVtbl)
|
|
|
|
#define HTMLSTYLE2(x) ((IHTMLStyle2*) &(x)->lpHTMLStyle2Vtbl)
|
2009-02-03 08:21:32 +00:00
|
|
|
#define HTMLSTYLE3(x) ((IHTMLStyle3*) &(x)->lpHTMLStyle3Vtbl)
|
2009-02-03 08:42:25 +00:00
|
|
|
#define HTMLSTYLE4(x) ((IHTMLStyle4*) &(x)->lpHTMLStyle4Vtbl)
|
2008-10-06 14:47:58 +00:00
|
|
|
|
2008-10-07 19:45:21 +00:00
|
|
|
/* NOTE: Make sure to keep in sync with style_tbl in htmlstyle.c */
|
2008-10-06 14:48:25 +00:00
|
|
|
typedef enum {
|
|
|
|
STYLEID_BACKGROUND,
|
|
|
|
STYLEID_BACKGROUND_COLOR,
|
|
|
|
STYLEID_BACKGROUND_IMAGE,
|
2009-03-05 09:24:24 +00:00
|
|
|
STYLEID_BACKGROUND_POSITION_X,
|
2009-03-05 09:26:36 +00:00
|
|
|
STYLEID_BACKGROUND_POSITION_Y,
|
2009-02-25 04:50:33 +00:00
|
|
|
STYLEID_BACKGROUND_REPEAT,
|
2008-10-06 14:50:03 +00:00
|
|
|
STYLEID_BORDER,
|
2009-01-13 07:38:32 +00:00
|
|
|
STYLEID_BORDER_BOTTOM_STYLE,
|
2009-03-05 09:41:39 +00:00
|
|
|
STYLEID_BORDER_BOTTOM_WIDTH,
|
2009-03-03 10:04:49 +00:00
|
|
|
STYLEID_BORDER_COLOR,
|
2008-10-06 14:48:25 +00:00
|
|
|
STYLEID_BORDER_LEFT,
|
2009-01-13 07:30:17 +00:00
|
|
|
STYLEID_BORDER_LEFT_STYLE,
|
2009-01-13 07:39:23 +00:00
|
|
|
STYLEID_BORDER_RIGHT_STYLE,
|
2009-03-05 09:35:50 +00:00
|
|
|
STYLEID_BORDER_RIGHT_WIDTH,
|
2009-03-02 10:58:55 +00:00
|
|
|
STYLEID_BORDER_STYLE,
|
2009-01-13 07:40:01 +00:00
|
|
|
STYLEID_BORDER_TOP_STYLE,
|
2009-03-05 09:32:41 +00:00
|
|
|
STYLEID_BORDER_TOP_WIDTH,
|
2008-10-10 10:00:53 +00:00
|
|
|
STYLEID_BORDER_WIDTH,
|
2008-10-06 14:48:25 +00:00
|
|
|
STYLEID_COLOR,
|
2008-10-06 14:50:46 +00:00
|
|
|
STYLEID_CURSOR,
|
2008-10-06 14:48:25 +00:00
|
|
|
STYLEID_DISPLAY,
|
2008-10-07 19:45:46 +00:00
|
|
|
STYLEID_FILTER,
|
2008-10-06 14:48:25 +00:00
|
|
|
STYLEID_FONT_FAMILY,
|
|
|
|
STYLEID_FONT_SIZE,
|
|
|
|
STYLEID_FONT_STYLE,
|
2008-12-11 11:37:18 +00:00
|
|
|
STYLEID_FONT_VARIANT,
|
2008-10-06 14:48:25 +00:00
|
|
|
STYLEID_FONT_WEIGHT,
|
2008-10-06 14:51:34 +00:00
|
|
|
STYLEID_HEIGHT,
|
2008-10-06 14:50:28 +00:00
|
|
|
STYLEID_LEFT,
|
2008-10-06 14:48:25 +00:00
|
|
|
STYLEID_MARGIN,
|
|
|
|
STYLEID_MARGIN_LEFT,
|
|
|
|
STYLEID_MARGIN_RIGHT,
|
2009-02-17 09:29:58 +00:00
|
|
|
STYLEID_MIN_HEIGHT,
|
2008-11-25 10:04:11 +00:00
|
|
|
STYLEID_OVERFLOW,
|
2008-10-06 14:48:25 +00:00
|
|
|
STYLEID_PADDING_LEFT,
|
2008-10-06 14:52:06 +00:00
|
|
|
STYLEID_POSITION,
|
2008-10-07 19:45:31 +00:00
|
|
|
STYLEID_TEXT_ALIGN,
|
2008-10-06 14:48:25 +00:00
|
|
|
STYLEID_TEXT_DECORATION,
|
2008-10-06 14:51:04 +00:00
|
|
|
STYLEID_TOP,
|
2008-10-06 14:51:21 +00:00
|
|
|
STYLEID_VERTICAL_ALIGN,
|
2008-10-06 14:48:25 +00:00
|
|
|
STYLEID_VISIBILITY,
|
2008-10-07 19:45:05 +00:00
|
|
|
STYLEID_WIDTH,
|
2009-08-01 22:09:49 +00:00
|
|
|
STYLEID_WORD_WRAP,
|
2008-10-07 19:45:05 +00:00
|
|
|
STYLEID_Z_INDEX
|
2008-10-06 14:48:25 +00:00
|
|
|
} styleid_t;
|
|
|
|
|
2008-10-06 14:47:58 +00:00
|
|
|
void HTMLStyle2_Init(HTMLStyle*);
|
2009-02-03 08:21:32 +00:00
|
|
|
void HTMLStyle3_Init(HTMLStyle*);
|
2008-10-06 14:49:24 +00:00
|
|
|
|
|
|
|
HRESULT get_nsstyle_attr(nsIDOMCSSStyleDeclaration*,styleid_t,BSTR*);
|
2008-10-06 14:52:06 +00:00
|
|
|
HRESULT set_nsstyle_attr(nsIDOMCSSStyleDeclaration*,styleid_t,LPCWSTR,DWORD);
|
2009-02-17 09:29:58 +00:00
|
|
|
|
|
|
|
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);
|
2009-02-21 10:08:17 +00:00
|
|
|
|
|
|
|
#define ATTR_FIX_PX 1
|
|
|
|
#define ATTR_FIX_URL 2
|
|
|
|
#define ATTR_STR_TO_INT 4
|