Hi Denis and thanks for looking at this.

Yes there is a duplication of the event hierarchy between Bloc and OSWindow.
We discussed about the fusion of OSWindow and Bloc events one year ago at
INRIA.
We made the choice to keep Bloc independent from OSWindow because, among
other things:
- Bloc allows several windowing backends, for instance we had a morphic
windowing backend (no longer maintained today) 
- OSEvents are too low level to be used directly in Bloc (nothing about
source, target, propagation, consumption ...)
- OSWindow has to stay low level and independent from high level
preoccupations like the Bloc ones
- Bloc has to provide an unified and consistent layer on top of underlying
libraries 

The keyboard management is not yet finished in Bloc.
numLock and capsLock seems to be missing, thanks for pointing this.
Moreover, some keys are also merged like the left & right distinction
between ctrl|alt|shift.
If this distinction is really needed in the future maybe we will add it.


Denis Kudriashov wrote
> BlKeyModifiers encode smart boolean flags about keys back into integer
> bits

I decided to replace all booleans by one integer+masks because it seems to
be more lightweight and this integer can be used directly for the hash key.
It is just the internal representation and users don't have to care about
this integer.
If you think that leads to some issues, i'm not against booleans by nature
;).

More generally, i think that, to stay consistent, Bloc should not reuse
directly (and everywhere) some part of underlying libraries even if sometime
these parts seems to match directly. 
We have to take care about dependencies between layers.
The gain was obvious during the migration from Athens to Sparta.

Regards,
Glenn.



-----
Glenn Cavarlé
--
View this message in context: 
http://forum.world.st/Bloc-Hierarchy-of-BiEvent-tp4920209p4920239.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.

Reply via email to