1 //******************************************************************************
2 //  Copyright (c) 2005-2013 by Jan Van hijfte
3 //
4 //  See the included file COPYING.TXT for details about the copyright.
5 //
6 //  This program is distributed in the hope that it will be useful,
7 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
8 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9 //******************************************************************************
10 
11 
12 #include "qmetaobject_c.h"
13 
QMetaMethod_Create()14 QMetaMethodH QMetaMethod_Create()
15 {
16 	return (QMetaMethodH) new QMetaMethod();
17 }
18 
QMetaMethod_Destroy(QMetaMethodH handle)19 void QMetaMethod_Destroy(QMetaMethodH handle)
20 {
21 	delete (QMetaMethod *)handle;
22 }
23 
QMetaMethod_methodSignature(QMetaMethodH handle,QByteArrayH retval)24 void QMetaMethod_methodSignature(QMetaMethodH handle, QByteArrayH retval)
25 {
26 	*(QByteArray *)retval = ((QMetaMethod *)handle)->methodSignature();
27 }
28 
QMetaMethod_name(QMetaMethodH handle,QByteArrayH retval)29 void QMetaMethod_name(QMetaMethodH handle, QByteArrayH retval)
30 {
31 	*(QByteArray *)retval = ((QMetaMethod *)handle)->name();
32 }
33 
QMetaMethod_typeName(QMetaMethodH handle)34 const char* QMetaMethod_typeName(QMetaMethodH handle)
35 {
36 	return (const char*) ((QMetaMethod *)handle)->typeName();
37 }
38 
QMetaMethod_returnType(QMetaMethodH handle)39 int QMetaMethod_returnType(QMetaMethodH handle)
40 {
41 	return (int) ((QMetaMethod *)handle)->returnType();
42 }
43 
QMetaMethod_parameterCount(QMetaMethodH handle)44 int QMetaMethod_parameterCount(QMetaMethodH handle)
45 {
46 	return (int) ((QMetaMethod *)handle)->parameterCount();
47 }
48 
QMetaMethod_parameterType(QMetaMethodH handle,int index)49 int QMetaMethod_parameterType(QMetaMethodH handle, int index)
50 {
51 	return (int) ((QMetaMethod *)handle)->parameterType(index);
52 }
53 
QMetaMethod_getParameterTypes(QMetaMethodH handle,int * types)54 void QMetaMethod_getParameterTypes(QMetaMethodH handle, int* types)
55 {
56 	((QMetaMethod *)handle)->getParameterTypes(types);
57 }
58 
QMetaMethod_tag(QMetaMethodH handle)59 const char* QMetaMethod_tag(QMetaMethodH handle)
60 {
61 	return (const char*) ((QMetaMethod *)handle)->tag();
62 }
63 
QMetaMethod_access(QMetaMethodH handle)64 QMetaMethod::Access QMetaMethod_access(QMetaMethodH handle)
65 {
66 	return (QMetaMethod::Access) ((QMetaMethod *)handle)->access();
67 }
68 
QMetaMethod_methodType(QMetaMethodH handle)69 QMetaMethod::MethodType QMetaMethod_methodType(QMetaMethodH handle)
70 {
71 	return (QMetaMethod::MethodType) ((QMetaMethod *)handle)->methodType();
72 }
73 
QMetaMethod_attributes(QMetaMethodH handle)74 int QMetaMethod_attributes(QMetaMethodH handle)
75 {
76 	return (int) ((QMetaMethod *)handle)->attributes();
77 }
78 
QMetaMethod_methodIndex(QMetaMethodH handle)79 int QMetaMethod_methodIndex(QMetaMethodH handle)
80 {
81 	return (int) ((QMetaMethod *)handle)->methodIndex();
82 }
83 
QMetaMethod_revision(QMetaMethodH handle)84 int QMetaMethod_revision(QMetaMethodH handle)
85 {
86 	return (int) ((QMetaMethod *)handle)->revision();
87 }
88 
QMetaMethod_enclosingMetaObject(QMetaMethodH handle)89 const QMetaObjectH QMetaMethod_enclosingMetaObject(QMetaMethodH handle)
90 {
91 	return (const QMetaObjectH) ((QMetaMethod *)handle)->enclosingMetaObject();
92 }
93 
QMetaMethod_isValid(QMetaMethodH handle)94 bool QMetaMethod_isValid(QMetaMethodH handle)
95 {
96 	return (bool) ((QMetaMethod *)handle)->isValid();
97 }
98 
QMetaEnum_Create()99 QMetaEnumH QMetaEnum_Create()
100 {
101 	return (QMetaEnumH) new QMetaEnum();
102 }
103 
QMetaEnum_Destroy(QMetaEnumH handle)104 void QMetaEnum_Destroy(QMetaEnumH handle)
105 {
106 	delete (QMetaEnum *)handle;
107 }
108 
QMetaEnum_name(QMetaEnumH handle)109 const char* QMetaEnum_name(QMetaEnumH handle)
110 {
111 	return (const char*) ((QMetaEnum *)handle)->name();
112 }
113 
QMetaEnum_isFlag(QMetaEnumH handle)114 bool QMetaEnum_isFlag(QMetaEnumH handle)
115 {
116 	return (bool) ((QMetaEnum *)handle)->isFlag();
117 }
118 
QMetaEnum_keyCount(QMetaEnumH handle)119 int QMetaEnum_keyCount(QMetaEnumH handle)
120 {
121 	return (int) ((QMetaEnum *)handle)->keyCount();
122 }
123 
QMetaEnum_key(QMetaEnumH handle,int index)124 const char* QMetaEnum_key(QMetaEnumH handle, int index)
125 {
126 	return (const char*) ((QMetaEnum *)handle)->key(index);
127 }
128 
QMetaEnum_value(QMetaEnumH handle,int index)129 int QMetaEnum_value(QMetaEnumH handle, int index)
130 {
131 	return (int) ((QMetaEnum *)handle)->value(index);
132 }
133 
QMetaEnum_scope(QMetaEnumH handle)134 const char* QMetaEnum_scope(QMetaEnumH handle)
135 {
136 	return (const char*) ((QMetaEnum *)handle)->scope();
137 }
138 
QMetaEnum_keyToValue(QMetaEnumH handle,const char * key,bool * ok)139 int QMetaEnum_keyToValue(QMetaEnumH handle, const char* key, bool* ok)
140 {
141 	return (int) ((QMetaEnum *)handle)->keyToValue(key, ok);
142 }
143 
QMetaEnum_valueToKey(QMetaEnumH handle,int value)144 const char* QMetaEnum_valueToKey(QMetaEnumH handle, int value)
145 {
146 	return (const char*) ((QMetaEnum *)handle)->valueToKey(value);
147 }
148 
QMetaEnum_keysToValue(QMetaEnumH handle,const char * keys,bool * ok)149 int QMetaEnum_keysToValue(QMetaEnumH handle, const char* keys, bool* ok)
150 {
151 	return (int) ((QMetaEnum *)handle)->keysToValue(keys, ok);
152 }
153 
QMetaEnum_valueToKeys(QMetaEnumH handle,QByteArrayH retval,int value)154 void QMetaEnum_valueToKeys(QMetaEnumH handle, QByteArrayH retval, int value)
155 {
156 	*(QByteArray *)retval = ((QMetaEnum *)handle)->valueToKeys(value);
157 }
158 
QMetaEnum_enclosingMetaObject(QMetaEnumH handle)159 const QMetaObjectH QMetaEnum_enclosingMetaObject(QMetaEnumH handle)
160 {
161 	return (const QMetaObjectH) ((QMetaEnum *)handle)->enclosingMetaObject();
162 }
163 
QMetaEnum_isValid(QMetaEnumH handle)164 bool QMetaEnum_isValid(QMetaEnumH handle)
165 {
166 	return (bool) ((QMetaEnum *)handle)->isValid();
167 }
168 
QMetaProperty_Create()169 QMetaPropertyH QMetaProperty_Create()
170 {
171 	return (QMetaPropertyH) new QMetaProperty();
172 }
173 
QMetaProperty_Destroy(QMetaPropertyH handle)174 void QMetaProperty_Destroy(QMetaPropertyH handle)
175 {
176 	delete (QMetaProperty *)handle;
177 }
178 
QMetaProperty_name(QMetaPropertyH handle)179 const char* QMetaProperty_name(QMetaPropertyH handle)
180 {
181 	return (const char*) ((QMetaProperty *)handle)->name();
182 }
183 
QMetaProperty_typeName(QMetaPropertyH handle)184 const char* QMetaProperty_typeName(QMetaPropertyH handle)
185 {
186 	return (const char*) ((QMetaProperty *)handle)->typeName();
187 }
188 
QMetaProperty_type(QMetaPropertyH handle)189 QVariant::Type QMetaProperty_type(QMetaPropertyH handle)
190 {
191 	return (QVariant::Type) ((QMetaProperty *)handle)->type();
192 }
193 
QMetaProperty_userType(QMetaPropertyH handle)194 int QMetaProperty_userType(QMetaPropertyH handle)
195 {
196 	return (int) ((QMetaProperty *)handle)->userType();
197 }
198 
QMetaProperty_propertyIndex(QMetaPropertyH handle)199 int QMetaProperty_propertyIndex(QMetaPropertyH handle)
200 {
201 	return (int) ((QMetaProperty *)handle)->propertyIndex();
202 }
203 
QMetaProperty_isReadable(QMetaPropertyH handle)204 bool QMetaProperty_isReadable(QMetaPropertyH handle)
205 {
206 	return (bool) ((QMetaProperty *)handle)->isReadable();
207 }
208 
QMetaProperty_isWritable(QMetaPropertyH handle)209 bool QMetaProperty_isWritable(QMetaPropertyH handle)
210 {
211 	return (bool) ((QMetaProperty *)handle)->isWritable();
212 }
213 
QMetaProperty_isResettable(QMetaPropertyH handle)214 bool QMetaProperty_isResettable(QMetaPropertyH handle)
215 {
216 	return (bool) ((QMetaProperty *)handle)->isResettable();
217 }
218 
QMetaProperty_isDesignable(QMetaPropertyH handle,const QObjectH obj)219 bool QMetaProperty_isDesignable(QMetaPropertyH handle, const QObjectH obj)
220 {
221 	return (bool) ((QMetaProperty *)handle)->isDesignable((const QObject*)obj);
222 }
223 
QMetaProperty_isScriptable(QMetaPropertyH handle,const QObjectH obj)224 bool QMetaProperty_isScriptable(QMetaPropertyH handle, const QObjectH obj)
225 {
226 	return (bool) ((QMetaProperty *)handle)->isScriptable((const QObject*)obj);
227 }
228 
QMetaProperty_isStored(QMetaPropertyH handle,const QObjectH obj)229 bool QMetaProperty_isStored(QMetaPropertyH handle, const QObjectH obj)
230 {
231 	return (bool) ((QMetaProperty *)handle)->isStored((const QObject*)obj);
232 }
233 
QMetaProperty_isEditable(QMetaPropertyH handle,const QObjectH obj)234 bool QMetaProperty_isEditable(QMetaPropertyH handle, const QObjectH obj)
235 {
236 	return (bool) ((QMetaProperty *)handle)->isEditable((const QObject*)obj);
237 }
238 
QMetaProperty_isUser(QMetaPropertyH handle,const QObjectH obj)239 bool QMetaProperty_isUser(QMetaPropertyH handle, const QObjectH obj)
240 {
241 	return (bool) ((QMetaProperty *)handle)->isUser((const QObject*)obj);
242 }
243 
QMetaProperty_isConstant(QMetaPropertyH handle)244 bool QMetaProperty_isConstant(QMetaPropertyH handle)
245 {
246 	return (bool) ((QMetaProperty *)handle)->isConstant();
247 }
248 
QMetaProperty_isFinal(QMetaPropertyH handle)249 bool QMetaProperty_isFinal(QMetaPropertyH handle)
250 {
251 	return (bool) ((QMetaProperty *)handle)->isFinal();
252 }
253 
QMetaProperty_isFlagType(QMetaPropertyH handle)254 bool QMetaProperty_isFlagType(QMetaPropertyH handle)
255 {
256 	return (bool) ((QMetaProperty *)handle)->isFlagType();
257 }
258 
QMetaProperty_isEnumType(QMetaPropertyH handle)259 bool QMetaProperty_isEnumType(QMetaPropertyH handle)
260 {
261 	return (bool) ((QMetaProperty *)handle)->isEnumType();
262 }
263 
QMetaProperty_enumerator(QMetaPropertyH handle,QMetaEnumH retval)264 void QMetaProperty_enumerator(QMetaPropertyH handle, QMetaEnumH retval)
265 {
266 	*(QMetaEnum *)retval = ((QMetaProperty *)handle)->enumerator();
267 }
268 
QMetaProperty_hasNotifySignal(QMetaPropertyH handle)269 bool QMetaProperty_hasNotifySignal(QMetaPropertyH handle)
270 {
271 	return (bool) ((QMetaProperty *)handle)->hasNotifySignal();
272 }
273 
QMetaProperty_notifySignal(QMetaPropertyH handle,QMetaMethodH retval)274 void QMetaProperty_notifySignal(QMetaPropertyH handle, QMetaMethodH retval)
275 {
276 	*(QMetaMethod *)retval = ((QMetaProperty *)handle)->notifySignal();
277 }
278 
QMetaProperty_notifySignalIndex(QMetaPropertyH handle)279 int QMetaProperty_notifySignalIndex(QMetaPropertyH handle)
280 {
281 	return (int) ((QMetaProperty *)handle)->notifySignalIndex();
282 }
283 
QMetaProperty_revision(QMetaPropertyH handle)284 int QMetaProperty_revision(QMetaPropertyH handle)
285 {
286 	return (int) ((QMetaProperty *)handle)->revision();
287 }
288 
QMetaProperty_read(QMetaPropertyH handle,QVariantH retval,const QObjectH obj)289 void QMetaProperty_read(QMetaPropertyH handle, QVariantH retval, const QObjectH obj)
290 {
291 	*(QVariant *)retval = ((QMetaProperty *)handle)->read((const QObject*)obj);
292 }
293 
QMetaProperty_write(QMetaPropertyH handle,QObjectH obj,const QVariantH value)294 bool QMetaProperty_write(QMetaPropertyH handle, QObjectH obj, const QVariantH value)
295 {
296 	return (bool) ((QMetaProperty *)handle)->write((QObject*)obj, *(const QVariant*)value);
297 }
298 
QMetaProperty_reset(QMetaPropertyH handle,QObjectH obj)299 bool QMetaProperty_reset(QMetaPropertyH handle, QObjectH obj)
300 {
301 	return (bool) ((QMetaProperty *)handle)->reset((QObject*)obj);
302 }
303 
QMetaProperty_hasStdCppSet(QMetaPropertyH handle)304 bool QMetaProperty_hasStdCppSet(QMetaPropertyH handle)
305 {
306 	return (bool) ((QMetaProperty *)handle)->hasStdCppSet();
307 }
308 
QMetaProperty_isValid(QMetaPropertyH handle)309 bool QMetaProperty_isValid(QMetaPropertyH handle)
310 {
311 	return (bool) ((QMetaProperty *)handle)->isValid();
312 }
313 
QMetaProperty_enclosingMetaObject(QMetaPropertyH handle)314 const QMetaObjectH QMetaProperty_enclosingMetaObject(QMetaPropertyH handle)
315 {
316 	return (const QMetaObjectH) ((QMetaProperty *)handle)->enclosingMetaObject();
317 }
318 
QMetaClassInfo_Create()319 QMetaClassInfoH QMetaClassInfo_Create()
320 {
321 	return (QMetaClassInfoH) new QMetaClassInfo();
322 }
323 
QMetaClassInfo_Destroy(QMetaClassInfoH handle)324 void QMetaClassInfo_Destroy(QMetaClassInfoH handle)
325 {
326 	delete (QMetaClassInfo *)handle;
327 }
328 
QMetaClassInfo_name(QMetaClassInfoH handle)329 const char* QMetaClassInfo_name(QMetaClassInfoH handle)
330 {
331 	return (const char*) ((QMetaClassInfo *)handle)->name();
332 }
333 
QMetaClassInfo_value(QMetaClassInfoH handle)334 const char* QMetaClassInfo_value(QMetaClassInfoH handle)
335 {
336 	return (const char*) ((QMetaClassInfo *)handle)->value();
337 }
338 
QMetaClassInfo_enclosingMetaObject(QMetaClassInfoH handle)339 const QMetaObjectH QMetaClassInfo_enclosingMetaObject(QMetaClassInfoH handle)
340 {
341 	return (const QMetaObjectH) ((QMetaClassInfo *)handle)->enclosingMetaObject();
342 }
343 
344