[info-performer] Re: Win32 input question

Date view Thread view Subject view Author view

From: Alexandre Naaman (naaman++at++laplace.engr.sgi.com)
Date: 09/04/2003 13:09:58


On 4 Sep 2003, Jason Daly wrote:

Hi Jason,

> On Thu, 2003-09-04 at 15:02, Alexandre Naaman wrote:
> >
> > The reason that this sample is commented out from the Makefile on win32
> > is because it uses X input in lieu of pfutil's input mechanism. This isn't
> > the only sample which hasn't been fully ported (there are many lib
> > src/pguide/libpf) but most of those that aren't ported fall into this
> > category as well.
>
> Alexandre (and others),
>
> Along these lines, I tried to take some code that was using plain old
> Win32 input and port it to use Performer. Essentially, I open a
> pfPipeWindow, then subclass the WNDCLASS (using SetWindowLong) to
> install my own main window procedure. When I do this, I get all the
> keyboard events I'm looking for, but I don't get any mouse events. Is
> this because pfUtil is skimming all the mouse events before I get them?
> If so, is there any way around this? I'd like to avoid switching to
> pfUtil if possible because I want the code to stay portable.

The SetWindowLong() trick is exactly what we do with pfutil so it does
work. The trick is that you're going to need to call it twice, once to
override the window proc on the Drawable and once on the WSWindow (I know
those aren't win32 terms but they correspond to the calls on the pipe
window which you'll need to make to get the handles which you'll pass to
SetWindowLong().) For more info check out the function openWin32Input()
in:

        %PFROOT%/Src/lib/libpfutil/input.c

which should be somewhere around line 757.

A+,

Alex.


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Thu Sep 04 2003 - 13:10:18 PDT