reSWIGged

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30661 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-11-19 22:59:49 +00:00
parent 9f486b326a
commit 8fb0e70a5d
27 changed files with 449 additions and 140 deletions

View File

@@ -11,6 +11,7 @@ BU_LEFT = _controls_.BU_LEFT
BU_TOP = _controls_.BU_TOP
BU_RIGHT = _controls_.BU_RIGHT
BU_BOTTOM = _controls_.BU_BOTTOM
BU_ALIGN_MASK = _controls_.BU_ALIGN_MASK
BU_EXACTFIT = _controls_.BU_EXACTFIT
BU_AUTODRAW = _controls_.BU_AUTODRAW
class Button(_core.Control):
@@ -2787,6 +2788,10 @@ class BookCtrl(_core.Control):
"""GetPage(self, size_t n) -> Window"""
return _controls_.BookCtrl_GetPage(*args, **kwargs)
def GetCurrentPage(*args, **kwargs):
"""GetCurrentPage(self) -> Window"""
return _controls_.BookCtrl_GetCurrentPage(*args, **kwargs)
def GetSelection(*args, **kwargs):
"""GetSelection(self) -> int"""
return _controls_.BookCtrl_GetSelection(*args, **kwargs)

View File

@@ -14279,6 +14279,34 @@ static PyObject *_wrap_BookCtrl_GetPage(PyObject *, PyObject *args, PyObject *kw
}
static PyObject *_wrap_BookCtrl_GetCurrentPage(PyObject *, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxBookCtrl *arg1 = (wxBookCtrl *) 0 ;
wxWindow *result;
PyObject * obj0 = 0 ;
char *kwnames[] = {
(char *) "self", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:BookCtrl_GetCurrentPage",kwnames,&obj0)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxBookCtrl,
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxWindow *)((wxBookCtrl const *)arg1)->GetCurrentPage();
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
{
resultobj = wxPyMake_wxObject(result, 0);
}
return resultobj;
fail:
return NULL;
}
static PyObject *_wrap_BookCtrl_GetSelection(PyObject *, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxBookCtrl *arg1 = (wxBookCtrl *) 0 ;
@@ -31970,6 +31998,7 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"ToggleButton_swigregister", ToggleButton_swigregister, METH_VARARGS, NULL },
{ (char *)"BookCtrl_GetPageCount", (PyCFunction) _wrap_BookCtrl_GetPageCount, METH_VARARGS | METH_KEYWORDS, NULL },
{ (char *)"BookCtrl_GetPage", (PyCFunction) _wrap_BookCtrl_GetPage, METH_VARARGS | METH_KEYWORDS, NULL },
{ (char *)"BookCtrl_GetCurrentPage", (PyCFunction) _wrap_BookCtrl_GetCurrentPage, METH_VARARGS | METH_KEYWORDS, NULL },
{ (char *)"BookCtrl_GetSelection", (PyCFunction) _wrap_BookCtrl_GetSelection, METH_VARARGS | METH_KEYWORDS, NULL },
{ (char *)"BookCtrl_SetPageText", (PyCFunction) _wrap_BookCtrl_SetPageText, METH_VARARGS | METH_KEYWORDS, NULL },
{ (char *)"BookCtrl_GetPageText", (PyCFunction) _wrap_BookCtrl_GetPageText, METH_VARARGS | METH_KEYWORDS, NULL },
@@ -33711,6 +33740,7 @@ SWIGEXPORT(void) SWIG_init(void) {
PyDict_SetItemString(d,"BU_TOP", SWIG_From_int((int)wxBU_TOP));
PyDict_SetItemString(d,"BU_RIGHT", SWIG_From_int((int)wxBU_RIGHT));
PyDict_SetItemString(d,"BU_BOTTOM", SWIG_From_int((int)wxBU_BOTTOM));
PyDict_SetItemString(d,"BU_ALIGN_MASK", SWIG_From_int((int)wxBU_ALIGN_MASK));
PyDict_SetItemString(d,"BU_EXACTFIT", SWIG_From_int((int)wxBU_EXACTFIT));
PyDict_SetItemString(d,"BU_AUTODRAW", SWIG_From_int((int)wxBU_AUTODRAW));
SWIG_addvarlink(SWIG_globals,(char*)"CheckBoxNameStr",_wrap_CheckBoxNameStr_get, _wrap_CheckBoxNameStr_set);

View File

@@ -1520,6 +1520,12 @@ class InputStream(object):
self.this = newobj.this
self.thisown = 1
del newobj.thisown
def __del__(self, destroy=_core_.delete_InputStream):
"""__del__(self)"""
try:
if self.thisown: destroy(self)
except: pass
def close(*args, **kwargs):
"""close(self)"""
return _core_.InputStream_close(*args, **kwargs)
@@ -2125,6 +2131,20 @@ class Image(Object):
"""
return _core_.Image_ConvertAlphaToMask(*args, **kwargs)
def ConvertColourToAlpha(*args, **kwargs):
"""
ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool
This method converts an image where the original alpha information is
only available as a shades of a colour (actually shades of grey)
typically when you draw anti-aliased text into a bitmap. The DC
drawing routines draw grey values on the black background although
they actually mean to draw white with differnt alpha values. This
method reverses it, assuming a black (!) background and white text.
The method will then fill up the whole image with the colour given.
"""
return _core_.Image_ConvertColourToAlpha(*args, **kwargs)
def SetMaskFromImage(*args, **kwargs):
"""SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool"""
return _core_.Image_SetMaskFromImage(*args, **kwargs)
@@ -5306,6 +5326,9 @@ your Mac."""
if redirect:
self.RedirectStdio(filename)
# Use Python's install prefix as the default
wx.StandardPaths.Get().SetInstallPrefix(_sys.prefix)
# This finishes the initialization of wxWindows and then calls
# the OnInit that should be present in the derived class
self._BootstrapApp()

View File

@@ -6005,6 +6005,31 @@ static PyObject *_wrap_new_InputStream(PyObject *, PyObject *args, PyObject *kwa
}
static PyObject *_wrap_delete_InputStream(PyObject *, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxPyInputStream *arg1 = (wxPyInputStream *) 0 ;
PyObject * obj0 = 0 ;
char *kwnames[] = {
(char *) "self", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:delete_InputStream",kwnames,&obj0)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxPyInputStream,
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
delete arg1;
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
Py_INCREF(Py_None); resultobj = Py_None;
return resultobj;
fail:
return NULL;
}
static PyObject *_wrap_InputStream_close(PyObject *, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxPyInputStream *arg1 = (wxPyInputStream *) 0 ;
@@ -9768,6 +9793,46 @@ static PyObject *_wrap_Image_ConvertAlphaToMask(PyObject *, PyObject *args, PyOb
}
static PyObject *_wrap_Image_ConvertColourToAlpha(PyObject *, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxImage *arg1 = (wxImage *) 0 ;
unsigned char arg2 ;
unsigned char arg3 ;
unsigned char arg4 ;
bool result;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
PyObject * obj3 = 0 ;
char *kwnames[] = {
(char *) "self",(char *) "r",(char *) "g",(char *) "b", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:Image_ConvertColourToAlpha",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxImage,
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
arg2 = (unsigned char)SWIG_As_unsigned_SS_char(obj1);
if (PyErr_Occurred()) SWIG_fail;
arg3 = (unsigned char)SWIG_As_unsigned_SS_char(obj2);
if (PyErr_Occurred()) SWIG_fail;
arg4 = (unsigned char)SWIG_As_unsigned_SS_char(obj3);
if (PyErr_Occurred()) SWIG_fail;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (bool)(arg1)->ConvertColourToAlpha(arg2,arg3,arg4);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
{
resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
}
return resultobj;
fail:
return NULL;
}
static PyObject *_wrap_Image_SetMaskFromImage(PyObject *, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxImage *arg1 = (wxImage *) 0 ;
@@ -40912,6 +40977,7 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"Point2D_Get", (PyCFunction) _wrap_Point2D_Get, METH_VARARGS | METH_KEYWORDS, NULL },
{ (char *)"Point2D_swigregister", Point2D_swigregister, METH_VARARGS, NULL },
{ (char *)"new_InputStream", (PyCFunction) _wrap_new_InputStream, METH_VARARGS | METH_KEYWORDS, NULL },
{ (char *)"delete_InputStream", (PyCFunction) _wrap_delete_InputStream, METH_VARARGS | METH_KEYWORDS, NULL },
{ (char *)"InputStream_close", (PyCFunction) _wrap_InputStream_close, METH_VARARGS | METH_KEYWORDS, NULL },
{ (char *)"InputStream_flush", (PyCFunction) _wrap_InputStream_flush, METH_VARARGS | METH_KEYWORDS, NULL },
{ (char *)"InputStream_eof", (PyCFunction) _wrap_InputStream_eof, METH_VARARGS | METH_KEYWORDS, NULL },
@@ -41020,6 +41086,7 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"Image_HasAlpha", (PyCFunction) _wrap_Image_HasAlpha, METH_VARARGS | METH_KEYWORDS, NULL },
{ (char *)"Image_FindFirstUnusedColour", (PyCFunction) _wrap_Image_FindFirstUnusedColour, METH_VARARGS | METH_KEYWORDS, NULL },
{ (char *)"Image_ConvertAlphaToMask", (PyCFunction) _wrap_Image_ConvertAlphaToMask, METH_VARARGS | METH_KEYWORDS, NULL },
{ (char *)"Image_ConvertColourToAlpha", (PyCFunction) _wrap_Image_ConvertColourToAlpha, METH_VARARGS | METH_KEYWORDS, NULL },
{ (char *)"Image_SetMaskFromImage", (PyCFunction) _wrap_Image_SetMaskFromImage, METH_VARARGS | METH_KEYWORDS, NULL },
{ (char *)"Image_CanRead", (PyCFunction) _wrap_Image_CanRead, METH_VARARGS | METH_KEYWORDS, NULL },
{ (char *)"Image_GetImageCount", (PyCFunction) _wrap_Image_GetImageCount, METH_VARARGS | METH_KEYWORDS, NULL },

View File

@@ -2347,8 +2347,8 @@ def EncodingConverter_CanConvert(*args, **kwargs):
# to the default catalog path.
if wx.Platform == "__WXMSW__":
import os
localedir = os.path.join(os.path.split(__file__)[0], "locale")
Locale_AddCatalogLookupPathPrefix(localedir)
_localedir = os.path.join(os.path.split(__file__)[0], "locale")
Locale.AddCatalogLookupPathPrefix(_localedir)
del os
#----------------------------------------------------------------------------

View File

@@ -5764,7 +5764,7 @@ class StandardPaths(object):
"""
Get() -> StandardPaths
Return the global standard paths object
Return the global standard paths singleton
"""
return _misc_.StandardPaths_Get(*args, **kwargs)
@@ -5774,7 +5774,7 @@ class StandardPaths(object):
GetConfigDir(self) -> String
Return the directory with system config files: /etc under Unix,
c:\Documents and Settings\All Users\Application Data under Windows,
'c:\Documents and Settings\All Users\Application Data' under Windows,
/Library/Preferences for Mac
"""
return _misc_.StandardPaths_GetConfigDir(*args, **kwargs)
@@ -5784,7 +5784,7 @@ class StandardPaths(object):
GetUserConfigDir(self) -> String
Return the directory for the user config files: $HOME under Unix,
c:\Documents and Settings\username under Windows,
'c:\Documents and Settings\username' under Windows, and
~/Library/Preferences under Mac
Only use this if you have a single file to put there, otherwise
@@ -5798,7 +5798,7 @@ class StandardPaths(object):
Return the location of the application's global, (i.e. not
user-specific,) data files: prefix/share/appname under Unix,
c:\Program Filesppname under Windows,
'c:\Program Files\appname' under Windows,
appname.app/Contents/SharedSupport app bundle directory under Mac.
"""
return _misc_.StandardPaths_GetDataDir(*args, **kwargs)
@@ -5819,7 +5819,7 @@ class StandardPaths(object):
Return the directory for the user-dependent application data files:
$HOME/.appname under Unix, c:\Documents and
Settings\username\Application Datappname under Windows and
Settings\username\Application Data\appname under Windows and
~/Library/Application Support/appname under Mac
"""
return _misc_.StandardPaths_GetUserDataDir(*args, **kwargs)
@@ -5832,7 +5832,7 @@ class StandardPaths(object):
with the other machines
Same as `GetUserDataDir` for all platforms except Windows where it is
the 'Local Settings\Application Datappname' directory.
the 'Local Settings\Application Data\appname' directory.
"""
return _misc_.StandardPaths_GetUserLocalDataDir(*args, **kwargs)
@@ -5847,11 +5847,23 @@ class StandardPaths(object):
return _misc_.StandardPaths_GetPluginsDir(*args, **kwargs)
def SetInstallPrefix(*args, **kwargs):
"""SetInstallPrefix(self, String prefix)"""
"""
SetInstallPrefix(self, String prefix)
Set the program installation directory which is /usr/local by default.
This value will be used by other methods such as `GetDataDir` and
`GetPluginsDir` as the prefix for what they return. (This function
only has meaning on Unix systems.)
"""
return _misc_.StandardPaths_SetInstallPrefix(*args, **kwargs)
def GetInstallPrefix(*args, **kwargs):
"""GetInstallPrefix(self) -> String"""
"""
GetInstallPrefix(self) -> String
Get the program installation prefix. The default is the prefix where
Python is installed. (This function only has meaning on Unix systems.)
"""
return _misc_.StandardPaths_GetInstallPrefix(*args, **kwargs)
@@ -5866,7 +5878,7 @@ def StandardPaths_Get(*args, **kwargs):
"""
StandardPaths_Get() -> StandardPaths
Return the global standard paths object
Return the global standard paths singleton
"""
return _misc_.StandardPaths_Get(*args, **kwargs)

View File

@@ -1763,6 +1763,9 @@ PyObject *wxDisplay_GetModes(wxDisplay *self,wxVideoMode const &mode){
#include <wx/stdpaths.h>
wxStandardPaths *StandardPaths_Get(){
return (wxStandardPaths*) &wxStandardPaths::Get();
}
void wxStandardPaths_SetInstallPrefix(wxStandardPaths *self,wxString const &prefix){}
wxString wxStandardPaths_GetInstallPrefix(wxStandardPaths *self){ return wxEmptyString; }
#ifdef __cplusplus
@@ -28603,10 +28606,7 @@ static PyObject *_wrap_StandardPaths_Get(PyObject *, PyObject *args, PyObject *k
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":StandardPaths_Get",kwnames)) goto fail;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
{
wxStandardPaths &_result_ref = wxStandardPaths::Get();
result = (wxStandardPaths *) &_result_ref;
}
result = (wxStandardPaths *)StandardPaths_Get();
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;

View File

@@ -1615,7 +1615,7 @@ HF_BOOKMARKS = _html.HF_BOOKMARKS
HF_OPENFILES = _html.HF_OPENFILES
HF_PRINT = _html.HF_PRINT
HF_DEFAULTSTYLE = _html.HF_DEFAULTSTYLE
class HtmlHelpController(_core.EvtHandler):
class HtmlHelpController(_core.Object):
def __repr__(self):
return "<%s.%s; proxy of C++ wxHtmlHelpController instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
@@ -1624,8 +1624,6 @@ class HtmlHelpController(_core.EvtHandler):
self.this = newobj.this
self.thisown = 1
del newobj.thisown
self._setOORInfo(self)
def __del__(self, destroy=_html.delete_HtmlHelpController):
"""__del__(self)"""
try:

File diff suppressed because one or more lines are too long