blob: 597f59a9eb466ba3b16b2d91357928f5b5bc373f [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="notification_shell_unstable_v1">
<copyright>
Copyright 2018 The Chromium Authors.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<description summary="Create desktop notifications">
notification_shell allows clients to create desktop notification on host.
Warning! The protocol described in this file is experimental and backward
incompatible changes may be made. Backward compatible changes may be added
together with the corresponding interface version bump. Backward
incompatible changes are done by bumping the version number in the protocol
and interface names and resetting the interface version. Once the protocol
is to be declared stable, the 'z' prefix and the version number in the
protocol and interface names are removed and the interface version number is
reset.
</description>
<interface name="zcr_notification_shell_v1" version="1">
<description summary="A notification window">
An interface that is used for creating desktop notification on host.
</description>
<enum name="error">
<entry name="invalid_notification_key" value="1"
summary="invalid notification key"/>
</enum>
<request name="create_notification">
<description summary="create a desktop notification from plain text">
Creates a desktop notification from plain text information.
</description>
<arg name="id" type="new_id" interface="zcr_notification_shell_notification_v1"/>
<arg name="title" type="string" />
<arg name="message" type="string" />
<arg name="display_source" type="string" summary="textual representation of who's shown the notification"/>
<arg name="notification_key" type="string" />
<arg name="buttons" type="array" summary="array of 0-terminated button title names"/>
</request>
<request name="get_notification_surface">
<description summary="create a notification surface from a surface">
Creates a notification_surface for the given surface, gives it the
notification_surface role and associated it with a notification id.
</description>
<arg name="id" type="new_id" interface="zcr_notification_shell_surface_v1"/>
<arg name="surface" type="object" interface="wl_surface"/>
<arg name="notification_key" type="string" />
</request>
</interface>
<interface name="zcr_notification_shell_surface_v1" version="1">
<description summary="A notification window">
An interface that may be implemented by a wl_surface to host
notification contents.
</description>
<request name="destroy" type="destructor">
<description summary="Destroy the notification_surface">
Unmap and destroy the notification surface.
</description>
</request>
<request name="set_app_id">
<description summary="set application ID">
Set an application identifier for the notification surface.
</description>
<arg name="app_id" type="string"/>
</request>
</interface>
<interface name="zcr_notification_shell_notification_v1" version="1">
<description summary="A notification">
An interface that controls the notification created by create_notification.
</description>
<request name="destroy" type="destructor">
<description summary="Destroy the notification">
Destroys the notification object.
</description>
</request>
<request name="close">
<description summary="Close the notification">
Closes the notification. The closed event is sent after this request.
</description>
</request>
<event name="closed">
<description summary="Notification is closed">
Notifies the notification object that the notification is closed.
</description>
<arg name="by_user" type="uint" summary="1 if notification is closed by a user"/>
</event>
<event name="clicked">
<description summary="Notification is clicked">
Notifies the notification object that the notification or its button is clicked.
</description>
<arg name="button_index" type="int" summary="-1 if the body of the notification is cliked as opposed to a button"/>
</event>
</interface>
</protocol>