Author: lwalter
Date: Fri Dec 9 21:27:39 2011
New Revision: 2759
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2759
Log:
Remove an unnecessary debug dump.
Modified:
ofw/wifi/eapol.fth
Modified: ofw/wifi/eapol.fth
==============================================================================
--- ofw/wifi/eapol.fth Thu Dec 8 13:44:00 2011 (r2758)
+++ ofw/wifi/eapol.fth Fri Dec 9 21:27:39 2011 (r2759)
@@ -491,7 +491,6 @@
data >ptype c@ eapol-key = and if \ EAPOL-key
data >ver c@ to eapol-ver
data >rcnt last-rcnt /rcnt comp 0> if \ A new eapol-key record
- data >rcnt /rcnt cdump cr
data >rcnt last-rcnt! \ Update last replay counter
process-eapol-key
else
Author: wmb
Date: Thu Dec 8 13:43:46 2011
New Revision: 2755
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2755
Log:
Absolutely-addressed text display routines for use by on-screen keyboard.
Modified:
ofw/gui/graphics.fth
Modified: ofw/gui/graphics.fth
==============================================================================
--- ofw/gui/graphics.fth Thu Dec 8 13:43:42 2011 (r2754)
+++ ofw/gui/graphics.fth Thu Dec 8 13:43:46 2011 (r2755)
@@ -114,6 +114,28 @@
)package
;
+: xy>screenadr ( x y -- screenadr )
+ bytes/line * swap pix* + frame-buffer-adr +
+;
+0 value char-fg 0 value char-bg
+: character-at-xy ( char x y -- )
+ screen-ih package(
+ 2>r ( char r: x y )
+ >font fontbytes char-width char-height ( 'font fontbytes w h r: x y )
+ 2r> xy>screenadr ( 'font fontbytes w h 'screen )
+ bytes/line char-fg char-bg ( font fontbytes w h 'screen bytes/line fg bg )
+ fb-paint ( )
+ )package
+;
+: type-at-xy ( adr len x y -- )
+ 2swap bounds ?do ( x y )
+ 2dup i c@ -rot character-at-xy ( x y )
+ screen-ih package( char-width )package ( x y char-width )
+ rot + swap ( x' y )
+ loop ( x y )
+ 2drop ( )
+;
+
: getchar ( -- byte ) key ;
\ use getchar or keyboard package read ( a n - actual ) to get input
Author: wmb
Date: Thu Dec 8 13:43:42 2011
New Revision: 2754
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2754
Log:
GUI mouse driver - support absolutely-addressed pointers like touchscreens.
Modified:
ofw/gui/mouse.fth
Modified: ofw/gui/mouse.fth
==============================================================================
--- ofw/gui/mouse.fth Thu Dec 8 13:43:38 2011 (r2753)
+++ ofw/gui/mouse.fth Thu Dec 8 13:43:42 2011 (r2754)
@@ -3,6 +3,8 @@
headerless
+false value mouse-absolute? \ True if coordinates are absolute
+
\ Current mouse cursor position
0 value xpos 0 value ypos
@@ -134,10 +136,12 @@
: remove-mouse-cursor ( -- )
hardware-cursor? if " cursor-off" $call-screen exit then
mouse-ih 0= if exit then
+ mouse-absolute? if exit then
xpos ypos old-rect put-cursor
;
: draw-mouse-cursor ( -- )
mouse-ih 0= if exit then
+ mouse-absolute? if exit then
hardware-cursor? if
xpos ypos " cursor-xy!" $call-screen
exit
@@ -152,6 +156,7 @@
: clamp ( n min max - m ) rot min max ;
: update-position ( x y -- )
+ mouse-absolute? if to ypos to xpos exit then
2dup or 0= if 2drop exit then \ Avoid flicker if there is no movement
\ Minimize the time the cursor is down by doing computation in advance
@@ -184,6 +189,7 @@
close-mouse? if
mouse-ih close-dev
0 to mouse-ih
+ false to mouse-absolute?
hardware-cursor? if
false to hardware-cursor?
" cursor-off" $call-screen
@@ -196,7 +202,13 @@
mouse-ih 0= if
" /mouse" open-dev to mouse-ih
then
- mouse-ih if alloc-mouse-cursor then
+ mouse-ih if
+ " absolute?" mouse-ih ['] $call-method catch if ( x x x )
+ 3drop false
+ then ( absolute? )
+ to mouse-absolute?
+ mouse-absolute? 0= if alloc-mouse-cursor then
+ then
then
;
: mouse-event? ( -- false | x y buttons true )