9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] oneko for rio
@ 2001-04-26  8:30 YAMANASHI Takeshi
  2001-04-26  9:28 ` Boyd Roberts
  0 siblings, 1 reply; 11+ messages in thread
From: YAMANASHI Takeshi @ 2001-04-26  8:30 UTC (permalink / raw)
  To: 9fans

Hi.

I feel like porting a fun X11 application called `oneko'.
Executing oneko, a kitten appears on the screen and
chases the mouse cursor running all over windows.

How can I do this for rio?  Any pointer or suggestion
on implementation is great.

Thank you.
--
YAMANASHI Takeshi


^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: [9fans] oneko for rio
@ 2001-04-26  9:57 rob pike
  2001-04-26 13:19 ` Boyd Roberts
  2001-04-27  9:10 ` Douglas A. Gwyn
  0 siblings, 2 replies; 11+ messages in thread
From: rob pike @ 2001-04-26  9:57 UTC (permalink / raw)
  To: 9fans

I agree.  I think I could probably puzzle out a way to implement
oneko but it will not be easy, to put it mildly.

-rob



^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: [9fans] oneko for rio
@ 2001-04-26 10:02 rog
  0 siblings, 0 replies; 11+ messages in thread
From: rog @ 2001-04-26 10:02 UTC (permalink / raw)
  To: 9fans

> on plan 9 this should be trivial (read 'hello world').

actually, i doubt if it would be so entirely trivial, as it's not that
easy to get the current position of the mouse cursor outside the
current window.  you could get around this by writing a little file
server (easiest using lib9p) that serves not only /dev/mouse, but
/dev/mouse2 as well; it would have to be run before rio (or run rio
inside a rio window)

then oneko would be able to get the current mouse position from
/dev/mouse2, despite the fact that rio had covered up /dev/mouse with
its own version. window position information is trivially found
in /dev/wsys/*/wctl

maybe i'm missing something.



^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: [9fans] oneko for rio
@ 2001-04-27 13:42 rob pike
  2001-04-27 16:32 ` Douglas A. Gwyn
  0 siblings, 1 reply; 11+ messages in thread
From: rob pike @ 2001-04-27 13:42 UTC (permalink / raw)
  To: 9fans

	Or, anyone want to change line 31 of
	/sys/src/cmd/rio/fsys.c to
		{ "screen",	Qscreen,	0600 ),
	and try the experiment?

It takes more than a chmod of a file to implement a driver.  /dev/screen
is provided by rio; the write interface to the underlying /dev/draw is
provided through an RPC protocol, not direct data writes, which don't
match well to the 2-d quality of the data.  /dev/screen could in principle
be writable but it will take changes to a lot more than line 31.

	The absolute mouse position would be
	determinable by adding the local position to the difference
	in LLCs of /dev/screen and /dev/window;

False.  The mouse position is always in absolute coordinates unless
the user program does extra work.

And as for the return value of main: enough already!  The subject
isn't worth all this clutter in our mailboxes.

-rob



^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: [9fans] oneko for rio
@ 2001-05-07  8:25 okamoto
  0 siblings, 0 replies; 11+ messages in thread
From: okamoto @ 2001-05-07  8:25 UTC (permalink / raw)
  To: 9fans

>By the way, can somebody provide a set of Glenda bitmap?

Are you going to make jglenda? :-)



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

end of thread, other threads:[~2001-05-07  8:25 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-26  8:30 [9fans] oneko for rio YAMANASHI Takeshi
2001-04-26  9:28 ` Boyd Roberts
2001-04-26  9:57 rob pike
2001-04-26 13:19 ` Boyd Roberts
2001-04-27  7:28   ` YAMANASHI Takeshi
2001-04-27  9:10 ` Douglas A. Gwyn
2001-04-26 10:02 rog
2001-04-27 13:42 rob pike
2001-04-27 16:32 ` Douglas A. Gwyn
2001-05-07  7:05   ` YAMANASHI Takeshi
2001-05-07  8:25 okamoto

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