mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-06 06:41:05 +00:00
Improve python wrapping of WindowingData
* If we make WindowingData an empty struct not an opaque one, it won't leak memory * Similarly we need typemaps to allow python to pass plain ints and have them cast to pointers
This commit is contained in:
@@ -63,6 +63,19 @@
|
||||
|
||||
%include "pyconversion.i"
|
||||
|
||||
// typemaps for windowing data
|
||||
%typemap(in) HWND (unsigned long long tmp, int err = 0) {
|
||||
// convert windowing data pointers from just plain integers
|
||||
err = SWIG_AsVal_unsigned_SS_long_SS_long($input, &tmp);
|
||||
if (!SWIG_IsOK(err)) {
|
||||
%argument_fail(err, "$*ltype", $symname, $argnum);
|
||||
}
|
||||
$1 = ($1_type)tmp;
|
||||
}
|
||||
|
||||
%typemap(in) Display* = HWND;
|
||||
%typemap(in) xcb_connection_t* = HWND;
|
||||
|
||||
// completely ignore rdcdatetime, we custom convert to/from a native python datetime
|
||||
%ignore rdcdatetime;
|
||||
|
||||
|
||||
@@ -357,7 +357,10 @@ struct ANativeWindow;
|
||||
// for swig bindings treat the windowing data struct as completely opaque
|
||||
#if defined(SWIG)
|
||||
|
||||
struct WindowingData;
|
||||
DOCUMENT("An opaque structure created to hold windowing setup data");
|
||||
struct WindowingData
|
||||
{
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
|
||||
Reference in New Issue
Block a user