mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-05 03:20:08 +01:00
git-svn-id: https://svn.wxwidgets.org/svn/wx/sandbox/trunk/Phoenix@66113 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1341 lines
33 KiB
C++
1341 lines
33 KiB
C++
/*
|
|
* Interface wrapper code.
|
|
*
|
|
* Generated by SIP 4.12-snapshot-eac351f5cca7 on Wed Nov 10 15:32:07 2010
|
|
*
|
|
* Copyright: (c) 2010 by Total Control Software
|
|
* Licence: wxWindows license
|
|
*/
|
|
|
|
#include "sipAPI_core.h"
|
|
|
|
#line 119 "sip/gen/gdicmn.sip"
|
|
#include <wx/gdicmn.h>
|
|
#line 15 "sip_corewxSize.cpp"
|
|
|
|
#line 22 "sip/gen/gdicmn.sip"
|
|
#include <wx/gdicmn.h>
|
|
#line 19 "sip_corewxSize.cpp"
|
|
|
|
|
|
PyDoc_STRVAR(doc_wxSize_DecBy, "Size.DecBy(Point)\n"
|
|
"Size.DecBy(Size)\n"
|
|
"Size.DecBy(int, int)\n"
|
|
"Size.DecBy(int)");
|
|
|
|
extern "C" {static PyObject *meth_wxSize_DecBy(PyObject *, PyObject *, PyObject *);}
|
|
static PyObject *meth_wxSize_DecBy(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
|
|
{
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
const wxPoint * pt;
|
|
int ptState = 0;
|
|
wxSize *sipCpp;
|
|
|
|
static const char *sipKwdList[] = {
|
|
sipName_pt,
|
|
};
|
|
|
|
if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "BJ1", &sipSelf, sipType_wxSize, &sipCpp, sipType_wxPoint, &pt, &ptState))
|
|
{
|
|
try
|
|
{
|
|
sipCpp->DecBy(*pt);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipReleaseType(const_cast<wxPoint *>(pt),sipType_wxPoint,ptState);
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
sipReleaseType(const_cast<wxPoint *>(pt),sipType_wxPoint,ptState);
|
|
|
|
Py_INCREF(Py_None);
|
|
return Py_None;
|
|
}
|
|
}
|
|
|
|
{
|
|
const wxSize * size;
|
|
wxSize *sipCpp;
|
|
|
|
static const char *sipKwdList[] = {
|
|
sipName_size,
|
|
};
|
|
|
|
if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "BJ9", &sipSelf, sipType_wxSize, &sipCpp, sipType_wxSize, &size))
|
|
{
|
|
try
|
|
{
|
|
sipCpp->DecBy(*size);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
Py_INCREF(Py_None);
|
|
return Py_None;
|
|
}
|
|
}
|
|
|
|
{
|
|
int dx;
|
|
int dy;
|
|
wxSize *sipCpp;
|
|
|
|
static const char *sipKwdList[] = {
|
|
sipName_dx,
|
|
sipName_dy,
|
|
};
|
|
|
|
if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "Bii", &sipSelf, sipType_wxSize, &sipCpp, &dx, &dy))
|
|
{
|
|
try
|
|
{
|
|
sipCpp->DecBy(dx,dy);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
Py_INCREF(Py_None);
|
|
return Py_None;
|
|
}
|
|
}
|
|
|
|
{
|
|
int d;
|
|
wxSize *sipCpp;
|
|
|
|
static const char *sipKwdList[] = {
|
|
sipName_d,
|
|
};
|
|
|
|
if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "Bi", &sipSelf, sipType_wxSize, &sipCpp, &d))
|
|
{
|
|
try
|
|
{
|
|
sipCpp->DecBy(d);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
Py_INCREF(Py_None);
|
|
return Py_None;
|
|
}
|
|
}
|
|
|
|
/* Raise an exception if the arguments couldn't be parsed. */
|
|
sipNoMethod(sipParseErr, sipName_Size, sipName_DecBy, doc_wxSize_DecBy);
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
PyDoc_STRVAR(doc_wxSize_IncBy, "Size.IncBy(Point)\n"
|
|
"Size.IncBy(Size)\n"
|
|
"Size.IncBy(int, int)\n"
|
|
"Size.IncBy(int)");
|
|
|
|
extern "C" {static PyObject *meth_wxSize_IncBy(PyObject *, PyObject *, PyObject *);}
|
|
static PyObject *meth_wxSize_IncBy(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
|
|
{
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
const wxPoint * pt;
|
|
int ptState = 0;
|
|
wxSize *sipCpp;
|
|
|
|
static const char *sipKwdList[] = {
|
|
sipName_pt,
|
|
};
|
|
|
|
if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "BJ1", &sipSelf, sipType_wxSize, &sipCpp, sipType_wxPoint, &pt, &ptState))
|
|
{
|
|
try
|
|
{
|
|
sipCpp->IncBy(*pt);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipReleaseType(const_cast<wxPoint *>(pt),sipType_wxPoint,ptState);
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
sipReleaseType(const_cast<wxPoint *>(pt),sipType_wxPoint,ptState);
|
|
|
|
Py_INCREF(Py_None);
|
|
return Py_None;
|
|
}
|
|
}
|
|
|
|
{
|
|
const wxSize * size;
|
|
wxSize *sipCpp;
|
|
|
|
static const char *sipKwdList[] = {
|
|
sipName_size,
|
|
};
|
|
|
|
if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "BJ9", &sipSelf, sipType_wxSize, &sipCpp, sipType_wxSize, &size))
|
|
{
|
|
try
|
|
{
|
|
sipCpp->IncBy(*size);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
Py_INCREF(Py_None);
|
|
return Py_None;
|
|
}
|
|
}
|
|
|
|
{
|
|
int dx;
|
|
int dy;
|
|
wxSize *sipCpp;
|
|
|
|
static const char *sipKwdList[] = {
|
|
sipName_dx,
|
|
sipName_dy,
|
|
};
|
|
|
|
if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "Bii", &sipSelf, sipType_wxSize, &sipCpp, &dx, &dy))
|
|
{
|
|
try
|
|
{
|
|
sipCpp->IncBy(dx,dy);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
Py_INCREF(Py_None);
|
|
return Py_None;
|
|
}
|
|
}
|
|
|
|
{
|
|
int d;
|
|
wxSize *sipCpp;
|
|
|
|
static const char *sipKwdList[] = {
|
|
sipName_d,
|
|
};
|
|
|
|
if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "Bi", &sipSelf, sipType_wxSize, &sipCpp, &d))
|
|
{
|
|
try
|
|
{
|
|
sipCpp->IncBy(d);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
Py_INCREF(Py_None);
|
|
return Py_None;
|
|
}
|
|
}
|
|
|
|
/* Raise an exception if the arguments couldn't be parsed. */
|
|
sipNoMethod(sipParseErr, sipName_Size, sipName_IncBy, doc_wxSize_IncBy);
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
PyDoc_STRVAR(doc_wxSize_DecTo, "Size.DecTo(Size)");
|
|
|
|
extern "C" {static PyObject *meth_wxSize_DecTo(PyObject *, PyObject *, PyObject *);}
|
|
static PyObject *meth_wxSize_DecTo(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
|
|
{
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
const wxSize * size;
|
|
wxSize *sipCpp;
|
|
|
|
static const char *sipKwdList[] = {
|
|
sipName_size,
|
|
};
|
|
|
|
if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "BJ9", &sipSelf, sipType_wxSize, &sipCpp, sipType_wxSize, &size))
|
|
{
|
|
try
|
|
{
|
|
sipCpp->DecTo(*size);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
Py_INCREF(Py_None);
|
|
return Py_None;
|
|
}
|
|
}
|
|
|
|
/* Raise an exception if the arguments couldn't be parsed. */
|
|
sipNoMethod(sipParseErr, sipName_Size, sipName_DecTo, doc_wxSize_DecTo);
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
PyDoc_STRVAR(doc_wxSize_GetHeight, "Size.GetHeight() -> int");
|
|
|
|
extern "C" {static PyObject *meth_wxSize_GetHeight(PyObject *, PyObject *);}
|
|
static PyObject *meth_wxSize_GetHeight(PyObject *sipSelf, PyObject *sipArgs)
|
|
{
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
wxSize *sipCpp;
|
|
|
|
if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxSize, &sipCpp))
|
|
{
|
|
int sipRes;
|
|
|
|
try
|
|
{
|
|
sipRes = sipCpp->GetHeight();
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
return SIPLong_FromLong(sipRes);
|
|
}
|
|
}
|
|
|
|
/* Raise an exception if the arguments couldn't be parsed. */
|
|
sipNoMethod(sipParseErr, sipName_Size, sipName_GetHeight, doc_wxSize_GetHeight);
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
PyDoc_STRVAR(doc_wxSize_GetWidth, "Size.GetWidth() -> int");
|
|
|
|
extern "C" {static PyObject *meth_wxSize_GetWidth(PyObject *, PyObject *);}
|
|
static PyObject *meth_wxSize_GetWidth(PyObject *sipSelf, PyObject *sipArgs)
|
|
{
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
wxSize *sipCpp;
|
|
|
|
if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxSize, &sipCpp))
|
|
{
|
|
int sipRes;
|
|
|
|
try
|
|
{
|
|
sipRes = sipCpp->GetWidth();
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
return SIPLong_FromLong(sipRes);
|
|
}
|
|
}
|
|
|
|
/* Raise an exception if the arguments couldn't be parsed. */
|
|
sipNoMethod(sipParseErr, sipName_Size, sipName_GetWidth, doc_wxSize_GetWidth);
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
PyDoc_STRVAR(doc_wxSize_IncTo, "Size.IncTo(Size)");
|
|
|
|
extern "C" {static PyObject *meth_wxSize_IncTo(PyObject *, PyObject *, PyObject *);}
|
|
static PyObject *meth_wxSize_IncTo(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
|
|
{
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
const wxSize * size;
|
|
wxSize *sipCpp;
|
|
|
|
static const char *sipKwdList[] = {
|
|
sipName_size,
|
|
};
|
|
|
|
if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "BJ9", &sipSelf, sipType_wxSize, &sipCpp, sipType_wxSize, &size))
|
|
{
|
|
try
|
|
{
|
|
sipCpp->IncTo(*size);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
Py_INCREF(Py_None);
|
|
return Py_None;
|
|
}
|
|
}
|
|
|
|
/* Raise an exception if the arguments couldn't be parsed. */
|
|
sipNoMethod(sipParseErr, sipName_Size, sipName_IncTo, doc_wxSize_IncTo);
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
PyDoc_STRVAR(doc_wxSize_IsFullySpecified, "Size.IsFullySpecified() -> bool");
|
|
|
|
extern "C" {static PyObject *meth_wxSize_IsFullySpecified(PyObject *, PyObject *);}
|
|
static PyObject *meth_wxSize_IsFullySpecified(PyObject *sipSelf, PyObject *sipArgs)
|
|
{
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
wxSize *sipCpp;
|
|
|
|
if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxSize, &sipCpp))
|
|
{
|
|
bool sipRes;
|
|
|
|
try
|
|
{
|
|
sipRes = sipCpp->IsFullySpecified();
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
return PyBool_FromLong(sipRes);
|
|
}
|
|
}
|
|
|
|
/* Raise an exception if the arguments couldn't be parsed. */
|
|
sipNoMethod(sipParseErr, sipName_Size, sipName_IsFullySpecified, doc_wxSize_IsFullySpecified);
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
PyDoc_STRVAR(doc_wxSize_Scale, "Size.Scale(float, float) -> Size");
|
|
|
|
extern "C" {static PyObject *meth_wxSize_Scale(PyObject *, PyObject *, PyObject *);}
|
|
static PyObject *meth_wxSize_Scale(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
|
|
{
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
float xscale;
|
|
float yscale;
|
|
wxSize *sipCpp;
|
|
|
|
static const char *sipKwdList[] = {
|
|
sipName_xscale,
|
|
sipName_yscale,
|
|
};
|
|
|
|
if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "Bff", &sipSelf, sipType_wxSize, &sipCpp, &xscale, &yscale))
|
|
{
|
|
wxSize *sipRes;
|
|
|
|
try
|
|
{
|
|
sipRes = &sipCpp->Scale(xscale,yscale);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
return sipConvertFromType(sipRes,sipType_wxSize,NULL);
|
|
}
|
|
}
|
|
|
|
/* Raise an exception if the arguments couldn't be parsed. */
|
|
sipNoMethod(sipParseErr, sipName_Size, sipName_Scale, doc_wxSize_Scale);
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
PyDoc_STRVAR(doc_wxSize_Set, "Size.Set(int, int)");
|
|
|
|
extern "C" {static PyObject *meth_wxSize_Set(PyObject *, PyObject *, PyObject *);}
|
|
static PyObject *meth_wxSize_Set(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
|
|
{
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
int width;
|
|
int height;
|
|
wxSize *sipCpp;
|
|
|
|
static const char *sipKwdList[] = {
|
|
sipName_width,
|
|
sipName_height,
|
|
};
|
|
|
|
if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "Bii", &sipSelf, sipType_wxSize, &sipCpp, &width, &height))
|
|
{
|
|
try
|
|
{
|
|
sipCpp->Set(width,height);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
Py_INCREF(Py_None);
|
|
return Py_None;
|
|
}
|
|
}
|
|
|
|
/* Raise an exception if the arguments couldn't be parsed. */
|
|
sipNoMethod(sipParseErr, sipName_Size, sipName_Set, doc_wxSize_Set);
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
PyDoc_STRVAR(doc_wxSize_SetDefaults, "Size.SetDefaults(Size)");
|
|
|
|
extern "C" {static PyObject *meth_wxSize_SetDefaults(PyObject *, PyObject *, PyObject *);}
|
|
static PyObject *meth_wxSize_SetDefaults(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
|
|
{
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
const wxSize * sizeDefault;
|
|
wxSize *sipCpp;
|
|
|
|
static const char *sipKwdList[] = {
|
|
sipName_sizeDefault,
|
|
};
|
|
|
|
if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "BJ9", &sipSelf, sipType_wxSize, &sipCpp, sipType_wxSize, &sizeDefault))
|
|
{
|
|
try
|
|
{
|
|
sipCpp->SetDefaults(*sizeDefault);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
Py_INCREF(Py_None);
|
|
return Py_None;
|
|
}
|
|
}
|
|
|
|
/* Raise an exception if the arguments couldn't be parsed. */
|
|
sipNoMethod(sipParseErr, sipName_Size, sipName_SetDefaults, doc_wxSize_SetDefaults);
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
PyDoc_STRVAR(doc_wxSize_SetHeight, "Size.SetHeight(int)");
|
|
|
|
extern "C" {static PyObject *meth_wxSize_SetHeight(PyObject *, PyObject *, PyObject *);}
|
|
static PyObject *meth_wxSize_SetHeight(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
|
|
{
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
int height;
|
|
wxSize *sipCpp;
|
|
|
|
static const char *sipKwdList[] = {
|
|
sipName_height,
|
|
};
|
|
|
|
if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "Bi", &sipSelf, sipType_wxSize, &sipCpp, &height))
|
|
{
|
|
try
|
|
{
|
|
sipCpp->SetHeight(height);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
Py_INCREF(Py_None);
|
|
return Py_None;
|
|
}
|
|
}
|
|
|
|
/* Raise an exception if the arguments couldn't be parsed. */
|
|
sipNoMethod(sipParseErr, sipName_Size, sipName_SetHeight, doc_wxSize_SetHeight);
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
PyDoc_STRVAR(doc_wxSize_SetWidth, "Size.SetWidth(int)");
|
|
|
|
extern "C" {static PyObject *meth_wxSize_SetWidth(PyObject *, PyObject *, PyObject *);}
|
|
static PyObject *meth_wxSize_SetWidth(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
|
|
{
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
int width;
|
|
wxSize *sipCpp;
|
|
|
|
static const char *sipKwdList[] = {
|
|
sipName_width,
|
|
};
|
|
|
|
if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "Bi", &sipSelf, sipType_wxSize, &sipCpp, &width))
|
|
{
|
|
try
|
|
{
|
|
sipCpp->SetWidth(width);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
Py_INCREF(Py_None);
|
|
return Py_None;
|
|
}
|
|
}
|
|
|
|
/* Raise an exception if the arguments couldn't be parsed. */
|
|
sipNoMethod(sipParseErr, sipName_Size, sipName_SetWidth, doc_wxSize_SetWidth);
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
extern "C" {static PyObject *slot_wxSize___eq__(PyObject *,PyObject *);}
|
|
static PyObject *slot_wxSize___eq__(PyObject *sipSelf,PyObject *sipArg)
|
|
{
|
|
wxSize *sipCpp = reinterpret_cast<wxSize *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_wxSize));
|
|
|
|
if (!sipCpp)
|
|
return 0;
|
|
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
const wxSize * s2;
|
|
|
|
if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_wxSize, &s2))
|
|
{
|
|
bool sipRes;
|
|
|
|
try
|
|
{
|
|
sipRes = operator==((*sipCpp), *s2);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
return PyBool_FromLong(sipRes);
|
|
}
|
|
}
|
|
|
|
Py_XDECREF(sipParseErr);
|
|
|
|
if (sipParseErr == Py_None)
|
|
return NULL;
|
|
|
|
return sipPySlotExtend(&sipModuleAPI__core,eq_slot,sipType_wxSize,sipSelf,sipArg);
|
|
}
|
|
|
|
|
|
extern "C" {static PyObject *slot_wxSize___ne__(PyObject *,PyObject *);}
|
|
static PyObject *slot_wxSize___ne__(PyObject *sipSelf,PyObject *sipArg)
|
|
{
|
|
wxSize *sipCpp = reinterpret_cast<wxSize *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_wxSize));
|
|
|
|
if (!sipCpp)
|
|
return 0;
|
|
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
const wxSize * s2;
|
|
|
|
if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_wxSize, &s2))
|
|
{
|
|
bool sipRes;
|
|
|
|
try
|
|
{
|
|
sipRes = operator!=((*sipCpp), *s2);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
return PyBool_FromLong(sipRes);
|
|
}
|
|
}
|
|
|
|
Py_XDECREF(sipParseErr);
|
|
|
|
if (sipParseErr == Py_None)
|
|
return NULL;
|
|
|
|
return sipPySlotExtend(&sipModuleAPI__core,ne_slot,sipType_wxSize,sipSelf,sipArg);
|
|
}
|
|
|
|
|
|
extern "C" {static PyObject *slot_wxSize___add__(PyObject *,PyObject *);}
|
|
static PyObject *slot_wxSize___add__(PyObject *sipArg0,PyObject *sipArg1)
|
|
{
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
const wxSize * s;
|
|
const wxPoint * p;
|
|
int pState = 0;
|
|
|
|
if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J9J1", sipType_wxSize, &s, sipType_wxPoint, &p, &pState))
|
|
{
|
|
wxPoint *sipRes;
|
|
|
|
try
|
|
{
|
|
sipRes = new wxPoint((*s + *p));
|
|
}
|
|
catch (...)
|
|
{
|
|
sipReleaseType(const_cast<wxPoint *>(p),sipType_wxPoint,pState);
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
sipReleaseType(const_cast<wxPoint *>(p),sipType_wxPoint,pState);
|
|
|
|
return sipConvertFromNewType(sipRes,sipType_wxPoint,NULL);
|
|
}
|
|
}
|
|
|
|
{
|
|
const wxSize * s1;
|
|
const wxSize * s2;
|
|
|
|
if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J9J9", sipType_wxSize, &s1, sipType_wxSize, &s2))
|
|
{
|
|
wxSize *sipRes;
|
|
|
|
try
|
|
{
|
|
sipRes = new wxSize((*s1 + *s2));
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
return sipConvertFromNewType(sipRes,sipType_wxSize,NULL);
|
|
}
|
|
}
|
|
|
|
Py_XDECREF(sipParseErr);
|
|
|
|
if (sipParseErr == Py_None)
|
|
return NULL;
|
|
|
|
return sipPySlotExtend(&sipModuleAPI__core,add_slot,NULL,sipArg0,sipArg1);
|
|
}
|
|
|
|
|
|
extern "C" {static PyObject *slot_wxSize___sub__(PyObject *,PyObject *);}
|
|
static PyObject *slot_wxSize___sub__(PyObject *sipArg0,PyObject *sipArg1)
|
|
{
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
const wxSize * s;
|
|
const wxPoint * p;
|
|
int pState = 0;
|
|
|
|
if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J9J1", sipType_wxSize, &s, sipType_wxPoint, &p, &pState))
|
|
{
|
|
wxPoint *sipRes;
|
|
|
|
try
|
|
{
|
|
sipRes = new wxPoint((*s - *p));
|
|
}
|
|
catch (...)
|
|
{
|
|
sipReleaseType(const_cast<wxPoint *>(p),sipType_wxPoint,pState);
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
sipReleaseType(const_cast<wxPoint *>(p),sipType_wxPoint,pState);
|
|
|
|
return sipConvertFromNewType(sipRes,sipType_wxPoint,NULL);
|
|
}
|
|
}
|
|
|
|
{
|
|
const wxSize * s1;
|
|
const wxSize * s2;
|
|
|
|
if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J9J9", sipType_wxSize, &s1, sipType_wxSize, &s2))
|
|
{
|
|
wxSize *sipRes;
|
|
|
|
try
|
|
{
|
|
sipRes = new wxSize((*s1 - *s2));
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
return sipConvertFromNewType(sipRes,sipType_wxSize,NULL);
|
|
}
|
|
}
|
|
|
|
Py_XDECREF(sipParseErr);
|
|
|
|
if (sipParseErr == Py_None)
|
|
return NULL;
|
|
|
|
return sipPySlotExtend(&sipModuleAPI__core,sub_slot,NULL,sipArg0,sipArg1);
|
|
}
|
|
|
|
|
|
extern "C" {static PyObject *slot_wxSize___mul__(PyObject *,PyObject *);}
|
|
static PyObject *slot_wxSize___mul__(PyObject *sipArg0,PyObject *sipArg1)
|
|
{
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
const wxSize * s;
|
|
int i;
|
|
|
|
if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J9i", sipType_wxSize, &s, &i))
|
|
{
|
|
wxSize *sipRes;
|
|
|
|
try
|
|
{
|
|
sipRes = new wxSize((*s * i));
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
return sipConvertFromNewType(sipRes,sipType_wxSize,NULL);
|
|
}
|
|
}
|
|
|
|
{
|
|
int i;
|
|
const wxSize * s;
|
|
|
|
if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "iJ9", &i, sipType_wxSize, &s))
|
|
{
|
|
wxSize *sipRes;
|
|
|
|
try
|
|
{
|
|
sipRes = new wxSize((i * *s));
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
return sipConvertFromNewType(sipRes,sipType_wxSize,NULL);
|
|
}
|
|
}
|
|
|
|
Py_XDECREF(sipParseErr);
|
|
|
|
if (sipParseErr == Py_None)
|
|
return NULL;
|
|
|
|
return sipPySlotExtend(&sipModuleAPI__core,mul_slot,NULL,sipArg0,sipArg1);
|
|
}
|
|
|
|
|
|
extern "C" {static PyObject *slot_wxSize___div__(PyObject *,PyObject *);}
|
|
static PyObject *slot_wxSize___div__(PyObject *sipArg0,PyObject *sipArg1)
|
|
{
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
const wxSize * s;
|
|
int i;
|
|
|
|
if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J9i", sipType_wxSize, &s, &i))
|
|
{
|
|
wxSize *sipRes;
|
|
|
|
try
|
|
{
|
|
sipRes = new wxSize((*s / i));
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
return sipConvertFromNewType(sipRes,sipType_wxSize,NULL);
|
|
}
|
|
}
|
|
|
|
Py_XDECREF(sipParseErr);
|
|
|
|
if (sipParseErr == Py_None)
|
|
return NULL;
|
|
|
|
return sipPySlotExtend(&sipModuleAPI__core,div_slot,NULL,sipArg0,sipArg1);
|
|
}
|
|
|
|
|
|
extern "C" {static PyObject *slot_wxSize___imul__(PyObject *,PyObject *);}
|
|
static PyObject *slot_wxSize___imul__(PyObject *sipSelf,PyObject *sipArg)
|
|
{
|
|
if (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_wxSize)))
|
|
{
|
|
Py_INCREF(Py_NotImplemented);
|
|
return Py_NotImplemented;
|
|
}
|
|
|
|
wxSize *sipCpp = reinterpret_cast<wxSize *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_wxSize));
|
|
|
|
if (!sipCpp)
|
|
return 0;
|
|
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
int factor;
|
|
|
|
if (sipParseArgs(&sipParseErr, sipArg, "1i", &factor))
|
|
{
|
|
try
|
|
{
|
|
sipCpp->wxSize::operator*=(factor);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
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_wxSize___idiv__(PyObject *,PyObject *);}
|
|
static PyObject *slot_wxSize___idiv__(PyObject *sipSelf,PyObject *sipArg)
|
|
{
|
|
if (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_wxSize)))
|
|
{
|
|
Py_INCREF(Py_NotImplemented);
|
|
return Py_NotImplemented;
|
|
}
|
|
|
|
wxSize *sipCpp = reinterpret_cast<wxSize *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_wxSize));
|
|
|
|
if (!sipCpp)
|
|
return 0;
|
|
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
int factor;
|
|
|
|
if (sipParseArgs(&sipParseErr, sipArg, "1i", &factor))
|
|
{
|
|
try
|
|
{
|
|
sipCpp->wxSize::operator/=(factor);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
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_wxSize___isub__(PyObject *,PyObject *);}
|
|
static PyObject *slot_wxSize___isub__(PyObject *sipSelf,PyObject *sipArg)
|
|
{
|
|
if (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_wxSize)))
|
|
{
|
|
Py_INCREF(Py_NotImplemented);
|
|
return Py_NotImplemented;
|
|
}
|
|
|
|
wxSize *sipCpp = reinterpret_cast<wxSize *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_wxSize));
|
|
|
|
if (!sipCpp)
|
|
return 0;
|
|
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
const wxSize * sz;
|
|
|
|
if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_wxSize, &sz))
|
|
{
|
|
try
|
|
{
|
|
sipCpp->wxSize::operator-=(*sz);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
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_wxSize___iadd__(PyObject *,PyObject *);}
|
|
static PyObject *slot_wxSize___iadd__(PyObject *sipSelf,PyObject *sipArg)
|
|
{
|
|
if (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_wxSize)))
|
|
{
|
|
Py_INCREF(Py_NotImplemented);
|
|
return Py_NotImplemented;
|
|
}
|
|
|
|
wxSize *sipCpp = reinterpret_cast<wxSize *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_wxSize));
|
|
|
|
if (!sipCpp)
|
|
return 0;
|
|
|
|
PyObject *sipParseErr = NULL;
|
|
|
|
{
|
|
const wxSize * sz;
|
|
|
|
if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_wxSize, &sz))
|
|
{
|
|
try
|
|
{
|
|
sipCpp->wxSize::operator+=(*sz);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
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_wxSize(void *, const sipTypeDef *);}
|
|
static void *cast_wxSize(void *ptr, const sipTypeDef *targetType)
|
|
{
|
|
if (targetType == sipType_wxSize)
|
|
return ptr;
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
/* Call the instance's destructor. */
|
|
extern "C" {static void release_wxSize(void *, int);}
|
|
static void release_wxSize(void *sipCppV,int)
|
|
{
|
|
delete reinterpret_cast<wxSize *>(sipCppV);
|
|
}
|
|
|
|
|
|
extern "C" {static void assign_wxSize(void *, SIP_SSIZE_T, const void *);}
|
|
static void assign_wxSize(void *sipDst, SIP_SSIZE_T sipDstIdx, const void *sipSrc)
|
|
{
|
|
reinterpret_cast<wxSize *>(sipDst)[sipDstIdx] = *reinterpret_cast<const wxSize *>(sipSrc);
|
|
}
|
|
|
|
|
|
extern "C" {static void *array_wxSize(SIP_SSIZE_T);}
|
|
static void *array_wxSize(SIP_SSIZE_T sipNrElem)
|
|
{
|
|
return new wxSize[sipNrElem];
|
|
}
|
|
|
|
|
|
extern "C" {static void *copy_wxSize(const void *, SIP_SSIZE_T);}
|
|
static void *copy_wxSize(const void *sipSrc, SIP_SSIZE_T sipSrcIdx)
|
|
{
|
|
return new wxSize(reinterpret_cast<const wxSize *>(sipSrc)[sipSrcIdx]);
|
|
}
|
|
|
|
|
|
extern "C" {static void dealloc_wxSize(sipSimpleWrapper *);}
|
|
static void dealloc_wxSize(sipSimpleWrapper *sipSelf)
|
|
{
|
|
if (sipIsPyOwned(sipSelf))
|
|
{
|
|
release_wxSize(sipGetAddress(sipSelf),0);
|
|
}
|
|
}
|
|
|
|
|
|
extern "C" {static void *init_wxSize(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
|
|
static void *init_wxSize(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
|
|
{
|
|
wxSize *sipCpp = 0;
|
|
|
|
{
|
|
if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, ""))
|
|
{
|
|
try
|
|
{
|
|
sipCpp = new wxSize();
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
return sipCpp;
|
|
}
|
|
}
|
|
|
|
{
|
|
int width;
|
|
int height;
|
|
|
|
static const char *sipKwdList[] = {
|
|
sipName_width,
|
|
sipName_height,
|
|
};
|
|
|
|
if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "ii", &width, &height))
|
|
{
|
|
try
|
|
{
|
|
sipCpp = new wxSize(width,height);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
return sipCpp;
|
|
}
|
|
}
|
|
|
|
{
|
|
const wxSize * a0;
|
|
|
|
if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J9", sipType_wxSize, &a0))
|
|
{
|
|
try
|
|
{
|
|
sipCpp = new wxSize(*a0);
|
|
}
|
|
catch (...)
|
|
{
|
|
sipRaiseUnknownException();
|
|
return NULL;
|
|
}
|
|
|
|
return sipCpp;
|
|
}
|
|
}
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
/* Define this type's Python slots. */
|
|
static sipPySlotDef slots_wxSize[] = {
|
|
{(void *)slot_wxSize___eq__, eq_slot},
|
|
{(void *)slot_wxSize___ne__, ne_slot},
|
|
{(void *)slot_wxSize___add__, add_slot},
|
|
{(void *)slot_wxSize___sub__, sub_slot},
|
|
{(void *)slot_wxSize___mul__, mul_slot},
|
|
{(void *)slot_wxSize___div__, div_slot},
|
|
{(void *)slot_wxSize___imul__, imul_slot},
|
|
{(void *)slot_wxSize___idiv__, idiv_slot},
|
|
{(void *)slot_wxSize___isub__, isub_slot},
|
|
{(void *)slot_wxSize___iadd__, iadd_slot},
|
|
{0, (sipPySlotType)0}
|
|
};
|
|
|
|
|
|
static PyMethodDef methods_wxSize[] = {
|
|
{SIP_MLNAME_CAST(sipName_DecBy), (PyCFunction)meth_wxSize_DecBy, METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxSize_DecBy)},
|
|
{SIP_MLNAME_CAST(sipName_DecTo), (PyCFunction)meth_wxSize_DecTo, METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxSize_DecTo)},
|
|
{SIP_MLNAME_CAST(sipName_GetHeight), meth_wxSize_GetHeight, METH_VARARGS, SIP_MLDOC_CAST(doc_wxSize_GetHeight)},
|
|
{SIP_MLNAME_CAST(sipName_GetWidth), meth_wxSize_GetWidth, METH_VARARGS, SIP_MLDOC_CAST(doc_wxSize_GetWidth)},
|
|
{SIP_MLNAME_CAST(sipName_IncBy), (PyCFunction)meth_wxSize_IncBy, METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxSize_IncBy)},
|
|
{SIP_MLNAME_CAST(sipName_IncTo), (PyCFunction)meth_wxSize_IncTo, METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxSize_IncTo)},
|
|
{SIP_MLNAME_CAST(sipName_IsFullySpecified), meth_wxSize_IsFullySpecified, METH_VARARGS, SIP_MLDOC_CAST(doc_wxSize_IsFullySpecified)},
|
|
{SIP_MLNAME_CAST(sipName_Scale), (PyCFunction)meth_wxSize_Scale, METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxSize_Scale)},
|
|
{SIP_MLNAME_CAST(sipName_Set), (PyCFunction)meth_wxSize_Set, METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxSize_Set)},
|
|
{SIP_MLNAME_CAST(sipName_SetDefaults), (PyCFunction)meth_wxSize_SetDefaults, METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxSize_SetDefaults)},
|
|
{SIP_MLNAME_CAST(sipName_SetHeight), (PyCFunction)meth_wxSize_SetHeight, METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxSize_SetHeight)},
|
|
{SIP_MLNAME_CAST(sipName_SetWidth), (PyCFunction)meth_wxSize_SetWidth, METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxSize_SetWidth)}
|
|
};
|
|
|
|
sipVariableDef variables_wxSize[] = {
|
|
{PropertyVariable, sipName_height, &methods_wxSize[2], &methods_wxSize[10], NULL, NULL},
|
|
{PropertyVariable, sipName_width, &methods_wxSize[3], &methods_wxSize[11], NULL, NULL},
|
|
};
|
|
|
|
PyDoc_STRVAR(doc_wxSize, "\1Size()\n"
|
|
"Size(int, int)\n"
|
|
"Size(Size)");
|
|
|
|
|
|
sipClassTypeDef sipTypeDef__core_wxSize = {
|
|
{
|
|
-1,
|
|
0,
|
|
0,
|
|
SIP_TYPE_CLASS,
|
|
sipNameNr_wxSize,
|
|
{0}
|
|
},
|
|
{
|
|
sipNameNr_Size,
|
|
{0, 0, 1},
|
|
12, methods_wxSize,
|
|
0, 0,
|
|
2, variables_wxSize,
|
|
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
|
},
|
|
doc_wxSize,
|
|
-1,
|
|
-1,
|
|
0,
|
|
slots_wxSize,
|
|
init_wxSize,
|
|
0,
|
|
0,
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0,
|
|
0,
|
|
#else
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
#endif
|
|
dealloc_wxSize,
|
|
assign_wxSize,
|
|
array_wxSize,
|
|
copy_wxSize,
|
|
release_wxSize,
|
|
cast_wxSize,
|
|
0,
|
|
0,
|
|
0
|
|
};
|