Prima::Utils(3)

NAME
Prima::Utils - miscellanneous routines

DESCRIPTION
The module contains several routines, implemented in C. These routines can be accessed via "Prima::Utils::" prefix.

API
Invokes the system-depended sound and/or visual bell, corresponding to one of following constants:

  mb::Error
  mb::Warning
  mb::Information
  mb::Question
Returns 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::Motif
The meaning of the return value is somewhat vague, and might be deprecated in future releases. Returns one of "apc::XXX" constants, reflecting the platfrom. Currently, the list of the supported platforms is:

   apc::Os2
   apc::Win32
   apc::Unix
Obsolete function.

Returns stdlib's ceil() of DOUBLE Obsolete function.

Returns stdlib's floor() of DOUBLE Reads 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"  - whiteout
This function was implemented for faster directory reading, to avoid successive call of "stat" for every file. 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 ). Returns 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::Memory
Issues a tone of FREQUENCY in Hz with DURATION in milliseconds. Returns the login name of the user. Sometimes is preferred to the perl-provided "getlogin" ( see the getlogin entry in the perlfunc manpage ) . Accepts COLOR string on one of the three formats:

  #rgb
  #rrggbb
  #rrrgggbbb
and returns 24-bit RGB integer value.

AUTHOR
Dmitry Karasik, <dmitry@karasik.eu.org>.

SEE ALSO
the Prima manpage