ff78f96a4f31379893e384b0a8c222101d2707a2
[ardour.git] / libs / libglademm / libglademm / wrap_init.cc
1
2 #include <glib.h>
3
4 // Disable the 'const' function attribute of the get_type() functions.
5 // GCC would optimize them out because we don't use the return value.
6 #undef  G_GNUC_CONST
7 #define G_GNUC_CONST /* empty */
8
9 #include <libglademm/wrap_init.h>
10 #include <glibmm/error.h>
11 #include <glibmm/object.h>
12
13 // #include the widget headers so that we can call the get_type() static methods:
14
15 #include "xml.h"
16
17 extern "C"
18 {
19
20 //Declarations of the *_get_type() functions:
21
22 GType glade_xml_get_type(void);
23
24 //Declarations of the *_error_quark() functions:
25
26 } // extern "C"
27
28
29 //Declarations of the *_Class::wrap_new() methods, instead of including all the private headers:
30
31 namespace Gnome { namespace Glade {  class Xml_Class { public: static Glib::ObjectBase* wrap_new(GObject*); };  } }
32
33 namespace Gnome { namespace Glade { 
34
35 void wrap_init()
36 {
37   // Register Error domains:
38
39 // Map gtypes to gtkmm wrapper-creation functions:
40   Glib::wrap_register(glade_xml_get_type(), &Gnome::Glade::Xml_Class::wrap_new);
41
42   // Register the gtkmm gtypes:
43   Gnome::Glade::Xml::get_type();
44
45 } // wrap_init()
46
47 } //Glade
48 } //Gnome
49
50