[librsvgmm] Add init() and term() functions



commit 767f2e095a09fe65acc04c9a90afb76daaef002c
Author: Daniel Elstner <daniel kitta gmail com>
Date:   Thu Jun 18 03:03:00 2009 +0200

    Add init() and term() functions
    
    * librsvg/src/rsvg.{ccg,hg} (Rsvg::init): New function to initialize
    librsvg, glibmm and librsvgmm.
    (Rsvg::term): New function wrapping rsvg_term().

 librsvg/src/rsvg.ccg |   13 +++++++++++++
 librsvg/src/rsvg.hg  |    8 ++++++++
 2 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/librsvg/src/rsvg.ccg b/librsvg/src/rsvg.ccg
index 986d66b..b8e4824 100644
--- a/librsvg/src/rsvg.ccg
+++ b/librsvg/src/rsvg.ccg
@@ -18,10 +18,23 @@
 
 #include <librsvg/rsvg-cairo.h>
 #include <librsvg/librsvg-enum-types.h>
+#include <librsvgmm/wrap_init.h>
 
 namespace Rsvg
 {
 
+void init()
+{
+  rsvg_init();
+  Glib::init();
+  Rsvg::wrap_init();
+}
+
+void term()
+{
+  rsvg_term();
+}
+
 void set_default_dpi(double dpi)
 {
   rsvg_set_default_dpi(dpi);
diff --git a/librsvg/src/rsvg.hg b/librsvg/src/rsvg.hg
index ef23770..4b54f1b 100644
--- a/librsvg/src/rsvg.hg
+++ b/librsvg/src/rsvg.hg
@@ -25,6 +25,14 @@ _PINCLUDE(glibmm/private/object_p.h)
 namespace Rsvg
 {
 
+/** Initialize librsvgmm for use.
+ */
+void init();
+
+/** Shut down librsvgmm.
+ */
+void term();
+
 _WRAP_GERROR(Error, RsvgError, RSVG_ERROR)
 
 /** Sets the DPI for the all future pixel calculations.



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