[Oberon] Mice in Native Oberon.
peter at easthope.ca
peter at easthope.ca
Tue Oct 20 21:42:13 CEST 2015
In Native Oberon,
====
MODULE Input;
...
TYPE
PollMouse* = PROCEDURE (VAR keys: SET; VAR dx, dy, dz: INTEGER): BOOLEAN; (** non-portable *)
...
MousePoller = POINTER TO RECORD
poll: PollMouse;
next: MousePoller
END;
...
VAR
...
mouse: MousePoller;
====
Good! mouse.next can point to a second mouse and etc. That allows a list of mice.
Further on,
====
PROCEDURE Mouse*(VAR keys: SET; VAR x, y: INTEGER);
...
REPEAT (* get all available mouse events, or until keys change *)
p := mouse; rawkeys := {}; ok := FALSE;
WHILE p # NIL DO (* poll all mice and sum keys and movements *)
IF p.poll(mousekeys, dx, dy, dz) THEN
(* Assimilate mouse button information and X,Y coordinate information. *)
END;
p := p.next
END
UNTIL ~ok OR (rawkeys # lastkeys);
====
Observation
REPEAT .. UNTIL steps through the list of mice, assimilating
information from each. When more than one mouse is present, the
input from each is equivalent to another. Multiple mice simply allows
redundancy. In the sources, I've seen nothing to add a second mouse to
the list.
Conclusion
Input was built to allow multiple mice but the code to configure and use
multiple mice wasn't developed.
Correct? Erroneous? Comments?
Thanks, ... Peter E.
--
123456789 123456789 123456789 123456789 123456789 123456789 123456789 12
Tel +1 360 639 0202 or +1 604 822 7107
http://easthope.ca/Peter.html Bcc: peter at easthope. ca
More information about the Oberon
mailing list