summaryrefslogtreecommitdiff
path: root/css/css.h
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2004-06-09 19:55:06 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2004-06-09 19:55:06 +0000
commit78594f3f60a2ce28f1d6ee95676bfa10492320fe (patch)
treee8d5e6e06d24e4b663ffb2bcd3115816879bdb0d /css/css.h
parentec820df42f083e60bdeb20d6fc1d83a9985091a3 (diff)
downloadnetsurf-78594f3f60a2ce28f1d6ee95676bfa10492320fe.tar.gz
netsurf-78594f3f60a2ce28f1d6ee95676bfa10492320fe.tar.bz2
[project @ 2004-06-09 19:55:06 by jmb]
Implement background-image, background-repeat, background-position and background-attachment CSS properties. background-attachment and background-position need more work. Some redraw issues remain. svn path=/import/netsurf/; revision=938
Diffstat (limited to 'css/css.h')
-rw-r--r--css/css.h38
1 files changed, 37 insertions, 1 deletions
diff --git a/css/css.h b/css/css.h
index 14c53a065..d80df9333 100644
--- a/css/css.h
+++ b/css/css.h
@@ -53,10 +53,44 @@ typedef enum {
CSS_TEXT_DECORATION_UNKNOWN = 0x1000
} css_text_decoration;
+typedef enum {
+ CSS_BACKGROUND_POSITION_LENGTH,
+ CSS_BACKGROUND_POSITION_PERCENT,
+ CSS_BACKGROUND_POSITION_INHERIT
+} css_background_position;
+
/** Representation of a complete CSS 2 style. */
struct css_style {
colour background_color;
+ css_background_attachment background_attachment;
+
+ struct {
+ enum { CSS_BACKGROUND_IMAGE_NONE,
+ CSS_BACKGROUND_IMAGE_INHERIT,
+ CSS_BACKGROUND_IMAGE_URI } type;
+ char *uri;
+ } background_image;
+
+ struct {
+ struct {
+ css_background_position pos;
+ union {
+ float percent;
+ struct css_length length;
+ } value;
+ } horz;
+ struct {
+ css_background_position pos;
+ union {
+ float percent;
+ struct css_length length;
+ } value;
+ } vert;
+ } background_position;
+
+ css_background_repeat background_repeat;
+
struct {
colour color;
struct {
@@ -246,6 +280,7 @@ struct css_node {
css_combinator comb;
struct css_style *style;
unsigned long specificity;
+ struct content *stylesheet;
};
@@ -282,7 +317,8 @@ void css_destroy(struct content *c);
#ifdef CSS_INTERNALS
-struct css_node * css_new_node(css_node_type type,
+struct css_node * css_new_node(struct content *stylesheet,
+ css_node_type type,
const char *data, unsigned int data_length);
void css_free_node(struct css_node *node);
struct css_selector * css_new_selector(css_selector_type type,