1<?xml version="1.0" encoding="UTF-8"?> 2<protocol name="notification_shell_unstable_v1"> 3 4 <copyright> 5 Copyright 2018 The Chromium Authors. 6 7 Permission is hereby granted, free of charge, to any person obtaining a 8 copy of this software and associated documentation files (the "Software"), 9 to deal in the Software without restriction, including without limitation 10 the rights to use, copy, modify, merge, publish, distribute, sublicense, 11 and/or sell copies of the Software, and to permit persons to whom the 12 Software is furnished to do so, subject to the following conditions: 13 14 The above copyright notice and this permission notice (including the next 15 paragraph) shall be included in all copies or substantial portions of the 16 Software. 17 18 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 21 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 DEALINGS IN THE SOFTWARE. 25 </copyright> 26 27 <description summary="Create desktop notifications"> 28 notification_shell allows clients to create desktop notification on host. 29 30 Warning! The protocol described in this file is experimental and backward 31 incompatible changes may be made. Backward compatible changes may be added 32 together with the corresponding interface version bump. Backward 33 incompatible changes are done by bumping the version number in the protocol 34 and interface names and resetting the interface version. Once the protocol 35 is to be declared stable, the 'z' prefix and the version number in the 36 protocol and interface names are removed and the interface version number is 37 reset. 38 </description> 39 40 <interface name="zcr_notification_shell_v1" version="1"> 41 <description summary="A notification window"> 42 An interface that is used for creating desktop notification on host. 43 </description> 44 45 <enum name="error"> 46 <entry name="invalid_notification_key" value="1" 47 summary="invalid notification key"/> 48 </enum> 49 50 <request name="create_notification"> 51 <description summary="create a desktop notification from plain text"> 52 Creates a desktop notification from plain text information. 53 </description> 54 <arg name="id" type="new_id" interface="zcr_notification_shell_notification_v1"/> 55 <arg name="title" type="string" /> 56 <arg name="message" type="string" /> 57 <arg name="display_source" type="string" summary="textual representation of who's shown the notification"/> 58 <arg name="notification_key" type="string" /> 59 <arg name="buttons" type="array" summary="array of 0-terminated button title names"/> 60 </request> 61 62 <request name="get_notification_surface"> 63 <description summary="create a notification surface from a surface"> 64 Creates a notification_surface for the given surface, gives it the 65 notification_surface role and associated it with a notification id. 66 </description> 67 <arg name="id" type="new_id" interface="zcr_notification_shell_surface_v1"/> 68 <arg name="surface" type="object" interface="wl_surface"/> 69 <arg name="notification_key" type="string" /> 70 </request> 71 </interface> 72 73 <interface name="zcr_notification_shell_surface_v1" version="1"> 74 <description summary="A notification window"> 75 An interface that may be implemented by a wl_surface to host 76 notification contents. 77 </description> 78 79 <request name="destroy" type="destructor"> 80 <description summary="Destroy the notification_surface"> 81 Unmap and destroy the notification surface. 82 </description> 83 </request> 84 85 <request name="set_app_id"> 86 <description summary="set application ID"> 87 Set an application identifier for the notification surface. 88 </description> 89 <arg name="app_id" type="string"/> 90 </request> 91 </interface> 92 93 <interface name="zcr_notification_shell_notification_v1" version="1"> 94 <description summary="A notification"> 95 An interface that controls the notification created by create_notification. 96 </description> 97 98 <request name="destroy" type="destructor"> 99 <description summary="Destroy the notification"> 100 Destroys the notification object. 101 </description> 102 </request> 103 104 <request name="close"> 105 <description summary="Close the notification"> 106 Closes the notification. The closed event is sent after this request. 107 </description> 108 </request> 109 110 <event name="closed"> 111 <description summary="Notification is closed"> 112 Notifies the notification object that the notification is closed. 113 </description> 114 <arg name="by_user" type="uint" summary="1 if notification is closed by a user"/> 115 </event> 116 117 <event name="clicked"> 118 <description summary="Notification is clicked"> 119 Notifies the notification object that the notification or its button is clicked. 120 </description> 121 <arg name="button_index" type="int" summary="-1 if the body of the notification is cliked as opposed to a button"/> 122 </event> 123 </interface> 124</protocol> 125