// python wrapper for vtkCocoaRenderWindow // #define VTK_WRAPPING_CXX #define VTK_STREAMS_FWD_ONLY #include "vtkPythonArgs.h" #include "vtkPythonOverload.h" #include "vtkConfigure.h" #include #include #include "vtkVariant.h" #include "vtkIndent.h" #include "vtkCocoaRenderWindow.h" extern "C" { VTK_ABI_EXPORT void PyVTKAddFile_vtkCocoaRenderWindow(PyObject *); } extern "C" { VTK_ABI_EXPORT PyObject *PyvtkCocoaRenderWindow_ClassNew(); } #ifndef DECLARED_PyvtkOpenGLRenderWindow_ClassNew extern "C" { PyObject *PyvtkOpenGLRenderWindow_ClassNew(); } #define DECLARED_PyvtkOpenGLRenderWindow_ClassNew #endif static const char *PyvtkCocoaRenderWindow_Doc = "vtkCocoaRenderWindow - Cocoa OpenGL rendering window\n\n" "Superclass: vtkOpenGLRenderWindow\n\n" "vtkCocoaRenderWindow is a concrete implementation of the abstract\n" "class vtkOpenGLRenderWindow. It is only available on Mac OS X. To use\n" "this class, build VTK with VTK_USE_COCOA turned ON (this is the\n" "default). This class can be used by 32 and 64 bit processes, and\n" "either in garbage collected or reference counted modes. ARC is not\n" "yet supported. vtkCocoaRenderWindow uses Objective-C++, and the\n" "OpenGL and Cocoa APIs. This class's default behaviour is to create an\n" "NSWindow and a vtkCocoaGLView which are used together to draw all VTK\n" "content. If you already have an NSWindow and vtkCocoaGLView and you\n" "want this class to use them you must call both SetRootWindow() and\n" "SetWindowId(), respectively, early on (before WindowInitialize() is\n" "executed).\n\n" "@sa\n" "vtkOpenGLRenderWindow vtkCocoaGLView\n\n" "@warning\n" "This header must be in C++ only because it is included by .cxx files.\n" "That means no Objective-C may be used. That's why some instance\n" "variables are void* instead of what they really should be.\n\n"; static PyObject * PyvtkCocoaRenderWindow_IsTypeOf(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "IsTypeOf"); char *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = vtkCocoaRenderWindow::IsTypeOf(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCocoaRenderWindow_IsA(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsA"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); char *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = (ap.IsBound() ? op->IsA(temp0) : op->vtkCocoaRenderWindow::IsA(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCocoaRenderWindow_SafeDownCast(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "SafeDownCast"); vtkObjectBase *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkObjectBase")) { vtkCocoaRenderWindow *tempr = vtkCocoaRenderWindow::SafeDownCast(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkCocoaRenderWindow_NewInstance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "NewInstance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkCocoaRenderWindow *tempr = (ap.IsBound() ? op->NewInstance() : op->vtkCocoaRenderWindow::NewInstance()); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); if (result && PyVTKObject_Check(result)) { PyVTKObject_GetObject(result)->UnRegister(0); PyVTKObject_SetFlag(result, VTK_PYTHON_IGNORE_UNREGISTER, 1); } } } return result; } static PyObject * PyvtkCocoaRenderWindow_Start(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "Start"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->Start(); } else { op->vtkCocoaRenderWindow::Start(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCocoaRenderWindow_Frame(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "Frame"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->Frame(); } else { op->vtkCocoaRenderWindow::Frame(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCocoaRenderWindow_WindowConfigure(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "WindowConfigure"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->WindowConfigure(); } else { op->vtkCocoaRenderWindow::WindowConfigure(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCocoaRenderWindow_Initialize(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "Initialize"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->Initialize(); } else { op->vtkCocoaRenderWindow::Initialize(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCocoaRenderWindow_SetFullScreen(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetFullScreen"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); int temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetFullScreen(temp0); } else { op->vtkCocoaRenderWindow::SetFullScreen(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCocoaRenderWindow_WindowRemap(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "WindowRemap"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->WindowRemap(); } else { op->vtkCocoaRenderWindow::WindowRemap(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCocoaRenderWindow_PrefFullScreen(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "PrefFullScreen"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->PrefFullScreen(); } else { op->vtkCocoaRenderWindow::PrefFullScreen(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCocoaRenderWindow_SetSize_s1(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetSize"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); const int size0 = 2; int temp0[2]; int save0[2]; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetArray(temp0, size0)) { ap.SaveArray(temp0, save0, size0); if (ap.IsBound()) { op->SetSize(temp0); } else { op->vtkCocoaRenderWindow::SetSize(temp0); } if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCocoaRenderWindow_SetSize_s2(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetSize"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); int temp0; int temp1; PyObject *result = nullptr; if (op && ap.CheckArgCount(2) && ap.GetValue(temp0) && ap.GetValue(temp1)) { if (ap.IsBound()) { op->SetSize(temp0, temp1); } else { op->vtkCocoaRenderWindow::SetSize(temp0, temp1); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCocoaRenderWindow_SetSize(PyObject *self, PyObject *args) { int nargs = vtkPythonArgs::GetArgCount(self, args); switch(nargs) { case 1: return PyvtkCocoaRenderWindow_SetSize_s1(self, args); case 2: return PyvtkCocoaRenderWindow_SetSize_s2(self, args); } vtkPythonArgs::ArgCountError(nargs, "SetSize"); return nullptr; } static PyObject * PyvtkCocoaRenderWindow_GetSize(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetSize"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); int sizer = 2; PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int *tempr = (ap.IsBound() ? op->GetSize() : op->vtkCocoaRenderWindow::GetSize()); if (!ap.ErrorOccurred()) { result = ap.BuildTuple(tempr, sizer); } } return result; } static PyObject * PyvtkCocoaRenderWindow_SetPosition_s1(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetPosition"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); const int size0 = 2; int temp0[2]; int save0[2]; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetArray(temp0, size0)) { ap.SaveArray(temp0, save0, size0); if (ap.IsBound()) { op->SetPosition(temp0); } else { op->vtkCocoaRenderWindow::SetPosition(temp0); } if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCocoaRenderWindow_SetPosition_s2(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetPosition"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); int temp0; int temp1; PyObject *result = nullptr; if (op && ap.CheckArgCount(2) && ap.GetValue(temp0) && ap.GetValue(temp1)) { if (ap.IsBound()) { op->SetPosition(temp0, temp1); } else { op->vtkCocoaRenderWindow::SetPosition(temp0, temp1); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCocoaRenderWindow_SetPosition(PyObject *self, PyObject *args) { int nargs = vtkPythonArgs::GetArgCount(self, args); switch(nargs) { case 1: return PyvtkCocoaRenderWindow_SetPosition_s1(self, args); case 2: return PyvtkCocoaRenderWindow_SetPosition_s2(self, args); } vtkPythonArgs::ArgCountError(nargs, "SetPosition"); return nullptr; } static PyObject * PyvtkCocoaRenderWindow_GetScreenSize(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetScreenSize"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); int sizer = 2; PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int *tempr = (ap.IsBound() ? op->GetScreenSize() : op->vtkCocoaRenderWindow::GetScreenSize()); if (!ap.ErrorOccurred()) { result = ap.BuildTuple(tempr, sizer); } } return result; } static PyObject * PyvtkCocoaRenderWindow_GetPosition(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetPosition"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); int sizer = 2; PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int *tempr = (ap.IsBound() ? op->GetPosition() : op->vtkCocoaRenderWindow::GetPosition()); if (!ap.ErrorOccurred()) { result = ap.BuildTuple(tempr, sizer); } } return result; } static PyObject * PyvtkCocoaRenderWindow_SetWindowName(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetWindowName"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); char *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetWindowName(temp0); } else { op->vtkCocoaRenderWindow::SetWindowName(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCocoaRenderWindow_SetNextWindowInfo(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetNextWindowInfo"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); char *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetNextWindowInfo(temp0); } else { op->vtkCocoaRenderWindow::SetNextWindowInfo(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCocoaRenderWindow_GetGenericDrawable(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetGenericDrawable"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { void *tempr = (ap.IsBound() ? op->GetGenericDrawable() : op->vtkCocoaRenderWindow::GetGenericDrawable()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCocoaRenderWindow_SetDisplayId(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetDisplayId"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); void *temp0 = nullptr; Py_buffer pbuf0 = VTK_PYBUFFER_INITIALIZER; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetBuffer(temp0, &pbuf0)) { if (ap.IsBound()) { op->SetDisplayId(temp0); } else { op->vtkCocoaRenderWindow::SetDisplayId(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } #if PY_VERSION_HEX >= 0x02060000 if (pbuf0.obj != 0) { PyBuffer_Release(&pbuf0); } #endif return result; } static PyObject * PyvtkCocoaRenderWindow_GetGenericDisplayId(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetGenericDisplayId"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { void *tempr = (ap.IsBound() ? op->GetGenericDisplayId() : op->vtkCocoaRenderWindow::GetGenericDisplayId()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCocoaRenderWindow_SetWindowInfo(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetWindowInfo"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); char *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetWindowInfo(temp0); } else { op->vtkCocoaRenderWindow::SetWindowInfo(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCocoaRenderWindow_SetParentInfo(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetParentInfo"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); char *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetParentInfo(temp0); } else { op->vtkCocoaRenderWindow::SetParentInfo(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCocoaRenderWindow_SetNextWindowId(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetNextWindowId"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); void *temp0 = nullptr; Py_buffer pbuf0 = VTK_PYBUFFER_INITIALIZER; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetBuffer(temp0, &pbuf0)) { if (ap.IsBound()) { op->SetNextWindowId(temp0); } else { op->vtkCocoaRenderWindow::SetNextWindowId(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } #if PY_VERSION_HEX >= 0x02060000 if (pbuf0.obj != 0) { PyBuffer_Release(&pbuf0); } #endif return result; } static PyObject * PyvtkCocoaRenderWindow_InitializeFromCurrentContext(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "InitializeFromCurrentContext"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { bool tempr = (ap.IsBound() ? op->InitializeFromCurrentContext() : op->vtkCocoaRenderWindow::InitializeFromCurrentContext()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCocoaRenderWindow_SetStereoCapableWindow(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetStereoCapableWindow"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); int temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetStereoCapableWindow(temp0); } else { op->vtkCocoaRenderWindow::SetStereoCapableWindow(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCocoaRenderWindow_MakeCurrent(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "MakeCurrent"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->MakeCurrent(); } else { op->vtkCocoaRenderWindow::MakeCurrent(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCocoaRenderWindow_IsCurrent(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsCurrent"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { bool tempr = (ap.IsBound() ? op->IsCurrent() : op->vtkCocoaRenderWindow::IsCurrent()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCocoaRenderWindow_IsDrawable(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsDrawable"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { bool tempr = (ap.IsBound() ? op->IsDrawable() : op->vtkCocoaRenderWindow::IsDrawable()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCocoaRenderWindow_UpdateContext(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "UpdateContext"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->UpdateContext(); } else { op->vtkCocoaRenderWindow::UpdateContext(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCocoaRenderWindow_ReportCapabilities(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "ReportCapabilities"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { const char *tempr = (ap.IsBound() ? op->ReportCapabilities() : op->vtkCocoaRenderWindow::ReportCapabilities()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCocoaRenderWindow_IsDirect(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsDirect"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->IsDirect() : op->vtkCocoaRenderWindow::IsDirect()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCocoaRenderWindow_SetForceMakeCurrent(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetForceMakeCurrent"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->SetForceMakeCurrent(); } else { op->vtkCocoaRenderWindow::SetForceMakeCurrent(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCocoaRenderWindow_GetEventPending(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetEventPending"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetEventPending() : op->vtkCocoaRenderWindow::GetEventPending()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCocoaRenderWindow_SetupPalette(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetupPalette"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); void *temp0 = nullptr; Py_buffer pbuf0 = VTK_PYBUFFER_INITIALIZER; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetBuffer(temp0, &pbuf0)) { if (ap.IsBound()) { op->SetupPalette(temp0); } else { op->vtkCocoaRenderWindow::SetupPalette(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } #if PY_VERSION_HEX >= 0x02060000 if (pbuf0.obj != 0) { PyBuffer_Release(&pbuf0); } #endif return result; } static PyObject * PyvtkCocoaRenderWindow_SetupPixelFormat(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetupPixelFormat"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); void *temp0 = nullptr; Py_buffer pbuf0 = VTK_PYBUFFER_INITIALIZER; void *temp1 = nullptr; Py_buffer pbuf1 = VTK_PYBUFFER_INITIALIZER; int temp2; int temp3 = 16; int temp4 = 16; PyObject *result = nullptr; if (op && ap.CheckArgCount(3, 5) && ap.GetBuffer(temp0, &pbuf0) && ap.GetBuffer(temp1, &pbuf1) && ap.GetValue(temp2) && (ap.NoArgsLeft() || ap.GetValue(temp3)) && (ap.NoArgsLeft() || ap.GetValue(temp4))) { if (ap.IsBound()) { op->SetupPixelFormat(temp0, temp1, temp2, temp3, temp4); } else { op->vtkCocoaRenderWindow::SetupPixelFormat(temp0, temp1, temp2, temp3, temp4); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } #if PY_VERSION_HEX >= 0x02060000 if (pbuf0.obj != 0) { PyBuffer_Release(&pbuf0); } #endif #if PY_VERSION_HEX >= 0x02060000 if (pbuf1.obj != 0) { PyBuffer_Release(&pbuf1); } #endif return result; } static PyObject * PyvtkCocoaRenderWindow_Finalize(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "Finalize"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->Finalize(); } else { op->vtkCocoaRenderWindow::Finalize(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCocoaRenderWindow_HideCursor(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "HideCursor"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->HideCursor(); } else { op->vtkCocoaRenderWindow::HideCursor(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCocoaRenderWindow_ShowCursor(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "ShowCursor"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->ShowCursor(); } else { op->vtkCocoaRenderWindow::ShowCursor(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCocoaRenderWindow_SetCursorPosition(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetCursorPosition"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); int temp0; int temp1; PyObject *result = nullptr; if (op && ap.CheckArgCount(2) && ap.GetValue(temp0) && ap.GetValue(temp1)) { if (ap.IsBound()) { op->SetCursorPosition(temp0, temp1); } else { op->vtkCocoaRenderWindow::SetCursorPosition(temp0, temp1); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCocoaRenderWindow_SetCurrentCursor(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetCurrentCursor"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); int temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetCurrentCursor(temp0); } else { op->vtkCocoaRenderWindow::SetCurrentCursor(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCocoaRenderWindow_GetViewCreated(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetViewCreated"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetViewCreated() : op->vtkCocoaRenderWindow::GetViewCreated()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCocoaRenderWindow_GetWindowCreated(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetWindowCreated"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetWindowCreated() : op->vtkCocoaRenderWindow::GetWindowCreated()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCocoaRenderWindow_SetContextId(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetContextId"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); void *temp0 = nullptr; Py_buffer pbuf0 = VTK_PYBUFFER_INITIALIZER; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetBuffer(temp0, &pbuf0)) { if (ap.IsBound()) { op->SetContextId(temp0); } else { op->vtkCocoaRenderWindow::SetContextId(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } #if PY_VERSION_HEX >= 0x02060000 if (pbuf0.obj != 0) { PyBuffer_Release(&pbuf0); } #endif return result; } static PyObject * PyvtkCocoaRenderWindow_GetContextId(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetContextId"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { void *tempr = (ap.IsBound() ? op->GetContextId() : op->vtkCocoaRenderWindow::GetContextId()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCocoaRenderWindow_GetGenericContext(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetGenericContext"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { void *tempr = (ap.IsBound() ? op->GetGenericContext() : op->vtkCocoaRenderWindow::GetGenericContext()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCocoaRenderWindow_SetRootWindow(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetRootWindow"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); void *temp0 = nullptr; Py_buffer pbuf0 = VTK_PYBUFFER_INITIALIZER; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetBuffer(temp0, &pbuf0)) { if (ap.IsBound()) { op->SetRootWindow(temp0); } else { op->vtkCocoaRenderWindow::SetRootWindow(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } #if PY_VERSION_HEX >= 0x02060000 if (pbuf0.obj != 0) { PyBuffer_Release(&pbuf0); } #endif return result; } static PyObject * PyvtkCocoaRenderWindow_GetRootWindow(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetRootWindow"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { void *tempr = (ap.IsBound() ? op->GetRootWindow() : op->vtkCocoaRenderWindow::GetRootWindow()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCocoaRenderWindow_SetWindowId(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetWindowId"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); void *temp0 = nullptr; Py_buffer pbuf0 = VTK_PYBUFFER_INITIALIZER; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetBuffer(temp0, &pbuf0)) { if (ap.IsBound()) { op->SetWindowId(temp0); } else { op->vtkCocoaRenderWindow::SetWindowId(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } #if PY_VERSION_HEX >= 0x02060000 if (pbuf0.obj != 0) { PyBuffer_Release(&pbuf0); } #endif return result; } static PyObject * PyvtkCocoaRenderWindow_GetWindowId(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetWindowId"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { void *tempr = (ap.IsBound() ? op->GetWindowId() : op->vtkCocoaRenderWindow::GetWindowId()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCocoaRenderWindow_GetGenericWindowId(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetGenericWindowId"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { void *tempr = (ap.IsBound() ? op->GetGenericWindowId() : op->vtkCocoaRenderWindow::GetGenericWindowId()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCocoaRenderWindow_SetParentId(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetParentId"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); void *temp0 = nullptr; Py_buffer pbuf0 = VTK_PYBUFFER_INITIALIZER; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetBuffer(temp0, &pbuf0)) { if (ap.IsBound()) { op->SetParentId(temp0); } else { op->vtkCocoaRenderWindow::SetParentId(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } #if PY_VERSION_HEX >= 0x02060000 if (pbuf0.obj != 0) { PyBuffer_Release(&pbuf0); } #endif return result; } static PyObject * PyvtkCocoaRenderWindow_GetParentId(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetParentId"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { void *tempr = (ap.IsBound() ? op->GetParentId() : op->vtkCocoaRenderWindow::GetParentId()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCocoaRenderWindow_GetGenericParentId(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetGenericParentId"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { void *tempr = (ap.IsBound() ? op->GetGenericParentId() : op->vtkCocoaRenderWindow::GetGenericParentId()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCocoaRenderWindow_SetWantsBestResolution(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetWantsBestResolution"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); bool temp0 = false; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetWantsBestResolution(temp0); } else { op->vtkCocoaRenderWindow::SetWantsBestResolution(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCocoaRenderWindow_GetWantsBestResolution(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetWantsBestResolution"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { bool tempr = (ap.IsBound() ? op->GetWantsBestResolution() : op->vtkCocoaRenderWindow::GetWantsBestResolution()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCocoaRenderWindow_SetPixelFormat(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetPixelFormat"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); void *temp0 = nullptr; Py_buffer pbuf0 = VTK_PYBUFFER_INITIALIZER; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetBuffer(temp0, &pbuf0)) { if (ap.IsBound()) { op->SetPixelFormat(temp0); } else { op->vtkCocoaRenderWindow::SetPixelFormat(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } #if PY_VERSION_HEX >= 0x02060000 if (pbuf0.obj != 0) { PyBuffer_Release(&pbuf0); } #endif return result; } static PyObject * PyvtkCocoaRenderWindow_GetPixelFormat(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetPixelFormat"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { void *tempr = (ap.IsBound() ? op->GetPixelFormat() : op->vtkCocoaRenderWindow::GetPixelFormat()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCocoaRenderWindow_PushContext(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "PushContext"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->PushContext(); } else { op->vtkCocoaRenderWindow::PushContext(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCocoaRenderWindow_PopContext(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "PopContext"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCocoaRenderWindow *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->PopContext(); } else { op->vtkCocoaRenderWindow::PopContext(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyMethodDef PyvtkCocoaRenderWindow_Methods[] = { {"IsTypeOf", PyvtkCocoaRenderWindow_IsTypeOf, METH_VARARGS, "V.IsTypeOf(string) -> int\nC++: static vtkTypeBool IsTypeOf(const char *type)\n\nReturn 1 if this class type is the same type of (or a subclass\nof) the named class. Returns 0 otherwise. This method works in\ncombination with vtkTypeMacro found in vtkSetGet.h.\n"}, {"IsA", PyvtkCocoaRenderWindow_IsA, METH_VARARGS, "V.IsA(string) -> int\nC++: vtkTypeBool IsA(const char *type) override;\n\nReturn 1 if this class is the same type of (or a subclass of) the\nnamed class. Returns 0 otherwise. This method works in\ncombination with vtkTypeMacro found in vtkSetGet.h.\n"}, {"SafeDownCast", PyvtkCocoaRenderWindow_SafeDownCast, METH_VARARGS, "V.SafeDownCast(vtkObjectBase) -> vtkCocoaRenderWindow\nC++: static vtkCocoaRenderWindow *SafeDownCast(vtkObjectBase *o)\n\n"}, {"NewInstance", PyvtkCocoaRenderWindow_NewInstance, METH_VARARGS, "V.NewInstance() -> vtkCocoaRenderWindow\nC++: vtkCocoaRenderWindow *NewInstance()\n\n"}, {"Start", PyvtkCocoaRenderWindow_Start, METH_VARARGS, "V.Start()\nC++: void Start() override;\n\nBegin the rendering process.\n"}, {"Frame", PyvtkCocoaRenderWindow_Frame, METH_VARARGS, "V.Frame()\nC++: void Frame() override;\n\nFinish the rendering process.\n"}, {"WindowConfigure", PyvtkCocoaRenderWindow_WindowConfigure, METH_VARARGS, "V.WindowConfigure()\nC++: virtual void WindowConfigure()\n\nSpecify various window parameters.\n"}, {"Initialize", PyvtkCocoaRenderWindow_Initialize, METH_VARARGS, "V.Initialize()\nC++: void Initialize() override;\n\nInitialize the window for rendering. virtual void\nWindowInitialize();\n\nInitialize the rendering window.\n"}, {"SetFullScreen", PyvtkCocoaRenderWindow_SetFullScreen, METH_VARARGS, "V.SetFullScreen(int)\nC++: void SetFullScreen(int) override;\n\nChange the window to fill the entire screen. This is only\npartially implemented for the vtkCocoaRenderWindow. It can only\nbe called before the window has been created, and it might not\nwork on all versions of OS X.\n"}, {"WindowRemap", PyvtkCocoaRenderWindow_WindowRemap, METH_VARARGS, "V.WindowRemap()\nC++: void WindowRemap() override;\n\nRemap the window. This is not implemented for the\nvtkCocoaRenderWindow.\n"}, {"PrefFullScreen", PyvtkCocoaRenderWindow_PrefFullScreen, METH_VARARGS, "V.PrefFullScreen()\nC++: virtual void PrefFullScreen()\n\nSet the preferred window size to full screen. This is not\nimplemented for the vtkCocoaRenderWindow.\n"}, {"SetSize", PyvtkCocoaRenderWindow_SetSize, METH_VARARGS, "V.SetSize([int, int])\nC++: void SetSize(int a[2]) override;\nV.SetSize(int, int)\nC++: void SetSize(int, int) override;\n\nSet the size of the window in pixels.\n"}, {"GetSize", PyvtkCocoaRenderWindow_GetSize, METH_VARARGS, "V.GetSize() -> (int, int)\nC++: int *GetSize() override;\n\nGet the current size of the window in pixels.\n"}, {"SetPosition", PyvtkCocoaRenderWindow_SetPosition, METH_VARARGS, "V.SetPosition([int, int])\nC++: void SetPosition(int a[2]) override;\nV.SetPosition(int, int)\nC++: void SetPosition(int, int) override;\n\nSet the position of the window.\n"}, {"GetScreenSize", PyvtkCocoaRenderWindow_GetScreenSize, METH_VARARGS, "V.GetScreenSize() -> (int, int)\nC++: int *GetScreenSize() override;\n\nGet the current size of the screen in pixels.\n"}, {"GetPosition", PyvtkCocoaRenderWindow_GetPosition, METH_VARARGS, "V.GetPosition() -> (int, int)\nC++: int *GetPosition() override;\n\nGet the position in screen coordinates of the window.\n"}, {"SetWindowName", PyvtkCocoaRenderWindow_SetWindowName, METH_VARARGS, "V.SetWindowName(string)\nC++: void SetWindowName(const char *) override;\n\nSet the name of the window. This appears at the top of the window\nnormally.\n"}, {"SetNextWindowInfo", PyvtkCocoaRenderWindow_SetNextWindowInfo, METH_VARARGS, "V.SetNextWindowInfo(string)\nC++: void SetNextWindowInfo(char *) override;\n\nDummy stubs for vtkWindow API.\n"}, {"GetGenericDrawable", PyvtkCocoaRenderWindow_GetGenericDrawable, METH_VARARGS, "V.GetGenericDrawable() -> void\nC++: void *GetGenericDrawable() override;\n\nDummy stubs for vtkWindow API.\n"}, {"SetDisplayId", PyvtkCocoaRenderWindow_SetDisplayId, METH_VARARGS, "V.SetDisplayId(void)\nC++: void SetDisplayId(void *) override;\n\nDummy stubs for vtkWindow API.\n"}, {"GetGenericDisplayId", PyvtkCocoaRenderWindow_GetGenericDisplayId, METH_VARARGS, "V.GetGenericDisplayId() -> void\nC++: void *GetGenericDisplayId() override;\n\nDummy stubs for vtkWindow API.\n"}, {"SetWindowInfo", PyvtkCocoaRenderWindow_SetWindowInfo, METH_VARARGS, "V.SetWindowInfo(string)\nC++: void SetWindowInfo(char *) override;\n\nSet this RenderWindow's window id to a pre-existing window. The\nparameter is an ASCII string of a decimal number representing a\npointer to the window.\n"}, {"SetParentInfo", PyvtkCocoaRenderWindow_SetParentInfo, METH_VARARGS, "V.SetParentInfo(string)\nC++: void SetParentInfo(char *) override;\n\nSee the documenation for SetParentId(). This method allows the\nParentId to be set as an ASCII string of a decimal number that is\nthe memory address of the parent NSView.\n"}, {"SetNextWindowId", PyvtkCocoaRenderWindow_SetNextWindowId, METH_VARARGS, "V.SetNextWindowId(void)\nC++: void SetNextWindowId(void *) override;\n\nDummy stubs for vtkWindow API.\n"}, {"InitializeFromCurrentContext", PyvtkCocoaRenderWindow_InitializeFromCurrentContext, METH_VARARGS, "V.InitializeFromCurrentContext() -> bool\nC++: bool InitializeFromCurrentContext() override;\n\nInitialize the render window from the information associated with\nthe currently activated OpenGL context.\n"}, {"SetStereoCapableWindow", PyvtkCocoaRenderWindow_SetStereoCapableWindow, METH_VARARGS, "V.SetStereoCapableWindow(int)\nC++: void SetStereoCapableWindow(int capable) override;\n\nPrescribe that the window be created in a stereo-capable mode.\nThis method must be called before the window is realized. This\nmethod overrrides the superclass method since this class can\nactually check whether the window has been realized yet.\n"}, {"MakeCurrent", PyvtkCocoaRenderWindow_MakeCurrent, METH_VARARGS, "V.MakeCurrent()\nC++: void MakeCurrent() override;\n\nMake this windows OpenGL context the current context.\n"}, {"IsCurrent", PyvtkCocoaRenderWindow_IsCurrent, METH_VARARGS, "V.IsCurrent() -> bool\nC++: bool IsCurrent() override;\n\nTells if this window is the current OpenGL context for the\ncalling thread.\n"}, {"IsDrawable", PyvtkCocoaRenderWindow_IsDrawable, METH_VARARGS, "V.IsDrawable() -> bool\nC++: bool IsDrawable() override;\n\nTest if the window has a valid drawable. This is currently only\nan issue on Mac OS X Cocoa where rendering to an invalid drawable\nresults in all OpenGL calls to fail with \"invalid framebuffer\noperation\".\n"}, {"UpdateContext", PyvtkCocoaRenderWindow_UpdateContext, METH_VARARGS, "V.UpdateContext()\nC++: void UpdateContext()\n\nUpdate this window's OpenGL context, e.g. when the window is\nresized.\n"}, {"ReportCapabilities", PyvtkCocoaRenderWindow_ReportCapabilities, METH_VARARGS, "V.ReportCapabilities() -> string\nC++: const char *ReportCapabilities() override;\n\nGet report of capabilities for the render window\n"}, {"IsDirect", PyvtkCocoaRenderWindow_IsDirect, METH_VARARGS, "V.IsDirect() -> int\nC++: int IsDirect() override;\n\nIs this render window using hardware acceleration? 0-false,\n1-true\n"}, {"SetForceMakeCurrent", PyvtkCocoaRenderWindow_SetForceMakeCurrent, METH_VARARGS, "V.SetForceMakeCurrent()\nC++: void SetForceMakeCurrent() override;\n\nIf called, allow MakeCurrent() to skip cache-check when called.\nMakeCurrent() reverts to original behavior of cache-checking on\nthe next render.\n"}, {"GetEventPending", PyvtkCocoaRenderWindow_GetEventPending, METH_VARARGS, "V.GetEventPending() -> int\nC++: int GetEventPending() override;\n\nCheck to see if an event is pending for this window. This is a\nuseful check to abort a long render.\n"}, {"SetupPalette", PyvtkCocoaRenderWindow_SetupPalette, METH_VARARGS, "V.SetupPalette(void)\nC++: virtual void SetupPalette(void *hDC)\n\nInitialize OpenGL for this window.\n"}, {"SetupPixelFormat", PyvtkCocoaRenderWindow_SetupPixelFormat, METH_VARARGS, "V.SetupPixelFormat(void, void, int, int, int)\nC++: virtual void SetupPixelFormat(void *hDC, void *dwFlags,\n int debug, int bpp=16, int zbpp=16)\n\nInitialize OpenGL for this window.\n"}, {"Finalize", PyvtkCocoaRenderWindow_Finalize, METH_VARARGS, "V.Finalize()\nC++: void Finalize() override;\n\nClean up device contexts, rendering contexts, etc.\n"}, {"HideCursor", PyvtkCocoaRenderWindow_HideCursor, METH_VARARGS, "V.HideCursor()\nC++: void HideCursor() override;\n\nHide or Show the mouse cursor, it is nice to be able to hide the\ndefault cursor if you want VTK to display a 3D cursor instead.\nSet cursor position in window (note that (0,0) is the lower left\ncorner).\n"}, {"ShowCursor", PyvtkCocoaRenderWindow_ShowCursor, METH_VARARGS, "V.ShowCursor()\nC++: void ShowCursor() override;\n\nHide or Show the mouse cursor, it is nice to be able to hide the\ndefault cursor if you want VTK to display a 3D cursor instead.\nSet cursor position in window (note that (0,0) is the lower left\ncorner).\n"}, {"SetCursorPosition", PyvtkCocoaRenderWindow_SetCursorPosition, METH_VARARGS, "V.SetCursorPosition(int, int)\nC++: void SetCursorPosition(int x, int y) override;\n\nHide or Show the mouse cursor, it is nice to be able to hide the\ndefault cursor if you want VTK to display a 3D cursor instead.\nSet cursor position in window (note that (0,0) is the lower left\ncorner).\n"}, {"SetCurrentCursor", PyvtkCocoaRenderWindow_SetCurrentCursor, METH_VARARGS, "V.SetCurrentCursor(int)\nC++: void SetCurrentCursor(int) override;\n\nChange the shape of the cursor.\n"}, {"GetViewCreated", PyvtkCocoaRenderWindow_GetViewCreated, METH_VARARGS, "V.GetViewCreated() -> int\nC++: virtual int GetViewCreated()\n\nGet the ViewCreated flag. It is 1 if this object created an\ninstance of NSView, 0 otherwise.\n"}, {"GetWindowCreated", PyvtkCocoaRenderWindow_GetWindowCreated, METH_VARARGS, "V.GetWindowCreated() -> int\nC++: virtual int GetWindowCreated()\n\nGet the WindowCreated flag. It is 1 if this object created an\ninstance of NSWindow, 0 otherwise.\n"}, {"SetContextId", PyvtkCocoaRenderWindow_SetContextId, METH_VARARGS, "V.SetContextId(void)\nC++: void SetContextId(void *)\n\nAccessors for the OpenGL context (Really an NSOpenGLContext*).\n"}, {"GetContextId", PyvtkCocoaRenderWindow_GetContextId, METH_VARARGS, "V.GetContextId() -> void\nC++: void *GetContextId()\n\nAccessors for the OpenGL context (Really an NSOpenGLContext*).\n"}, {"GetGenericContext", PyvtkCocoaRenderWindow_GetGenericContext, METH_VARARGS, "V.GetGenericContext() -> void\nC++: void *GetGenericContext() override;\n\nAccessors for the OpenGL context (Really an NSOpenGLContext*).\n"}, {"SetRootWindow", PyvtkCocoaRenderWindow_SetRootWindow, METH_VARARGS, "V.SetRootWindow(void)\nC++: virtual void SetRootWindow(void *)\n\nSets the NSWindow* associated with this vtkRenderWindow. This\nclass' default behaviour, that is, if you never call\nSetWindowId()/SetRootWindow() is to create an NSWindow and a\nvtkCocoaGLView (NSView subclass) which are used together to draw\nall vtk stuff into. If you already have an NSWindow and NSView\nand you want this class to use them you must call both\nSetRootWindow() and SetWindowId(), respectively, early on (before\nWindowInitialize() is executed). In the case of Java, you should\ncall only SetWindowId().\n"}, {"GetRootWindow", PyvtkCocoaRenderWindow_GetRootWindow, METH_VARARGS, "V.GetRootWindow() -> void\nC++: virtual void *GetRootWindow()\n\nReturns the NSWindow* associated with this vtkRenderWindow.\n"}, {"SetWindowId", PyvtkCocoaRenderWindow_SetWindowId, METH_VARARGS, "V.SetWindowId(void)\nC++: void SetWindowId(void *) override;\n\nSets the NSView* associated with this vtkRenderWindow. This\nclass' default behaviour, that is, if you never call this\nSetWindowId()/SetRootWindow() is to create an NSWindow and a\nvtkCocoaGLView (NSView subclass) which are used together to draw\nall vtk stuff into. If you already have an NSWindow and NSView\nand you want this class to use them you must call both\nSetRootWindow() and SetWindowId(), respectively, early on (before\nWindowInitialize() is executed). In the case of Java, you should\ncall only SetWindowId().\n"}, {"GetWindowId", PyvtkCocoaRenderWindow_GetWindowId, METH_VARARGS, "V.GetWindowId() -> void\nC++: virtual void *GetWindowId()\n\nReturns the NSView* associated with this vtkRenderWindow.\n"}, {"GetGenericWindowId", PyvtkCocoaRenderWindow_GetGenericWindowId, METH_VARARGS, "V.GetGenericWindowId() -> void\nC++: void *GetGenericWindowId() override;\n\nDummy stubs for vtkWindow API.\n"}, {"SetParentId", PyvtkCocoaRenderWindow_SetParentId, METH_VARARGS, "V.SetParentId(void)\nC++: void SetParentId(void *nsview) override;\n\nSet the NSView* for the vtkRenderWindow to be parented within. \nThe Position and Size of the RenderWindow will set the rectangle\nof the NSView that the vtkRenderWindow will create within this\nparent. If you set the WindowId, then this ParentId will be\nignored.\n"}, {"GetParentId", PyvtkCocoaRenderWindow_GetParentId, METH_VARARGS, "V.GetParentId() -> void\nC++: virtual void *GetParentId()\n\nGet the parent NSView* for this vtkRenderWindow. This method\nwill return \"NULL\" if the parent was not set with SetParentId()\nor SetParentInfo().\n"}, {"GetGenericParentId", PyvtkCocoaRenderWindow_GetGenericParentId, METH_VARARGS, "V.GetGenericParentId() -> void\nC++: void *GetGenericParentId() override;\n\nDummy stubs for vtkWindow API.\n"}, {"SetWantsBestResolution", PyvtkCocoaRenderWindow_SetWantsBestResolution, METH_VARARGS, "V.SetWantsBestResolution(bool)\nC++: void SetWantsBestResolution(bool wantsBest)\n\nSet to true if you want to force NSViews created by this object\nto have their wantsBestResolutionOpenGLSurface property set to\nYES. Otherwise, the bundle's Info.plist will be checked for the\n\"NSHighResolutionCapable\" key, if it is present and YES,\nwantsBestResolutionOpenGLSurface will be set to YES. In all other\ncases, setWantsBestResolutionOpenGLSurface: is not invoked at\nall. Notably, setWantsBestResolutionOpenGLSurface: is never\ninvoked on NSViews not created by VTK itself.\n"}, {"GetWantsBestResolution", PyvtkCocoaRenderWindow_GetWantsBestResolution, METH_VARARGS, "V.GetWantsBestResolution() -> bool\nC++: bool GetWantsBestResolution()\n\n"}, {"SetPixelFormat", PyvtkCocoaRenderWindow_SetPixelFormat, METH_VARARGS, "V.SetPixelFormat(void)\nC++: void SetPixelFormat(void *pixelFormat)\n\nAccessors for the pixel format object (Really an\nNSOpenGLPixelFormat*).\n"}, {"GetPixelFormat", PyvtkCocoaRenderWindow_GetPixelFormat, METH_VARARGS, "V.GetPixelFormat() -> void\nC++: void *GetPixelFormat()\n\nAccessors for the pixel format object (Really an\nNSOpenGLPixelFormat*).\n"}, {"PushContext", PyvtkCocoaRenderWindow_PushContext, METH_VARARGS, "V.PushContext()\nC++: void PushContext() override;\n\nAbility to push and pop this window's context as the current\ncontext. The idea being to if needed make this window's context\ncurrent and when done releasing resources restore the prior\ncontext\n"}, {"PopContext", PyvtkCocoaRenderWindow_PopContext, METH_VARARGS, "V.PopContext()\nC++: void PopContext() override;\n\nAbility to push and pop this window's context as the current\ncontext. The idea being to if needed make this window's context\ncurrent and when done releasing resources restore the prior\ncontext\n"}, {nullptr, nullptr, 0, nullptr} }; static PyTypeObject PyvtkCocoaRenderWindow_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "vtkRenderingOpenGL2Python.vtkCocoaRenderWindow", // tp_name sizeof(PyVTKObject), // tp_basicsize 0, // tp_itemsize PyVTKObject_Delete, // tp_dealloc 0, // tp_print nullptr, // tp_getattr nullptr, // tp_setattr nullptr, // tp_compare PyVTKObject_Repr, // tp_repr nullptr, // tp_as_number nullptr, // tp_as_sequence nullptr, // tp_as_mapping nullptr, // tp_hash nullptr, // tp_call PyVTKObject_String, // tp_str PyObject_GenericGetAttr, // tp_getattro PyObject_GenericSetAttr, // tp_setattro &PyVTKObject_AsBuffer, // tp_as_buffer Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_BASETYPE, // tp_flags PyvtkCocoaRenderWindow_Doc, // tp_doc PyVTKObject_Traverse, // tp_traverse nullptr, // tp_clear nullptr, // tp_richcompare offsetof(PyVTKObject, vtk_weakreflist), // tp_weaklistoffset nullptr, // tp_iter nullptr, // tp_iternext nullptr, // tp_methods nullptr, // tp_members PyVTKObject_GetSet, // tp_getset nullptr, // tp_base nullptr, // tp_dict nullptr, // tp_descr_get nullptr, // tp_descr_set offsetof(PyVTKObject, vtk_dict), // tp_dictoffset nullptr, // tp_init nullptr, // tp_alloc PyVTKObject_New, // tp_new PyObject_GC_Del, // tp_free nullptr, // tp_is_gc nullptr, // tp_bases nullptr, // tp_mro nullptr, // tp_cache nullptr, // tp_subclasses nullptr, // tp_weaklist VTK_WRAP_PYTHON_SUPPRESS_UNINITIALIZED }; static vtkObjectBase *PyvtkCocoaRenderWindow_StaticNew() { return vtkCocoaRenderWindow::New(); } PyObject *PyvtkCocoaRenderWindow_ClassNew() { PyVTKClass_Add( &PyvtkCocoaRenderWindow_Type, PyvtkCocoaRenderWindow_Methods, "vtkCocoaRenderWindow", &PyvtkCocoaRenderWindow_StaticNew); PyTypeObject *pytype = &PyvtkCocoaRenderWindow_Type; if ((pytype->tp_flags & Py_TPFLAGS_READY) != 0) { return (PyObject *)pytype; } #if !defined(VTK_PY3K) && PY_VERSION_HEX >= 0x02060000 pytype->tp_flags |= Py_TPFLAGS_HAVE_NEWBUFFER; #endif pytype->tp_base = (PyTypeObject *)PyvtkOpenGLRenderWindow_ClassNew(); PyType_Ready(pytype); return (PyObject *)pytype; } void PyVTKAddFile_vtkCocoaRenderWindow( PyObject *dict) { PyObject *o; o = PyvtkCocoaRenderWindow_ClassNew(); if (o && PyDict_SetItemString(dict, "vtkCocoaRenderWindow", o) != 0) { Py_DECREF(o); } }