9front - general discussion about 9front
 help / color / mirror / Atom feed
* Re: [9front] !#&%&^#*@ RIO!!!
@ 2018-12-13 13:44 cinap_lenrek
  2018-12-13 21:13 ` Ethan Gardener
  0 siblings, 1 reply; 11+ messages in thread
From: cinap_lenrek @ 2018-12-13 13:44 UTC (permalink / raw)
  To: 9front

no, its just rio. the global Mouse *mouse that is. its not from the
library. all these things can be easily found by grep.

--
cinap


^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: [9front] !#&%&^#*@ RIO!!!
@ 2018-12-13 11:23 cinap_lenrek
  2018-12-13 13:28 ` Ethan Gardener
  0 siblings, 1 reply; 11+ messages in thread
From: cinap_lenrek @ 2018-12-13 11:23 UTC (permalink / raw)
  To: 9front

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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-12-15 13:41 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
  -- strict thread matches above, loose matches on Subject: below --
2018-12-13 11:23 cinap_lenrek
2018-12-13 13:28 ` Ethan Gardener

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).