~ubuntu-branches/ubuntu/karmic/python-kde3/karmic

« back to all changes in this revision

Viewing changes to sip/khtml/khtmlview.sip

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2006-11-22 19:03:34 UTC
  • mfrom: (1.1.5 upstream) (3.1.1 etch)
  • Revision ID: james.westby@ubuntu.com-20061122190334-z7nhzu4dca926iam
Tags: 3.16.0-0ubuntu1
* New upstream release
* Build-depend on pyqt 3.17 and sip 4.5
* Add build-depends on /usr/lib/kde3/libkonsolepart.so
* Don't build for python 2.5, it fails to build
* Merge with Debian, remaining change:
  - kubuntu_01_dcop.diff patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 
6
6
 
7
7
//                 Generated by preSip
8
 
//            module khtml  version KDE_3_5_2
 
8
//            module khtml  version KDE 3.5.3
9
9
 
10
10
 
11
11
// This software is free software; you can redistribute it and/or
126
126
    void                 slotPaletteChanged ();
127
127
    void                 slotScrollBarMoved ();
128
128
 
129
 
 
130
 
 
131
 
 
132
 
 
133
 
%If ( KDE_3_5_2 -  )
134
 
 
135
129
//force
136
130
%ConvertToSubClassCode
137
131
    // The table of Python class objects indexed by their names.  The table
145
139
    sipClass = sipMapStringToClass(sipCpp -> className(),map,sizeof (map)/sizeof (map[0]));
146
140
%End
147
141
//end
148
 
%End
149
 
 
150
142
 
151
143
};  // class KHTMLView
152
144
 
153
 
 
154
 
 
155
 
%MappedType QList<KHTMLView>
156
 
//converts a Python list of KHTMLView
157
 
{
158
 
%TypeHeaderCode
159
 
#include <qlist.h>
160
 
%End
161
 
 
162
 
%ConvertFromTypeCode
163
 
    if (!sipCpp)
164
 
        return PyList_New (0);
165
 
 
166
 
    PyObject *pylist;
167
 
 
168
 
    // Create the list
169
 
 
170
 
    if ((pylist = PyList_New(0)) == NULL)
171
 
        return NULL;
172
 
 
173
 
    // Get it.
174
 
 
175
 
    QList<KHTMLView> *cpplist = (QList<KHTMLView> *)sipCpp;
176
 
    KHTMLView *cpp;
177
 
    PyObject *inst;
178
 
 
179
 
    // the loop depends on the type of iterator the  tmeplate makes available
180
 
    for(cpp = cpplist->first (); cpp != 0; cpp = cpplist->next () )
181
 
    {
182
 
        if (((inst = sipConvertFromInstance (cpp, sipClass_KHTMLView, sipTransferObj)) == NULL)
183
 
            || PyList_Append (pylist, inst) < 0)
184
 
        {
185
 
            Py_DECREF (pylist);
186
 
            return NULL;
187
 
        }
188
 
    }
189
 
 
190
 
    return pylist;
191
 
%End
192
 
 
193
 
%ConvertToTypeCode
194
 
    if (sipIsErr == NULL)
195
 
        return PyList_Check(sipPy);
196
 
 
197
 
    QList<KHTMLView> *cpplist = new QList<KHTMLView>;
198
 
 
199
 
    PyObject *elem;
200
 
    KHTMLView *cpp;
201
 
    int iserr = 0;
202
 
 
203
 
    for (int i = 0; i < PyList_Size (sipPy); i++)
204
 
    {
205
 
        elem = PyList_GET_ITEM (sipPy, i);
206
 
        cpp = (KHTMLView *)sipForceConvertTo_KHTMLView (elem, &iserr);
207
 
 
208
 
        if (iserr)
209
 
        {
210
 
            *sipIsErr = 1;
211
 
            delete cpplist;
212
 
            return 0;
213
 
        }
214
 
 
215
 
        cpplist->append (cpp);
216
 
    }
217
 
 
218
 
    *sipCppPtr = cpplist;
219
 
 
220
 
    return 1;
221
 
%End
222
 
};
223
 
 
224