Re: [AD] various questions about events (4.3)

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 5/16/07, Peter Wang <novalazy@xxxxxxxxxx> wrote:
On 2007-05-07, Matthew Leverton <meffer@xxxxxxxxxx> wrote:
> If necessary for optimization, I think filtering could be implemented
> by simply not generating the event. (If that makes any sense.)

Well, that's what the masks do.  You apply a mask to an event source and
it only generates events which aren't masked.  Bitfields make the check
cheap, that's all.

I just meant that the source itself could be notified to not even
"emit" events if it created enough different types for it to be
useful. So if some source could potentially produce superfluous
events, you could tell it to not produce them by some group (custom to
that source), and then it wouldn't even call
_al_event_source_emit_event.

But I really don't think that would be very beneficial given the
probable use of events. The one or two times that it might be useful
to have source specific filters (masks) wouldn't make up for the
non-standard API.

On 5/20/07, Robert Jr Ohannessian <rohannessian@xxxxxxxxxx> wrote:
I think this is premature optimization. If bitfields must be used, then
at least allow for an arbitrary number of bits.

I suppose you mean reserving a few bits for classes of events. This
could be useful, but defining them would be a bit arbitrary and
ambiguous.

--
Matthew Leverton




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/