~ubuntu-branches/ubuntu/natty/kdebindings/natty

« back to all changes in this revision

Viewing changes to perl/plasma/src/Plasma4.xs

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2010-12-01 11:14:38 UTC
  • mfrom: (1.1.41 upstream)
  • Revision ID: james.westby@ubuntu.com-20101201111438-1q61cvs8zw118t3m
Tags: 4:4.5.80-0ubuntu1
* New upstream release
* Remove build-dep on libqimageblitz-dev, causes smoke to segfault

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
                          Plasma4.xs  -  Plasma perl extension
3
3
                             -------------------
4
4
    begin                : 04-02-2010
5
 
    copyright            : (C) 2009 by Chris Burel
 
5
    copyright            : (C) 2010 by Chris Burel
6
6
    email                : chrisburel@gmail.com
7
7
 ***************************************************************************/
8
8
 
17
17
 
18
18
#include <QHash>
19
19
#include <QList>
20
 
#include <QtDebug>
21
 
 
22
 
#include <iostream>
23
20
 
24
21
// Perl headers
25
22
extern "C" {
62
59
    OUTPUT:
63
60
        RETVAL
64
61
 
 
62
SV*
 
63
getEnumList()
 
64
    CODE:
 
65
        AV *av = newAV();
 
66
        for(int i = 1; i < plasma_Smoke->numTypes; i++) {
 
67
            Smoke::Type curType = plasma_Smoke->types[i];
 
68
            if( (curType.flags & Smoke::tf_elem) == Smoke::t_enum )
 
69
                av_push(av, newSVpv(curType.name, 0));
 
70
        }
 
71
        RETVAL = newRV_noinc((SV*)av);
 
72
    OUTPUT:
 
73
        RETVAL
 
74
 
65
75
MODULE = Plasma4            PACKAGE = Plasma4
66
76
 
67
77
PROTOTYPES: ENABLE