Prima::Utils

Prima::Utils are miscellanneous routines.
Download

Prima::Utils Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Dmitry Karasik
  • Publisher web site:
  • http://search.cpan.org/~karasik/Prima-1.26/pod/Prima/Widget.pod

Prima::Utils Tags


Prima::Utils Description

Prima::Utils are miscellanneous routines. Prima::Utils are miscellanneous routines.The module contains several helper routines, implemented in both C and perl. Whereas the C-coded parts are accessible only if 'use Prima;' statement was issued prior to the 'use Prima::Utils' invocation, the perl-coded are always available. This makes the module valuable when used without the rest of toolkit code.APIalarm $TIMEOUT, $SUB, @PARAMSCalls SUB with PARAMS after TIMEOUT milliseconds.beep Invokes the system-depended sound and/or visual bell, corresponding to one of following constants: mb::Error mb::Warning mb::Information mb::Questionget_guiReturns one of gui::XXX constants, reflecting the graphic user interface used in the system: gui::Default gui::PM gui::Windows gui::XLib gui::OpenLook gui::MotifThe meaning of the return value is somewhat vague, and might be deprecated in future releases.get_osReturns one of apc::XXX constants, reflecting the platfrom. Currently, the list of the supported platforms is: apc::Os2 apc::Win32 apc::Unixceil DOUBLEObsolete function.Returns stdlib's ceil() of DOUBLEfind_image PATHConverts PATH from perl module notation into a file path, and searches for the file in @INC paths set. If a file is found, its full filename is returned; otherwise undef is returned.floor DOUBLEObsolete function.Returns stdlib's floor() of DOUBLEgetdir PATHReads content of PATH directory and returns array of string pairs, where the first item is a file name, and the second is a file type.The file type is a string, one of the following: "fifo" - named pipe "chr" - character special file "dir" - directory "blk" - block special file "reg" - regular file "lnk" - symbolic link "sock" - socket "wht" - whiteoutThis function was implemented for faster directory reading, to avoid successive call of stat for every file.path If called with no parameters, returns path to a directory, usually ~/.prima, that can be used to contain the user settings of a toolkit module or a program. If FILE is specified, appends it to the path and returns the full file name. In the latter case the path is automatically created by File::Path::mkpath unless it already exists.post $SUB, @PARAMSPostpones a call to SUB with PARAMS until the next event loop tick.query_drives_map Returns anonymous array to drive letters, used by the system. FIRST_DRIVE can be set to other value to start enumeration from. Some OSes can probe eventual diskette drives inside the drive enumeration routines, so there is a chance to increase responsiveness of the function it might be reasonable to set FIRST_DRIVE to C: string.If the system supports no drive letters, empty array reference is returned ( unix ).query_drive_type DRIVEReturns one of dt::XXX constants, describing the type of drive, where DRIVE is a 1-character string. If there is no such drive, or the system supports no drive letters ( unix ), dt::None is returned. dt::None dt::Unknown dt::Floppy dt::HDD dt::Network dt::CDROM dt::Memorysound Issues a tone of FREQUENCY in Hz with DURATION in milliseconds.usernameReturns the login name of the user. Sometimes is preferred to the perl-provided getlogin ( see "getlogin" in perlfunc ) .xcolor COLORAccepts COLOR string on one of the three formats: #rgb #rrggbb #rrrgggbbband returns 24-bit RGB integer value. Requirements: · Perl


Prima::Utils Related Software