Re: [Fresco-devel] input::filter

Nathaniel Smith <[email protected]>
Newsgroups gmane.comp.video.fresco.devel
Message-ID <[email protected]>
On Sun, Aug 25, 2002 at 10:07:22AM -0400, Nick Lewycky wrote:
> At the moment, Input::Filter is entirely unimplemented.
> Is there any documentation describing how this is supposed to work?
> 
> PositionalFocus.cc has an add_filter function which seems to imply that 
> you can filter yourself out of the control graph. Input::Filter is a 
> CORBA object with one function, "handle" that takes an Event and returns 
> a boolean.
> 
> Is the idea that we're supposed to attach a Filter to a certain point in 
> the controller graph? Won't we need a factory for these things? (Should 
> we make a new one?)
> 
> Most importantly, is this already documented anywhere? I couldn't find 
> any mention on the mailing lists of old, nor in the "Further Reading" 
> section, not that I grepped them all or anything.

This isn't documented anywhere; I'm not even sure that it's
implemented anywhere.  You'll have to ask Stefan about what it was
originally intended to do, because he's probably the only one who
knows :-).  Unfortunately, the input sub-system as a whole probably
needs a fair amount of rewriting, for more flexibility and
information.  (Eg, we need to think about passing more information --
X provides keycode information, so perhaps we should too, especially
if we want to run X as a Fresco client -- and more sophisticated
plumbing stuff (like event filters that modify the event or add
additional information on the way through), more sophisticated focus
management, etc.)  On the other hand, it's probably a bad idea to not
improve the current input system just because it'll need to be
rewritten someday; it's only by working with it that we'll learn what
needs to be done :-).

If I had to guess, I'd say that Input::Filter was a stub Stefan left
in as a mark of his plans to add more sophisticated filtering etc.
Just a simple "pass or don't" test like it seems intended to allow
would be very useful, since it lets us prune branches before spending
lots of (possibly remote!) CORBA calls passing the event around the
tree.  Figuring out a useful factory interface is an interesting
problem, though, because somehow you need a way to flexibly specify
event masks.  Thinking about formats for this could be a great way to
move towards the yet-more-nifty things I mentioned above...

-- Nathaniel

-- 
The Universe may  /  Be as large as they say
But it wouldn't be missed  /  If it didn't exist.
  -- Piet Hein

This email may be read aloud.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.