2 #ifndef _GLIBMM_INTERFACE_H
3 #define _GLIBMM_INTERFACE_H
5 /* $Id: interface.h 2 2003-01-07 16:59:16Z murrayc $ */
7 /* Copyright 2002 The gtkmm Development Team
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public
11 * License as published by the Free Software Foundation; either
12 * version 2 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Library General Public License for more details.
19 * You should have received a copy of the GNU Library General Public
20 * License along with this library; if not, write to the Free
21 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 #include <glibmm/object.h>
30 #ifndef DOXYGEN_SHOULD_SKIP_THIS
31 class Interface_Class;
34 // There is no base GInterface struct in Glib, though there is G_TYPE_INTERFACE enum value.
35 class Interface : virtual public Glib::ObjectBase
38 #ifndef DOXYGEN_SHOULD_SKIP_THIS
39 typedef Interface CppObjectType;
40 typedef Interface_Class CppClassType;
41 typedef GTypeInterface BaseClassType;
42 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
44 explicit Interface(const Glib::Interface_Class& interface_class);
45 explicit Interface(GObject* castitem);
48 //void add_interface(GType gtype_implementer);
50 // Hook for translating API
51 //static Glib::Interface* wrap_new(GTypeInterface*);
53 #ifndef DOXYGEN_SHOULD_SKIP_THIS
54 static GType get_type() G_GNUC_CONST;
55 static GType get_base_type() G_GNUC_CONST;
58 inline GObject* gobj() { return gobject_; }
59 inline const GObject* gobj() const { return gobject_; }
63 Interface(const Interface&);
64 Interface& operator=(const Interface&);
67 RefPtr<ObjectBase> wrap_interface(GObject* object, bool take_copy = false);
71 #endif /* _GLIBMM_INTERFACE_H */