Update of /cvsroot/freevo/freevo/WIP/Ruelle
In directory sc8-pr-cvs1:/tmp/cvs-serv30419
Added Files:
freevoscreensaver.py
Log Message:
first cut at a screensaver
--- NEW FILE: freevoscreensaver.py ---
#if 0 /*
# -----------------------------------------------------------------------
# freevoscreensaver.py - quick hurry and save the screen!!!
# -----------------------------------------------------------------------
# $Id: freevoscreensaver.py,v 1.1 2004/01/01 00:27:39 mikeruelle Exp $
#
# Notes: maybe some day i will make it really start and stop the saver
# Todo:
#
# -----------------------------------------------------------------------
# $Log: freevoscreensaver.py,v $
# Revision 1.1 2004/01/01 00:27:39 mikeruelle
# first cut at a screensaver
#
#
# -----------------------------------------------------------------------
# Freevo - A Home Theater PC framework
# Copyright (C) 2003 Krister Lagerstrom, et al.
# Please see the file freevo/Docs/CREDITS for a complete list of authors.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MER-
# CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# ----------------------------------------------------------------------- */
#endif
import time
import config
import plugin
# Set to 1 for debug output
DEBUG = config.DEBUG
TRUE = 1
FALSE = 0
class PluginInterface(plugin.DaemonPlugin):
def __init__(self):
plugin.DaemonPlugin.__init__(self)
self.plugin_name = 'SCREENSAVER'
self.event_listener = TRUE
self.poll_menu_only = TRUE
self.last_event = 0
self.screensaver_showing = FALSE
# eventually make a config based on minutes
self.poll_interval = 600
self.saver_delay = 3000
def eventhandler(self, event = None, menuw=None, arg=None):
"""
eventhandler to handle the VOL events
"""
print "MFR DEBUG: %s" % event.name
if self.screensaver_showing :
print "MFR DEBUG: stop screensaver"
self.screensaver_showing = FALSE
if not event.name == 'IDENTIFY_MEDIA':
self.last_event = time.time()
return FALSE
def poll(self):
print "MFR DEBUG: got polled %f" % time.time()
if not self.screensaver_showing and (time.time() - self.last_event) >
self.saver_delay :
self.screensaver_showing = TRUE
print "MFR DEBUG: start screensaver"
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog