From 91c41b30c2e1b44ed19c18a84da42c96fc600fec Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 30 Apr 2001 23:52:22 +0000 Subject: [PATCH] Some tweaks and cleanup. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/distrib/make_installer.py | 3 -- wxPython/src/misc.i | 1 - wxPython/src/msw/misc.cpp | 38 --------------- wxPython/src/msw/misc.py | 2 - wxPython/src/msw/misc2.cpp | 78 ++++++++++++++++++++++++++++++ wxPython/src/msw/misc2.py | 7 +++ 6 files changed, 85 insertions(+), 44 deletions(-) diff --git a/wxPython/distrib/make_installer.py b/wxPython/distrib/make_installer.py index eee5c57209..9fee40ccfe 100644 --- a/wxPython/distrib/make_installer.py +++ b/wxPython/distrib/make_installer.py @@ -1,5 +1,4 @@ """ - This script will generate a setup script for InnoSetup and then run it to make the installer executable. If all goes right the proper versions of Python and wxWindows (including hybrid/final settings) will all be @@ -10,8 +9,6 @@ will be created. import os, string -#---------------------------------------------------------------------- - KEEP_TEMPS = 0 #---------------------------------------------------------------------- diff --git a/wxPython/src/misc.i b/wxPython/src/misc.i index 36c75d98d6..8486a08ce3 100644 --- a/wxPython/src/misc.i +++ b/wxPython/src/misc.i @@ -315,7 +315,6 @@ void wxRegisterId(long id); long wxGetCurrentId(); void wxBell(); -void wxDisplaySize(int *OUTPUT, int *OUTPUT); void wxEndBusyCursor(); long wxGetElapsedTime(bool resetTimer = TRUE); diff --git a/wxPython/src/msw/misc.cpp b/wxPython/src/msw/misc.cpp index 5ca9cf04e0..e0dba8635c 100644 --- a/wxPython/src/msw/misc.cpp +++ b/wxPython/src/msw/misc.cpp @@ -286,43 +286,6 @@ static PyObject *_wrap_wxBell(PyObject *self, PyObject *args, PyObject *kwargs) return _resultobj; } -static PyObject *_wrap_wxDisplaySize(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int * _arg0; - int temp; - int * _arg1; - int temp0; - char *_kwnames[] = { NULL }; - - self = self; -{ - _arg0 = &temp; -} -{ - _arg1 = &temp0; -} - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxDisplaySize",_kwnames)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - wxDisplaySize(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg0)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - static PyObject *_wrap_wxEndBusyCursor(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; char *_kwnames[] = { NULL }; @@ -5020,7 +4983,6 @@ static PyMethodDef misccMethods[] = { { "wxGetFreeMemory", (PyCFunction) _wrap_wxGetFreeMemory, METH_VARARGS | METH_KEYWORDS }, { "wxGetElapsedTime", (PyCFunction) _wrap_wxGetElapsedTime, METH_VARARGS | METH_KEYWORDS }, { "wxEndBusyCursor", (PyCFunction) _wrap_wxEndBusyCursor, METH_VARARGS | METH_KEYWORDS }, - { "wxDisplaySize", (PyCFunction) _wrap_wxDisplaySize, METH_VARARGS | METH_KEYWORDS }, { "wxBell", (PyCFunction) _wrap_wxBell, METH_VARARGS | METH_KEYWORDS }, { "wxGetCurrentId", (PyCFunction) _wrap_wxGetCurrentId, METH_VARARGS | METH_KEYWORDS }, { "RegisterId", (PyCFunction) _wrap_RegisterId, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/misc.py b/wxPython/src/msw/misc.py index 55207e1d74..0f1bb7c68a 100644 --- a/wxPython/src/msw/misc.py +++ b/wxPython/src/msw/misc.py @@ -658,8 +658,6 @@ wxGetCurrentId = miscc.wxGetCurrentId wxBell = miscc.wxBell -wxDisplaySize = miscc.wxDisplaySize - wxEndBusyCursor = miscc.wxEndBusyCursor wxGetElapsedTime = miscc.wxGetElapsedTime diff --git a/wxPython/src/msw/misc2.cpp b/wxPython/src/msw/misc2.cpp index 410c24805d..f8a752bb47 100644 --- a/wxPython/src/msw/misc2.cpp +++ b/wxPython/src/msw/misc2.cpp @@ -1032,6 +1032,82 @@ static PyObject *_wrap_wxGetDisplaySizeMM(PyObject *self, PyObject *args, PyObje return _resultobj; } +static PyObject *_wrap_wxClientDisplayRect(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int * _arg0; + int temp; + int * _arg1; + int temp0; + int * _arg2; + int temp1; + int * _arg3; + int temp2; + char *_kwnames[] = { NULL }; + + self = self; +{ + _arg0 = &temp; +} +{ + _arg1 = &temp0; +} +{ + _arg2 = &temp1; +} +{ + _arg3 = &temp2; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxClientDisplayRect",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxClientDisplayRect(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg0)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg1)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg3)); + _resultobj = t_output_helper(_resultobj, o); +} + return _resultobj; +} + +static PyObject *_wrap_wxGetClientDisplayRect(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRect * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetClientDisplayRect",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxRect (wxGetClientDisplayRect()); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxRect_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + static PyObject *_wrap_wxSetCursor(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxCursor * _arg0; @@ -6820,6 +6896,8 @@ static PyMethodDef misc2cMethods[] = { { "wxFindWindowByName", (PyCFunction) _wrap_wxFindWindowByName, METH_VARARGS | METH_KEYWORDS }, { "wxFindWindowByLabel", (PyCFunction) _wrap_wxFindWindowByLabel, METH_VARARGS | METH_KEYWORDS }, { "wxSetCursor", (PyCFunction) _wrap_wxSetCursor, METH_VARARGS | METH_KEYWORDS }, + { "wxGetClientDisplayRect", (PyCFunction) _wrap_wxGetClientDisplayRect, METH_VARARGS | METH_KEYWORDS }, + { "wxClientDisplayRect", (PyCFunction) _wrap_wxClientDisplayRect, METH_VARARGS | METH_KEYWORDS }, { "wxGetDisplaySizeMM", (PyCFunction) _wrap_wxGetDisplaySizeMM, METH_VARARGS | METH_KEYWORDS }, { "wxDisplaySizeMM", (PyCFunction) _wrap_wxDisplaySizeMM, METH_VARARGS | METH_KEYWORDS }, { "wxGetDisplaySize", (PyCFunction) _wrap_wxGetDisplaySize, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/misc2.py b/wxPython/src/msw/misc2.py index b836092489..8260fac59c 100644 --- a/wxPython/src/msw/misc2.py +++ b/wxPython/src/msw/misc2.py @@ -667,6 +667,13 @@ def wxGetDisplaySizeMM(*_args, **_kwargs): if val: val = wxSizePtr(val); val.thisown = 1 return val +wxClientDisplayRect = misc2c.wxClientDisplayRect + +def wxGetClientDisplayRect(*_args, **_kwargs): + val = apply(misc2c.wxGetClientDisplayRect,_args,_kwargs) + if val: val = wxRectPtr(val); val.thisown = 1 + return val + wxSetCursor = misc2c.wxSetCursor def wxFindWindowByLabel(*_args, **_kwargs): -- 2.47.2