/usr/include/wx-3.0/wx/wxPython/i_files/_axbase.i is in python-wxgtk3.0-dev 3.0.2.0+dfsg-7.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | /////////////////////////////////////////////////////////////////////////////
// Name: _axbase.i
// Purpose: SWIG interface for a wxWindow that virtualizes MSWTranslateMessage
//
// Author: Robin Dunn
//
// Created: 6-Jun-2008
// RCS-ID: $Id: $
// Copyright: (c) 2008 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
// Not a %module
//---------------------------------------------------------------------------
#ifdef __WXMSW__
%newgroup
// a wxWindow class that can forward the MSWTranslateMessage virtual to
// Python. This is intended only for use in the wxSMW port and only as the
// base class for a new ActiveX wrapper, so we'll use a private name.
%{
class wxPyAxBaseWindow : public wxWindow
{
DECLARE_DYNAMIC_CLASS(wxPyAxBaseWindow)
public:
wxPyAxBaseWindow(wxWindow* parent, const wxWindowID id=-1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPyPanelNameStr)
: wxWindow(parent, id, pos, size, style, name) {}
wxPyAxBaseWindow() : wxWindow() {}
virtual bool MSWTranslateMessage(WXMSG* msg)
{
// To make the python interface easier we'll just pass the msg pointer
// as a long
bool rval;
bool found;
wxPyBlock_t blocked = wxPyBeginBlockThreads();
if ((found = wxPyCBH_findCallback(m_myInst, "MSWTranslateMessage"))) {
rval = wxPyCBH_callCallback(m_myInst,
Py_BuildValue("(i)", (long)msg));
}
wxPyEndBlockThreads(blocked);
if (! found)
rval = wxWindow::MSWTranslateMessage(msg);
return rval;
}
PYPRIVATE;
};
IMPLEMENT_DYNAMIC_CLASS(wxPyAxBaseWindow, wxWindow);
%}
MustHaveApp(wxPyAxBaseWindow);
class wxPyAxBaseWindow : public wxWindow
{
public:
%pythonAppend wxPyAxBaseWindow "self._setOORInfo(self);" setCallbackInfo(PyAxBaseWindow)
%pythonAppend wxPyAxBaseWindow() ""
wxPyAxBaseWindow(wxWindow* parent, const wxWindowID id=-1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPyPanelNameStr);
%RenameCtor(PrePyAxBaseWindow, wxPyAxBaseWindow());
void _setCallbackInfo(PyObject* self, PyObject* _class);
%extend {
bool MSWTranslateMessage(long msg)
{
return self->MSWTranslateMessage((WXMSG*)msg);
}
}
};
MustHaveApp(wxWindow_FromHWND);
// Note this is similar to another function in _window.i, keep them in sync.
%inline %{
wxPyAxBaseWindow* wxPyAxBaseWindow_FromHWND(wxWindow* parent, unsigned long _hWnd)
{
WXHWND hWnd = (WXHWND)_hWnd;
wxPyAxBaseWindow* win = new wxPyAxBaseWindow;
if (parent)
parent->AddChild(win);
win->SetEventHandler(win);
win->SetHWND(hWnd);
win->SubclassWin(hWnd);
win->AdoptAttributesFromHWND();
win->SetupColours();
return win;
}
%}
#endif
//---------------------------------------------------------------------------
|