1
/***************************************************************************
2
QtHelp4.xs - QtHelp perl extension
5
copyright : (C) 2010 by Chris Burel
6
email : chrisburel@gmail.com
7
***************************************************************************/
9
/***************************************************************************
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
16
***************************************************************************/
29
#include <smoke/qt/qthelp_smoke.h>
31
#include <smokeperl.h>
34
extern QList<Smoke*> smokeList;
37
resolve_classname_qthelp(smokeperl_object * o)
39
return perlqt_modules[o->smoke].binding->className(o->classId);
42
extern TypeHandler QtHelp4_handlers[];
44
static PerlQt4::Binding bindingqthelp;
46
MODULE = QtHelp4 PACKAGE = QtHelp4::_internal
53
AV* classList = newAV();
54
for (int i = 1; i <= qthelp_Smoke->numClasses; i++) {
55
if (qthelp_Smoke->classes[i].className && !qthelp_Smoke->classes[i].external)
56
av_push(classList, newSVpv(qthelp_Smoke->classes[i].className, 0));
58
RETVAL = newRV_noinc((SV*)classList);
66
for(int i = 1; i < qthelp_Smoke->numTypes; i++) {
67
Smoke::Type curType = qthelp_Smoke->types[i];
68
if( (curType.flags & Smoke::tf_elem) == Smoke::t_enum )
69
av_push(av, newSVpv(curType.name, 0));
71
RETVAL = newRV_noinc((SV*)av);
75
MODULE = QtHelp4 PACKAGE = QtHelp4
81
smokeList << qthelp_Smoke;
83
bindingqthelp = PerlQt4::Binding(qthelp_Smoke);
85
PerlQt4Module module = { "PerlQtHelp4", resolve_classname_qthelp, 0, &bindingqthelp };
86
perlqt_modules[qthelp_Smoke] = module;
88
install_handlers(QtHelp4_handlers);