mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-10 22:07:08 +01:00
git-svn-id: https://svn.wxwidgets.org/svn/wx/sandbox/trunk/Phoenix@66198 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
799 lines
21 KiB
C++
799 lines
21 KiB
C++
/*
|
|
* Interface wrapper code.
|
|
*
|
|
* Generated by SIP 4.12-snapshot-93040d2c716c
|
|
*
|
|
* Copyright: (c) 2010 by Total Control Software
|
|
* License: wxWindows License
|
|
*/
|
|
|
|
#include "sipAPI_core.h"
|
|
|
|
#line 680 "sip/gen/gdicmn.sip"
|
|
#include <wx/gdicmn.h>
|
|
#line 15 "sip_corewxRealPoint.cpp"
|
|
|
|
#line 23 "sip/gen/gdicmn.sip"
|
|
#include <wx/gdicmn.h>
|
|
#line 19 "sip_corewxRealPoint.cpp"
|
|
#line 177 "sip/gen/gdicmn.sip"
|
|
#include <wx/gdicmn.h>
|
|
#line 22 "sip_corewxRealPoint.cpp"
|
|
|
|
|
|
PyDoc_STRVAR(doc_wxRealPoint_Get, "RealPoint.Get() -> object");
|
|
|
|
extern "C" {static PyObject *meth_wxRealPoint_Get(PyObject *, PyObject *);}
|
|
static PyObject *meth_wxRealPoint_Get(PyObject *sipSelf, PyObject *sipArgs)
|
|
{
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
wxRealPoint *sipCpp;
|
|
|
|
if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxRealPoint, &sipCpp))
|
|
{
|
|
PyObject * sipRes = 0;
|
|
int sipIsErr = 0;
|
|
|
|
#line 717 "sip/gen/gdicmn.sip"
|
|
sipRes = sipBuildResult(&sipIsErr, "(dd)",
|
|
sipCpp->x, sipCpp->y);
|
|
#line 44 "sip_corewxRealPoint.cpp"
|
|
|
|
if (sipIsErr)
|
|
return 0;
|
|
|
|
return sipRes;
|
|
}
|
|
}
|
|
|
|
/* Raise an exception if the arguments couldn't be parsed. */
|
|
sipNoMethod(sipParseErr, sipName_RealPoint, sipName_Get, doc_wxRealPoint_Get);
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
extern "C" {static PyObject *slot_wxRealPoint___eq__(PyObject *,PyObject *);}
|
|
static PyObject *slot_wxRealPoint___eq__(PyObject *sipSelf,PyObject *sipArg)
|
|
{
|
|
wxRealPoint *sipCpp = reinterpret_cast<wxRealPoint *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_wxRealPoint));
|
|
|
|
if (!sipCpp)
|
|
return 0;
|
|
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
const wxRealPoint * p2;
|
|
int p2State = 0;
|
|
|
|
if (sipParseArgs(&sipParseErr, sipArg, "1J1", sipType_wxRealPoint, &p2, &p2State))
|
|
{
|
|
bool sipRes;
|
|
|
|
try
|
|
{
|
|
sipRes = operator==((*sipCpp), *p2);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipReleaseType(const_cast<wxRealPoint *>(p2),sipType_wxRealPoint,p2State);
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
sipReleaseType(const_cast<wxRealPoint *>(p2),sipType_wxRealPoint,p2State);
|
|
|
|
return PyBool_FromLong(sipRes);
|
|
}
|
|
}
|
|
|
|
Py_XDECREF(sipParseErr);
|
|
|
|
if (sipParseErr == Py_None)
|
|
return NULL;
|
|
|
|
return sipPySlotExtend(&sipModuleAPI__core,eq_slot,sipType_wxRealPoint,sipSelf,sipArg);
|
|
}
|
|
|
|
|
|
extern "C" {static PyObject *slot_wxRealPoint___ne__(PyObject *,PyObject *);}
|
|
static PyObject *slot_wxRealPoint___ne__(PyObject *sipSelf,PyObject *sipArg)
|
|
{
|
|
wxRealPoint *sipCpp = reinterpret_cast<wxRealPoint *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_wxRealPoint));
|
|
|
|
if (!sipCpp)
|
|
return 0;
|
|
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
const wxRealPoint * p2;
|
|
int p2State = 0;
|
|
|
|
if (sipParseArgs(&sipParseErr, sipArg, "1J1", sipType_wxRealPoint, &p2, &p2State))
|
|
{
|
|
bool sipRes;
|
|
|
|
try
|
|
{
|
|
sipRes = operator!=((*sipCpp), *p2);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipReleaseType(const_cast<wxRealPoint *>(p2),sipType_wxRealPoint,p2State);
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
sipReleaseType(const_cast<wxRealPoint *>(p2),sipType_wxRealPoint,p2State);
|
|
|
|
return PyBool_FromLong(sipRes);
|
|
}
|
|
}
|
|
|
|
Py_XDECREF(sipParseErr);
|
|
|
|
if (sipParseErr == Py_None)
|
|
return NULL;
|
|
|
|
return sipPySlotExtend(&sipModuleAPI__core,ne_slot,sipType_wxRealPoint,sipSelf,sipArg);
|
|
}
|
|
|
|
|
|
extern "C" {static PyObject *slot_wxRealPoint___add__(PyObject *,PyObject *);}
|
|
static PyObject *slot_wxRealPoint___add__(PyObject *sipArg0,PyObject *sipArg1)
|
|
{
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
const wxRealPoint * p1;
|
|
int p1State = 0;
|
|
const wxRealPoint * p2;
|
|
int p2State = 0;
|
|
|
|
if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1J1", sipType_wxRealPoint, &p1, &p1State, sipType_wxRealPoint, &p2, &p2State))
|
|
{
|
|
wxRealPoint *sipRes;
|
|
|
|
try
|
|
{
|
|
sipRes = new wxRealPoint((*p1 + *p2));
|
|
}
|
|
catch (...)
|
|
{
|
|
sipReleaseType(const_cast<wxRealPoint *>(p1),sipType_wxRealPoint,p1State);
|
|
sipReleaseType(const_cast<wxRealPoint *>(p2),sipType_wxRealPoint,p2State);
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
sipReleaseType(const_cast<wxRealPoint *>(p1),sipType_wxRealPoint,p1State);
|
|
sipReleaseType(const_cast<wxRealPoint *>(p2),sipType_wxRealPoint,p2State);
|
|
|
|
return sipConvertFromNewType(sipRes,sipType_wxRealPoint,NULL);
|
|
}
|
|
}
|
|
|
|
Py_XDECREF(sipParseErr);
|
|
|
|
if (sipParseErr == Py_None)
|
|
return NULL;
|
|
|
|
return sipPySlotExtend(&sipModuleAPI__core,add_slot,NULL,sipArg0,sipArg1);
|
|
}
|
|
|
|
|
|
extern "C" {static PyObject *slot_wxRealPoint___sub__(PyObject *,PyObject *);}
|
|
static PyObject *slot_wxRealPoint___sub__(PyObject *sipArg0,PyObject *sipArg1)
|
|
{
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
const wxRealPoint * p1;
|
|
int p1State = 0;
|
|
const wxRealPoint * p2;
|
|
int p2State = 0;
|
|
|
|
if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1J1", sipType_wxRealPoint, &p1, &p1State, sipType_wxRealPoint, &p2, &p2State))
|
|
{
|
|
wxRealPoint *sipRes;
|
|
|
|
try
|
|
{
|
|
sipRes = new wxRealPoint((*p1 - *p2));
|
|
}
|
|
catch (...)
|
|
{
|
|
sipReleaseType(const_cast<wxRealPoint *>(p1),sipType_wxRealPoint,p1State);
|
|
sipReleaseType(const_cast<wxRealPoint *>(p2),sipType_wxRealPoint,p2State);
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
sipReleaseType(const_cast<wxRealPoint *>(p1),sipType_wxRealPoint,p1State);
|
|
sipReleaseType(const_cast<wxRealPoint *>(p2),sipType_wxRealPoint,p2State);
|
|
|
|
return sipConvertFromNewType(sipRes,sipType_wxRealPoint,NULL);
|
|
}
|
|
}
|
|
|
|
Py_XDECREF(sipParseErr);
|
|
|
|
if (sipParseErr == Py_None)
|
|
return NULL;
|
|
|
|
return sipPySlotExtend(&sipModuleAPI__core,sub_slot,NULL,sipArg0,sipArg1);
|
|
}
|
|
|
|
|
|
extern "C" {static PyObject *slot_wxRealPoint___mul__(PyObject *,PyObject *);}
|
|
static PyObject *slot_wxRealPoint___mul__(PyObject *sipArg0,PyObject *sipArg1)
|
|
{
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
const wxRealPoint * s;
|
|
int sState = 0;
|
|
double i;
|
|
|
|
if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1d", sipType_wxRealPoint, &s, &sState, &i))
|
|
{
|
|
wxRealPoint *sipRes;
|
|
|
|
try
|
|
{
|
|
sipRes = new wxRealPoint((*s * i));
|
|
}
|
|
catch (...)
|
|
{
|
|
sipReleaseType(const_cast<wxRealPoint *>(s),sipType_wxRealPoint,sState);
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
sipReleaseType(const_cast<wxRealPoint *>(s),sipType_wxRealPoint,sState);
|
|
|
|
return sipConvertFromNewType(sipRes,sipType_wxRealPoint,NULL);
|
|
}
|
|
}
|
|
|
|
{
|
|
double i;
|
|
const wxRealPoint * s;
|
|
int sState = 0;
|
|
|
|
if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "dJ1", &i, sipType_wxRealPoint, &s, &sState))
|
|
{
|
|
wxRealPoint *sipRes;
|
|
|
|
try
|
|
{
|
|
sipRes = new wxRealPoint((i * *s));
|
|
}
|
|
catch (...)
|
|
{
|
|
sipReleaseType(const_cast<wxRealPoint *>(s),sipType_wxRealPoint,sState);
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
sipReleaseType(const_cast<wxRealPoint *>(s),sipType_wxRealPoint,sState);
|
|
|
|
return sipConvertFromNewType(sipRes,sipType_wxRealPoint,NULL);
|
|
}
|
|
}
|
|
|
|
Py_XDECREF(sipParseErr);
|
|
|
|
if (sipParseErr == Py_None)
|
|
return NULL;
|
|
|
|
return sipPySlotExtend(&sipModuleAPI__core,mul_slot,NULL,sipArg0,sipArg1);
|
|
}
|
|
|
|
|
|
extern "C" {static PyObject *slot_wxRealPoint___div__(PyObject *,PyObject *);}
|
|
static PyObject *slot_wxRealPoint___div__(PyObject *sipArg0,PyObject *sipArg1)
|
|
{
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
const wxRealPoint * s;
|
|
int sState = 0;
|
|
int i;
|
|
|
|
if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1i", sipType_wxRealPoint, &s, &sState, &i))
|
|
{
|
|
wxRealPoint *sipRes;
|
|
|
|
try
|
|
{
|
|
sipRes = new wxRealPoint((*s / i));
|
|
}
|
|
catch (...)
|
|
{
|
|
sipReleaseType(const_cast<wxRealPoint *>(s),sipType_wxRealPoint,sState);
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
sipReleaseType(const_cast<wxRealPoint *>(s),sipType_wxRealPoint,sState);
|
|
|
|
return sipConvertFromNewType(sipRes,sipType_wxRealPoint,NULL);
|
|
}
|
|
}
|
|
|
|
Py_XDECREF(sipParseErr);
|
|
|
|
if (sipParseErr == Py_None)
|
|
return NULL;
|
|
|
|
return sipPySlotExtend(&sipModuleAPI__core,div_slot,NULL,sipArg0,sipArg1);
|
|
}
|
|
|
|
|
|
extern "C" {static PyObject *slot_wxRealPoint___isub__(PyObject *,PyObject *);}
|
|
static PyObject *slot_wxRealPoint___isub__(PyObject *sipSelf,PyObject *sipArg)
|
|
{
|
|
if (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_wxRealPoint)))
|
|
{
|
|
Py_INCREF(Py_NotImplemented);
|
|
return Py_NotImplemented;
|
|
}
|
|
|
|
wxRealPoint *sipCpp = reinterpret_cast<wxRealPoint *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_wxRealPoint));
|
|
|
|
if (!sipCpp)
|
|
return 0;
|
|
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
const wxRealPoint * pt;
|
|
int ptState = 0;
|
|
|
|
if (sipParseArgs(&sipParseErr, sipArg, "1J1", sipType_wxRealPoint, &pt, &ptState))
|
|
{
|
|
try
|
|
{
|
|
sipCpp->wxRealPoint::operator-=(*pt);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipReleaseType(const_cast<wxRealPoint *>(pt),sipType_wxRealPoint,ptState);
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
sipReleaseType(const_cast<wxRealPoint *>(pt),sipType_wxRealPoint,ptState);
|
|
|
|
Py_INCREF(sipSelf);
|
|
return sipSelf;
|
|
}
|
|
}
|
|
|
|
{
|
|
const wxSize * sz;
|
|
int szState = 0;
|
|
|
|
if (sipParseArgs(&sipParseErr, sipArg, "1J1", sipType_wxSize, &sz, &szState))
|
|
{
|
|
try
|
|
{
|
|
sipCpp->wxRealPoint::operator-=(*sz);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipReleaseType(const_cast<wxSize *>(sz),sipType_wxSize,szState);
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
sipReleaseType(const_cast<wxSize *>(sz),sipType_wxSize,szState);
|
|
|
|
Py_INCREF(sipSelf);
|
|
return sipSelf;
|
|
}
|
|
}
|
|
|
|
Py_XDECREF(sipParseErr);
|
|
|
|
if (sipParseErr == Py_None)
|
|
return NULL;
|
|
|
|
PyErr_Clear();
|
|
|
|
Py_INCREF(Py_NotImplemented);
|
|
return Py_NotImplemented;
|
|
}
|
|
|
|
|
|
extern "C" {static PyObject *slot_wxRealPoint___iadd__(PyObject *,PyObject *);}
|
|
static PyObject *slot_wxRealPoint___iadd__(PyObject *sipSelf,PyObject *sipArg)
|
|
{
|
|
if (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_wxRealPoint)))
|
|
{
|
|
Py_INCREF(Py_NotImplemented);
|
|
return Py_NotImplemented;
|
|
}
|
|
|
|
wxRealPoint *sipCpp = reinterpret_cast<wxRealPoint *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_wxRealPoint));
|
|
|
|
if (!sipCpp)
|
|
return 0;
|
|
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
const wxRealPoint * pt;
|
|
int ptState = 0;
|
|
|
|
if (sipParseArgs(&sipParseErr, sipArg, "1J1", sipType_wxRealPoint, &pt, &ptState))
|
|
{
|
|
try
|
|
{
|
|
sipCpp->wxRealPoint::operator+=(*pt);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipReleaseType(const_cast<wxRealPoint *>(pt),sipType_wxRealPoint,ptState);
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
sipReleaseType(const_cast<wxRealPoint *>(pt),sipType_wxRealPoint,ptState);
|
|
|
|
Py_INCREF(sipSelf);
|
|
return sipSelf;
|
|
}
|
|
}
|
|
|
|
{
|
|
const wxSize * sz;
|
|
int szState = 0;
|
|
|
|
if (sipParseArgs(&sipParseErr, sipArg, "1J1", sipType_wxSize, &sz, &szState))
|
|
{
|
|
try
|
|
{
|
|
sipCpp->wxRealPoint::operator+=(*sz);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipReleaseType(const_cast<wxSize *>(sz),sipType_wxSize,szState);
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
sipReleaseType(const_cast<wxSize *>(sz),sipType_wxSize,szState);
|
|
|
|
Py_INCREF(sipSelf);
|
|
return sipSelf;
|
|
}
|
|
}
|
|
|
|
Py_XDECREF(sipParseErr);
|
|
|
|
if (sipParseErr == Py_None)
|
|
return NULL;
|
|
|
|
PyErr_Clear();
|
|
|
|
Py_INCREF(Py_NotImplemented);
|
|
return Py_NotImplemented;
|
|
}
|
|
|
|
|
|
/* Cast a pointer to a type somewhere in its superclass hierarchy. */
|
|
extern "C" {static void *cast_wxRealPoint(void *, const sipTypeDef *);}
|
|
static void *cast_wxRealPoint(void *ptr, const sipTypeDef *targetType)
|
|
{
|
|
if (targetType == sipType_wxRealPoint)
|
|
return ptr;
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
/* Call the instance's destructor. */
|
|
extern "C" {static void release_wxRealPoint(void *, int);}
|
|
static void release_wxRealPoint(void *sipCppV,int)
|
|
{
|
|
delete reinterpret_cast<wxRealPoint *>(sipCppV);
|
|
}
|
|
|
|
|
|
extern "C" {static void assign_wxRealPoint(void *, SIP_SSIZE_T, const void *);}
|
|
static void assign_wxRealPoint(void *sipDst, SIP_SSIZE_T sipDstIdx, const void *sipSrc)
|
|
{
|
|
reinterpret_cast<wxRealPoint *>(sipDst)[sipDstIdx] = *reinterpret_cast<const wxRealPoint *>(sipSrc);
|
|
}
|
|
|
|
|
|
extern "C" {static void *array_wxRealPoint(SIP_SSIZE_T);}
|
|
static void *array_wxRealPoint(SIP_SSIZE_T sipNrElem)
|
|
{
|
|
return new wxRealPoint[sipNrElem];
|
|
}
|
|
|
|
|
|
extern "C" {static void *copy_wxRealPoint(const void *, SIP_SSIZE_T);}
|
|
static void *copy_wxRealPoint(const void *sipSrc, SIP_SSIZE_T sipSrcIdx)
|
|
{
|
|
return new wxRealPoint(reinterpret_cast<const wxRealPoint *>(sipSrc)[sipSrcIdx]);
|
|
}
|
|
|
|
|
|
extern "C" {static void dealloc_wxRealPoint(sipSimpleWrapper *);}
|
|
static void dealloc_wxRealPoint(sipSimpleWrapper *sipSelf)
|
|
{
|
|
if (sipIsPyOwned(sipSelf))
|
|
{
|
|
release_wxRealPoint(sipGetAddress(sipSelf),0);
|
|
}
|
|
}
|
|
|
|
|
|
extern "C" {static void *init_wxRealPoint(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
|
|
static void *init_wxRealPoint(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
|
|
{
|
|
wxRealPoint *sipCpp = 0;
|
|
|
|
{
|
|
if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, ""))
|
|
{
|
|
try
|
|
{
|
|
sipCpp = new wxRealPoint();
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
return sipCpp;
|
|
}
|
|
}
|
|
|
|
{
|
|
double x;
|
|
double y;
|
|
|
|
static const char *sipKwdList[] = {
|
|
sipName_x,
|
|
sipName_y,
|
|
};
|
|
|
|
if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "dd", &x, &y))
|
|
{
|
|
try
|
|
{
|
|
sipCpp = new wxRealPoint(x,y);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
return sipCpp;
|
|
}
|
|
}
|
|
|
|
{
|
|
const wxPoint * pt;
|
|
int ptState = 0;
|
|
|
|
static const char *sipKwdList[] = {
|
|
sipName_pt,
|
|
};
|
|
|
|
if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J1", sipType_wxPoint, &pt, &ptState))
|
|
{
|
|
try
|
|
{
|
|
sipCpp = new wxRealPoint(*pt);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipReleaseType(const_cast<wxPoint *>(pt),sipType_wxPoint,ptState);
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
sipReleaseType(const_cast<wxPoint *>(pt),sipType_wxPoint,ptState);
|
|
|
|
return sipCpp;
|
|
}
|
|
}
|
|
|
|
{
|
|
const wxRealPoint * a0;
|
|
int a0State = 0;
|
|
|
|
if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J1", sipType_wxRealPoint, &a0, &a0State))
|
|
{
|
|
try
|
|
{
|
|
sipCpp = new wxRealPoint(*a0);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipReleaseType(const_cast<wxRealPoint *>(a0),sipType_wxRealPoint,a0State);
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
sipReleaseType(const_cast<wxRealPoint *>(a0),sipType_wxRealPoint,a0State);
|
|
|
|
return sipCpp;
|
|
}
|
|
}
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
extern "C" {static int convertTo_wxRealPoint(PyObject *, void **, int *, PyObject *);}
|
|
static int convertTo_wxRealPoint(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
|
|
{
|
|
wxRealPoint **sipCppPtr = reinterpret_cast<wxRealPoint **>(sipCppPtrV);
|
|
|
|
#line 722 "sip/gen/gdicmn.sip"
|
|
// is it just a typecheck?
|
|
if (!sipIsErr) {
|
|
if (sipCanConvertToType(sipPy, sipType_wxRealPoint, SIP_NO_CONVERTORS))
|
|
return 1;
|
|
|
|
if (PySequence_Check(sipPy) && PySequence_Size(sipPy) == 2) {
|
|
int rval = 1;
|
|
PyObject* o1 = PySequence_ITEM(sipPy, 0);
|
|
PyObject* o2 = PySequence_ITEM(sipPy, 1);
|
|
if (!PyNumber_Check(o1) || !PyNumber_Check(o2))
|
|
rval = 0;
|
|
Py_DECREF(o1);
|
|
Py_DECREF(o2);
|
|
return rval;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
// otherwise do the conversion
|
|
if (PySequence_Check(sipPy)) {
|
|
PyObject* o1 = PySequence_ITEM(sipPy, 0);
|
|
PyObject* o2 = PySequence_ITEM(sipPy, 1);
|
|
*sipCppPtr = new wxRealPoint(PyFloat_AsDouble(o1), PyFloat_AsDouble(o2));
|
|
Py_DECREF(o1);
|
|
Py_DECREF(o2);
|
|
return sipGetState(sipTransferObj);
|
|
}
|
|
*sipCppPtr = reinterpret_cast<wxRealPoint*>(sipConvertToType(
|
|
sipPy, sipType_wxRealPoint, sipTransferObj, SIP_NO_CONVERTORS, 0, sipIsErr));
|
|
return 0;
|
|
#line 666 "sip_corewxRealPoint.cpp"
|
|
}
|
|
|
|
|
|
/* Define this type's Python slots. */
|
|
static sipPySlotDef slots_wxRealPoint[] = {
|
|
{(void *)slot_wxRealPoint___eq__, eq_slot},
|
|
{(void *)slot_wxRealPoint___ne__, ne_slot},
|
|
{(void *)slot_wxRealPoint___add__, add_slot},
|
|
{(void *)slot_wxRealPoint___sub__, sub_slot},
|
|
{(void *)slot_wxRealPoint___mul__, mul_slot},
|
|
{(void *)slot_wxRealPoint___div__, div_slot},
|
|
{(void *)slot_wxRealPoint___isub__, isub_slot},
|
|
{(void *)slot_wxRealPoint___iadd__, iadd_slot},
|
|
{0, (sipPySlotType)0}
|
|
};
|
|
|
|
|
|
static PyMethodDef methods_wxRealPoint[] = {
|
|
{SIP_MLNAME_CAST(sipName_Get), meth_wxRealPoint_Get, METH_VARARGS, SIP_MLDOC_CAST(doc_wxRealPoint_Get)}
|
|
};
|
|
|
|
|
|
extern "C" {static PyObject *varget_wxRealPoint_x(void *, PyObject *);}
|
|
static PyObject *varget_wxRealPoint_x(void *sipSelf, PyObject *)
|
|
{
|
|
double sipVal;
|
|
wxRealPoint *sipCpp = reinterpret_cast<wxRealPoint *>(sipSelf);
|
|
|
|
sipVal = sipCpp->x;
|
|
|
|
return PyFloat_FromDouble(sipVal);
|
|
}
|
|
|
|
|
|
extern "C" {static int varset_wxRealPoint_x(void *, PyObject *, PyObject *);}
|
|
static int varset_wxRealPoint_x(void *sipSelf, PyObject *sipPy, PyObject *)
|
|
{
|
|
double sipVal;
|
|
wxRealPoint *sipCpp = reinterpret_cast<wxRealPoint *>(sipSelf);
|
|
|
|
sipVal = PyFloat_AsDouble(sipPy);
|
|
|
|
if (PyErr_Occurred() != NULL)
|
|
return -1;
|
|
|
|
sipCpp->x = sipVal;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
extern "C" {static PyObject *varget_wxRealPoint_y(void *, PyObject *);}
|
|
static PyObject *varget_wxRealPoint_y(void *sipSelf, PyObject *)
|
|
{
|
|
double sipVal;
|
|
wxRealPoint *sipCpp = reinterpret_cast<wxRealPoint *>(sipSelf);
|
|
|
|
sipVal = sipCpp->y;
|
|
|
|
return PyFloat_FromDouble(sipVal);
|
|
}
|
|
|
|
|
|
extern "C" {static int varset_wxRealPoint_y(void *, PyObject *, PyObject *);}
|
|
static int varset_wxRealPoint_y(void *sipSelf, PyObject *sipPy, PyObject *)
|
|
{
|
|
double sipVal;
|
|
wxRealPoint *sipCpp = reinterpret_cast<wxRealPoint *>(sipSelf);
|
|
|
|
sipVal = PyFloat_AsDouble(sipPy);
|
|
|
|
if (PyErr_Occurred() != NULL)
|
|
return -1;
|
|
|
|
sipCpp->y = sipVal;
|
|
|
|
return 0;
|
|
}
|
|
|
|
sipVariableDef variables_wxRealPoint[] = {
|
|
{InstanceVariable, sipName_x, (PyMethodDef *)varget_wxRealPoint_x, (PyMethodDef *)varset_wxRealPoint_x, NULL, NULL},
|
|
{InstanceVariable, sipName_y, (PyMethodDef *)varget_wxRealPoint_y, (PyMethodDef *)varset_wxRealPoint_y, NULL, NULL},
|
|
};
|
|
|
|
PyDoc_STRVAR(doc_wxRealPoint, "\1RealPoint()\n"
|
|
"RealPoint(float, float)\n"
|
|
"RealPoint(Point)\n"
|
|
"RealPoint(RealPoint)");
|
|
|
|
|
|
sipClassTypeDef sipTypeDef__core_wxRealPoint = {
|
|
{
|
|
-1,
|
|
0,
|
|
0,
|
|
SIP_TYPE_CLASS,
|
|
sipNameNr_wxRealPoint,
|
|
{0}
|
|
},
|
|
{
|
|
sipNameNr_RealPoint,
|
|
{0, 0, 1},
|
|
1, methods_wxRealPoint,
|
|
0, 0,
|
|
2, variables_wxRealPoint,
|
|
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
|
},
|
|
doc_wxRealPoint,
|
|
-1,
|
|
-1,
|
|
0,
|
|
slots_wxRealPoint,
|
|
init_wxRealPoint,
|
|
0,
|
|
0,
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0,
|
|
0,
|
|
#else
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
#endif
|
|
dealloc_wxRealPoint,
|
|
assign_wxRealPoint,
|
|
array_wxRealPoint,
|
|
copy_wxRealPoint,
|
|
release_wxRealPoint,
|
|
cast_wxRealPoint,
|
|
convertTo_wxRealPoint,
|
|
0,
|
|
0
|
|
};
|