QtGStreamer  1.2.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
gen.cpp
1 // Autogenerated by the QtGStreamer helper code generator - DO NOT EDIT
2 /*
3  Copyright (C) 2010 George Kiagiadakis <kiagiadakis.george@gmail.com>
4  Copyright (C) 2010 Collabora Ltd.
5  @author George Kiagiadakis <george.kiagiadakis@collabora.co.uk>
6 
7  This library is free software; you can redistribute it and/or modify
8  it under the terms of the GNU Lesser General Public License as published
9  by the Free Software Foundation; either version 2.1 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU Lesser General Public License for more details.
16 
17  You should have received a copy of the GNU Lesser General Public License
18  along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20 
21 #define INCLUDED_FROM_CODEGEN
22 #include <boost/static_assert.hpp>
23 
24 #define REGISTER_TYPE_IMPLEMENTATION(T, GTYPE) \
25  namespace QGlib { \
26  GetTypeImpl<T>::operator Type() { return (GTYPE); } \
27  }
28 
29 #include <glib-object.h>
30 #include "QGlib/string_p.h"
31 
32 #include "QGlib/qglib_signal.h"
33 
34 namespace QGlib {
35  BOOST_STATIC_ASSERT(static_cast<int>(Signal::RunFirst) == static_cast<int>(G_SIGNAL_RUN_FIRST));
36  BOOST_STATIC_ASSERT(static_cast<int>(Signal::RunLast) == static_cast<int>(G_SIGNAL_RUN_LAST));
37  BOOST_STATIC_ASSERT(static_cast<int>(Signal::RunCleanup) == static_cast<int>(G_SIGNAL_RUN_CLEANUP));
38  BOOST_STATIC_ASSERT(static_cast<int>(Signal::NoRecurse) == static_cast<int>(G_SIGNAL_NO_RECURSE));
39  BOOST_STATIC_ASSERT(static_cast<int>(Signal::Detailed) == static_cast<int>(G_SIGNAL_DETAILED));
40  BOOST_STATIC_ASSERT(static_cast<int>(Signal::Action) == static_cast<int>(G_SIGNAL_ACTION));
41  BOOST_STATIC_ASSERT(static_cast<int>(Signal::NoHooks) == static_cast<int>(G_SIGNAL_NO_HOOKS));
42 }
43 
44 #include "QGlib/paramspec.h"
45 
46 REGISTER_TYPE_IMPLEMENTATION(QGlib::ParamSpec,G_TYPE_PARAM)
47 
48 REGISTER_TYPE_IMPLEMENTATION(QGlib::ParamSpec::ParamFlags,G_TYPE_PARAM_FLAGS)
49 
50 namespace QGlib {
51  QGlib::RefCountedObject *ParamSpec_new(void *instance)
52  {
53  QGlib::ParamSpec *cppClass = new QGlib::ParamSpec;
54  cppClass->m_object = instance;
55  return cppClass;
56  }
57 } //namespace QGlib
58 
59 namespace QGlib {
60  BOOST_STATIC_ASSERT(static_cast<int>(ParamSpec::Readable) == static_cast<int>(G_PARAM_READABLE));
61  BOOST_STATIC_ASSERT(static_cast<int>(ParamSpec::Writable) == static_cast<int>(G_PARAM_WRITABLE));
62  BOOST_STATIC_ASSERT(static_cast<int>(ParamSpec::ReadWrite) == static_cast<int>(G_PARAM_READWRITE));
63  BOOST_STATIC_ASSERT(static_cast<int>(ParamSpec::Construct) == static_cast<int>(G_PARAM_CONSTRUCT));
64  BOOST_STATIC_ASSERT(static_cast<int>(ParamSpec::ConstructOnly) == static_cast<int>(G_PARAM_CONSTRUCT_ONLY));
65  BOOST_STATIC_ASSERT(static_cast<int>(ParamSpec::LaxValidation) == static_cast<int>(G_PARAM_LAX_VALIDATION));
66  BOOST_STATIC_ASSERT(static_cast<int>(ParamSpec::Deprecated) == static_cast<int>(G_PARAM_DEPRECATED));
67 }
68 
69 #include "QGlib/global.h"
70 
71 #include "QGlib/value.h"
72 
73 REGISTER_TYPE_IMPLEMENTATION(QGlib::Value,G_TYPE_VALUE)
74 
75 #include "QGlib/object.h"
76 
77 REGISTER_TYPE_IMPLEMENTATION(QGlib::Object,G_TYPE_OBJECT)
78 
79 REGISTER_TYPE_IMPLEMENTATION(QGlib::Interface,G_TYPE_INTERFACE)
80 
81 namespace QGlib {
82  QGlib::RefCountedObject *Object_new(void *instance)
83  {
84  QGlib::Object *cppClass = new QGlib::Object;
85  cppClass->m_object = instance;
86  return cppClass;
87  }
88 } //namespace QGlib
89 
90 namespace QGlib {
91  QGlib::RefCountedObject *Interface_new(void *instance)
92  {
93  QGlib::Interface *cppClass = new QGlib::Interface;
94  cppClass->m_object = instance;
95  return cppClass;
96  }
97 } //namespace QGlib
98 
99 #include "QGlib/error.h"
100 
101 REGISTER_TYPE_IMPLEMENTATION(QGlib::Error,G_TYPE_ERROR)
102 
103 #include "QGlib/type.h"
104 
105 REGISTER_TYPE_IMPLEMENTATION(QGlib::Type,G_TYPE_GTYPE)
106 
107 namespace QGlib {
108  BOOST_STATIC_ASSERT(static_cast<int>(Type::Invalid) == static_cast<int>(G_TYPE_INVALID));
109  BOOST_STATIC_ASSERT(static_cast<int>(Type::None) == static_cast<int>(G_TYPE_NONE));
110  BOOST_STATIC_ASSERT(static_cast<int>(Type::Interface) == static_cast<int>(G_TYPE_INTERFACE));
111  BOOST_STATIC_ASSERT(static_cast<int>(Type::Char) == static_cast<int>(G_TYPE_CHAR));
112  BOOST_STATIC_ASSERT(static_cast<int>(Type::Uchar) == static_cast<int>(G_TYPE_UCHAR));
113  BOOST_STATIC_ASSERT(static_cast<int>(Type::Boolean) == static_cast<int>(G_TYPE_BOOLEAN));
114  BOOST_STATIC_ASSERT(static_cast<int>(Type::Int) == static_cast<int>(G_TYPE_INT));
115  BOOST_STATIC_ASSERT(static_cast<int>(Type::Uint) == static_cast<int>(G_TYPE_UINT));
116  BOOST_STATIC_ASSERT(static_cast<int>(Type::Long) == static_cast<int>(G_TYPE_LONG));
117  BOOST_STATIC_ASSERT(static_cast<int>(Type::Ulong) == static_cast<int>(G_TYPE_ULONG));
118  BOOST_STATIC_ASSERT(static_cast<int>(Type::Int64) == static_cast<int>(G_TYPE_INT64));
119  BOOST_STATIC_ASSERT(static_cast<int>(Type::Uint64) == static_cast<int>(G_TYPE_UINT64));
120  BOOST_STATIC_ASSERT(static_cast<int>(Type::Enum) == static_cast<int>(G_TYPE_ENUM));
121  BOOST_STATIC_ASSERT(static_cast<int>(Type::Flags) == static_cast<int>(G_TYPE_FLAGS));
122  BOOST_STATIC_ASSERT(static_cast<int>(Type::Float) == static_cast<int>(G_TYPE_FLOAT));
123  BOOST_STATIC_ASSERT(static_cast<int>(Type::Double) == static_cast<int>(G_TYPE_DOUBLE));
124  BOOST_STATIC_ASSERT(static_cast<int>(Type::String) == static_cast<int>(G_TYPE_STRING));
125  BOOST_STATIC_ASSERT(static_cast<int>(Type::Pointer) == static_cast<int>(G_TYPE_POINTER));
126  BOOST_STATIC_ASSERT(static_cast<int>(Type::Boxed) == static_cast<int>(G_TYPE_BOXED));
127  BOOST_STATIC_ASSERT(static_cast<int>(Type::Param) == static_cast<int>(G_TYPE_PARAM));
128  BOOST_STATIC_ASSERT(static_cast<int>(Type::Object) == static_cast<int>(G_TYPE_OBJECT));
129 }
130 
131 #include "QGlib/quark.h"
132 
133 #include "QGlib/refpointer.h"
134 
135 #include "QGlib/connect.h"
136 
137 
138 #include "QGlib/init.h"
139 
140 #include "QGlib/wrap.h"
141 
142 namespace QGlib {
143 namespace Private {
144  void registerWrapperConstructors()
145  {
146  QGlib::Quark q = g_quark_from_static_string("QGlib__wrapper_constructor");
147  QGlib::GetType<ParamSpec>().setQuarkData(q, reinterpret_cast<void*>(&ParamSpec_new));
148  QGlib::GetType<Object>().setQuarkData(q, reinterpret_cast<void*>(&Object_new));
149  QGlib::GetType<Interface>().setQuarkData(q, reinterpret_cast<void*>(&Interface_new));
150  }
151 } //namespace Private
152 } //namespace QGlib
153 
Wrapper class for GValue.
Definition: value.h:74
Base class for interface wrappers.
Definition: object.h:99
Wrapper class for GParamSpec.
Definition: paramspec.h:34
Base class for all the reference-counted object wrappers.
Definition: refpointer.h:179
Wrapper class for GObject.
Definition: object.h:89
Wrapper class for GQuark.
Definition: quark.h:42
Wrapper class for GType.
Definition: type.h:63
Wrapper class for GError.
Definition: error.h:30