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