Handbook
Glossary
fill-in-bstate ( mouse-event bstate -- )
Vocabulary
curses
.
private
Inputs
mouse-event
an
object
bstate
an
object
Outputs
None
Definition
USING:
accessors
combinators
curses
kernel
math
;
IN:
curses.private
:
fill-in-bstate
( mouse-event bstate -- )
2dup
{
{
[
dup
1
button-n?
]
[
[
1
>>button
]
dip
1
fill-in-type
]
}
{
[
dup
2
button-n?
]
[
[
2
>>button
]
dip
2
fill-in-type
]
}
{
[
dup
3
button-n?
]
[
[
3
>>button
]
dip
3
fill-in-type
]
}
{
[
dup
4
button-n?
]
[
[
4
>>button
]
dip
4
fill-in-type
]
}
{
[
dup
5
button-n?
]
[
[
5
>>button
]
dip
5
fill-in-type
]
}
}
cond
{
[
BUTTON_CTRL
bitand
0
=
not
[
t
>>ctrl
]
when
drop
]
[
BUTTON_SHIFT
bitand
0
=
not
[
t
>>shift
]
when
drop
]
[
BUTTON_ALT
bitand
0
=
not
[
t
>>alt
]
when
drop
]
}
2cleave
;