Your IP : 216.73.216.48


Current Path : /usr/X11R6/share/emacs/24.5/lisp/
Upload File :
Current File : //usr/X11R6/share/emacs/24.5/lisp/notifications.elc

;ELC
;;; Compiled
;;; in Emacs version 24.5.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.

;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(require 'dbus)
#@69 The version of the Desktop Notifications Specification implemented.
(defconst notifications-specification-version "1.2" (#$ . 426))
#@27 Default application name.
(defconst notifications-application-name "Emacs" (#$ . 564))
#@27 Default application icon.
(defconst notifications-application-icon (expand-file-name "images/icons/hicolor/scalable/apps/emacs.svg" data-directory) (#$ . 657))
#@35 D-Bus notifications service name.
(defconst notifications-service "org.freedesktop.Notifications" (#$ . 823))
#@35 D-Bus notifications service path.
(defconst notifications-path "/org/freedesktop/Notifications" (#$ . 939))
#@40 D-Bus notifications service interface.
(defconst notifications-interface "org.freedesktop.Notifications" (#$ . 1053))
#@36 D-Bus notifications notify method.
(defconst notifications-notify-method "Notify" (#$ . 1177))
#@48 D-Bus notifications close notification method.
(defconst notifications-close-notification-method "CloseNotification" (#$ . 1278))
#@46 D-Bus notifications get capabilities method.
(defconst notifications-get-capabilities-method "GetCapabilities" (#$ . 1414))
#@52 D-Bus notifications get server information method.
(defconst notifications-get-server-information-method "GetServerInformation" (#$ . 1544))
#@36 D-Bus notifications action signal.
(defconst notifications-action-signal "ActionInvoked" (#$ . 1691))
#@36 D-Bus notifications closed signal.
(defconst notifications-closed-signal "NotificationClosed" (#$ . 1799))
#@53 List of reasons why a notification has been closed.
(defconst notifications-closed-reason '((1 expired) (2 dismissed) (3 close-notification) (4 undefined)) (#$ . 1912))
#@61 Mapping between notification and action callback functions.
(defvar notifications-on-action-map nil (#$ . 2087))
#@41 Object for registered on-action signal.
(defvar notifications-on-action-object nil (#$ . 2206))
#@60 Mapping between notification and close callback functions.
(defvar notifications-on-close-map nil (#$ . 2308))
#@40 Object for registered on-close signal.
(defvar notifications-on-close-object nil (#$ . 2425))
#@76 Dispatch signals to callback functions from `notifications-on-action-map'.
(defalias 'notifications-on-action-signal #[(id action) "\306!\307!\310	\nE\f\"\211\2057
\211A@\262\f\"\210\311
\f\"\211?\2057
\2057\312
!\210\313\211
+\207" [last-input-event bus unique-name id notifications-on-action-map entry dbus-event-bus-name dbus-event-service-name assoc remove dbus-unregister-object nil action notifications-on-action-object] 5 (#$ . 2525)])
#@76 Dispatch signals to callback functions from `notifications-on-closed-map'.
(defalias 'notifications-on-closed-signal #[(id &optional reason) "\306!\307!\310	\nE\f\"
\206\311

\205H
\211A@\262\310
\"\211A@\262\"\210\312
\f\"\211?\205H\205H\313!\210\314\211,\207" [last-input-event bus unique-name id notifications-on-close-map entry dbus-event-bus-name dbus-event-service-name assoc 4 remove dbus-unregister-object nil reason notifications-closed-reason notifications-on-close-object] 5 (#$ . 2990)])
#@4399 Send notification via D-Bus using the Freedesktop notification protocol.
Various PARAMS can be set:

 :bus            The D-Bus bus, if different from `:session'.
 :title          The notification title.
 :body           The notification body text.
 :app-name       The name of the application sending the notification.
                 Default to `notifications-application-name'.
 :replaces-id    The notification ID that this notification replaces.
 :app-icon       The notification icon.
                 Default is `notifications-application-icon'.
                 Set to nil if you do not want any icon displayed.
 :actions        A list of actions in the form:
                   (KEY TITLE KEY TITLE ...)
                 where KEY and TITLE are both strings.
                 The default action (usually invoked by clicking the
                 notification) should have a key named "default".
                 The title can be anything, though implementations are free
                 not to display it.
 :timeout        The timeout time in milliseconds since the display
                 of the notification at which the notification should
                 automatically close.
                 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, the notification never expires.
                 Default value is -1.
 :urgency        The urgency level.
                 Either `low', `normal' or `critical'.
 :action-items   Whether the TITLE of the actions is interpreted as
                 a named icon.
 :category       The type of notification this is.
 :desktop-entry  This specifies the name of the desktop filename representing
                 the calling program.
 :image-data     This is a raw data image format which describes the width,
                 height, rowstride, has alpha, bits per sample, channels and
                 image data respectively.
 :image-path     This is represented either as a URI (file:// is the
                 only URI schema supported right now) or a name
                 in a freedesktop.org-compliant icon theme.
 :sound-file     The path to a sound file to play when the notification pops up.
 :sound-name     A themable named sound from the freedesktop.org sound naming
                 specification to play when the notification pops up.
                 Similar to icon-name,only for sounds. An example would
                 be "message-new-instant".
 :suppress-sound Causes the server to suppress playing any sounds, if it has
                 that ability.
 :resident       When set the server will not automatically remove the
                 notification when an action has been invoked.
 :transient      When set the server will treat the notification as transient
                 and by-pass the server's persistence capability, if it
                 should exist.
 :x              Specifies the X location on the screen that the notification
                 should point to.  The "y" hint must also be specified.
 :y              Specifies the Y location on the screen that the notification
                 should point to.  The "x" hint must also be specified.
 :on-action      Function to call when an action is invoked.
                 The notification id and the key of the action are passed
                 as arguments to the function.
 :on-close       Function to call when the notification has been closed
                 by timeout or by the user.
                 The function receive the notification id and the closing
                 reason as arguments:
                   - `expired' if the notification has expired
                   - `dismissed' if the notification was dismissed by the user
                   - `close-notification' if the notification was closed
                     by a call to CloseNotification
                   - `undefined' if the notification server hasn't provided
                     a reason

Which parameters are accepted by the notification server can be
checked via `notifications-get-capabilities'.

This function returns a notification id, an integer, which can be
used to manipulate the notification item with
`notifications-close-notification' or the `:replaces-id' argument
of another `notifications-notify' call.
(defalias 'notifications-notify #[(&rest params) "\300\301\302\217\207" [#1=#:err (byte-code "\306\307\"\206\310\306\311\"\306\312\"\306\313\"\306\314\"\306\315\"\306\316\"\306\317\"\320\306\321\"\306\322\"\306\323\"\306\324\"\306\325\"\306\326\"\306\327\"\306\330\"\306\331\"\306\332\"\306\333\"\306\334\"\306\335\"\320@ABCDEFGHIJKLMNOPQH\203\276\336\337\340\341H\342=\203\227\343\202\243H\344=\203\242\345\202\243\346EE\211RI\235\203\264I\210\202\275\347IRC\"I)G\203\344\336\350\340\351GEE\211SI\235\203\332I\210\202\343\347ISC\"I)F\203\n\336\352\340\351FEE\211TI\235\203I\210\202	\347ITC\"I)E\2030\336\353\340\354EEE\211UI\235\203&I\210\202/\347IUC\"I)D\203V\336\355\340\351DEE\211VI\235\203LI\210\202U\347IVC\"I)C\203|\336\356\340\357CEE\211WI\235\203rI\210\202{\347IWC\"I)B\203\242\336\360\340\351BEE\211XI\235\203\230I\210\202\241\347IXC\"I)A\203\310\336\361\340\351AEE\211YI\235\203\276I\210\202\307\347IYC\"I)@\203\356\336\362\340\357@EE\211ZI\235\203\344I\210\202\355\347IZC\"I)
\203\336\363\340\357
EE\211[I\235\203I\210\202\347I[C\"I)\f\2036\336\364\340\357\fEE\211\\I\235\203,I\210\2025\347I\\C\"I)\203Z\336\365\340\366EE\211]I\235\203PI\210\202Y\347I]C\"I)\n\203~\336\367\340\366\nEE\211^I\235\203tI\210\202}\347I^C\"I)\370Q_`ab\351N\206\221c\371M\206\230\343\351L\203\245\372L!\202\262\373\315\"\203\260\374\202\262d\351P\206\271\374\351O\206\300\374\375KBI\206\312\376\366J\206\321\377&\306\201p\"\306\201q\"\201rQ_\"ef\211g\203*Qe	EgD\211hi\235\203\ni\210\202hiBi)j\204*\201sQ\320`ak\201t&jf\203gQe	EfD\211lm\235\203Gm\210\202NlmBm)n\204g\201sQ\320`ao\201u&n+	.\207" [params id y x transient resident plist-get :bus :session :title :body :app-name :replaces-id :app-icon :actions :timeout nil :urgency :category :desktop-entry :image-data :image-path :action-items :sound-file :sound-name :suppress-sound :resident :transient :x :y :dict-entry "urgency" :variant :byte low 0 critical 2 1 append "category" :string "desktop-entry" "image-data" :struct "image-path" "action-items" :boolean "sound-file" "sound-name" "suppress-sound" "resident" "transient" "x" :int32 "y" dbus-call-method :uint32 expand-file-name plist-member "" :array (:array :signature "{sv}") -1 suppress-sound sound-name sound-file action-items image-path image-data desktop-entry category urgency hints timeout actions app-icon replaces-id app-name body title bus #2=#:x #3=#:x #4=#:x #5=#:x #6=#:x #7=#:x #8=#:x #9=#:x #10=#:x #11=#:x #12=#:x #13=#:x #14=#:x notifications-service notifications-path notifications-interface notifications-notify-method notifications-application-name notifications-application-icon unique-name on-close on-action #15=#:x notifications-on-action-map notifications-on-action-object notifications-action-signal #16=#:x notifications-on-close-map notifications-on-close-object notifications-closed-signal :on-action :on-close dbus-get-name-owner dbus-register-signal notifications-on-action-signal notifications-on-closed-signal] 25) (((debug error) (message "Error: %S" #1#) nil))] 3 (#$ . 3524)])
#@118 Close a notification with identifier ID.
BUS can be a string denoting a D-Bus connection, the default is `:session'.
(defalias 'notifications-close-notification #[(id &optional bus) "\306\206\307	\n\f\310
&\207" [bus notifications-service notifications-path notifications-interface notifications-close-notification-method id dbus-call-method :session :uint32] 8 (#$ . 11221)])
#@1122 Return the capabilities of the notification server, a list of symbols.
BUS can be a string denoting a D-Bus connection, the default is `:session'.
The following capabilities can be expected:

  :actions         The server will provide the specified actions
                   to the user.
  :action-icons    Supports using icons instead of text for
                   displaying actions.
  :body            Supports body text.
  :body-hyperlinks The server supports hyperlinks in the notifications.
  :body-images     The server supports images in the notifications.
  :body-markup     Supports markup in the body text.
  :icon-multi      The server will render an animation of all the
                   frames in a given image array.
  :icon-static     Supports display of exactly 1 frame of any
                   given image array.  This value is mutually exclusive
                   with `:icon-multi'.
  :persistence     The server supports persistence of notifications.
  :sound           The server supports sounds on notifications.

Further vendor-specific caps start with `:x-vendor', like `:x-gnome-foo-cap'.
(defalias 'notifications-get-capabilities #[(&optional bus) "\300\301\302\217\207" [err (byte-code "\305\306\307\206\310	\n\f%\"\207" [bus notifications-service notifications-path notifications-interface notifications-get-capabilities-method mapcar #[(x) "\301\302P!\207" [x intern ":"] 3] dbus-call-method :session] 8) ((dbus-error (byte-code "\205\n\302	@	A\"\207" [dbus-debug err signal] 3)))] 3 (#$ . 11611)])
#@611 Return information on the notification server, a list of strings.
BUS can be a string denoting a D-Bus connection, the default is `:session'.
The returned list is (NAME VENDOR VERSION SPEC-VERSION).

  NAME         The product name of the server.
  VENDOR       The vendor name.  For example, "KDE", "GNOME".
  VERSION      The server's version number.
  SPEC-VERSION The specification version the server is compliant with.

If SPEC_VERSION is missing, the server supports a specification
prior to "1.0".

See `notifications-specification-version' for the specification
version this library is compliant with.
(defalias 'notifications-get-server-information #[(&optional bus) "\300\301\302\217\207" [err (byte-code "\305\206\306	\n\f%\207" [bus notifications-service notifications-path notifications-interface notifications-get-server-information-method dbus-call-method :session] 6) ((dbus-error (byte-code "\205\n\302	@	A\"\207" [dbus-debug err signal] 3)))] 3 (#$ . 13160)])
(provide 'notifications)