My problem is that Neko can be raised and lowered over/below other windows
on the screen just like a normal window. What I want to be able to do
is make Neko always be on top of everything else.
I think oneko is implemented by using a small, frameless window that moves
when the cat moves.
Any ideas on how to make Neko stay as the top window all the time??
For you information, I am running on a Sun4 SparcStation using
Openwin (soon to be graduating to using Motif) and know next to
nothing about X intrinsics or X programming etc.
I would look up the documentation that come with neko except all the
doc files and comments in the C code are in Japanese (or Kanji??)
Double Bytes Characters and I don't know Japanese!
Any ideas??
--
Wendigo [ Occasionally thought of as | "This isn't science fiction,
e...@daneel.rdt.monash.edu.au ] | this is StarTrek!"
___{ Sometimes answers to Evan McLean }____|______-- Shelia Willis___________
What can you say about a society that believes God is dead and Elvis is Alive?
> My problem is that Neko can be raised and lowered over/below other windows
> on the screen just like a normal window. What I want to be able to do
> is make Neko always be on top of everything else.
> Any ideas on how to make Neko stay as the top window all the time??
Ok, I've figured it out from another program I just discovered that does
the same thing.
The solution was to stick a call to XRaiseWindow in the main loop that
updates the little kitty cat.
I now have another problem!!
When the kitty is on top of another window, and you press the FRONT button
on your Sun keyboard, that window then raises istelf to be the top window,
then Neko reasserts itself over the top of this window as expected, making
the cat the top window again. Therefore, if you press FRONT again, instead
of the window going to the back as would be normally the case when Neko
aint there, it tries to bring itself in front of Neko again.
Is there a way to get Neko's scampering around to act transparently to the
window levels? I want the windows to be able to act exactly as if Neko wasn't
sitting there over the top of them.
If there's no way to do this the only other hack I can think of would be to
stick in a counter so that Neko is only raised to be the front window say,
once in every 100 iterations through the update process, that would give a
user enough time to press the FRONT key twice really fast to raise the window
they want to the front then lower it to the back before Neko asserts himself
again. Not an elegant solution at best!
For your information, I am still running on a Sun4 SparcStation using
Another variant of the same (xneko) has a "-front" option that should
do what you want - however, it doesn't seem to do a very good job at
sending expose events to xterm.
-----
John B. Melby
Fujitsu Limited, Yokohama, Japan
melby%yk.fujit...@fai.com
People interested in oneko can get English annotated files by
anonymous ftp from cs.utk.edu in pub/reed/oneko.
My Japanese is _very_ bad. This is not a translation but you
may find it helpful for hacking on oneko.
README and oneko.c with some English comments next to the Japanese.-
README.annotated
oneko.c.annotated
Above files in postscript form for the curious (should print anywhere).-
README.annotated.ps.Z
oneko.c.annotated.ps.Z
Reed Wade
wa...@cs.utk.edu
Here's the English documentation, not that it would help with the question
at hand...
From: as...@is.s.u-tokyo.ac.jp (Satoshi ASAMI)
Newsgroups: comp.sources.d
Subject: English document for oneko
Message-ID: <3...@kei.is.s.u-tokyo.ac.jp>
Date: 21 Mar 91 03:05:45 GMT
Hello netland!
About a month ago, I wrote that an enhanced version of a kitten
running over windows is available via anonymous ftp from
utsun.s.u-tokyo.ac.jp[133.11.11.11].
Since then, I've got millions of requests from frustrated
non-Japanese speaking people who couldn't read the README of the
notoriously cute program. I told it to Mr. Kato, the original author
of oneko, and he sent me an English version of the README which was
sent to him by a person who requested anonymity. Mr. Kato and I
modified it slightly.
It is now available in the directory utsun:~ftp/fj/oneko/ as well
as the source. A compress + uuencoded version is attatched at the end
of this article. I hope you can now enjoy all the lovely options of
oneko.
Mr. Kato is currently preparing a new version of oneko. He said he
would post it to an appropriate source group when all the bugs are
fixed. An on-line manual will be included in the new version.
Enjoy!
---
o o Satoshi Asami
^
Form follows Function. (as...@is.s.u-tokyo.ac.jp)
Department of Information Science
The University of Tokyo
===utsun maintainer's note===
This is an English version of the README file of oneko. It was
translated and sent to Mr. Kato by a person who requested anonymity.
Mr. Kato and I made minimal changes in order to preserve the intention
of the original author.
Satoshi Asami (asami.is.s.u-tokyo.ac.jp)
---
oneko - Neko runs over the windows.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Original program written by
Masayuki Koba
Modified by
Tatsuya Kato (ka...@ntts.co.jp)
A `cat' named `xneko', which runs on X window, was posted to fj.sources.
But, it is pity that this `cat' makes a window and runs after a mouse
inside that window.
I, therefore, modified it for the cat, so that it can freely run on the
screen as I felt sorry that it was caged in a jail.
Its name is ``oneko''. At first, I intended that it was named after `o'
from `oclock'. But, I heard that oclock began with `o' not because of
roundness, but because it is from ``o'clock''. Then, I distorted that
it was from `Neko runs Over the window'. (Uhm, it is a lame excuse....)
# Don't mistype it because `n' and `m' are next to each other!
* Commented by the translator:
* o@eko (replaced by `m' for `@') is a taboo word in Japanese. It is an
* IMPORTANT PLACE of a woman's body!
To execute this program needs X Window System. It presume R4 as X
version. When you execute on R3, it results in an uninteresting result
as it uses `shape extension', which is adopted on R4. (It can be
compiled even though there is no `shape extension'.)
I only tested on SUN4/330 and X terminal by NCD. But, to put it
plainly, it is too slow on the X terminal! When I did it on the
console of SUN, it could be made considerably fast by setting some
parameter though ....
Try it.
< Functional Extension by Version Up >
- All options can be set by resource. But, it does not make use of Xrm
library function, but get resources by XGetDefault (corresponds to a
function on X11R1). Therefore, users cannot set resource as
application default (the file /usr/lib/X11/app-default) now.
- It adopts the function that turns to be a striped cat, which has won
popularity (?) in NTTSOFT local. When executing, do:
% oneko -tora
* A `tora' means a tiger. We call a striped cat as `a tiger cat'.
and the patterns of a cat is changed.
- You can set colours. Set options `-fg', `-bg'.
- This cat remains sleeping when the mouse moves slowly. It is because
the setting which makes the cat unnotice unless the distance the mouse
moves at a certain time exceeds a value. Users can now set the
`value'. Though the default is 6, set:
% oneko -idle 20
and `the duller cat' is made.
- I heard that it doesn't work if `gcc' is used when compiling. (I also
confirmed.) That is why, Imakefile of this time forces to compile by
`cc'.
- It can be compiled even if there is no `shape extension' library. If
your X is not X4, and if your machine is not SONY NEWS, delete the
line:
DEFINES = -DSHAPE
in Imakefile. (I have not tested on NEWS. Could somebody confirm
it?)
< How to Compile >
1. First, unshar this article and you get a set of sources.
2. make `Makefile'. Change directory `oneko' and Execute:
% xmkmf
If you don't have the command `xmkmf', you can get the same result
by:
% imake -DUseInstalled -I/usr/lib/X11/config
3. do `make'.
% make
Now, an executable `cat' is made. If you want to put it in
/usr/bin/X11, do:
# make install
(as a super user).
Compiling is finished now. After that, do:
% oneko &
and enjoy it :-).
< How to Use It >
Users don't have to set any options basically. But, they can set these
options. All options except `help' can be set in resources.
-help Display a help for options.
-tora A `Cat' turns to be a `striped cat'.
-time <n> Change the value of interval timer that the neko uses.
The default is 125,000 micro seconds. The smaller to
set this value, the quicker the cat moves.
-speed <n> Specify the distance that the cat moves at a time. The
default is 16. The larger to set this value, the
quicker the cat moves.
-idle <n> Specify the distance that the cat `gets up' when the
mouse moves farther than this distance. The default
is 6.
-rv Reverse the colour. (It does not make very important
sense on colour screen because it can be set by fg and
bg.)
-noshape Execute without using `Shape Extension'. Indeed it
becomes much faster, but the display becomes dull. (Try
it actually.)
-fg <colour> Specify the foreground colour. This is ignored on
mono-chrome display.
-bg <colour> Specify the background colour. This is ignored on
mono-chrome display.
Adding to say, it symbolically links to `tora' if you `make install'.
When executing `tora', it runs same as executed with the option -tora.
In case of setting in resource,
oneko.foreground: black
oneko.background: red
oneko.time: 100000
oneko.reverse: true
In case the command `tora' instead of `oneko', the resource names become
to be `tora.*'. Therefore:
tora.foreground: sienna
tora.background: moccasin
can set differently from the setting for normal cat. Because the
colours for striped cat are black and white as the default, put the two
lines above into resources.
And, the resource which begins with the names of class (``Oneko'')
instead of the ones of command can be read, too. So, it is a good
idea to set by the names of class common resources to all cat such as
speed, time, etc., and by the names of command resources which you
want be changed depending on the kind of `cat'.
I should have used Xrm* from the beginning for these kinds of
implementation. But, because I had not known if there are such
functions, I violently wrote them with XGetDefault.
< Bugs, the Things Which I Want to Version Up >
I want to make it move plural cats simultaneously. When you Execute two
`oneko's they overlaps each other as they moves in the same way. (When
you Execute them by setting `-speed' or `-time' differently, they moves
AS THEY ARE, though. Try it.)
It flicks on some windows such as kterm as it happens `Expose' on the
area where a cat runs. Are there some good ways?
Though the cursor turns to be a mouse when it is on the root window or
on the cat, the colour of the mouse is simply the reverse one of the
cat. If I had had a time, I could have modified, but it remains as it
was. Expect the version up.
I want to make it be faster ... but, I wonder if it is possible than
it is now. Tell me the way `Modify as this, and it becomes faster!'
(I have not tried the way using Map/Unmap that Kondo-san@FLab
suggested. I have had no time.)
The cat sometimes prevents us from typing. Can we ignore the key input
and pass it to the window underneath? (But, the cat of current version
selects input the key event.)
# It is basically PDS. But, let me (kato%ntts....@relay.cs.net) know
# the bug fixes and/or the extension for functions (even if you tell me
# secretly, it is welcome). I will do version up.