Re: [python-win32] hook to obtain WM_GESTURE

2013-05-09 Thread John Grant
I think I finally have a fix. I believe I needed to specify the argtypes for the function objects loaded by importing ctypes. I did not get the correct behavior when only specifying the return types. One issue may be that my return type for 'SetWindowLongPtrW' was a function signature that I declar

Re: [python-win32] hook to obtain WM_GESTURE

2013-05-09 Thread Tim Roberts
John Grant wrote: > > I was not sure if I could initialize a Python integer with a hex like > I can in C. The explicit "cast" was to make sure the default type was > not float or unsigned. Python does not have unsigned types. Numbers are either integers (infinitely large) or floats. > I am seei

Re: [python-win32] hook to obtain WM_GESTURE

2013-05-09 Thread John Grant
Hi Tim, et al, I am testing the ctypes technique to intercept messages for my process, as Tim pointed out I need to do using the SetWindowsLongPtr function. I am seeing slightly unexpected results. My goal was to make a pass-through implementation, so my callback does not disrupt the application.

Re: [python-win32] hook to obtain WM_GESTURE

2013-05-09 Thread John Grant
I believe found access to the HWND. mHWND = ctypes.windll.user32.GetActiveWindow() On Thu, May 9, 2013 at 11:13 AM, John Grant wrote: > Hi Tim, > > Thanks for the great explanations. > > Yes, you are right, I am trying to intercept gestures in a window within > the same process. The Blender ap

Re: [python-win32] hook to obtain WM_GESTURE

2013-05-09 Thread John Grant
Hi Tim, Thanks for the great explanations. Yes, you are right, I am trying to intercept gestures in a window within the same process. The Blender application framework has a WndProc in C, and Blender supports extending itself with user-supplied Python scripts. I am trying to add gesture support w

Re: [python-win32] hook to obtain WM_GESTURE

2013-05-09 Thread Tim Roberts
John Grant wrote: > > I would like to obtain multi-touch events in my Python code (running > inside Blender's python environment). I have looked around the web for > a python module that works with py 3.3 (others work with py 2.x), but > I have not found one. So, I'm trying to build one. > > I beli

[python-win32] hook to obtain WM_GESTURE

2013-05-09 Thread John Grant
Hi, I would like to obtain multi-touch events in my Python code (running inside Blender's python environment). I have looked around the web for a python module that works with py 3.3 (others work with py 2.x), but I have not found one. So, I'm trying to build one. I believe I can use the 'ctypes'