summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorRobert Staudinger <robsta@gnome.org>2008-12-01 11:11:18 +0100
committerRobert Staudinger <robsta@gnome.org>2008-12-01 11:11:18 +0100
commit1ad720d25bf7227aa29b69cee31d81d0bcd38fbb (patch)
tree989d80ec7c63eba3e560fbc0b6c3417fd3a61a77 /examples
parent41da97438b74dced73812849b344133a73177096 (diff)
* ccss-cairo/ccss-background-parser.c:
* ccss-cairo/ccss-border-image-parser.c: * ccss-cairo/ccss-border-parser.c (border_style_create): * ccss-cairo/ccss-color.c (ccss_color_create), (ccss_color_destroy): * ccss-cairo/ccss-color.h: * ccss-doc/ccss-sections.txt: * ccss-doc/tmpl/ccss-unused.sgml: * ccss-doc/tmpl/property.sgml: * ccss-doc/tmpl/style.sgml: * ccss-doc/tmpl/stylesheet.sgml: * ccss/ccss-block-priv.h: * ccss/ccss-block.c (ccss_block_create), (ccss_block_destroy): * ccss/ccss-parser.c (walk_additional_selector), (walk_simple_selector_r), (walk_selector), (start_selector_cb), (property_cb): * ccss/ccss-property-generic.c (property_create), (property_destroy): * ccss/ccss-property.h: * ccss/ccss-selector-group.c (free_set), (ccss_selector_group_create), (ccss_selector_group_destroy), (ccss_selector_group_clear_dangling_selectors): * ccss/ccss-selector-group.h: * ccss/ccss-selector.c (ccss_universal_selector_create), (universal_selector_destroy), (ccss_type_selector_create), (type_selector_destroy), (ccss_base_type_selector_create), (ccss_class_selector_create), (class_selector_destroy), (ccss_id_selector_create), (id_selector_destroy), (ccss_attribute_selector_create), (attribute_selector_destroy), (ccss_pseudo_class_selector_create), (pseudo_class_selector_destroy), (ccss_instance_selector_create), (instance_selector_destroy), (ccss_selector_destroy): * ccss/ccss-selector.h: * ccss/ccss-style.c (ccss_style_create), (ccss_style_destroy): * ccss/ccss-style.h: * ccss/ccss-stylesheet.c (ccss_stylesheet_create), (ccss_stylesheet_create_from_buffer), (ccss_stylesheet_create_from_file), (ccss_stylesheet_add_from_file), (ccss_stylesheet_destroy), (query_node), (query_container_r): * ccss/ccss-stylesheet.h: * ccss/ccss.sym: * examples/example-1.c (main): * examples/example-2.c (main): * examples/example-3.c (main): * examples/example-4.c (main): * examples/example-5.c (main): Use cairo's create()/destroy() idiom instead of new()/free().
Diffstat (limited to 'examples')
-rw-r--r--examples/example-1.c10
-rw-r--r--examples/example-2.c8
-rw-r--r--examples/example-3.c10
-rw-r--r--examples/example-4.c14
-rw-r--r--examples/example-5.c8
5 files changed, 25 insertions, 25 deletions
diff --git a/examples/example-1.c b/examples/example-1.c
index bf155a5..06d7a76 100644
--- a/examples/example-1.c
+++ b/examples/example-1.c
@@ -44,10 +44,10 @@ main (int argc,
gtk_init (&argc, &argv);
ccss_cairo_init ();
- stylesheet = ccss_stylesheet_new_from_buffer (_css, sizeof (_css));
- /* stylesheet = ccss_stylesheet_new_from_file ("example-1.css"); */
+ stylesheet = ccss_stylesheet_create_from_buffer (_css, sizeof (_css));
+ /* stylesheet = ccss_stylesheet_create_from_file ("example-1.css"); */
- style = ccss_style_new ();
+ style = ccss_style_create ();
ret = ccss_stylesheet_query_type (stylesheet, "box", style);
g_assert (ret);
@@ -65,8 +65,8 @@ main (int argc,
gtk_widget_show_all (window);
gtk_main ();
- ccss_style_free (style);
- ccss_stylesheet_free (stylesheet);
+ ccss_style_destroy (style);
+ ccss_stylesheet_destroy (stylesheet);
ccss_cairo_shutdown ();
diff --git a/examples/example-2.c b/examples/example-2.c
index c8a984f..f68a5e4 100644
--- a/examples/example-2.c
+++ b/examples/example-2.c
@@ -77,14 +77,14 @@ main (int argc,
gtk_init (&argc, &argv);
ccss_cairo_init ();
- stylesheet = ccss_stylesheet_new_from_buffer (_css, sizeof (_css));
+ stylesheet = ccss_stylesheet_create_from_buffer (_css, sizeof (_css));
ccss_node_init ((ccss_node_t *) &node, &_node_class);
node.type_name = "box";
node.instance = 0xdeadbeef;
node.inline_css = "background-color: yellow";
- style = ccss_style_new ();
+ style = ccss_style_create ();
ret = ccss_stylesheet_query (stylesheet, (ccss_node_t const *) &node,
style);
g_assert (ret);
@@ -104,8 +104,8 @@ main (int argc,
gtk_widget_show_all (window);
gtk_main ();
- ccss_style_free (style);
- ccss_stylesheet_free (stylesheet);
+ ccss_style_destroy (style);
+ ccss_stylesheet_destroy (stylesheet);
ccss_cairo_shutdown ();
diff --git a/examples/example-3.c b/examples/example-3.c
index ad81f30..9040534 100644
--- a/examples/example-3.c
+++ b/examples/example-3.c
@@ -65,10 +65,10 @@ main (int argc,
ccss_cairo_init ();
ccss_add_functions (_functions);
- stylesheet = ccss_stylesheet_new_from_buffer (_css, sizeof (_css));
- /* stylesheet = ccss_stylesheet_new_from_file ("example-1.css"); */
+ stylesheet = ccss_stylesheet_create_from_buffer (_css, sizeof (_css));
+ /* stylesheet = ccss_stylesheet_create_from_file ("example-1.css"); */
- style = ccss_style_new ();
+ style = ccss_style_create ();
ret = ccss_stylesheet_query_type (stylesheet, "box", style);
g_assert (ret);
@@ -86,8 +86,8 @@ main (int argc,
gtk_widget_show_all (window);
gtk_main ();
- ccss_style_free (style);
- ccss_stylesheet_free (stylesheet);
+ ccss_style_destroy (style);
+ ccss_stylesheet_destroy (stylesheet);
ccss_cairo_shutdown ();
diff --git a/examples/example-4.c b/examples/example-4.c
index 56a4757..53155d6 100644
--- a/examples/example-4.c
+++ b/examples/example-4.c
@@ -66,8 +66,8 @@ font_family_convert (font_family_t const *self,
static ccss_property_class_t const _ptable[] = {
{
.name = "font-family",
- .property_new = (ccss_property_new_f) font_family_new,
- .property_free = (ccss_property_free_f) font_family_free,
+ .property_create = (ccss_property_create_f) font_family_new,
+ .property_destroy = (ccss_property_destroy_f) font_family_free,
.property_convert = (ccss_property_convert_f) font_family_convert,
.property_factory = NULL
}, {
@@ -133,10 +133,10 @@ main (int argc,
ccss_cairo_init ();
ccss_add_properties (_ptable);
- stylesheet = ccss_stylesheet_new_from_buffer (_css, sizeof (_css));
- /* stylesheet = ccss_stylesheet_new_from_file ("example-1.css"); */
+ stylesheet = ccss_stylesheet_create_from_buffer (_css, sizeof (_css));
+ /* stylesheet = ccss_stylesheet_create_from_file ("example-1.css"); */
- style = ccss_style_new ();
+ style = ccss_style_create ();
ret = ccss_stylesheet_query_type (stylesheet, "box", style);
g_assert (ret);
@@ -154,8 +154,8 @@ main (int argc,
gtk_widget_show_all (window);
gtk_main ();
- ccss_style_free (style);
- ccss_stylesheet_free (stylesheet);
+ ccss_style_destroy (style);
+ ccss_stylesheet_destroy (stylesheet);
ccss_cairo_shutdown ();
diff --git a/examples/example-5.c b/examples/example-5.c
index c74fe86..c7f1ef2 100644
--- a/examples/example-5.c
+++ b/examples/example-5.c
@@ -68,9 +68,9 @@ main (int argc,
ccss_cairo_init ();
ccss_add_functions (_functions);
- stylesheet = ccss_stylesheet_new_from_buffer (_css, sizeof (_css));
+ stylesheet = ccss_stylesheet_create_from_buffer (_css, sizeof (_css));
- style = ccss_style_new ();
+ style = ccss_style_create ();
ret = ccss_stylesheet_query_type (stylesheet, "box", style);
g_assert (ret);
@@ -88,8 +88,8 @@ main (int argc,
gtk_widget_show_all (window);
gtk_main ();
- ccss_style_free (style);
- ccss_stylesheet_free (stylesheet);
+ ccss_style_destroy (style);
+ ccss_stylesheet_destroy (stylesheet);
ccss_cairo_shutdown ();