From: cinap_lenrek@felloff.net
To: 9front@9front.org
Subject: Re: [9front] !#&%&^#*@ RIO!!!
Date: Thu, 13 Dec 2018 12:23:21 +0100 [thread overview]
Message-ID: <26B6FB24FAC120B8B424D0C3246CF039@felloff.net> (raw)
In-Reply-To: 1544697123.1465015.1607978976.77FEF1AE@webmail.messagingengine.com
huh? rio doesnt use event library. it uses mouse(2) instead, which gives
you a Mousectl* that contains a channel. the "mouse" variable of
type Mouse* points into that mousectl which caches the most recent mouse
data read from the channel. it gets updated by readmouse() which is
in libdraw.
here:
int
readmouse(Mousectl *mc)
{
if(mc->image){
Display *d = mc->image->display;
if(d->bufp > d->buf)
flushimage(d, 1);
}
if(recv(mc->c, &mc->Mouse) < 0){
fprint(2, "readmouse: %r\n");
return -1;
}
return 0;
}
note that mouse == &mc->Mouse because:
mousectl = initmouse(nil, screen);
if(mousectl == nil)
error("can't find mouse");
mouse = mousectl;
--
cinap
next reply other threads:[~2018-12-13 11:23 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-13 11:23 cinap_lenrek [this message]
2018-12-13 13:28 ` Ethan Gardener
2018-12-18 22:47 ` Reading/understanding OS code (WAS: Re: [9front] !#&%&^#*@ RIO!!!) magma698hfsp273p9f
2018-12-18 23:41 ` Julius Schmidt
2018-12-19 7:44 ` Steve Simon
2018-12-19 8:19 ` hiro
2018-12-19 8:02 ` hiro
2018-12-20 20:20 ` Ethan Gardener
2018-12-20 20:12 ` Ethan Gardener
2018-12-21 8:22 ` Reading/understanding OS code -- documentation Ethan Gardener
2018-12-13 13:44 [9front] !#&%&^#*@ RIO!!! cinap_lenrek
2018-12-13 21:13 ` Ethan Gardener
2018-12-14 11:22 ` Ethan Gardener
2018-12-14 11:46 ` hiro
2018-12-14 13:23 ` Ethan Gardener
2018-12-14 14:16 ` hiro
2018-12-14 15:04 ` Stanley Lieber
2018-12-14 23:46 ` Steve Simon
2018-12-15 13:41 ` Ethan Gardener
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=26B6FB24FAC120B8B424D0C3246CF039@felloff.net \
--to=cinap_lenrek@felloff.net \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).