[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pygame] XWindow screen saver in pygame?
On 2003-03-19, Jesse David Andrews wrote:
> Now that we all know how to do a windows screensaver in pygame, how
> about an X screensaver?
>
X being a "mechanism not a a policy" has no official screensaver API
(there is one low-level, rarely implemented extension for reliable
detection of inactivity, IIRC; that's all).
So it's a matter of user-land convention. The single leader is
xscreensaver_. It takes care of all little details and can run any
external program - e.g. python script... The program should draw on
the root window and I think it should understand "virtual root"s (I
don't ;-).
The program is expected to be configured by command-line arguments.
xscreensaver includes a parser for xml descriptions of the
configuration dialog (that maps GUI elements to command line
elements).
If you fell fitting really seamlessly with it, there are conventions
for command-line argument style (who cares :-) and some common options
that it's actually useful to understand (``-visual``, etc.) because
they will be supplied automatically in some cases.
.. xscreensaver: http://www.jwz.org/xscreensaver/
--
Beni Cherniavsky <cben@tx.technion.ac.il>
Shameless plug: bitlife_, an eye-candy doing multi-plane Conway's Life
with boolean operation blits (too bad sdl & pygame don't have them,
BTW); two implementations: a pygame/surfarray proof-of-concept one and
a C/Xlib xscreensaver one that has good chance of being accelerated.
.. bitlife: http://bitlife.sf.net