Implemented support to MSG type on windows.
This commit is contained in:
parent
3e88ef1c54
commit
23d1e497d8
6 changed files with 144 additions and 2 deletions
32
PySide/QtCore/glue/hwnd_conversions.h
Normal file
32
PySide/QtCore/glue/hwnd_conversions.h
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
namespace Shiboken {
|
||||
template <>
|
||||
struct Converter<HWND__>
|
||||
{
|
||||
static bool checkType(PyObject* pyObj)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool isConvertible(PyObject* pyobj)
|
||||
{
|
||||
return PyCObject_Check(pyobj);
|
||||
}
|
||||
|
||||
static inline PyObject* toPython(void* cppobj)
|
||||
{
|
||||
// not supported
|
||||
Q_ASSERT(true);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static PyObject* toPython(HWND__ cppobj)
|
||||
{
|
||||
return PyCObject_FromVoidPtr(&cppobj, 0);
|
||||
}
|
||||
|
||||
static HWND__ toCpp(PyObject* pyobj)
|
||||
{
|
||||
return *((HWND__*) PyCObject_AsVoidPtr(pyobj));
|
||||
}
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue