Server IP : 111.118.215.189 / Your IP : 18.118.164.125 Web Server : Apache System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : a1673wkz ( 2475) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /usr/share/emacs/24.3/lisp/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
;ELC ;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:06:26 2024 ;;; from file /builddir/build/BUILD/emacs-24.3/lisp/notifications.el ;;; in Emacs version 24.3.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" (#$ . 572)) #@27 Default application name. (defconst notifications-application-name "Emacs" (#$ . 710)) #@27 Default application icon. (defconst notifications-application-icon (expand-file-name "images/icons/hicolor/scalable/apps/emacs.svg" data-directory) (#$ . 803)) #@35 D-Bus notifications service name. (defconst notifications-service "org.freedesktop.Notifications" (#$ . 969)) #@35 D-Bus notifications service path. (defconst notifications-path "/org/freedesktop/Notifications" (#$ . 1085)) #@40 D-Bus notifications service interface. (defconst notifications-interface "org.freedesktop.Notifications" (#$ . 1200)) #@36 D-Bus notifications notify method. (defconst notifications-notify-method "Notify" (#$ . 1324)) #@48 D-Bus notifications close notification method. (defconst notifications-close-notification-method "CloseNotification" (#$ . 1425)) #@46 D-Bus notifications get capabilities method. (defconst notifications-get-capabilities-method "GetCapabilities" (#$ . 1561)) #@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\2058 \211\fA@) \"\210\311 \f\"\211?\2058 \2058 \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 x 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 \205J \211A@)\310 \"\211A@)\"\210\312 \f\"\211?\205J \205J \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 x notifications-closed-reason notifications-on-close-object] 6 (#$ . 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) "\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@ABCDEFGHIJKLMNOPH\203\252 \336\337\340\341\342\343H\344=\203\231 \345\202\245 H\346=\203\244 \347\202\245 \350EE\351#\210G\203\274 \336\337\340\352\342\353GEE\351#\210F\203\316 \336\337\340\354\342\353FEE\351#\210E\203\340 \336\337\340\355\342\356EEE\351#\210D\203\362 \336\337\340\357\342\353DEE\351#\210C\203\336\337\340\360\342\361CEE\351#\210B\203\336\337\340\362\342\353BEE\351#\210A\203(\336\337\340\363\342\353AEE\351#\210@\203:\336\337\340\364\342\361@EE\351#\210 \203J\336\337\340\365\342\361 EE\351#\210\f\203Z\336\337\340\366\342\361\fEE\351#\210\203j\336\337\340\367\342\370EE\351#\210\n\203z\336\337\340\371\342\370\nEE\351#\210\372PQRST\353M\206\215U\373L\206\224\345\353K\203\241\374K!\202\256\375\315\"\203\254\376\202\256V\353O\206\265\376\353N\206\274\376\377JB\206\310\201^ \370I\206\321\201_ &\306\201` \"\306\201a \"\201b PQ\"WX\211Y\203\336\201c PW EYD\"\210Z\204\201d P\320RS[\201e &ZX\203E\336\201f PW EXD\"\210\\\204E\201d P\320RS]\201g &\\+ .\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 add-to-list hints :dict-entry "urgency" :variant :byte low 0 critical 2 1 t "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 suppress-sound sound-name sound-file action-items image-path image-data desktop-entry category urgency timeout actions app-icon replaces-id app-name body title bus notifications-service notifications-path notifications-interface notifications-notify-method notifications-application-name notifications-application-icon unique-name on-close on-action notifications-on-action-object notifications-action-signal notifications-on-close-object notifications-closed-signal (:array :signature "{sv}") -1 :on-action :on-close dbus-get-name-owner notifications-on-action-map dbus-register-signal notifications-on-action-signal notifications-on-close-map notifications-on-closed-signal] 25 (#$ . 3522)]) #@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 :int32] 8 (#$ . 10595)]) #@1122 Return the capabilities of the notification server, a list of strings. 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 (#$ . 10984)]) (provide 'notifications)