Unicode fixes for wxPython
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@18318 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -110,8 +110,8 @@ public:
|
||||
wxPyBeginBlockThreads();
|
||||
if ((found = wxPyCBH_findCallback(m_myInst, "DrawItem"))) {
|
||||
PyObject* dcobj = wxPyMake_wxObject(&dc);
|
||||
PyObject* idobj = wxPyConstructObject((void*)&id, "wxTreeItemId", FALSE);
|
||||
PyObject* recobj= wxPyConstructObject((void*)&rect, "wxRect", FALSE);
|
||||
PyObject* idobj = wxPyConstructObject((void*)&id, wxT("wxTreeItemId"), FALSE);
|
||||
PyObject* recobj= wxPyConstructObject((void*)&rect, wxT("wxRect"), FALSE);
|
||||
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OOO)", dcobj, idobj, recobj));
|
||||
Py_DECREF(dcobj);
|
||||
Py_DECREF(idobj);
|
||||
|
@@ -272,8 +272,8 @@ public:
|
||||
wxPyBeginBlockThreads();
|
||||
if ((found = wxPyCBH_findCallback(m_myInst, "DrawItem"))) {
|
||||
PyObject* dcobj = wxPyMake_wxObject(&dc);
|
||||
PyObject* idobj = wxPyConstructObject((void*)&id, "wxTreeItemId", FALSE);
|
||||
PyObject* recobj= wxPyConstructObject((void*)&rect, "wxRect", FALSE);
|
||||
PyObject* idobj = wxPyConstructObject((void*)&id, wxT("wxTreeItemId"), FALSE);
|
||||
PyObject* recobj= wxPyConstructObject((void*)&rect, wxT("wxRect"), FALSE);
|
||||
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OOO)", dcobj, idobj, recobj));
|
||||
Py_DECREF(dcobj);
|
||||
Py_DECREF(idobj);
|
||||
|
@@ -69,7 +69,7 @@ public:
|
||||
~wxGLContext();
|
||||
|
||||
void SetCurrent();
|
||||
void SetColour(const char *colour);
|
||||
void SetColour(const wxString& colour);
|
||||
void SwapBuffers();
|
||||
|
||||
#ifdef __WXGTK__
|
||||
@@ -151,7 +151,7 @@ public:
|
||||
%pragma(python) addtomethod = "wxGLCanvasWithContext:val._setOORInfo(self)"
|
||||
|
||||
void SetCurrent();
|
||||
void SetColour(const char *colour);
|
||||
void SetColour(const wxString& colour);
|
||||
void SwapBuffers();
|
||||
|
||||
wxGLContext* GetContext();
|
||||
|
@@ -210,12 +210,13 @@ static PyObject *_wrap_wxGLContext_SetCurrent(PyObject *self, PyObject *args, Py
|
||||
static PyObject *_wrap_wxGLContext_SetColour(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxGLContext * _arg0;
|
||||
char * _arg1;
|
||||
wxString * _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _obj1 = 0;
|
||||
char *_kwnames[] = { "self","colour", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxGLContext_SetColour",_kwnames,&_argo0,&_arg1))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGLContext_SetColour",_kwnames,&_argo0,&_obj1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
@@ -224,14 +225,23 @@ static PyObject *_wrap_wxGLContext_SetColour(PyObject *self, PyObject *args, PyO
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
_arg1 = wxString_in_helper(_obj1);
|
||||
if (_arg1 == NULL)
|
||||
return NULL;
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
wxGLContext_SetColour(_arg0,_arg1);
|
||||
wxGLContext_SetColour(_arg0,*_arg1);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
{
|
||||
if (_obj1)
|
||||
delete _arg1;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
@@ -544,12 +554,13 @@ static PyObject *_wrap_wxGLCanvas_SetCurrent(PyObject *self, PyObject *args, PyO
|
||||
static PyObject *_wrap_wxGLCanvas_SetColour(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxGLCanvas * _arg0;
|
||||
char * _arg1;
|
||||
wxString * _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _obj1 = 0;
|
||||
char *_kwnames[] = { "self","colour", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxGLCanvas_SetColour",_kwnames,&_argo0,&_arg1))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGLCanvas_SetColour",_kwnames,&_argo0,&_obj1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
@@ -558,14 +569,23 @@ static PyObject *_wrap_wxGLCanvas_SetColour(PyObject *self, PyObject *args, PyOb
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
_arg1 = wxString_in_helper(_obj1);
|
||||
if (_arg1 == NULL)
|
||||
return NULL;
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
wxGLCanvas_SetColour(_arg0,_arg1);
|
||||
wxGLCanvas_SetColour(_arg0,*_arg1);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
{
|
||||
if (_obj1)
|
||||
delete _arg1;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
|
@@ -27,15 +27,17 @@
|
||||
#if wxUSE_GLCANVAS
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include <wx/frame.h>
|
||||
#include "wx/frame.h"
|
||||
#include "wx/settings.h"
|
||||
#include "wx/intl.h"
|
||||
#include "wx/log.h"
|
||||
#endif
|
||||
|
||||
#include <wx/msw/private.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/log.h>
|
||||
#include "wx/msw/private.h"
|
||||
|
||||
#include "myglcanvas.h"
|
||||
|
||||
const wxChar* wxGLCanvasName = wxT("GLcanvas");
|
||||
static const wxChar *wxGLCanvasClassName = wxT("wxGLCanvasClass");
|
||||
static const wxChar *wxGLCanvasClassNameNoRedraw = wxT("wxGLCanvasClassNR");
|
||||
|
||||
@@ -108,7 +110,7 @@ void wxGLContext::SetCurrent()
|
||||
*/
|
||||
}
|
||||
|
||||
void wxGLContext::SetColour(const char *colour)
|
||||
void wxGLContext::SetColour(const wxChar *colour)
|
||||
{
|
||||
float r = 0.0;
|
||||
float g = 0.0;
|
||||
@@ -403,7 +405,6 @@ static void AdjustPFDForAttributes(PIXELFORMATDESCRIPTOR& pfd, int *attribList)
|
||||
|
||||
void wxGLCanvas::SetupPixelFormat(int *attribList) // (HDC hDC)
|
||||
{
|
||||
int pixelFormat;
|
||||
PIXELFORMATDESCRIPTOR pfd = {
|
||||
sizeof(PIXELFORMATDESCRIPTOR), /* size */
|
||||
1, /* version */
|
||||
@@ -427,13 +428,13 @@ void wxGLCanvas::SetupPixelFormat(int *attribList) // (HDC hDC)
|
||||
|
||||
AdjustPFDForAttributes(pfd, attribList);
|
||||
|
||||
pixelFormat = ChoosePixelFormat((HDC) m_hDC, &pfd);
|
||||
int pixelFormat = ChoosePixelFormat((HDC) m_hDC, &pfd);
|
||||
if (pixelFormat == 0) {
|
||||
wxLogWarning(_("ChoosePixelFormat failed."));
|
||||
wxLogLastError(_T("ChoosePixelFormat"));
|
||||
}
|
||||
else {
|
||||
if (SetPixelFormat((HDC) m_hDC, pixelFormat, &pfd) != TRUE) {
|
||||
wxLogWarning(_("SetPixelFormat failed."));
|
||||
if ( !::SetPixelFormat((HDC) m_hDC, pixelFormat, &pfd) ) {
|
||||
wxLogLastError(_T("SetPixelFormat"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -527,7 +528,7 @@ void wxGLCanvas::SetCurrent()
|
||||
}
|
||||
}
|
||||
|
||||
void wxGLCanvas::SetColour(const char *colour)
|
||||
void wxGLCanvas::SetColour(const wxChar *colour)
|
||||
{
|
||||
if (m_glContext)
|
||||
m_glContext->SetColour(colour);
|
||||
@@ -728,7 +729,7 @@ bool wxGLApp::InitGLVisual(int *attribList)
|
||||
AdjustPFDForAttributes(pfd, attribList);
|
||||
|
||||
// use DC for whole (root) screen, since no windows have yet been created
|
||||
pixelFormat = ChoosePixelFormat((HDC) ::GetDC(NULL), &pfd);
|
||||
pixelFormat = ChoosePixelFormat(ScreenHDC(), &pfd);
|
||||
|
||||
if (pixelFormat == 0) {
|
||||
wxLogError(_("Failed to initialize OpenGL"));
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#include <wx/scrolwin.h>
|
||||
|
||||
#include <windows.h>
|
||||
#include "wx/msw/winundef.h"
|
||||
|
||||
#include <GL/gl.h>
|
||||
|
||||
@@ -69,7 +70,7 @@ public:
|
||||
~wxGLContext();
|
||||
|
||||
void SetCurrent();
|
||||
void SetColour(const char *colour);
|
||||
void SetColour(const wxChar *colour);
|
||||
void SwapBuffers();
|
||||
|
||||
|
||||
@@ -83,21 +84,26 @@ public:
|
||||
wxWindow* m_window;
|
||||
};
|
||||
|
||||
|
||||
extern const wxChar* wxGLCanvasName;
|
||||
|
||||
|
||||
class wxGLCanvas: public wxWindow
|
||||
{
|
||||
DECLARE_CLASS(wxGLCanvas)
|
||||
public:
|
||||
wxGLCanvas(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxString& name = "GLCanvas", int *attribList = 0, const wxPalette& palette = wxNullPalette);
|
||||
const wxString& name = wxGLCanvasName, int *attribList = 0, const wxPalette& palette = wxNullPalette);
|
||||
wxGLCanvas( wxWindow *parent, const wxGLContext *shared = (wxGLContext *)NULL,
|
||||
wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "GLCanvas",
|
||||
const wxSize& size = wxDefaultSize, long style = 0, const wxString&
|
||||
name = wxGLCanvasName,
|
||||
int *attribList = (int*) NULL, const wxPalette& palette = wxNullPalette );
|
||||
|
||||
wxGLCanvas( wxWindow *parent, const wxGLCanvas *shared = (wxGLCanvas *)NULL, wxWindowID id = -1,
|
||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxString& name = "GLCanvas", int *attribList = 0, const wxPalette& palette = wxNullPalette );
|
||||
const wxString& name = wxGLCanvasName, int *attribList = 0, const wxPalette& palette = wxNullPalette );
|
||||
|
||||
~wxGLCanvas();
|
||||
|
||||
@@ -106,7 +112,7 @@ class wxGLCanvas: public wxWindow
|
||||
const wxPoint& pos, const wxSize& size, long style, const wxString& name);
|
||||
|
||||
void SetCurrent();
|
||||
void SetColour(const char *colour);
|
||||
void SetColour(const wxChar *colour);
|
||||
void SwapBuffers();
|
||||
|
||||
void OnSize(wxSizeEvent& event);
|
||||
|
@@ -72,7 +72,7 @@ public:
|
||||
m_iewin->GetParent()->AddPendingEvent(event);
|
||||
};
|
||||
|
||||
bool Process(WXTYPE etype, wxString text = "", long l1 = 0, long l2 = 0)
|
||||
bool Process(WXTYPE etype, wxString text = wxEmptyString, long l1 = 0, long l2 = 0)
|
||||
{
|
||||
if (! m_iewin || ! m_iewin->GetParent())
|
||||
return true;
|
||||
@@ -103,7 +103,7 @@ public:
|
||||
return v.bstrVal;
|
||||
}
|
||||
else
|
||||
return "";
|
||||
return wxEmptyString;
|
||||
};
|
||||
|
||||
#define STR_ARG(arg) GetStrArg(pDispParams->rgvarg[arg])
|
||||
@@ -137,7 +137,7 @@ public:
|
||||
break;
|
||||
|
||||
case DISPID_PROGRESSCHANGE:
|
||||
Post(wxEVT_COMMAND_MSHTML_PROGRESSCHANGE, "", LONG_ARG(1), LONG_ARG(0));
|
||||
Post(wxEVT_COMMAND_MSHTML_PROGRESSCHANGE, wxEmptyString, LONG_ARG(1), LONG_ARG(0));
|
||||
break;
|
||||
|
||||
case DISPID_DOCUMENTCOMPLETE:
|
||||
@@ -524,7 +524,7 @@ wxString wxIEHtmlWin::GetStringSelection(bool asHTML)
|
||||
{
|
||||
wxAutoOleInterface<IHTMLTxtRange> tr(GetSelRange(m_oleObject));
|
||||
if (! tr)
|
||||
return "";
|
||||
return wxEmptyString;
|
||||
|
||||
BSTR text = NULL;
|
||||
HRESULT hr = E_FAIL;
|
||||
@@ -534,7 +534,7 @@ wxString wxIEHtmlWin::GetStringSelection(bool asHTML)
|
||||
else
|
||||
hr = tr->get_text(&text);
|
||||
if (hr != S_OK)
|
||||
return "";
|
||||
return wxEmptyString;
|
||||
|
||||
wxString s = text;
|
||||
SysFreeString(text);
|
||||
@@ -545,26 +545,26 @@ wxString wxIEHtmlWin::GetStringSelection(bool asHTML)
|
||||
wxString wxIEHtmlWin::GetText(bool asHTML)
|
||||
{
|
||||
if (! m_webBrowser.Ok())
|
||||
return "";
|
||||
return wxEmptyString;
|
||||
|
||||
// get document dispatch interface
|
||||
IDispatch *iDisp = NULL;
|
||||
HRESULT hr = m_webBrowser->get_Document(&iDisp);
|
||||
if (hr != S_OK)
|
||||
return "";
|
||||
return wxEmptyString;
|
||||
|
||||
// Query for Document Interface
|
||||
wxAutoOleInterface<IHTMLDocument2> hd(IID_IHTMLDocument2, iDisp);
|
||||
iDisp->Release();
|
||||
|
||||
if (! hd.Ok())
|
||||
return "";
|
||||
return wxEmptyString;
|
||||
|
||||
// get body element
|
||||
IHTMLElement *_body = NULL;
|
||||
hd->get_body(&_body);
|
||||
if (! _body)
|
||||
return "";
|
||||
return wxEmptyString;
|
||||
wxAutoOleInterface<IHTMLElement> body(_body);
|
||||
|
||||
// get inner text
|
||||
@@ -576,7 +576,7 @@ wxString wxIEHtmlWin::GetText(bool asHTML)
|
||||
else
|
||||
hr = body->get_innerText(&text);
|
||||
if (hr != S_OK)
|
||||
return "";
|
||||
return wxEmptyString;
|
||||
|
||||
wxString s = text;
|
||||
SysFreeString(text);
|
||||
|
@@ -697,12 +697,12 @@ wxVariant& wxActiveXEvent::operator[] (wxString name)
|
||||
return m_params[i];
|
||||
};
|
||||
|
||||
wxString err = "wxActiveXEvent::operator[] invalid name <" + name + ">";
|
||||
err += "\r\nValid Names = :\r\n";
|
||||
wxString err = wxT("wxActiveXEvent::operator[] invalid name <") + name + wxT(">");
|
||||
err += wxT("\r\nValid Names = :\r\n");
|
||||
for (i = 0; i < m_params.GetCount(); i++)
|
||||
{
|
||||
err += m_params[i].GetName();
|
||||
err += "\r\n";
|
||||
err += wxT("\r\n");
|
||||
};
|
||||
|
||||
wxASSERT_MSG(false, err);
|
||||
@@ -772,12 +772,12 @@ void wxActiveX::GetTypeInfo()
|
||||
{
|
||||
if (impTypeFlags & IMPLTYPEFLAG_FSOURCE)
|
||||
{
|
||||
WXOLE_TRACEOUT("Default Event Sink");
|
||||
WXOLE_TRACEOUT(wxT("Default Event Sink"));
|
||||
defEventSink = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
WXOLE_TRACEOUT("Default Interface");
|
||||
WXOLE_TRACEOUT(wxT("Default Interface"));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -804,7 +804,7 @@ void wxActiveX::GetTypeInfo(ITypeInfo *ti, bool defEventSink)
|
||||
|
||||
if (ta->typekind == TKIND_DISPATCH)
|
||||
{
|
||||
WXOLE_TRACEOUT("GUID = " << GetIIDName(ta->guid).c_str());
|
||||
WXOLE_TRACEOUT(wxT("GUID = ") << GetIIDName(ta->guid).c_str());
|
||||
|
||||
if (defEventSink)
|
||||
{
|
||||
@@ -831,7 +831,7 @@ void wxActiveX::GetTypeInfo(ITypeInfo *ti, bool defEventSink)
|
||||
{
|
||||
wxString name = anames[0];
|
||||
|
||||
WXOLE_TRACEOUT("Name " << i << " = " << name.c_str());
|
||||
WXOLE_TRACEOUT(wxT("Name ") << i << wxT(" = ") << name.c_str());
|
||||
SysFreeString(anames[0]);
|
||||
|
||||
if (defEventSink)
|
||||
@@ -1775,49 +1775,49 @@ wxString OLEHResultToString(HRESULT hr)
|
||||
switch (hr)
|
||||
{
|
||||
case S_OK:
|
||||
return "";
|
||||
return wxEmptyString;
|
||||
|
||||
case OLECMDERR_E_UNKNOWNGROUP:
|
||||
return "The pguidCmdGroup parameter is not NULL but does not specify a recognized command group.";
|
||||
return wxT("The pguidCmdGroup parameter is not NULL but does not specify a recognized command group.");
|
||||
|
||||
case OLECMDERR_E_NOTSUPPORTED:
|
||||
return "The nCmdID parameter is not a valid command in the group identified by pguidCmdGroup.";
|
||||
return wxT("The nCmdID parameter is not a valid command in the group identified by pguidCmdGroup.");
|
||||
|
||||
case OLECMDERR_E_DISABLED:
|
||||
return "The command identified by nCmdID is currently disabled and cannot be executed.";
|
||||
return wxT("The command identified by nCmdID is currently disabled and cannot be executed.");
|
||||
|
||||
case OLECMDERR_E_NOHELP:
|
||||
return "The caller has asked for help on the command identified by nCmdID, but no help is available.";
|
||||
return wxT("The caller has asked for help on the command identified by nCmdID, but no help is available.");
|
||||
|
||||
case OLECMDERR_E_CANCELED:
|
||||
return "The user canceled the execution of the command.";
|
||||
return wxT("The user canceled the execution of the command.");
|
||||
|
||||
case E_INVALIDARG:
|
||||
return "E_INVALIDARG";
|
||||
return wxT("E_INVALIDARG");
|
||||
|
||||
case E_OUTOFMEMORY:
|
||||
return "E_OUTOFMEMORY";
|
||||
return wxT("E_OUTOFMEMORY");
|
||||
|
||||
case E_NOINTERFACE:
|
||||
return "E_NOINTERFACE";
|
||||
return wxT("E_NOINTERFACE");
|
||||
|
||||
case E_UNEXPECTED:
|
||||
return "E_UNEXPECTED";
|
||||
return wxT("E_UNEXPECTED");
|
||||
|
||||
case STG_E_INVALIDFLAG:
|
||||
return "STG_E_INVALIDFLAG";
|
||||
return wxT("STG_E_INVALIDFLAG");
|
||||
|
||||
case E_FAIL:
|
||||
return "E_FAIL";
|
||||
return wxT("E_FAIL");
|
||||
|
||||
case E_NOTIMPL:
|
||||
return "E_NOTIMPL";
|
||||
return wxT("E_NOTIMPL");
|
||||
|
||||
default:
|
||||
{
|
||||
char buf[64];
|
||||
sprintf(buf, "Unknown - 0x%X", hr);
|
||||
return wxString(buf);
|
||||
wxString buf;
|
||||
buf.Printf(wxT("Unknown - 0x%X"), hr);
|
||||
return buf;
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -1948,5 +1948,5 @@ wxString GetIIDName(REFIID riid)
|
||||
return s;
|
||||
}
|
||||
else
|
||||
return "StringFromIID() error";
|
||||
return wxT("StringFromIID() error");
|
||||
}
|
||||
|
@@ -391,16 +391,17 @@ static PyObject *_wrap_wxPseudoMetaFile_LoadFromMetaFile(PyObject *self, PyObjec
|
||||
PyObject * _resultobj;
|
||||
bool _result;
|
||||
wxPseudoMetaFile * _arg0;
|
||||
char * _arg1;
|
||||
wxString * _arg1;
|
||||
double * _arg2;
|
||||
double * _arg3;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _obj1 = 0;
|
||||
PyObject * _argo2 = 0;
|
||||
PyObject * _argo3 = 0;
|
||||
char *_kwnames[] = { "self","filename","width","height", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OsOO:wxPseudoMetaFile_LoadFromMetaFile",_kwnames,&_argo0,&_arg1,&_argo2,&_argo3))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO:wxPseudoMetaFile_LoadFromMetaFile",_kwnames,&_argo0,&_obj1,&_argo2,&_argo3))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
@@ -409,6 +410,11 @@ static PyObject *_wrap_wxPseudoMetaFile_LoadFromMetaFile(PyObject *self, PyObjec
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
_arg1 = wxString_in_helper(_obj1);
|
||||
if (_arg1 == NULL)
|
||||
return NULL;
|
||||
}
|
||||
if (_argo2) {
|
||||
if (_argo2 == Py_None) { _arg2 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_double_p")) {
|
||||
@@ -425,11 +431,15 @@ static PyObject *_wrap_wxPseudoMetaFile_LoadFromMetaFile(PyObject *self, PyObjec
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (bool )wxPseudoMetaFile_LoadFromMetaFile(_arg0,_arg1,_arg2,_arg3);
|
||||
_result = (bool )wxPseudoMetaFile_LoadFromMetaFile(_arg0,*_arg1,_arg2,_arg3);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} _resultobj = Py_BuildValue("i",_result);
|
||||
{
|
||||
if (_obj1)
|
||||
delete _arg1;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
@@ -5938,12 +5948,13 @@ static PyObject *_wrap_wxPyDrawnShape_LoadFromMetaFile(PyObject *self, PyObject
|
||||
PyObject * _resultobj;
|
||||
bool _result;
|
||||
wxPyDrawnShape * _arg0;
|
||||
char * _arg1;
|
||||
wxString * _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _obj1 = 0;
|
||||
char *_kwnames[] = { "self","filename", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxPyDrawnShape_LoadFromMetaFile",_kwnames,&_argo0,&_arg1))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyDrawnShape_LoadFromMetaFile",_kwnames,&_argo0,&_obj1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
@@ -5952,13 +5963,22 @@ static PyObject *_wrap_wxPyDrawnShape_LoadFromMetaFile(PyObject *self, PyObject
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
_arg1 = wxString_in_helper(_obj1);
|
||||
if (_arg1 == NULL)
|
||||
return NULL;
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (bool )wxPyDrawnShape_LoadFromMetaFile(_arg0,_arg1);
|
||||
_result = (bool )wxPyDrawnShape_LoadFromMetaFile(_arg0,*_arg1);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} _resultobj = Py_BuildValue("i",_result);
|
||||
{
|
||||
if (_obj1)
|
||||
delete _arg1;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
|
@@ -56,7 +56,7 @@ public:
|
||||
void ScaleTo(double w, double h);
|
||||
void Translate(double x, double y);
|
||||
void Rotate(double x, double y, double theta);
|
||||
bool LoadFromMetaFile(char* filename, double *width, double *height);
|
||||
bool LoadFromMetaFile(const wxString& filename, double *width, double *height);
|
||||
void GetBounds(double *minX, double *minY, double *maxX, double *maxY);
|
||||
void CalculateSize(wxPyDrawnShape* shape);
|
||||
|
||||
@@ -281,7 +281,7 @@ public:
|
||||
wxPseudoMetaFile& GetMetaFile();
|
||||
|
||||
double GetRotation();
|
||||
bool LoadFromMetaFile(char * filename);
|
||||
bool LoadFromMetaFile(const wxString& filename);
|
||||
void Rotate(double x, double y, double theta);
|
||||
void SetClippingRect(const wxRect& rect);
|
||||
void SetDrawnBackgroundColour(const wxColour& colour);
|
||||
|
@@ -291,7 +291,7 @@ wxBitmap wxPyBitmapDataObject::GetBitmap() {
|
||||
void wxPyBitmapDataObject::SetBitmap(const wxBitmap& bitmap) {
|
||||
wxPyBeginBlockThreads();
|
||||
if (m_myInst.findCallback("SetBitmap")) {
|
||||
PyObject* bo = wxPyConstructObject((void*)&bitmap, "wxBitmap");
|
||||
PyObject* bo = wxPyConstructObject((void*)&bitmap, wxT("wxBitmap"));
|
||||
m_myInst.callCallback(Py_BuildValue("(O)", bo));
|
||||
Py_DECREF(bo);
|
||||
}
|
||||
|
@@ -1102,8 +1102,8 @@ public:
|
||||
bool found;
|
||||
wxPyBeginBlockThreads();
|
||||
if ((found = m_myInst.findCallback("OnCompareItems"))) {
|
||||
PyObject *o1 = wxPyConstructObject((void*)&item1, "wxTreeItemId");
|
||||
PyObject *o2 = wxPyConstructObject((void*)&item2, "wxTreeItemId");
|
||||
PyObject *o1 = wxPyConstructObject((void*)&item1, wxT("wxTreeItemId"));
|
||||
PyObject *o2 = wxPyConstructObject((void*)&item2, wxT("wxTreeItemId"));
|
||||
rval = m_myInst.callCallback(Py_BuildValue("(OO)",o1,o2));
|
||||
Py_DECREF(o1);
|
||||
Py_DECREF(o2);
|
||||
@@ -1244,7 +1244,7 @@ public:
|
||||
num = self->GetSelections(array);
|
||||
for (x=0; x < num; x++) {
|
||||
wxTreeItemId *tii = new wxTreeItemId(array.Item(x));
|
||||
PyObject* item = wxPyConstructObject((void*)tii, "wxTreeItemId", TRUE);
|
||||
PyObject* item = wxPyConstructObject((void*)tii, wxT("wxTreeItemId"), TRUE);
|
||||
PyList_Append(rval, item);
|
||||
}
|
||||
wxPyEndBlockThreads();
|
||||
@@ -1335,7 +1335,7 @@ public:
|
||||
if (self->GetBoundingRect(item, rect, textOnly)) {
|
||||
wxPyBeginBlockThreads();
|
||||
wxRect* r = new wxRect(rect);
|
||||
PyObject* val = wxPyConstructObject((void*)r, "wxRect");
|
||||
PyObject* val = wxPyConstructObject((void*)r, wxT("wxRect"));
|
||||
wxPyEndBlockThreads();
|
||||
return val;
|
||||
}
|
||||
|
@@ -70,7 +70,7 @@ PyObject* wxPyMake_##TYPE(TYPE* source) { \
|
||||
/* Otherwise make a new wrapper for it the old fashioned way and \
|
||||
give it the OOR treatment */ \
|
||||
if (! target) { \
|
||||
target = wxPyConstructObject(source, #TYPE, FALSE); \
|
||||
target = wxPyConstructObject(source, wxT(#TYPE), FALSE); \
|
||||
if (target) \
|
||||
source->SetClientObject(new wxPyOORClientData(target)); \
|
||||
} \
|
||||
@@ -571,7 +571,7 @@ public:
|
||||
PyObject* go = wxPyMake_wxObject(&grid);
|
||||
PyObject* dco = wxPyMake_wxObject(&dc);
|
||||
PyObject* ao = wxPyMake_wxGridCellAttr(&attr);
|
||||
PyObject* ro = wxPyConstructObject((void*)&rect, "wxRect", 0);
|
||||
PyObject* ro = wxPyConstructObject((void*)&rect, wxT("wxRect"), 0);
|
||||
|
||||
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OOOOiii)", go, ao, dco, ro,
|
||||
row, col, isSelected));
|
||||
@@ -856,7 +856,7 @@ public:
|
||||
wxPyBeginBlockThreads();
|
||||
if ((found = wxPyCBH_findCallback(m_myInst, "PaintBackground)"))) {
|
||||
PyObject* ao = wxPyMake_wxGridCellAttr(attr);
|
||||
PyObject* ro = wxPyConstructObject((void*)&rectCell, "wxRect", 0);
|
||||
PyObject* ro = wxPyConstructObject((void*)&rectCell, wxT("wxRect"), 0);
|
||||
|
||||
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OO)", ro, ao));
|
||||
|
||||
|
@@ -527,7 +527,7 @@ public:
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxHW_SCROLLBAR_AUTO,
|
||||
const wxString& name = "htmlWindow")
|
||||
const wxString& name = wxPyHtmlWindowNameStr)
|
||||
: wxHtmlWindow(parent, id, pos, size, style, name) {};
|
||||
wxPyHtmlWindow() : wxHtmlWindow() {};
|
||||
|
||||
@@ -563,7 +563,7 @@ void wxPyHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) {
|
||||
bool found;
|
||||
wxPyBeginBlockThreads();
|
||||
if ((found = wxPyCBH_findCallback(m_myInst, "OnLinkClicked"))) {
|
||||
PyObject* obj = wxPyConstructObject((void*)&link, "wxHtmlLinkInfo", 0);
|
||||
PyObject* obj = wxPyConstructObject((void*)&link, wxT("wxHtmlLinkInfo"), 0);
|
||||
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", obj));
|
||||
Py_DECREF(obj);
|
||||
}
|
||||
|
@@ -318,7 +318,7 @@ public:
|
||||
if (dest != wxRect(0,0,0,0)) {
|
||||
wxPyBeginBlockThreads();
|
||||
wxRect* newRect = new wxRect(dest);
|
||||
obj = wxPyConstructObject((void*)newRect, "wxRect");
|
||||
obj = wxPyConstructObject((void*)newRect, wxT("wxRect"));
|
||||
PyObject* one = PyInt_FromLong(1);
|
||||
PyObject_SetAttrString(obj, "thisown", one);
|
||||
Py_DECREF(one);
|
||||
|
@@ -1257,7 +1257,7 @@ public:
|
||||
wxPyBeginBlockThreads();
|
||||
PyObject* tuple = PyTuple_New(3);
|
||||
PyTuple_SetItem(tuple, 0, wxPyConstructObject(new wxIcon(icon),
|
||||
"wxIcon", TRUE));
|
||||
wxT("wxIcon"), TRUE));
|
||||
#if wxUSE_UNICODE
|
||||
PyTuple_SetItem(tuple, 1, PyUnicode_FromUnicode(iconFile.c_str(), iconFile.Len()));
|
||||
#else
|
||||
@@ -1527,7 +1527,7 @@ public:
|
||||
wxBitmap rval = wxNullBitmap;
|
||||
wxPyBeginBlockThreads();
|
||||
if ((wxPyCBH_findCallback(m_myInst, "CreateBitmap"))) {
|
||||
PyObject* so = wxPyConstructObject((void*)&size, "wxSize", 0);
|
||||
PyObject* so = wxPyConstructObject((void*)&size, wxT("wxSize"), 0);
|
||||
PyObject* ro;
|
||||
wxBitmap* ptr;
|
||||
PyObject* s1, *s2;
|
||||
|
@@ -61,7 +61,7 @@
|
||||
if ($source) {
|
||||
_ptr = new wxPyInputStream($source);
|
||||
}
|
||||
$target = wxPyConstructObject(_ptr, "wxInputStream", TRUE);
|
||||
$target = wxPyConstructObject(_ptr, wxT("wxInputStream"), TRUE);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user