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;
|
2011-01-04 02:00:53 +01:00
|
|
|
IHTMLStyle IHTMLStyle_iface;
|
2011-01-04 02:02:40 +01:00
|
|
|
IHTMLStyle2 IHTMLStyle2_iface;
|
2011-01-04 02:03:57 +01:00
|
|
|
IHTMLStyle3 IHTMLStyle3_iface;
|
2011-01-04 02:05:27 +01:00
|
|
|
IHTMLStyle4 IHTMLStyle4_iface;
|
2011-07-28 16:28:59 +02:00
|
|
|
IHTMLStyle5 IHTMLStyle5_iface;
|
2011-07-28 16:29:33 +02:00
|
|
|
IHTMLStyle6 IHTMLStyle6_iface;
|
2008-10-06 16:47:58 +02:00
|
|
|
|
|
|
|
LONG ref;
|
|
|
|
|
|
|
|
nsIDOMCSSStyleDeclaration *nsstyle;
|
2012-03-16 12:17:50 +01:00
|
|
|
HTMLElement *elem;
|
2008-12-30 21:23:56 +01:00
|
|
|
};
|
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,
|
2011-02-25 14:11:16 +01:00
|
|
|
STYLEID_BACKGROUND_POSITION,
|
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-12-01 21:04:38 +01:00
|
|
|
STYLEID_BORDER_BOTTOM,
|
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-12-01 21:04:38 +01:00
|
|
|
STYLEID_BORDER_RIGHT,
|
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-12-01 21:04:38 +01:00
|
|
|
STYLEID_BORDER_TOP,
|
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,
|
2013-11-07 17:01:31 +01:00
|
|
|
STYLEID_BOX_SIZING,
|
2012-10-23 13:41:13 +02:00
|
|
|
STYLEID_CLEAR,
|
2011-07-15 15:38:08 +02:00
|
|
|
STYLEID_CLIP,
|
2008-10-06 16:48:25 +02:00
|
|
|
STYLEID_COLOR,
|
2008-10-06 16:50:46 +02:00
|
|
|
STYLEID_CURSOR,
|
2011-07-22 11:40:17 +02:00
|
|
|
STYLEID_DIRECTION,
|
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,
|
2009-09-18 12:18:45 +02:00
|
|
|
STYLEID_LINE_HEIGHT,
|
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,
|
2013-09-30 16:05:34 +02:00
|
|
|
STYLEID_OUTLINE,
|
2008-11-25 11:04:11 +01:00
|
|
|
STYLEID_OVERFLOW,
|
2012-04-17 12:41:27 +02:00
|
|
|
STYLEID_OVERFLOW_X,
|
2012-04-17 12:41:40 +02:00
|
|
|
STYLEID_OVERFLOW_Y,
|
2010-11-29 00:18:48 +01:00
|
|
|
STYLEID_PADDING,
|
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,
|
2011-07-18 13:39:37 +02:00
|
|
|
STYLEID_PAGE_BREAK_AFTER,
|
2011-07-21 12:26:37 +02:00
|
|
|
STYLEID_PAGE_BREAK_BEFORE,
|
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,
|
2009-09-18 12:21:56 +02:00
|
|
|
STYLEID_TEXT_INDENT,
|
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,
|
2013-08-28 17:51:08 +02:00
|
|
|
STYLEID_WHITE_SPACE,
|
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;
|
|
|
|
|
2012-07-25 14:46:54 +02:00
|
|
|
HRESULT HTMLStyle_Create(HTMLElement*,HTMLStyle**) DECLSPEC_HIDDEN;
|
2011-05-01 20:27:06 +02:00
|
|
|
void HTMLStyle2_Init(HTMLStyle*) DECLSPEC_HIDDEN;
|
|
|
|
void HTMLStyle3_Init(HTMLStyle*) DECLSPEC_HIDDEN;
|
2008-10-06 16:49:24 +02:00
|
|
|
|
2011-07-15 15:37:56 +02:00
|
|
|
HRESULT get_nsstyle_attr(nsIDOMCSSStyleDeclaration*,styleid_t,BSTR*,DWORD) DECLSPEC_HIDDEN;
|
2011-05-01 20:27:06 +02:00
|
|
|
HRESULT set_nsstyle_attr(nsIDOMCSSStyleDeclaration*,styleid_t,LPCWSTR,DWORD) DECLSPEC_HIDDEN;
|
2009-02-17 10:29:58 +01:00
|
|
|
|
2011-05-01 20:27:06 +02:00
|
|
|
HRESULT set_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, VARIANT *value, DWORD flags) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT get_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, VARIANT *p, DWORD flags) DECLSPEC_HIDDEN;
|
2009-02-21 11:08:17 +01:00
|
|
|
|
2013-11-11 14:36:43 +01:00
|
|
|
HRESULT get_elem_style(HTMLElement*,styleid_t,BSTR*) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT set_elem_style(HTMLElement*,styleid_t,const WCHAR*) DECLSPEC_HIDDEN;
|
|
|
|
|
2011-07-15 15:38:08 +02:00
|
|
|
#define ATTR_FIX_PX 0x0001
|
|
|
|
#define ATTR_FIX_URL 0x0002
|
|
|
|
#define ATTR_STR_TO_INT 0x0004
|
|
|
|
#define ATTR_HEX_INT 0x0008
|
|
|
|
#define ATTR_REMOVE_COMMA 0x0010
|
2013-09-30 16:05:34 +02:00
|
|
|
#define ATTR_NO_NULL 0x0020
|