Prima
view release on metacpan or search on metacpan
Prima/Application.pm view on Meta::CPAN
=item get_default_font
Returns the default system font. The method can be called with a class string
instead of an object instance.
=item get_default_scrollbar_metrics
Returns dimensions of the system scrollbars - width of the standard vertical
scrollbar and height of the standard horizon scrollbar. The method can be
called with a class string instead of an object instance.
=item get_dnd_clipboard
Returns the predefined special clipboard used as a proxy for drag and drop
interactions.
See also: C<Widget/Drag and drop>, C<Clipboard/is_dnd>.
=item get_default_window_borders BORDER_STYLE = bs::Sizeable
Returns width and height of standard system window border decorations for one
of C<bs::XXX> constants. The method can be called with a class string instead
of an object instance.
=item get_focused_widget
Returns object reference to a currently focused widget, if any, that belongs to
the program. If no such widget exists, C<undef> is returned.
=item get_fullscreen_image
Syntax sugar for grabbing whole screen as in
$::application->get_image( 0, 0, $::application->size)
(MacOSX/XQuartz: get_image() does not grab all screen bits, but
C<get_fullscreen_image> does (given Prima is compiled with Cocoa library)).
=item get_hint_widget
Returns the hint label widget, attached automatically to Prima::Application
object during startup. The widget is of C<::hintClass> class, Prima::HintWidget
by default.
=item get_image X_OFFSET, Y_OFFSET, WIDTH, HEIGHT
Returns Prima::Image object with WIDTH and HEIGHT dimensions filled with
graphic content of the screen, copied from X_OFFSET and Y_OFFSET coordinates.
If WIDTH and HEIGHT extend beyond the screen dimensions, they are adjusted. If
the offsets are outside screen boundaries, or WIDTH and HEIGHT are zero or
negative, C<undef> is returned.
Note: When running on MacOSX under XQuartz, the latter does not give access to
the whole screen, so the function will not be able to grab top-level menu bar.
This problem is addressed in C<get_fullscreen_image>.
=item get_indents
Returns 4 integers that corresponds to extensions of eventual desktop
decorations that the windowing system may present on the left, bottom, right,
and top edges of the screen. For example, for win32 this reports the size of
the part of the scraan that windows taskbar may occupies, if any.
=item get_printer
Returns the printer object, attached automatically to Prima::Application
object. The object is of C<::printerClass> class.
=item get_message_font
Returns the font the system uses to draw the message text. The method can be
called with a class string instead of an object instance.
=item get_modal_window MODALITY_TYPE = mt::Exclusive, TOPMOST = 1
Returns the modal window, that resides on an end of a modality chain.
MODALITY_TYPE selects the chain, and can be either C<mt::Exclusive> or
C<mt::Shared>. TOPMOST is a boolean flag, selecting the lookup direction; if it
is 1, the 'topmost' window is returned, if 0, the 'lowest' one ( in a simple
case when window A is made modal (executed) after modal window B, the A window
is the 'topmost' one ).
If a chain is empty C<undef> is returned. In case when a chain consists of just
one window, TOPMOST value is apparently irrelevant.
=item get_monitor_rects
Returns set of rects in format [X,Y,WIDTH,HEIGHT] identifying monitor
configurations. Currently works under X11 only.
=item get_scroll_rate
Returns two integer values of two system-specific scrolling timeouts. The first
is the initial timeout, that is applied when the user drags the mouse from a
scrollable widget ( a text field, for example ), and the widget is about to
scroll, but the actual scroll is performed after the timeout is expired. The
second is the repetitive timeout, - if the dragging condition did not change,
the scrolling performs automatically after this timeout. The timeout values are
in milliseconds.
=item get_system_info
Returns a hash with information about the system. The hash result contains the
following keys:
=over
=item apc
One of C<apc::XXX> constants, reflecting the platform.
Currently, the list of the supported platforms is:
apc::Win32
apc::Unix
=item gui
One of C<gui::XXX> constants, reflecting the graphic
user interface used in the system:
Prima/Application.pm view on Meta::CPAN
An arbitrary string, reflecting the OS version
information.
=item vendor
The OS vendor string
=item architecture
The machine architecture string
=back
The method can be called with a class string instead of an object instance.
=item get_system_value
Returns the system integer value, associated with one
of C<sv::XXX> constants. The constants are:
sv::YMenu - height of menu bar in top-level windows
sv::YTitleBar - height of title bar in top-level windows
sv::XIcon - width and height of main icon dimensions,
sv::YIcon acceptable by the system
sv::XSmallIcon - width and height of alternate icon dimensions,
sv::YSmallIcon acceptable by the system
sv::XPointer - width and height of mouse pointer icon
sv::YPointer acceptable by the system
sv::XScrollbar - width of the default vertical scrollbar
sv::YScrollbar - height of the default horizontal scrollbar
( see get_default_scrollbar_metrics() )
sv::XCursor - width of the system cursor
( see get_default_cursor_width() )
sv::AutoScrollFirst - the initial and the repetitive
sv::AutoScrollNext scroll timeouts
( see get_scroll_rate() )
sv::InsertMode - the system insert mode
( see insertMode )
sv::XbsNone - widths and heights of the top-level window
sv::YbsNone decorations, correspondingly, with borderStyle
sv::XbsSizeable bs::None, bs::Sizeable, bs::Single, and
sv::YbsSizeable bs::Dialog.
sv::XbsSingle ( see get_default_window_borders() )
sv::YbsSingle
sv::XbsDialog
sv::YbsDialog
sv::MousePresent - 1 if the mouse is present, 0 otherwise
sv::MouseButtons - number of the mouse buttons
sv::WheelPresent - 1 if the mouse wheel is present, 0 otherwise
sv::SubmenuDelay - timeout ( in ms ) before a sub-menu shows on
an implicit selection
sv::FullDrag - 1 if the top-level windows are dragged dynamically,
0 - with marquee mode
sv::DblClickDelay - mouse double-click timeout in milliseconds
sv::ShapeExtension - 1 if Prima::Widget::shape functionality is supported,
0 otherwise
sv::ColorPointer - 1 if system accepts color pointer icons.
sv::CanUTF8_Input - 1 if system can generate key codes in unicode
sv::CanUTF8_Output - 1 if system can output utf8 text
sv::CompositeDisplay - 1 if system uses double-buffering and alpha composition for the desktop,
0 if it doesn't, -1 if unknown
sv::LayeredWidgets - 1 if system supports layering
sv::FixedPointerSize - 0 if system doesn't support arbitrary sized pointers and will resize custom icons to the system size
sv::MenuCheckSize - width and height of default menu check icon
sv::FriBidi - 1 if Prima is compiled with libfribidi and full bidi unicode support is available
sv::Antialias - 1 if system supports antialiasing and alpha layer for primitives
sv::LibThai - 1 if Prima is compiled with libthai
The method can be called with a class string instead of an object instance.
=item get_widget_from_handle HANDLE
HANDLE is an integer value of a toolkit widget. It is usually passed to the
program by other IPC means, so it returns the associated widget. If no widget
is associated with HANDLE, C<undef> is returned.
=item get_widget_from_point X_OFFSET, Y_OFFSET
Returns the widget that occupies screen area under (X_OFFSET,Y_OFFSET)
coordinates. If no toolkit widget are found, C<undef> is returned.
=item go
The main event loop. Called by
run Prima;
standard code. Returns when the program is about to terminate, if C<stop> was called, or if the
exception was signaled. In the latter two cases, the loop can be safely re-started.
=item lock
Effectively blocks the graphic output for all widgets. The output can be
restored with C<unlock()>.
=item load_font FONTNAME
Registers font resource in system-specific format. The resource is freed after
prgram ends.
Notes for win32: To add a font whose information comes from several resource
files, point FONTNAME to a string with the file names separated by a C<|> - for
example, C< abcxxxxx.pfm | abcxxxxx.pfb >.
Notes for unix: available only when Prima is compiled with fontconfig and Xft .
Returns number of font resources added.
=item open_help TOPIC
Opens the help viewer window with TOPIC string in
link POD format ( see L<perlpod> ) - the string is treated
as "manpage/section", where 'manpage' is the file with POD
content and 'section' is the topic inside the manpage.
Alternatively can handle the syntax in form of C< file://path|section >
where C<path> is the file with the pod content and C<section> is an optional pod
section within the file.
=item stop
( run in 2.316 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )