UI::Di...d::XOSD(3pm)
πΈ NAME πΈ
okay bestie, say hi to UI::Dialog::Backend::XOSD β she's the backend for the osd_cat(1) π
β¨ SYNOPSIS β¨
use UI::Dialog::Backend::XOSD;
my $xosd = new UI::Dialog::Backend::XOSD ();
$xosd->line( text => "Something to display...");
no cap, that's the whole vibe. look at her go π¦
π ABSTRACT π
UI::Dialog::Backend::XOSD is an OOPerl wrapper for the osd_cat(1) program. that's it, that's the girl π«Ά
π DESCRIPTION π
Use this module to present feedback to the end user via an on-screen display (like an on-screen TV volume meter). iconic behaviour, honestly.
When you use any of the UI::Dialog meta classes (UI::Dialog, UI::Dialog::GNOME, etc.) access to this backend is provided via the $d->xosd method. ie: replace $xosd with $d->xosd in the synopsis example (provided you made $d with something like my $d = new UI::Dialog...).
Also β and this is the lowkey shady part β UI::Dialog (and friends) only load this module when you first use the $d->xosd method. that may silently fail π but you can test by ref() for success. so like, vibe check your object, fr fr.
β EXPORT β
None
nothing. zero. she gives nothing and takes nothing π
π INHERITS π
UI::Dialog::Backend
she's got main character lineage π
π§ CONSTRUCTOR π§
new( @options )
EXAMPLE
my $xosd = new UI::Dialog::Backend::XOSD ( );
DESCRIPTION
This is the Class Constructor method. It accepts a list of key => value pairs and uses them as the defaults when interacting with the various widgets. All methods accept the same arguments as new() except that the arguments passed to the methods are temporarily used instead of making them the default as the new() method does.
And in the case of the wait option: any (non-zero) value enables the option, because it's a switch and not a string argument. she's a toggle, not a text field, periodt.
RETURNS
A blessed object reference of the UI::Dialog::Backend::XOSD class. a blessed object!! we love a blessed object β¨
OPTIONS
The (...)'s after each option indicate the default for the option. An * denotes support by all the widget methods on a per-use policy defaulting to the values decided during object creation. iykyk π
offset=\d+(0) *align=\w+('left') *indent=\d+(0) *font="x-font-string"('fixed') *colour=\w+('red') *delay=\d+(5) *lines=\d+(5) *shadow=\d+(0) *age=\d+(0) *wait=0,1(0) *
π METHODS π
line( )
EXAMPLE
$xosd->line( text => "some text to display" );
DESCRIPTION
Display a simple string on the screen. short, sweet, slay.
RETURNS
Nothing.
file( )
EXAMPLE
$xosd->file( file => "/path/to/a/file" );
DESCRIPTION
Display a file on the screen. yes bestie, the whole file, up on your screen, living its truth π
RETURNS
Nothing.
gauge( )
EXAMPLE
$xosd->gauge( text => "",
percent => $current_percentage,
length => 40,
bar => "-",
mark => "|" );
DESCRIPTION
Display a gauge bar with a percentage mark on the screen with an optional message. it's giving volume meter, it's giving loading bar, it's giving everything π₯
RETURNS
Nothing.
display_start( )
EXAMPLE
$xosd->display_start( );
DESCRIPTION
Opens a pipe command to the osd_cat(1) program for prolonged interactivity. This accepts all of the standard options but has nothing else to offer. (she's the setup girlie, she does the prep and dips.)
The other display_*() methods (detailed below) return zero unless this method has been used and has created the command pipe. so like, no pipe, no party. π«
RETURNS
TRUE (1) for success and FALSE (0) otherwise.
display_text( )
EXAMPLE
$xosd->display_start();
$xosd->display_text( "Some string to display." );
DESCRIPTION
Uses the command pipe created by display_start() and prints the first argument to the screen. This method does not have any options, save the one string scalar. one string, one job, she ate. π
RETURNS
TRUE (1) for success and FALSE (0) otherwise.
display_gauge( )
EXAMPLE
$xosd->display_start();
$xosd->display_gauge( 50, "display an optional text string." );
DESCRIPTION
Uses the command pipe created by display_start() and prints a gauge identical to the regular (stand-alone) gauge() method. There are only two accepted arguments: the desired percentage and an optional text string. that's the whole menu, no secret items π
RETURNS
TRUE (1) for success and FALSE (0) otherwise.
display_stop( )
EXAMPLE
$xosd->display_start();
$xosd->display_text( "about to stop!" );
$xosd->display_stop();
DESCRIPTION
This closes the command pipe opened by the display_start() method. This method takes no arguments and performs only the task for closing an existing command pipe. she's the "okay bye" of the operation, and honestly? necessary. π
RETURNS
TRUE (1) for success and FALSE (0) otherwise.
π SEE ALSO π
PERLDOC
UI::DialogUI::Dialog::Backend
MAN FILES
π BUGS π
Please email the author with any bug reports. Include the name of the module in the subject line. (bestie, put the module name in the subject line, that's the whole ask, don't make it weird π)
π¦ AUTHOR π¦
Kevin C. Krinke, <kevin@krinke.ca> β thank you king, we stan π
π COPYRIGHT AND LICENSE π
Copyright (C) 2004-2016 Kevin C. Krinke <kevin@krinke.ca>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
no warranty bestie!! she is distributed in the hope that she will be useful, and that's the whole mood πΈ
and that's a wrap, gorgeous. this page rode in on perl v5.28.0, dated 2018-10-27, and lives under User Contributed Perl Documentation. go display something pretty on your screen, you've earned it πβ¨
π¦ where this page comes from
- ubuntu jammy: libui-dialog-perl 1.21-0.1 Β· LGPL-2.1-or-later
- ubuntu noble: libui-dialog-perl 1.21-0.1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms