~ubuntu-branches/ubuntu/natty/pyside/natty

« back to all changes in this revision

Viewing changes to PySide/QtOpenGL/typesystem_opengl.xml

  • Committer: Bazaar Package Importer
  • Author(s): Didier Raboud
  • Date: 2011-02-18 18:01:00 UTC
  • mfrom: (1.2.3 upstream) (6.1.6 experimental)
  • Revision ID: james.westby@ubuntu.com-20110218180100-vaczjij7g08fzfme
Tags: 1.0.0~rc1-1
* New 1.0.0~rc1 upstream release
  - Bump the B-D chain versions:
    + apiextractor to 0.10.0-2~
    + generatorrunner to 0.6.6
    + shiboken to 1.0.0~rc1
* Update patches to ~rc1.
* debian/watch: update to handle Release Candidates too.
* Bump XS-Python-Version to >= 2.6.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
  <load-typesystem name="typesystem_gui.xml" generate="no" />
23
23
 
24
24
  <rejection class="QGLColormap::QGLColormapData"/>
25
 
  <rejection class="QGLWidget" function-name="setMouseTracking"/>
26
25
  <rejection class="QGLContext" field-name="currentCtx"/>
27
26
 
28
27
  <namespace-type name="QGL">
119
118
      <inject-code class="target" position="beginning">
120
119
        int size = %2;
121
120
        if (size &lt; 0)
122
 
            size = %1->size();
123
 
        %CPPSELF.allocate((const void*) %1->data(), size);
 
121
            size = %1.size();
 
122
        %CPPSELF.allocate((const void*) %1.data(), size);
124
123
      </inject-code>
125
124
    </modify-function>
126
125
    <modify-function signature="map(QGLBuffer::Access)">
127
 
      <inject-code class="target" position="beginning">
128
 
        void *data = %CPPSELF.map(%1);
129
 
        QByteArray ret;
130
 
        if (data)
131
 
            ret.append((const char*)data, %CPPSELF.size());
132
 
        %PYARG_0 = %CONVERTTOPYTHON[QByteArray](ret);
 
126
      <inject-code>
 
127
        Py_ssize_t dataSize = %CPPSELF.size();
 
128
        void* data = %CPPSELF.map(%1);
 
129
 
 
130
        if (!data) {
 
131
            Py_INCREF(Py_None);
 
132
            %PYARG_0 = Py_None;
 
133
        } else if (%1 == QGLBuffer::ReadOnly) {
 
134
            %PYARG_0 = PyBuffer_FromMemory(data, dataSize);
 
135
        } else {
 
136
            %PYARG_0 = PyBuffer_FromReadWriteMemory(data, dataSize);
 
137
        }
133
138
      </inject-code>
134
139
    </modify-function>
135
140
    <modify-function signature="read(int, void*, int)">
159
164
      <inject-code class="target" position="beginning">
160
165
        int size = %3;
161
166
        if (size &lt; 0)
162
 
            size = %2->size();
163
 
        %CPPSELF.write(%1, (const void*) %2->data(), size);
 
167
            size = %2.size();
 
168
        %CPPSELF.write(%1, (const void*) %2.data(), size);
164
169
      </inject-code>
165
170
    </modify-function>
166
171
  </object-type>