.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "Desktop::Notify::Notification 3pm" .TH Desktop::Notify::Notification 3pm "2018-10-29" "perl v5.26.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Desktop::Notify::Notification \- a notification object for the desktop notifications framework .SH "VERSION" .IX Header "VERSION" Version 0.03 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 4 \& # $notify is an existing Desktop::Notify object \& my $note = $notify\->create(summary => \*(AqRebuilding FooBar\*(Aq, \& body => \*(AqProgress: 10%\*(Aq); \& $note\->show; \& \& ... \& \& # Update the notification later \& $note\->body(\*(AqProgress: 20%\*(Aq); \& $note\->show; \& \& ... \& # Take it off the screen \& $note\->close; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Desktop notification objects are represented as objects of this class. They are created by a Desktop::Notify object. Displaying, closing, and modifying the notification is done by using methods in this class. .SH "METHODS" .IX Header "METHODS" .ie n .SS "new $notify, %params" .el .SS "new \f(CW$notify\fP, \f(CW%params\fP" .IX Subsection "new $notify, %params" This is called internally by Desktop::Notify to create a new notification object. .SS "show" .IX Subsection "show" Display the notification on the screen. If this notification had previously been shown and not closed yet, it will replace the existing notification. .PP Show can be called multiple times on the same notification, probably with attribute changes between calls, and later show calls will cause the server to seamlessly replace the existing notification. .SS "close" .IX Subsection "close" Close the notification if it is already being displayed. .SH "ATTRIBUTES" .IX Header "ATTRIBUTES" The following parameters can be set when creating the object or later modified using accessors (descriptions are from the specification at ) .IP "summary" 4 .IX Item "summary" The summary text briefly describing the notification. .IP "body" 4 .IX Item "body" The optional detailed body text. Can be empty. .IP "actions" 4 .IX Item "actions" Actions are sent over as a list of pairs. Each even element in the list (starting at index 0) represents the identifier for the action. Each odd element in the list is the localized string that will be displayed to the user. .Sp A user-specified function to be called whenever an action is invoked can be specified with Desktop::Notify's action_callback method. .IP "hints" 4 .IX Item "hints" Optional hints that can be passed to the server from the client program. .IP "timeout" 4 .IX Item "timeout" The timeout time in milliseconds since the display of the notification at which the notification should automatically close. .Sp If \-1, the notification's expiration time is dependent on the notification server's settings, and may vary for the type of notification. If 0, never expire. .PP The following extra parameters are included in the specification but not supported by Desktop::Notify at this time .IP "app_icon" 4 .IX Item "app_icon" The optional program icon of the calling application.