[aisleriot] Rename



commit fd338e02689ad8c89a767c76d2205e078f411d5a
Author: Christian Persch <chpe gnome org>
Date:   Mon Apr 25 21:13:07 2011 +0200

    Rename

 src/lib/Makefile.am                                |    6 +-
 src/lib/ar-card-theme-kde.c                        |   38 +++---
 src/lib/ar-card-theme-preimage.c                   |   22 ++--
 src/lib/ar-card-theme-private.h                    |    6 +-
 src/lib/ar-card-theme-svg.c                        |   14 +-
 .../{ar-preimage-private.h => ar-svg-private.h}    |    2 +-
 src/lib/{ar-preimage.c => ar-svg.c}                |  123 ++++++++++----------
 src/lib/{ar-preimage.h => ar-svg.h}                |   38 +++---
 8 files changed, 124 insertions(+), 125 deletions(-)
---
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index 2e7a115..f6529e4 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -48,9 +48,9 @@ endif # HAVE_CLUTTER
 
 if HAVE_RSVG
 libaisleriot_la_SOURCES += \
-	ar-preimage.c \
-	ar-preimage.h \
-	ar-preimage-private.h \
+	ar-svg.c \
+	ar-svg.h \
+	ar-svg-private.h \
 	ar-card-theme-preimage.c \
 	$(NULL)
 
diff --git a/src/lib/ar-card-theme-kde.c b/src/lib/ar-card-theme-kde.c
index d4499fe..7abf22a 100644
--- a/src/lib/ar-card-theme-kde.c
+++ b/src/lib/ar-card-theme-kde.c
@@ -28,8 +28,8 @@
 
 #include "ar-debug.h"
 #include "ar-profile.h"
-#include "ar-preimage.h"
-#include "ar-preimage-private.h"
+#include "ar-svg.h"
+#include "ar-svg-private.h"
 #include "ar-runtime.h"
 #include "ar-string-utils.h"
 
@@ -189,7 +189,7 @@ ar_card_theme_kde_get_card_extents (ArCardThemeKDE *theme,
                                     int card_id,
                                     const char *node)
 {
-  ArPreimage *preimage;
+  ArSvg *svg;
   cairo_rectangle_t *card_extents;
   cairo_rectangle_t rect;
   cairo_surface_t *surface;
@@ -200,12 +200,12 @@ ar_card_theme_kde_get_card_extents (ArCardThemeKDE *theme,
   if (card_extents->width != 0. && card_extents->height != 0.)
     return card_extents;
 
-  preimage = ((ArCardThemePreimage *) theme)->cards_preimage;
+  svg = ((ArCardThemePreimage *) theme)->cards_svg;
 
   surface = cairo_recording_surface_create (CAIRO_CONTENT_ALPHA, NULL);
   cr = cairo_create (surface);
   ar_profilestart ("getting ink extents for node %s", node);
-  rsvg_handle_render_cairo_sub (preimage->rsvg_handle, cr, node);
+  rsvg_handle_render_cairo_sub (svg->rsvg_handle, cr, node);
   ar_profileend ("getting ink extents for node %s", node);
   cairo_destroy (cr);
 
@@ -241,7 +241,7 @@ ar_card_theme_kde_load (ArCardTheme *card_theme,
     "#green_back"
   };
   ArCardThemeKDE *theme = (ArCardThemeKDE *) card_theme;
-  ArPreimage *preimage;
+  ArSvg *svg;
   char node[32];
   guint i;
   gboolean has_red_joker, has_black_joker, has_joker;
@@ -249,25 +249,25 @@ ar_card_theme_kde_load (ArCardTheme *card_theme,
   if (!AR_CARD_THEME_CLASS (ar_card_theme_kde_parent_class)->load (card_theme, error))
     return FALSE;
 
-  preimage = ((ArCardThemePreimage *) theme)->cards_preimage;
+  svg = ((ArCardThemePreimage *) theme)->cards_svg;
 
   /* Check available backs */
   g_assert (theme->n_backs == 0);
 
   ar_card_get_node_by_id_snprintf (node, sizeof (node), AR_CARD_BACK);
-  if (rsvg_handle_has_sub (preimage->rsvg_handle, node)) {
+  if (rsvg_handle_has_sub (svg->rsvg_handle, node)) {
     theme->backs[theme->n_backs++] = g_strdup (node);
   }
 
   for (i = 0; i < G_N_ELEMENTS (extra_backs); ++i) {
-    if (rsvg_handle_has_sub (preimage->rsvg_handle, extra_backs[i])) {
+    if (rsvg_handle_has_sub (svg->rsvg_handle, extra_backs[i])) {
       theme->backs[theme->n_backs++] = g_strdup (extra_backs[i]);
     }
   }
 
   for (i = 1; i < 10; ++i) {
     g_snprintf (node, sizeof (node), "#back_c%d", i);
-    if (rsvg_handle_has_sub (preimage->rsvg_handle, node)) {
+    if (rsvg_handle_has_sub (svg->rsvg_handle, node)) {
       theme->backs[theme->n_backs++] = g_strdup (node);
     }
   }
@@ -281,11 +281,11 @@ ar_card_theme_kde_load (ArCardTheme *card_theme,
 
   /* Look for the jokers */
   ar_card_get_node_by_id_snprintf (node, sizeof (node), AR_CARD_BLACK_JOKER);
-  has_black_joker = rsvg_handle_has_sub (preimage->rsvg_handle, node);
+  has_black_joker = rsvg_handle_has_sub (svg->rsvg_handle, node);
   ar_card_get_node_by_id_snprintf (node, sizeof (node), AR_CARD_RED_JOKER);
-  has_red_joker = rsvg_handle_has_sub (preimage->rsvg_handle, node);
+  has_red_joker = rsvg_handle_has_sub (svg->rsvg_handle, node);
 
-  has_joker = rsvg_handle_has_sub (preimage->rsvg_handle, "#joker");
+  has_joker = rsvg_handle_has_sub (svg->rsvg_handle, "#joker");
 
   theme->has_2_jokers = has_red_joker && has_black_joker;
   theme->has_joker = has_joker;
@@ -319,13 +319,13 @@ ar_card_theme_kde_paint_card (ArCardTheme *card_theme,
 {
   ArCardThemePreimage *preimage_card_theme = (ArCardThemePreimage *) card_theme;
   ArCardThemeKDE *theme = (ArCardThemeKDE *) card_theme;
-  ArPreimage *preimage = preimage_card_theme->cards_preimage;
+  ArSvg *svg = preimage_card_theme->cards_svg;
   char node[32];
   cairo_rectangle_t *card_extents;
   cairo_matrix_t matrix;
 
   if (G_UNLIKELY (card_id == AR_CARD_SLOT)) {
-    ar_preimage_render_cairo (preimage_card_theme->slot_preimage,
+    ar_svg_render_cairo (preimage_card_theme->slot_preimage,
                                  cr,
                                  preimage_card_theme->card_size.width,
                                  preimage_card_theme->card_size.height);
@@ -340,10 +340,10 @@ ar_card_theme_kde_paint_card (ArCardTheme *card_theme,
 
   cairo_save (cr);
 
-  if (preimage->font_options) {
-    cairo_set_antialias (cr, cairo_font_options_get_antialias (preimage->font_options));
+  if (svg->font_options) {
+    cairo_set_antialias (cr, cairo_font_options_get_antialias (svg->font_options));
 
-    cairo_set_font_options (cr, preimage->font_options);
+    cairo_set_font_options (cr, svg->font_options);
   }
 
   cairo_matrix_init_identity (&matrix);
@@ -354,7 +354,7 @@ ar_card_theme_kde_paint_card (ArCardTheme *card_theme,
 
   cairo_set_matrix (cr, &matrix);
 
-  rsvg_handle_render_cairo_sub (preimage->rsvg_handle, cr, node);
+  rsvg_handle_render_cairo_sub (svg->rsvg_handle, cr, node);
 
   cairo_restore (cr);
 }
diff --git a/src/lib/ar-card-theme-preimage.c b/src/lib/ar-card-theme-preimage.c
index 653a641..279b77d 100644
--- a/src/lib/ar-card-theme-preimage.c
+++ b/src/lib/ar-card-theme-preimage.c
@@ -29,7 +29,7 @@
 #include <librsvg/librsvg-features.h>
 #endif
 
-#include "ar-preimage.h"
+#include "ar-svg.h"
 #include "ar-runtime.h"
 #include "ar-string-utils.h"
 
@@ -68,7 +68,7 @@ ar_card_theme_preimage_load (ArCardTheme *card_theme,
   /* FIXMEchpe: use uninstalled data dir for rendering the card theme! */
   slot_dir = ar_runtime_get_directory (AR_RUNTIME_PIXMAP_DIRECTORY);
   path = g_build_filename (slot_dir, "slot.svg", NULL);
-  theme->slot_preimage = ar_preimage_new_from_file (path, error);
+  theme->slot_preimage = ar_svg_new_from_file (path, error);
   g_free (path);
   if (!theme->slot_preimage)
     return FALSE;
@@ -76,14 +76,14 @@ ar_card_theme_preimage_load (ArCardTheme *card_theme,
 
   /* Now the main course */
   path = g_build_filename (theme_info->path, theme_info->filename, NULL);
-  theme->cards_preimage = ar_preimage_new_from_file (path, error);
+  theme->cards_svg = ar_svg_new_from_file (path, error);
   g_free (path);
-  if (!theme->cards_preimage)
+  if (!theme->cards_svg)
     return FALSE;
 
   if (theme->font_options) {
-    ar_preimage_set_font_options (theme->slot_preimage, theme->font_options);
-    ar_preimage_set_font_options (theme->cards_preimage, theme->font_options);
+    ar_svg_set_font_options (theme->slot_preimage, theme->font_options);
+    ar_svg_set_font_options (theme->cards_svg, theme->font_options);
   }
 
   return TRUE;
@@ -92,7 +92,7 @@ ar_card_theme_preimage_load (ArCardTheme *card_theme,
 static void
 ar_card_theme_preimage_init (ArCardThemePreimage *theme)
 {
-  theme->cards_preimage = NULL;
+  theme->cards_svg = NULL;
   theme->slot_preimage = NULL;
 
   theme->subsize.width = -1;
@@ -109,8 +109,8 @@ ar_card_theme_preimage_finalize (GObject * object)
 
   _ar_card_theme_preimage_clear_sized_theme_data (theme);
 
-  if (theme->cards_preimage != NULL) {
-    g_object_unref (theme->cards_preimage);
+  if (theme->cards_svg != NULL) {
+    g_object_unref (theme->cards_svg);
   }
   if (theme->slot_preimage != NULL) {
     g_object_unref (theme->slot_preimage);
@@ -205,9 +205,9 @@ ar_card_theme_preimage_get_card_aspect (ArCardTheme* card_theme)
   ArCardThemePreimage *theme = (ArCardThemePreimage *) card_theme;
   double aspect;
 aspect =
-      (((double) ar_preimage_get_width (theme->cards_preimage))
+      (((double) ar_svg_get_width (theme->cards_svg))
        * N_ROWS) /
-      (((double) ar_preimage_get_height (theme->cards_preimage))
+      (((double) ar_svg_get_height (theme->cards_svg))
        * N_COLS);
 
   return aspect;
diff --git a/src/lib/ar-card-theme-private.h b/src/lib/ar-card-theme-private.h
index 2c9b55b..ecc110a 100644
--- a/src/lib/ar-card-theme-private.h
+++ b/src/lib/ar-card-theme-private.h
@@ -19,7 +19,7 @@
 #include "ar-card.h"
 
 #ifdef HAVE_RSVG
-#include "ar-preimage.h"
+#include "ar-svg.h"
 #endif
 
 #define FLOAT_TO_INT_CEIL(f) ((int) (f + 0.5f))
@@ -141,8 +141,8 @@ struct _ArCardThemePreimage {
   char *theme_dir;
   char *theme_name;
 
-  ArPreimage *cards_preimage;
-  ArPreimage *slot_preimage;
+  ArSvg *cards_svg;
+  ArSvg *slot_preimage;
   GdkPixbuf *source;
   CardSize subsize;
 
diff --git a/src/lib/ar-card-theme-svg.c b/src/lib/ar-card-theme-svg.c
index 5f83cce..5aaebf0 100644
--- a/src/lib/ar-card-theme-svg.c
+++ b/src/lib/ar-card-theme-svg.c
@@ -25,8 +25,8 @@
 #include <gdk-pixbuf/gdk-pixbuf.h>
 #include <gtk/gtk.h>
 
-#include "ar-preimage.h"
-#include "ar-preimage-private.h"
+#include "ar-svg.h"
+#include "ar-svg-private.h"
 #include "ar-runtime.h"
 #include "ar-string-utils.h"
 
@@ -56,7 +56,7 @@ ar_card_theme_svg_paint_card (ArCardTheme *card_theme,
                               int card_id)
 {
   ArCardThemePreimage *preimage_card_theme = (ArCardThemePreimage *) card_theme;
-  ArPreimage *preimage = preimage_card_theme->cards_preimage;
+  ArSvg *svg = preimage_card_theme->cards_svg;
   int suit, rank;
   double card_width, card_height;
   double width, height;
@@ -65,7 +65,7 @@ ar_card_theme_svg_paint_card (ArCardTheme *card_theme,
   char node[32];
 
   if (G_UNLIKELY (card_id == AR_CARD_SLOT)) {
-    ar_preimage_render_cairo (preimage_card_theme->slot_preimage,
+    ar_svg_render_cairo (preimage_card_theme->slot_preimage,
                                  cr,
                                  preimage_card_theme->card_size.width,
                                  preimage_card_theme->card_size.height);
@@ -75,8 +75,8 @@ ar_card_theme_svg_paint_card (ArCardTheme *card_theme,
   suit = card_id / 13;
   rank = card_id % 13;
 
-  card_width = ((double) ar_preimage_get_width (preimage)) / N_COLS;
-  card_height = ((double) ar_preimage_get_height (preimage)) / N_ROWS;
+  card_width = ((double) ar_svg_get_width (svg)) / N_COLS;
+  card_height = ((double) ar_svg_get_height (svg)) / N_ROWS;
 
   width = preimage_card_theme->card_size.width - 2 * DELTA;
   height = preimage_card_theme->card_size.height - 2 * DELTA;
@@ -89,7 +89,7 @@ ar_card_theme_svg_paint_card (ArCardTheme *card_theme,
 
   ar_card_get_node_by_suit_and_rank_snprintf (node, sizeof (node), suit, rank);
 
-  ar_preimage_render_cairo_sub (preimage,
+  ar_svg_render_cairo_sub (svg,
                                    cr,
                                    node,
                                    preimage_card_theme->card_size.width,
diff --git a/src/lib/ar-preimage-private.h b/src/lib/ar-svg-private.h
similarity index 97%
rename from src/lib/ar-preimage-private.h
rename to src/lib/ar-svg-private.h
index 308c9d8..cd41dc2 100644
--- a/src/lib/ar-preimage-private.h
+++ b/src/lib/ar-svg-private.h
@@ -20,7 +20,7 @@
 
 #include <librsvg/rsvg.h>
 
-struct _ArPreimage {
+struct _ArSvg {
   GObject parent;
 
   gint width;
diff --git a/src/lib/ar-preimage.c b/src/lib/ar-svg.c
similarity index 58%
rename from src/lib/ar-preimage.c
rename to src/lib/ar-svg.c
index f5ddb73..8123aff 100644
--- a/src/lib/ar-preimage.c
+++ b/src/lib/ar-svg.c
@@ -35,45 +35,45 @@
 
 #include "ar-profile.h"
 
-#include "ar-preimage.h"
-#include "ar-preimage-private.h"
+#include "ar-svg.h"
+#include "ar-svg-private.h"
 
-G_DEFINE_TYPE (ArPreimage, ar_preimage, G_TYPE_OBJECT);
+G_DEFINE_TYPE (ArSvg, ar_svg, G_TYPE_OBJECT);
 
 static void
-ar_preimage_init (ArPreimage * preimage)
+ar_svg_init (ArSvg *svg)
 {
-  preimage->width = 0;
-  preimage->height = 0;
+  svg->width = 0;
+  svg->height = 0;
 }
 
 static void
-ar_preimage_finalize (GObject * object)
+ar_svg_finalize (GObject * object)
 {
-  ArPreimage *preimage = AR_PREIMAGE (object);
+  ArSvg *svg = AR_SVG (object);
 
-  if (preimage->rsvg_handle != NULL) {
-    g_object_unref (preimage->rsvg_handle);
+  if (svg->rsvg_handle != NULL) {
+    g_object_unref (svg->rsvg_handle);
   }
-  if (preimage->font_options) {
-    cairo_font_options_destroy (preimage->font_options);
+  if (svg->font_options) {
+    cairo_font_options_destroy (svg->font_options);
   }
 
-  G_OBJECT_CLASS (ar_preimage_parent_class)->finalize (object);
+  G_OBJECT_CLASS (ar_svg_parent_class)->finalize (object);
 }
 
 static void
-ar_preimage_class_init (ArPreimageClass * klass)
+ar_svg_class_init (ArSvgClass * klass)
 {
   GObjectClass *oclass = G_OBJECT_CLASS (klass);
 
-  oclass->finalize = ar_preimage_finalize;
+  oclass->finalize = ar_svg_finalize;
 
   rsvg_init ();
 }
 
 /**
- * ar_preimage_render_cairo:
+ * ar_svg_render_cairo:
  * @preimage:
  * @cr:
  * @width: the desired width
@@ -83,28 +83,27 @@ ar_preimage_class_init (ArPreimageClass * klass)
  * @width and @height to @cr.
  **/
 void
-ar_preimage_render_cairo (ArPreimage * preimage,
+ar_svg_render_cairo (ArSvg *svg,
                              cairo_t *cr,
                              gint width,
                              gint height)
 {
   g_return_if_fail (width > 0 && height > 0);
-  g_return_if_fail (preimage != NULL);
 
-    ar_preimage_render_cairo_sub (preimage,
+    ar_svg_render_cairo_sub (svg,
                                      cr,
                                      NULL,
                                      width,
                                      height,
                                      0.0, 0.0,
                                      ((double) width) /
-                                     ((double) preimage->width),
+                                     ((double) svg->width),
                                      ((double) height) /
-                                     ((double) preimage->height));
+                                     ((double) svg->height));
 }
 
 /**
- * ar_preimage_render_cairo_sub:
+ * ar_svg_render_cairo_sub:
  * @preimage:
  * @cr:
  * @node: a SVG node ID (starting with "#"), or %NULL
@@ -125,7 +124,7 @@ ar_preimage_render_cairo (ArPreimage * preimage,
  * isn't a scalable SVG image
  **/
 void
-ar_preimage_render_cairo_sub (ArPreimage * preimage,
+ar_svg_render_cairo_sub (ArSvg *svg,
                                  cairo_t *cr,
                                  const char *node,
                                  int width,
@@ -137,12 +136,12 @@ ar_preimage_render_cairo_sub (ArPreimage * preimage,
 {
   cairo_matrix_t matrix;
 
-  g_return_if_fail (AR_IS_PREIMAGE (preimage));
+  g_return_if_fail (AR_IS_SVG (svg));
 
-  if (preimage->font_options) {
-    cairo_set_antialias (cr, cairo_font_options_get_antialias (preimage->font_options));
+  if (svg->font_options) {
+    cairo_set_antialias (cr, cairo_font_options_get_antialias (svg->font_options));
 
-    cairo_set_font_options (cr, preimage->font_options);
+    cairo_set_font_options (cr, svg->font_options);
   }
 
   cairo_matrix_init_identity (&matrix);
@@ -151,104 +150,104 @@ ar_preimage_render_cairo_sub (ArPreimage * preimage,
 
   cairo_set_matrix (cr, &matrix);
 
-  rsvg_handle_render_cairo_sub (preimage->rsvg_handle, cr, node);
+  rsvg_handle_render_cairo_sub (svg->rsvg_handle, cr, node);
 }
 
 /**
- * ar_preimage_new_from_file:
+ * ar_svg_new_from_file:
  * @filename:
  * @error: a location for a #GError
  *
- * Creates a new #ArPreimage from the image in @filename.
+ * Creates a new #ArSvg from the image in @filename.
  *
- * Returns: (allow-none): a new #ArPreimage, or %NULL if there was an error
+ * Returns: (allow-none): a new #ArSvg, or %NULL if there was an error
  */
-ArPreimage *
-ar_preimage_new_from_file (const gchar * filename, GError ** error)
+ArSvg *
+ar_svg_new_from_file (const gchar * filename, GError ** error)
 {
-  ArPreimage *preimage;
+  ArSvg *svg;
 
   g_return_val_if_fail (filename != NULL, NULL);
 
-  ar_profilestart ("creating ArPreimage from %s", filename);
+  ar_profilestart ("creating ArSvg from %s", filename);
 
-  preimage = g_object_new (AR_TYPE_PREIMAGE, NULL);
+  svg = g_object_new (AR_TYPE_SVG, NULL);
 
-  preimage->rsvg_handle = rsvg_handle_new_from_file (filename, error);
-  if (preimage->rsvg_handle) {
+  svg->rsvg_handle = rsvg_handle_new_from_file (filename, error);
+  if (svg->rsvg_handle) {
     RsvgDimensionData data;
 
-    rsvg_handle_get_dimensions (preimage->rsvg_handle, &data);
+    rsvg_handle_get_dimensions (svg->rsvg_handle, &data);
 
-    ar_profileend ("creating ArPreimage from %s", filename);
+    ar_profileend ("creating ArSvg from %s", filename);
 
     if (data.width == 0 || data.height == 0) {
       g_set_error (error,
                    GDK_PIXBUF_ERROR,
                    GDK_PIXBUF_ERROR_FAILED, "Image has zero extent");
-      g_object_unref (preimage);
+      g_object_unref (svg);
       return NULL;
     }
 
-    preimage->width = data.width;
-    preimage->height = data.height;
+    svg->width = data.width;
+    svg->height = data.height;
 
-    return preimage;
+    return svg;
   }
 
-  ar_profileend ("creating ArPreimage from %s", filename);
+  ar_profileend ("creating ArSvg from %s", filename);
 
   return NULL;
 }
 
 /**
- * ar_preimage_set_font_options:
- * @preimage: a #ArPreimage
+ * ar_svg_set_font_options:
+ * @preimage: a #ArSvg
  * @font_options: the font options
  *
  * Turns on antialising of @preimage, if it contains an SVG image.
  */
 void
-ar_preimage_set_font_options (ArPreimage * preimage,
-                                 const cairo_font_options_t * font_options)
+ar_svg_set_font_options (ArSvg *svg,
+                         const cairo_font_options_t * font_options)
 {
-  g_return_if_fail (AR_IS_PREIMAGE (preimage));
+  g_return_if_fail (AR_IS_SVG (svg));
 
-  if (preimage->font_options) {
-    cairo_font_options_destroy (preimage->font_options);
+  if (svg->font_options) {
+    cairo_font_options_destroy (svg->font_options);
   }
 
   if (font_options) {
-    preimage->font_options = cairo_font_options_copy (font_options);
+    svg->font_options = cairo_font_options_copy (font_options);
   } else {
-    preimage->font_options = NULL;
+    svg->font_options = NULL;
   }
 }
 
 /**
- * ar_preimage_get_width:
+ * ar_svg_get_width:
  * @preimage:
  *
  * Returns: the natural width of the image in @preimage
  */
 gint
-ar_preimage_get_width (ArPreimage * preimage)
+ar_svg_get_width (ArSvg *svg)
 {
-  g_return_val_if_fail (AR_IS_PREIMAGE (preimage), 0);
+  g_return_val_if_fail (AR_IS_SVG (svg), 0);
 
-  return preimage->width;
+  return svg->width;
 }
 
 /**
- * ar_preimage_get_height:
+ * ar_svg_get_height:
  * @preimage:
  *
  * Returns: the natural height of the image in @preimage
  */
 gint
-ar_preimage_get_height (ArPreimage * preimage)
+ar_svg_get_height (ArSvg *svg)
 {
-  g_return_val_if_fail (AR_IS_PREIMAGE (preimage), 0);
+  g_return_val_if_fail (AR_IS_SVG (svg), 0);
 
-  return preimage->height;
+  return svg->height;
 }
diff --git a/src/lib/ar-preimage.h b/src/lib/ar-svg.h
similarity index 61%
rename from src/lib/ar-preimage.h
rename to src/lib/ar-svg.h
index cd4ff47..562b473 100644
--- a/src/lib/ar-preimage.h
+++ b/src/lib/ar-svg.h
@@ -19,8 +19,8 @@
 
 /* Cache raster and vector images and render them to a specific size. */
 
-#ifndef AR_PREIMAGE_H
-#define AR_PREIMAGE_H
+#ifndef AR_SVG_H
+#define AR_SVG_H
 
 #include <glib.h>
 #include <cairo.h>
@@ -28,35 +28,35 @@
 
 G_BEGIN_DECLS
 
-#define AR_TYPE_PREIMAGE             (ar_preimage_get_type ())
-#define AR_PREIMAGE(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj), AR_TYPE_PREIMAGE, ArPreimage))
-#define AR_PREIMAGE_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), AR_TYPE_PREIMAGE, ArPreimageClass))
-#define AR_IS_PREIMAGE(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AR_TYPE_PREIMAGE))
-#define AR_IS_PREIMAGE_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), AR_TYPE_PREIMAGE))
-#define AR_GET_PREIMAGE_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), AR_TYPE_PREIMAGE, ArPreimageClass))
+#define AR_TYPE_SVG             (ar_svg_get_type ())
+#define AR_SVG(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj), AR_TYPE_SVG, ArSvg))
+#define AR_SVG_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), AR_TYPE_SVG, ArSvgClass))
+#define AR_IS_SVG(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AR_TYPE_SVG))
+#define AR_IS_SVG_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), AR_TYPE_SVG))
+#define AR_GET_SVG_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), AR_TYPE_SVG, ArSvgClass))
 
-typedef struct _ArPreimage ArPreimage;
+typedef struct _ArSvg ArSvg;
 
 typedef struct {
   GObjectClass parent_class;
-} ArPreimageClass;
+} ArSvgClass;
 
-GType ar_preimage_get_type (void);
+GType ar_svg_get_type (void);
 
-ArPreimage *ar_preimage_new (void);
+ArSvg *ar_svg_new (void);
 
-ArPreimage *ar_preimage_new_from_file (const gchar * filename,
+ArSvg *ar_svg_new_from_file (const gchar * filename,
                                              GError ** error);
 
-void ar_preimage_set_font_options (ArPreimage * preimage,
+void ar_svg_set_font_options (ArSvg * preimage,
                                       const cairo_font_options_t *font_options);
 
-void ar_preimage_render_cairo (ArPreimage * preimage,
+void ar_svg_render_cairo (ArSvg * preimage,
                                   cairo_t *cr,
                                   gint width,
                                   gint height);
 
-void ar_preimage_render_cairo_sub (ArPreimage * preimage,
+void ar_svg_render_cairo_sub (ArSvg * preimage,
                                       cairo_t *cr,
                                       const char *node,
                                       int width,
@@ -66,10 +66,10 @@ void ar_preimage_render_cairo_sub (ArPreimage * preimage,
                                       double xzoom,
                                       double yzoom);
 
-gint ar_preimage_get_width (ArPreimage * preimage);
+gint ar_svg_get_width (ArSvg * preimage);
 
-gint ar_preimage_get_height (ArPreimage * preimage);
+gint ar_svg_get_height (ArSvg * preimage);
 
 G_END_DECLS
 
-#endif /* AR_PREIMAGE_H */
+#endif /* AR_SVG_H */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]