Created
June 7, 2009 20:57
-
-
Save anonymous/125487 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // example: QS_BIND_MODULE(new QScriptEngine, core) | |
| #define QS_BIND_MODULE(engine, modulename) \ | |
| extern void qtscript_initialize_com_trolltech_qt_##modulename##_bindings(QScriptValue &extensionObject); \ | |
| { QScriptValue extensionObject = (engine)->globalObject(); \ | |
| qtscript_initialize_com_trolltech_qt_##modulename##_bindings(extensionObject); } | |
| // example: QS_BIND_CLASS(new QScriptEngine, QPushButton) | |
| #define QS_BIND_CLASS(engine, classname) \ | |
| extern QScriptValue qtscript_create_##classname##_class(QScriptEngine*); \ | |
| (engine)->globalObject().setProperty(#classname, \ | |
| qtscript_create_##classname##_class((engine)), \ | |
| QScriptValue::SkipInEnumeration); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment