NAME
X11::FullScreen - Create a full-screen window with Xlib
SYNOPSIS
use X11::FullScreen;
# Create the object
my $xfs = X11::FullScreen->new( $display_string );
# Create a full-screen window
$xfs->show();
# Return any new X event
my $events = $xfs->check_event();
# Display a still image
$xfs->display_still("/path/to/my.png");
# Sync the X display
$xfs->sync();
# Close the window
$xfs->close();
DESCRIPTION
This module is used for creating simple borderless X windows that take up the entire screen. You can use it to display still images, or to show movies (with Video::Xine).
It was primarily developed to provide a no-frills interface to X for use with Video::Xine, as part of the Video::PlaybackMachine project.
METHODS
new()
my $xfs = X11::FullScreen->new( $display_string );
Creates a new Display object. $display_string
should be a valid X11 display specifier, such as ':0.0'. This does not connect to the display. Call show()
before doing anything else.
show()
$xfs->show();
Map the window and make it full screen.
close()
$xfs->close();
Close the window.
window()
my $window = $xfs->window();
Returns the Xlib window ID for our window.
display()
Returns a pointer to the X connection.
screen()
Returns the number of the default screen on our display.
display_width()
Returns the width in pixels of the display.
display_height()
Returns the height in pixels of the displays.
pixel_aspect()
Returns the pixel aspect of the screen.
clear()
Clears the window.
display_still()
$xfs->display_still( 'my_file.png' );
Displays a still image. This can be any image format handled by imlib2.
sync()
Flushes the output buffer and waits until all all requests have been received and processed by the X server.
check_event( $event_mask )
my $event = check_event( $event_mask );
my $event_type = $event->get_type();
Checks for any new event which has occurred to the full screen window. If $event_mask
is not specified, defaults to ( ExposureMask | VisibilityChangeMask)
This returns an X11::FullScreen::Event object. You can access the event type by the get_type() method.
SEE ALSO
Video::Xine, Video::PlaybackMachine, Xlib
AUTHOR
Stephen Nelson, <stephenenelson@mac.com<gt>
COPYRIGHT AND LICENSE
Copyright (C) 2013 by Stephen Nelson
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available.