From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from duke.felloff.net ([216.126.196.34]) by ewsd; Thu Dec 13 06:23:28 EST 2018 Message-ID: <26B6FB24FAC120B8B424D0C3246CF039@felloff.net> Date: Thu, 13 Dec 2018 12:23:21 +0100 From: cinap_lenrek@felloff.net To: 9front@9front.org Subject: Re: [9front] !#&%&^#*@ RIO!!! In-Reply-To: 1544697123.1465015.1607978976.77FEF1AE@webmail.messagingengine.com MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: webscale GPU interface 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