1
/***************************************************************************
2
KTextEditor.xs - KTextEditor 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/ktexteditor_smoke.h>
31
#include <smokeperl.h>
34
extern QList<Smoke*> smokeList;
38
resolve_classname_ktexteditor(smokeperl_object * o)
40
return perlqt_modules[o->smoke].binding->className(o->classId);
43
extern TypeHandler KTextEditor_handlers[];
45
static PerlQt4::Binding bindingktexteditor;
47
MODULE = KTextEditor PACKAGE = KTextEditor::_internal
54
AV* classList = newAV();
55
for (int i = 1; i < ktexteditor_Smoke->numClasses; i++) {
56
if (ktexteditor_Smoke->classes[i].className && !ktexteditor_Smoke->classes[i].external)
57
av_push(classList, newSVpv(ktexteditor_Smoke->classes[i].className, 0));
59
RETVAL = newRV_noinc((SV*)classList);
67
for(int i = 1; i < ktexteditor_Smoke->numTypes; i++) {
68
Smoke::Type curType = ktexteditor_Smoke->types[i];
69
if( (curType.flags & Smoke::tf_elem) == Smoke::t_enum )
70
av_push(av, newSVpv(curType.name, 0));
72
RETVAL = newRV_noinc((SV*)av);
76
MODULE = KTextEditor PACKAGE = KTextEditor
81
init_ktexteditor_Smoke();
82
smokeList << ktexteditor_Smoke;
84
bindingktexteditor = PerlQt4::Binding(ktexteditor_Smoke);
86
PerlQt4Module module = { "PerlKTextEditor", resolve_classname_ktexteditor, 0, &bindingktexteditor };
87
perlqt_modules[ktexteditor_Smoke] = module;
89
install_handlers(KTextEditor_handlers);
b'\\ No newline at end of file'