[PyKDE] Passing a type through SIP

Richie Hindle richie at entrian.com
Sun Jan 9 22:12:59 GMT 2005


[James]
> I've compiled Qt for windows under the GPL license using the work from
> the kde-cygwin project.

Interesting!  Let us know how it goes.

> I _believe_ HWND is an unsigned long

HWND is a pointer, either to void or to a struct according to whether
STRICT is defined.  WinDef.h says:

DECLARE_HANDLE            (HWND);

and WinNT.h says:

#ifdef STRICT
typedef void *HANDLE;
#define DECLARE_HANDLE(name) struct name##__ { int unused; }; typedef struct name##__ *name
#else
typedef PVOID HANDLE;
#define DECLARE_HANDLE(name) typedef HANDLE name
#endif
typedef HANDLE *PHANDLE;

If you don't define STRICT, you should be safe using void* for HWND.
That may still be true even *with* STRICT defined, but I think that
depends on your compiler and your compiler options.

(I know about Windows but I don't know about SIP, so I don't know how
you might use the above information, but I hope it's useful. 8-)

-- 
Richie Hindle
richie at entrian.com




More information about the PyQt mailing list