repos
/
qt.gui
/ annotate_shade
summary
|
shortlog
|
log
|
tree
|
commit
|
commitdiff
|
headdiff
|
annotate
|
filehistory
normal
|
plain
|
shade
|
zebra
Support ownership transfer to non smoke wrapped QObjects & cleanup C++ to Lisp translation.
Annotate for file src/lib/qt-smoke.cpp
2010-01-10 tobias
1
#include <qnamespace.h>
08:52:49 '
2
#include <QEvent>
'
3
#include <QtDebug>
'
4
'
5
#include "cl_smoke_qt.h"
'
6
'
7
/** @file
'
8
* @brief Qt support functions */
'
9
'
10
extern "C" {
'
11
'
12
/** Registers a callback to be invoked for every QEvent.
'
13
* @see QCoreApplication::notifyInternal
'
14
*
'
15
* @param callback the callback
'
16
*
2009-08-02 tobias
17
* @return @c true on success and @c false otherwise
2010-01-10 tobias
18
*/
08:52:49 '
19
CL_SMOKE_QT_EXPORT int
'
20
qt_smoke_register_event_notify(void* callback)
'
21
{
'
22
Q_ASSERT(callback);
'
23
'
24
return QInternal::registerCallback(QInternal::EventNotifyCallback,
'
25
reinterpret_cast<qInternalCallback>(callback));
'
26
}
'
27
2009-08-02 tobias
28
/** Returns the most specific QMetaObject of the QObject instance @a object.
11:15:21 '
29
* Used to determine the actual class of an object. Smoke can not be used since it calls the
'
30
* metaObject() of the class the method was called for.
'
31
*
'
32
* @param object A QObject
'
33
*
'
34
* @return QMetaObject
'
35
*/
'
36
CL_SMOKE_QT_EXPORT void*
'
37
qt_smoke_meta_object(void* object)
'
38
{
'
39
Q_ASSERT(object);
'
40
static_cast<QObject*>(object)->metaObject();
'
41
}
'
42
'
43
2010-01-10 tobias
44
} // extern "C"