summaryrefslogtreecommitdiff
path: root/ccss
diff options
context:
space:
mode:
authorRobert Staudinger <robsta@gnome.org>2009-08-10 18:49:26 +0200
committerRobert Staudinger <robsta@gnome.org>2009-08-10 18:49:26 +0200
commit723a1e2b97c08b58a62ff48c5da4d62366988b52 (patch)
tree044cc452d13d1653db35d5d259e0119e2732cac3 /ccss
parent5df8a82fdda1c97cb8bf9ad7698f45415e0f2c21 (diff)
[property] Rename field "property_class" to "vtable".
Diffstat (limited to 'ccss')
-rw-r--r--ccss/ccss-block.c10
-rw-r--r--ccss/ccss-border-image-parser.c2
-rw-r--r--ccss/ccss-border-parser.c8
-rw-r--r--ccss/ccss-padding-parser.c2
-rw-r--r--ccss/ccss-property-parser.c2
-rw-r--r--ccss/ccss-property.c10
-rw-r--r--ccss/ccss-property.h6
-rw-r--r--ccss/ccss-style.c30
-rw-r--r--ccss/ccss-stylesheet.c4
9 files changed, 37 insertions, 37 deletions
diff --git a/ccss/ccss-block.c b/ccss/ccss-block.c
index fd10d0e..abca52e 100644
--- a/ccss/ccss-block.c
+++ b/ccss/ccss-block.c
@@ -105,12 +105,12 @@ ccss_block_dump (ccss_block_t const *self)
strval = g_strdup (ccss_property_state_serialize (property->state));
- } else if (property->property_class &&
- property->property_class->convert) {
+ } else if (property->vtable &&
+ property->vtable->convert) {
- property->property_class->convert (property,
- CCSS_PROPERTY_TYPE_STRING,
- &strval);
+ property->vtable->convert (property,
+ CCSS_PROPERTY_TYPE_STRING,
+ &strval);
}
if (NULL == strval)
diff --git a/ccss/ccss-border-image-parser.c b/ccss/ccss-border-image-parser.c
index 77ada45..00e3756 100644
--- a/ccss/ccss-border-image-parser.c
+++ b/ccss/ccss-border-image-parser.c
@@ -102,7 +102,7 @@ border_image_create (ccss_grammar_t const *grammar,
bool ret;
memset (&bimg, 0, sizeof (bimg));
- bimg.base.property_class = peek_property_class ();
+ bimg.base.vtable = peek_property_class ();
iter = values;
diff --git a/ccss/ccss-border-parser.c b/ccss/ccss-border-parser.c
index bb3bdad..570e126 100644
--- a/ccss/ccss-border-parser.c
+++ b/ccss/ccss-border-parser.c
@@ -31,7 +31,7 @@
#define INSERT_BORDER_COLOR(block_, prop_name_, prop_, prop_ptr_) \
G_STMT_START { \
- prop_.base.property_class = peek_property_class (prop_name_); \
+ prop_.base.vtable = peek_property_class (prop_name_); \
prop_ptr_ = g_new0 (ccss_color_t, 1); \
*prop_ptr_ = prop_; \
ccss_block_add_property (block_, prop_name_, &prop_ptr_->base); \
@@ -39,7 +39,7 @@
#define INSERT_BORDER_STYLE(block_, prop_name_, prop_, prop_ptr_) \
G_STMT_START { \
- prop_.base.property_class = peek_property_class (prop_name_); \
+ prop_.base.vtable = peek_property_class (prop_name_); \
prop_ptr_ = g_new0 (ccss_border_style_t, 1); \
*prop_ptr_ = prop_; \
ccss_block_add_property (block_, prop_name_, &prop_ptr_->base); \
@@ -47,7 +47,7 @@
#define INSERT_BORDER_WIDTH(block_, prop_name_, prop_, prop_ptr_) \
G_STMT_START { \
- prop_.base.property_class = peek_property_class (prop_name_); \
+ prop_.base.vtable = peek_property_class (prop_name_); \
prop_ptr_ = g_new0 (ccss_border_width_t, 1); \
*prop_ptr_ = prop_; \
ccss_block_add_property (block_, prop_name_, &prop_ptr_->base); \
@@ -55,7 +55,7 @@
#define INSERT_BORDER_RADIUS(block_, prop_name_, prop_, prop_ptr_) \
G_STMT_START { \
- prop_.base.property_class = peek_property_class (prop_name_); \
+ prop_.base.vtable = peek_property_class (prop_name_); \
prop_ptr_ = g_new0 (ccss_border_join_t, 1); \
*prop_ptr_ = prop_; \
ccss_block_add_property (block_, prop_name_, &prop_ptr_->base); \
diff --git a/ccss/ccss-padding-parser.c b/ccss/ccss-padding-parser.c
index b4a2e55..bed8894 100644
--- a/ccss/ccss-padding-parser.c
+++ b/ccss/ccss-padding-parser.c
@@ -27,7 +27,7 @@
#define INSERT_PADDING(block_, prop_name_, prop_, prop_ptr_) \
G_STMT_START { \
- prop_.base.property_class = peek_property_class (prop_name_); \
+ prop_.base.vtable = peek_property_class (prop_name_); \
prop_ptr_ = g_new0 (ccss_padding_t, 1); \
*prop_ptr_ = prop_; \
ccss_block_add_property (block_, prop_name_, &prop_ptr_->base); \
diff --git a/ccss/ccss-property-parser.c b/ccss/ccss-property-parser.c
index 689b815..b0c8cd6 100644
--- a/ccss/ccss-property-parser.c
+++ b/ccss/ccss-property-parser.c
@@ -41,7 +41,7 @@ property_factory (ccss_grammar_t const *grammar,
memset (&p, 0, sizeof (p));
- p.base.property_class = peek_property_class ();
+ p.base.vtable = peek_property_class ();
p.base.state = ccss_property_parse_state (&values);
p.name = g_strdup (name);
if (p.base.state == CCSS_PROPERTY_STATE_SET) {
diff --git a/ccss/ccss-property.c b/ccss/ccss-property.c
index 949417f..5ec23eb 100644
--- a/ccss/ccss-property.c
+++ b/ccss/ccss-property.c
@@ -39,7 +39,7 @@ ccss_property_init (ccss_property_t *self,
{
g_assert (self && property_class);
- self->property_class = property_class;
+ self->vtable = property_class;
self->state = CCSS_PROPERTY_STATE_INVALID;
}
@@ -47,11 +47,11 @@ void
ccss_property_destroy (ccss_property_t *self)
{
g_return_if_fail (self);
- g_return_if_fail (self->property_class);
- g_return_if_fail (self->property_class);
- g_return_if_fail (self->property_class->destroy);
+ g_return_if_fail (self->vtable);
+ g_return_if_fail (self->vtable);
+ g_return_if_fail (self->vtable->destroy);
- self->property_class->destroy (self);
+ self->vtable->destroy (self);
}
/**
diff --git a/ccss/ccss-property.h b/ccss/ccss-property.h
index 63ed6eb..6f04c26 100644
--- a/ccss/ccss-property.h
+++ b/ccss/ccss-property.h
@@ -176,13 +176,13 @@ typedef struct {
/**
* ccss_property_t:
- * @property_class: class descriptor, see #ccss_property_class_t.
- * @state: property state, see #ccss_property_state_t.
+ * @vtable: class descriptor, see #ccss_property_class_t.
+ * @state: property state, see #ccss_property_state_t.
*
* This structure has to be embedded at the beginning of every custom property.
**/
struct ccss_property_ {
- ccss_property_class_t const *property_class;
+ ccss_property_class_t const *vtable;
ccss_property_state_t state;
};
diff --git a/ccss/ccss-style.c b/ccss/ccss-style.c
index 833ea8d..1197c96 100644
--- a/ccss/ccss-style.c
+++ b/ccss/ccss-style.c
@@ -160,14 +160,14 @@ ccss_style_get_double (ccss_style_t const *self,
g_return_val_if_fail (property, false);
/* Have conversion function? */
- g_return_val_if_fail (property->property_class, false);
- if (NULL == property->property_class->convert) {
+ g_return_val_if_fail (property->vtable, false);
+ if (NULL == property->vtable->convert) {
return false;
}
- return property->property_class->convert (property,
- CCSS_PROPERTY_TYPE_DOUBLE,
- value);
+ return property->vtable->convert (property,
+ CCSS_PROPERTY_TYPE_DOUBLE,
+ value);
}
/**
@@ -198,14 +198,14 @@ ccss_style_get_string (ccss_style_t const *self,
g_return_val_if_fail (property, false);
/* Have conversion function? */
- g_return_val_if_fail (property->property_class, false);
- if (NULL == property->property_class->convert) {
+ g_return_val_if_fail (property->vtable, false);
+ if (NULL == property->vtable->convert) {
return false;
}
- return property->property_class->convert (property,
- CCSS_PROPERTY_TYPE_STRING,
- value);
+ return property->vtable->convert (property,
+ CCSS_PROPERTY_TYPE_STRING,
+ value);
}
/**
@@ -418,12 +418,12 @@ ccss_style_dump (ccss_style_t const *self)
strval = g_strdup (ccss_property_state_serialize (property->state));
- } else if (property->property_class &&
- property->property_class->convert) {
+ } else if (property->vtable &&
+ property->vtable->convert) {
- property->property_class->convert (property,
- CCSS_PROPERTY_TYPE_STRING,
- &strval);
+ property->vtable->convert (property,
+ CCSS_PROPERTY_TYPE_STRING,
+ &strval);
}
if (NULL == strval) {
strval = g_strdup ("<unknown>");
diff --git a/ccss/ccss-stylesheet.c b/ccss/ccss-stylesheet.c
index 337aef3..b0ec902 100644
--- a/ccss/ccss-stylesheet.c
+++ b/ccss/ccss-stylesheet.c
@@ -443,13 +443,13 @@ inherit_container_style (ccss_style_t const *container_style,
bool is_resolved;
- if (property->property_class->inherit) {
+ if (property->vtable->inherit) {
/* FIXME: should swap parameters and have the style pull from the container
* instead. So "style" wants to inherit "background", it can pull
* "background-color" and stuff from the container.
* Otherwise the approach with the css engine's user-agent.css is restricted
* to using shorthand properties for inheritance. */
- is_resolved = property->property_class->inherit
+ is_resolved = property->vtable->inherit
(container_style, style);
} else {
g_hash_table_insert (style->properties,