Ivan Wills

NAME

Event::ScreenSaver::Unix - Provides the Unix & Unix like screen saver monitoring code.

VERSION

This documentation refers to Event::ScreenSaver::Unix version 0.0.6.

SYNOPSIS

   use Event::ScreenSaver::Unix;

   # create the screen saver object
   my $ss = Event::ScreenSaver::Unix->new();

   # add functions to events
   $ss->start( sub {print "The screen saver started\n" } );
   $ss->stop( sub { print "The screen saver stopped\n" } );

   # run the event handler
   $ss->run();

DESCRIPTION

This library provides an easy way to hook to the starting and stopping of the screen saver (currently only in Unix like environments).

The call back functions are passed the current event object.

SUBROUTINES/METHODS

start ( [$sub] )

Param: $sub - sub - The starting call back function

Return: sub - The currently set starting function

Description: Sets/Gets the function that will be called when the screen saver is started.

stop ( [$sub] )

Param: $sub - sub - The stopping call back function

Return: sub - The currently set stopping function

Description: Sets/Gets the function that will be called when the screen saver is stopped.

run ()

This function starts the process for listening for screen saver events. It does not return.

DIAGNOSTICS

CONFIGURATION AND ENVIRONMENT

DEPENDENCIES

INCOMPATIBILITIES

BUGS AND LIMITATIONS

There appears to be an issue with Net::DBus where if the code calling this module also uses Net::DBus the Net::DBus::Reactor will not run.

Please report problems to Ivan Wills (ivan.wills@gmail.com).

Patches are welcome.

AUTHOR

Ivan Wills - (ivan.wills@gmail.com)

LICENSE AND COPYRIGHT

Copyright (c) 2009 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW Australia 2077). All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.