PLplot
5.10.0
|
00001 /* 00002 * Module code. 00003 * 00004 * Generated by SIP 4.16.4 on Wed Dec 10 03:55:21 2014 00005 */ 00006 00007 #include "sipAPIplplot_pyqt4.h" 00008 00009 #line 34 "/usr/share/sip/PyQt4/QtCore/qobject.sip" 00010 #include <qobject.h> 00011 #line 12 "./sipplplot_pyqt4cmodule.cpp" 00012 #line 66 "/usr/src/RPM/BUILD/plplot-5.10.0/bindings/qt_gui/pyqt4/plplot_pyqt4.sip" 00013 #include "qt.h" 00014 #line 15 "./sipplplot_pyqt4cmodule.cpp" 00015 #line 33 "/usr/src/RPM/BUILD/plplot-5.10.0/bindings/qt_gui/pyqt4/plplot_pyqt4.sip" 00016 #include "qt.h" 00017 #line 18 "./sipplplot_pyqt4cmodule.cpp" 00018 00019 /* Define the strings used by this module. */ 00020 const char sipStrings_plplot_pyqt4[] = { 00021 'P', 'y', 'Q', 't', '4', '.', 'Q', 't', 'C', 'o', 'r', 'e', '.', 'p', 'y', 'q', 't', 'W', 'r', 'a', 'p', 'p', 'e', 'r', 'T', 'y', 'p', 'e', 0, 00022 'c', 'a', 'p', 't', 'u', 'r', 'e', 'M', 'o', 'u', 's', 'e', 'P', 'l', 'o', 't', 'C', 'o', 'o', 'r', 'd', 's', 0, 00023 'w', 'i', 'n', 'd', 'o', 'w', 'A', 'c', 't', 'i', 'v', 'a', 't', 'i', 'o', 'n', 'C', 'h', 'a', 'n', 'g', 'e', 0, 00024 'm', 'o', 'u', 's', 'e', 'D', 'o', 'u', 'b', 'l', 'e', 'C', 'l', 'i', 'c', 'k', 'E', 'v', 'e', 'n', 't', 0, 00025 'd', 'e', 'f', 'a', 'u', 'l', 't', 'B', 'u', 't', 't', 'o', 'n', 'N', 'u', 'm', 'b', 'e', 'r', 0, 00026 'f', 'o', 'c', 'u', 's', 'P', 'r', 'e', 'v', 'i', 'o', 'u', 's', 'C', 'h', 'i', 'l', 'd', 0, 00027 'e', 's', 'c', 'a', 'p', 'e', 'B', 'u', 't', 't', 'o', 'n', 'N', 'u', 'm', 'b', 'e', 'r', 0, 00028 'f', 'o', 'c', 'u', 's', 'N', 'e', 'x', 't', 'P', 'r', 'e', 'v', 'C', 'h', 'i', 'l', 'd', 0, 00029 'g', 'e', 't', 'P', 'l', 'o', 't', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 's', 0, 00030 'd', 'e', 's', 't', 'r', 'o', 'y', 'S', 'u', 'b', 'W', 'i', 'n', 'd', 'o', 'w', 's', 0, 00031 'r', 'e', 's', 'e', 't', 'I', 'n', 'p', 'u', 't', 'C', 'o', 'n', 't', 'e', 'x', 't', 0, 00032 'm', 'o', 'u', 's', 'e', 'R', 'e', 'l', 'e', 'a', 's', 'e', 'E', 'v', 'e', 'n', 't', 0, 00033 's', 'e', 'n', 'd', 'e', 'r', 'S', 'i', 'g', 'n', 'a', 'l', 'I', 'n', 'd', 'e', 'x', 0, 00034 'd', 'e', 's', 't', 'r', 'o', 'y', 'O', 'l', 'd', 'W', 'i', 'n', 'd', 'o', 'w', 0, 00035 'i', 'n', 'i', 't', 'i', 'a', 'l', 'i', 'z', 'e', 'W', 'i', 'n', 'd', 'o', 'w', 0, 00036 'u', 'p', 'd', 'a', 't', 'e', 'M', 'i', 'c', 'r', 'o', 'F', 'o', 'c', 'u', 's', 0, 00037 'c', 'o', 'n', 't', 'e', 'x', 't', 'M', 'e', 'n', 'u', 'E', 'v', 'e', 'n', 't', 0, 00038 'i', 'n', 'p', 'u', 't', 'M', 'e', 't', 'h', 'o', 'd', 'E', 'v', 'e', 'n', 't', 0, 00039 'i', 'n', 'p', 'u', 't', 'M', 'e', 't', 'h', 'o', 'd', 'Q', 'u', 'e', 'r', 'y', 0, 00040 'd', 'i', 's', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'N', 'o', 't', 'i', 'f', 'y', 0, 00041 'a', 's', 'p', 'e', 'c', 't', 'R', 'a', 't', 'i', 'o', 'M', 'o', 'd', 'e', 0, 00042 'd', 'e', 'v', 'i', 'c', 'e', 'T', 'r', 'a', 'n', 's', 'f', 'o', 'r', 'm', 0, 00043 'm', 'i', 'n', 'i', 'm', 'u', 'm', 'S', 'i', 'z', 'e', 'H', 'i', 'n', 't', 0, 00044 'm', 'o', 'u', 's', 'e', 'P', 'r', 'e', 's', 's', 'E', 'v', 'e', 'n', 't', 0, 00045 'k', 'e', 'y', 'R', 'e', 'l', 'e', 'a', 's', 'e', 'E', 'v', 'e', 'n', 't', 0, 00046 'l', 'a', 'n', 'g', 'u', 'a', 'g', 'e', 'C', 'h', 'a', 'n', 'g', 'e', 0, 00047 'f', 'o', 'c', 'u', 's', 'N', 'e', 'x', 't', 'C', 'h', 'i', 'l', 'd', 0, 00048 's', 'e', 'l', 'e', 'c', 't', 'e', 'd', 'F', 'i', 'l', 't', 'e', 'r', 0, 00049 'h', 'e', 'i', 'g', 'h', 't', 'F', 'o', 'r', 'W', 'i', 'd', 't', 'h', 0, 00050 'd', 'r', 'a', 'g', 'L', 'e', 'a', 'v', 'e', 'E', 'v', 'e', 'n', 't', 0, 00051 'd', 'r', 'a', 'g', 'E', 'n', 't', 'e', 'r', 'E', 'v', 'e', 'n', 't', 0, 00052 'm', 'o', 'u', 's', 'e', 'M', 'o', 'v', 'e', 'E', 'v', 'e', 'n', 't', 0, 00053 'c', 'h', 'a', 'n', 'g', 'e', 'd', 'S', 'i', 'g', 'n', 'a', 'l', 0, 00054 'p', 'a', 'l', 'e', 't', 't', 'e', 'C', 'h', 'a', 'n', 'g', 'e', 0, 00055 'e', 'n', 'a', 'b', 'l', 'e', 'd', 'C', 'h', 'a', 'n', 'g', 'e', 0, 00056 'd', 'e', 's', 't', 'r', 'o', 'y', 'W', 'i', 'n', 'd', 'o', 'w', 0, 00057 't', 'r', 'a', 'n', 's', 'f', 'o', 'r', 'm', 'M', 'o', 'd', 'e', 0, 00058 't', 'h', 'r', 'e', 's', 'h', 'o', 'l', 'd', 'T', 'i', 'm', 'e', 0, 00059 'd', 'r', 'a', 'g', 'M', 'o', 'v', 'e', 'E', 'v', 'e', 'n', 't', 0, 00060 'f', 'o', 'c', 'u', 's', 'O', 'u', 't', 'E', 'v', 'e', 'n', 't', 0, 00061 'k', 'e', 'y', 'P', 'r', 'e', 's', 's', 'E', 'v', 'e', 'n', 't', 0, 00062 's', 'o', 'u', 'r', 'c', 'e', 'R', 'e', 'g', 'i', 'o', 'n', 0, 00063 't', 'a', 'r', 'g', 'e', 't', 'O', 'f', 'f', 's', 'e', 't', 0, 00064 'b', 'o', 'u', 'n', 'd', 'i', 'n', 'g', 'R', 'e', 'c', 't', 0, 00065 'm', 'i', 'd', 'L', 'i', 'n', 'e', 'W', 'i', 'd', 't', 'h', 0, 00066 'f', 'o', 'c', 'u', 's', 'I', 'n', 'E', 'v', 'e', 'n', 't', 0, 00067 'p', 'l', 'p', 'l', 'o', 't', '_', 'p', 'y', 'q', 't', '4', 0, 00068 'p', 'l', 'f', 'r', 'e', 'e', 'q', 't', 'd', 'e', 'v', 0, 00069 'Q', 't', 'E', 'x', 't', 'W', 'i', 'd', 'g', 'e', 't', 0, 00070 'c', 'l', 'e', 'a', 'r', 'W', 'i', 'd', 'g', 'e', 't', 0, 00071 't', 'a', 'b', 'l', 'e', 't', 'E', 'v', 'e', 'n', 't', 0, 00072 'b', 'u', 't', 't', 'o', 'n', '2', 'T', 'e', 'x', 't', 0, 00073 'b', 'u', 't', 't', 'o', 'n', '1', 'T', 'e', 'x', 't', 0, 00074 'a', 'c', 't', 'i', 'o', 'n', 'E', 'v', 'e', 'n', 't', 0, 00075 'p', 'a', 'i', 'n', 't', 'E', 'n', 'g', 'i', 'n', 'e', 0, 00076 'r', 'e', 's', 'i', 'z', 'e', 'E', 'v', 'e', 'n', 't', 0, 00077 'c', 'h', 'a', 'n', 'g', 'e', 'E', 'v', 'e', 'n', 't', 0, 00078 'c', 'u', 's', 't', 'o', 'm', 'E', 'v', 'e', 'n', 't', 0, 00079 'e', 'v', 'e', 'n', 't', 'F', 'i', 'l', 't', 'e', 'r', 0, 00080 'p', 'l', 's', 'e', 't', 'q', 't', 'd', 'e', 'v', 0, 00081 'Q', 't', 'P', 'L', 'W', 'i', 'd', 'g', 'e', 't', 0, 00082 'Q', 't', 'P', 'L', 'D', 'r', 'i', 'v', 'e', 'r', 0, 00083 'f', 'o', 'n', 't', 'C', 'h', 'a', 'n', 'g', 'e', 0, 00084 'e', 'n', 't', 'e', 'r', 'E', 'v', 'e', 'n', 't', 0, 00085 'l', 'e', 'a', 'v', 'e', 'E', 'v', 'e', 'n', 't', 0, 00086 'c', 'o', 'l', 'u', 'm', 'n', 'S', 'p', 'a', 'n', 0, 00087 'c', 'o', 'n', 's', 't', 'r', 'a', 'i', 'n', 't', 0, 00088 's', 'e', 't', 'V', 'i', 's', 'i', 'b', 'l', 'e', 0, 00089 'c', 'l', 'o', 's', 'e', 'E', 'v', 'e', 'n', 't', 0, 00090 'r', 'e', 'p', 'e', 'a', 't', 'T', 'i', 'm', 'e', 0, 00091 'w', 'h', 'e', 'e', 'l', 'E', 'v', 'e', 'n', 't', 0, 00092 'p', 'a', 'i', 'n', 't', 'E', 'v', 'e', 'n', 't', 0, 00093 'f', 'i', 'e', 'l', 'd', 'W', 'i', 'd', 't', 'h', 0, 00094 'c', 'h', 'i', 'l', 'd', 'E', 'v', 'e', 'n', 't', 0, 00095 't', 'i', 'm', 'e', 'r', 'E', 'v', 'e', 'n', 't', 0, 00096 'o', 'p', 'e', 'r', 'a', 't', 'i', 'o', 'n', 0, 00097 'm', 'o', 'v', 'e', 'E', 'v', 'e', 'n', 't', 0, 00098 'l', 'i', 'n', 'e', 'W', 'i', 'd', 't', 'h', 0, 00099 's', 'h', 'o', 'w', 'E', 'v', 'e', 'n', 't', 0, 00100 'h', 'i', 'd', 'e', 'E', 'v', 'e', 'n', 't', 0, 00101 'd', 'r', 'o', 'p', 'E', 'v', 'e', 'n', 't', 0, 00102 'd', 'i', 'r', 'e', 'c', 't', 'o', 'r', 'y', 0, 00103 'a', 'l', 'i', 'g', 'n', 'm', 'e', 'n', 't', 0, 00104 'r', 'e', 'c', 'e', 'i', 'v', 'e', 'r', 's', 0, 00105 'p', 'r', 'e', 'c', 'i', 's', 'i', 'o', 'n', 0, 00106 'n', 'e', 'x', 't', 'P', 'a', 'g', 'e', 0, 00107 'f', 'i', 'l', 'l', 'R', 'u', 'l', 'e', 0, 00108 't', 'a', 'b', 'A', 'r', 'r', 'a', 'y', 0, 00109 't', 'a', 'b', 'S', 't', 'o', 'p', 's', 0, 00110 'u', 's', 'e', 'r', 'D', 'a', 't', 'a', 0, 00111 's', 'i', 'z', 'e', 'H', 'i', 'n', 't', 0, 00112 's', 'h', 'o', 'r', 't', 'c', 'u', 't', 0, 00113 'b', 'e', 'h', 'a', 'v', 'i', 'o', 'r', 0, 00114 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', 0, 00115 'f', 'i', 'l', 'l', 'C', 'h', 'a', 'r', 0, 00116 'p', 'r', 'o', 'p', 'e', 'r', 't', 'y', 0, 00117 'd', 'e', 's', 't', 'r', 'o', 'y', 0, 00118 'e', 'x', 'p', 'o', 's', 'e', 'd', 0, 00119 'b', 'u', 't', 't', 'o', 'n', '2', 0, 00120 'b', 'u', 't', 't', 'o', 'n', '1', 0, 00121 'q', 'u', 'a', 'l', 'i', 't', 'y', 0, 00122 'd', 'e', 'v', 'T', 'y', 'p', 'e', 0, 00123 'y', 'M', 'a', 'r', 'g', 'i', 'n', 0, 00124 'x', 'M', 'a', 'r', 'g', 'i', 'n', 0, 00125 'r', 'o', 'w', 'S', 'p', 'a', 'n', 0, 00126 'c', 'a', 'p', 't', 'i', 'o', 'n', 0, 00127 'o', 'p', 't', 'i', 'o', 'n', 's', 0, 00128 'e', 'n', 'a', 'b', 'l', 'e', 'd', 0, 00129 'f', 'i', 'l', 't', 'e', 'r', 's', 0, 00130 'y', 'R', 'o', 'u', 'n', 'd', 0, 00131 'x', 'R', 'o', 'u', 'n', 'd', 0, 00132 'm', 'e', 't', 'r', 'i', 'c', 0, 00133 'l', 'a', 'y', 'e', 'r', 's', 0, 00134 'w', 'i', 'n', 'd', 'o', 'w', 0, 00135 's', 'u', 'n', 'k', 'e', 'n', 0, 00136 'o', 'p', 't', 'i', 'o', 'n', 0, 00137 'w', 'i', 'd', 'g', 'e', 't', 0, 00138 'p', 'r', 'o', 'p', 'e', 'r', 0, 00139 's', 'e', 'n', 'd', 'e', 'r', 0, 00140 'v', 'a', 'l', 'u', 'e', '9', 0, 00141 'v', 'a', 'l', 'u', 'e', '8', 0, 00142 'v', 'a', 'l', 'u', 'e', '7', 0, 00143 'v', 'a', 'l', 'u', 'e', '6', 0, 00144 'v', 'a', 'l', 'u', 'e', '5', 0, 00145 'v', 'a', 'l', 'u', 'e', '4', 0, 00146 'v', 'a', 'l', 'u', 'e', '3', 0, 00147 'v', 'a', 'l', 'u', 'e', '0', 0, 00148 's', 'y', 's', 't', 'e', 'm', 0, 00149 's', 'y', 'm', 'b', 'o', 'l', 0, 00150 's', 'u', 'f', 'f', 'i', 'x', 0, 00151 'p', 'r', 'e', 'f', 'i', 'x', 0, 00152 'f', 'o', 'r', 'm', 'a', 't', 0, 00153 'v', 'a', 'l', 'u', 'e', '2', 0, 00154 'v', 'a', 'l', 'u', 'e', '1', 0, 00155 'a', 'c', 't', 'i', 'o', 'n', 0, 00156 'c', 'o', 'l', 'u', 'm', 'n', 0, 00157 'o', 'f', 'f', 's', 'e', 't', 0, 00158 'c', 'r', 'e', 'a', 't', 'e', 0, 00159 'f', 'i', 'l', 't', 'e', 'r', 0, 00160 'o', 'b', 'j', 'e', 'c', 't', 0, 00161 'p', 'a', 'r', 'e', 'n', 't', 0, 00162 'b', 'r', 'u', 's', 'h', 0, 00163 'h', 'i', 'n', 't', 's', 0, 00164 'f', 'l', 'a', 'g', 's', 0, 00165 'e', 'v', 'e', 'n', 't', 0, 00166 'm', 's', 'e', 'c', 's', 0, 00167 's', 't', 'a', 't', 'e', 0, 00168 'm', 'o', 'd', 'e', 0, 00169 'n', 'a', 'm', 'e', 0, 00170 'b', 'a', 's', 'e', 0, 00171 'f', 'i', 'l', 'l', 0, 00172 'f', 'r', 'o', 'm', 0, 00173 's', 'o', 'r', 't', 0, 00174 'p', 'e', 'n', 0, 00175 'e', 'n', 'd', 0, 00176 'p', 'o', 's', 0, 00177 's', 'w', 0, 00178 's', 'y', 0, 00179 's', 'x', 0, 00180 }; 00181 00182 00183 extern "C" {static PyObject *func_plfreeqtdev(PyObject *,PyObject *);} 00184 static PyObject *func_plfreeqtdev(PyObject *,PyObject *sipArgs) 00185 { 00186 PyObject *sipParseErr = NULL; 00187 00188 { 00189 if (sipParseArgs(&sipParseErr, sipArgs, "")) 00190 { 00191 Py_BEGIN_ALLOW_THREADS 00192 plfreeqtdev(); 00193 Py_END_ALLOW_THREADS 00194 00195 Py_INCREF(Py_None); 00196 return Py_None; 00197 } 00198 } 00199 00200 /* Raise an exception if the arguments couldn't be parsed. */ 00201 sipNoFunction(sipParseErr, sipName_plfreeqtdev, NULL); 00202 00203 return NULL; 00204 } 00205 00206 00207 extern "C" {static PyObject *func_plsetqtdev(PyObject *,PyObject *);} 00208 static PyObject *func_plsetqtdev(PyObject *,PyObject *sipArgs) 00209 { 00210 PyObject *sipParseErr = NULL; 00211 00212 { 00213 QtExtWidget* a0; 00214 00215 if (sipParseArgs(&sipParseErr, sipArgs, "J8", sipType_QtExtWidget, &a0)) 00216 { 00217 Py_BEGIN_ALLOW_THREADS 00218 plsetqtdev(a0); 00219 Py_END_ALLOW_THREADS 00220 00221 Py_INCREF(Py_None); 00222 return Py_None; 00223 } 00224 } 00225 00226 /* Raise an exception if the arguments couldn't be parsed. */ 00227 sipNoFunction(sipParseErr, sipName_plsetqtdev, NULL); 00228 00229 return NULL; 00230 } 00231 00232 00233 /* 00234 * This defines each type in this module. 00235 */ 00236 static sipTypeDef *typesTable[] = { 00237 &sipTypeDef_plplot_pyqt4_QtExtWidget.super.ctd_base, 00238 &sipTypeDef_plplot_pyqt4_QtPLDriver.super.ctd_base, 00239 &sipTypeDef_plplot_pyqt4_QtPLWidget.super.ctd_base, 00240 }; 00241 00242 00243 /* This defines the modules that this module needs to import. */ 00244 static sipImportedModuleDef importsTable[] = { 00245 {"PyQt4.QtCore", 1, NULL}, 00246 {"PyQt4.QtGui", -1, NULL}, 00247 {NULL, -1, NULL} 00248 }; 00249 00250 00251 /* This defines this module. */ 00252 sipExportedModuleDef sipModuleAPI_plplot_pyqt4 = { 00253 0, 00254 SIP_API_MINOR_NR, 00255 sipNameNr_plplot_pyqt4, 00256 0, 00257 0, 00258 sipStrings_plplot_pyqt4, 00259 importsTable, 00260 NULL, 00261 3, 00262 typesTable, 00263 NULL, 00264 0, 00265 NULL, 00266 0, 00267 NULL, 00268 NULL, 00269 NULL, 00270 NULL, 00271 {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, 00272 NULL, 00273 NULL, 00274 NULL, 00275 NULL, 00276 NULL, 00277 NULL, 00278 NULL, 00279 NULL 00280 }; 00281 00282 00283 /* The SIP API and the APIs of any imported modules. */ 00284 const sipAPIDef *sipAPI_plplot_pyqt4; 00285 const sipExportedModuleDef *sipModuleAPI_plplot_pyqt4_QtCore; 00286 const sipExportedModuleDef *sipModuleAPI_plplot_pyqt4_QtGui; 00287 00288 sip_qt_metaobject_func sip_plplot_pyqt4_qt_metaobject; 00289 sip_qt_metacall_func sip_plplot_pyqt4_qt_metacall; 00290 sip_qt_metacast_func sip_plplot_pyqt4_qt_metacast; 00291 00292 00293 /* The Python module initialisation function. */ 00294 #if PY_MAJOR_VERSION >= 3 00295 #define SIP_MODULE_ENTRY PyInit_plplot_pyqt4 00296 #define SIP_MODULE_TYPE PyObject * 00297 #define SIP_MODULE_DISCARD(r) Py_DECREF(r) 00298 #define SIP_MODULE_RETURN(r) return (r) 00299 #else 00300 #define SIP_MODULE_ENTRY initplplot_pyqt4 00301 #define SIP_MODULE_TYPE void 00302 #define SIP_MODULE_DISCARD(r) 00303 #define SIP_MODULE_RETURN(r) return 00304 #endif 00305 00306 #if defined(SIP_STATIC_MODULE) 00307 extern "C" SIP_MODULE_TYPE SIP_MODULE_ENTRY() 00308 #else 00309 PyMODINIT_FUNC SIP_MODULE_ENTRY() 00310 #endif 00311 { 00312 static PyMethodDef sip_methods[] = { 00313 {SIP_MLNAME_CAST(sipName_plfreeqtdev), func_plfreeqtdev, METH_VARARGS, NULL}, 00314 {SIP_MLNAME_CAST(sipName_plsetqtdev), func_plsetqtdev, METH_VARARGS, NULL}, 00315 {0, 0, 0, 0} 00316 }; 00317 00318 #if PY_MAJOR_VERSION >= 3 00319 static PyModuleDef sip_module_def = { 00320 PyModuleDef_HEAD_INIT, 00321 "plplot_pyqt4", 00322 NULL, 00323 -1, 00324 sip_methods, 00325 NULL, 00326 NULL, 00327 NULL, 00328 NULL 00329 }; 00330 #endif 00331 00332 PyObject *sipModule, *sipModuleDict; 00333 PyObject *sip_sipmod, *sip_capiobj; 00334 00335 /* Initialise the module and get it's dictionary. */ 00336 #if PY_MAJOR_VERSION >= 3 00337 sipModule = PyModule_Create(&sip_module_def); 00338 #elif PY_VERSION_HEX >= 0x02050000 00339 sipModule = Py_InitModule(sipName_plplot_pyqt4, sip_methods); 00340 #else 00341 sipModule = Py_InitModule(const_cast<char *>(sipName_plplot_pyqt4), sip_methods); 00342 #endif 00343 00344 if (sipModule == NULL) 00345 SIP_MODULE_RETURN(NULL); 00346 00347 sipModuleDict = PyModule_GetDict(sipModule); 00348 00349 /* Get the SIP module's API. */ 00350 #if PY_VERSION_HEX >= 0x02050000 00351 sip_sipmod = PyImport_ImportModule(SIP_MODULE_NAME); 00352 #else 00353 sip_sipmod = PyImport_ImportModule(const_cast<char *>(SIP_MODULE_NAME)); 00354 #endif 00355 00356 if (sip_sipmod == NULL) 00357 { 00358 SIP_MODULE_DISCARD(sipModule); 00359 SIP_MODULE_RETURN(NULL); 00360 } 00361 00362 sip_capiobj = PyDict_GetItemString(PyModule_GetDict(sip_sipmod), "_C_API"); 00363 Py_DECREF(sip_sipmod); 00364 00365 #if defined(SIP_USE_PYCAPSULE) 00366 if (sip_capiobj == NULL || !PyCapsule_CheckExact(sip_capiobj)) 00367 #else 00368 if (sip_capiobj == NULL || !PyCObject_Check(sip_capiobj)) 00369 #endif 00370 { 00371 SIP_MODULE_DISCARD(sipModule); 00372 SIP_MODULE_RETURN(NULL); 00373 } 00374 00375 #if defined(SIP_USE_PYCAPSULE) 00376 sipAPI_plplot_pyqt4 = reinterpret_cast<const sipAPIDef *>(PyCapsule_GetPointer(sip_capiobj, SIP_MODULE_NAME "._C_API")); 00377 #else 00378 sipAPI_plplot_pyqt4 = reinterpret_cast<const sipAPIDef *>(PyCObject_AsVoidPtr(sip_capiobj)); 00379 #endif 00380 00381 #if defined(SIP_USE_PYCAPSULE) 00382 if (sipAPI_plplot_pyqt4 == NULL) 00383 { 00384 SIP_MODULE_DISCARD(sipModule); 00385 SIP_MODULE_RETURN(NULL); 00386 } 00387 #endif 00388 00389 /* Export the module and publish it's API. */ 00390 if (sipExportModule(&sipModuleAPI_plplot_pyqt4,SIP_API_MAJOR_NR,SIP_API_MINOR_NR,0) < 0) 00391 { 00392 SIP_MODULE_DISCARD(sipModule); 00393 SIP_MODULE_RETURN(0); 00394 } 00395 00396 sip_plplot_pyqt4_qt_metaobject = (sip_qt_metaobject_func)sipImportSymbol("qtcore_qt_metaobject"); 00397 sip_plplot_pyqt4_qt_metacall = (sip_qt_metacall_func)sipImportSymbol("qtcore_qt_metacall"); 00398 sip_plplot_pyqt4_qt_metacast = (sip_qt_metacast_func)sipImportSymbol("qtcore_qt_metacast"); 00399 00400 if (!sip_plplot_pyqt4_qt_metacast) 00401 Py_FatalError("Unable to import qtcore_qt_metacast"); 00402 00403 /* Initialise the module now all its dependencies have been set up. */ 00404 if (sipInitModule(&sipModuleAPI_plplot_pyqt4,sipModuleDict) < 0) 00405 { 00406 SIP_MODULE_DISCARD(sipModule); 00407 SIP_MODULE_RETURN(0); 00408 } 00409 00410 /* Get the APIs of the modules that this one is dependent on. */ 00411 sipModuleAPI_plplot_pyqt4_QtCore = sipModuleAPI_plplot_pyqt4.em_imports[0].im_module; 00412 sipModuleAPI_plplot_pyqt4_QtGui = sipModuleAPI_plplot_pyqt4.em_imports[1].im_module; 00413 00414 SIP_MODULE_RETURN(sipModule); 00415 }