weston/protocol/desktop-shell.xml
Pekka Paalanen 6e16811e5e protocol: add screensaver interface
Add the screensaver interface to the desktop-shell protocol file. Also
add stubs for it in the compositor, and make wscreensaver to bind to the
screensaver interface. Wscreensaver gets a new option --demo to retain
the current behaviour as a regular wayland client.

When a screensaver application starts, it should bind to the screensaver
interface, enumerate all outputs, create a surface per output, and
register those surfaces via screensaver::set_surface request. Then it
continues with the usual animation loop, waiting for frame events. The
compositor will decide, when the given screensaver surfaces are
displayed. A screensaver application should respond to outputs coming
and going away by creating and destroying surfaces.

The compositor is supposed to activate a screensaver by exec'ing it, and
stop the screensaver by killing the client process. Only one client may
be bound to the screensaver interface at a time. If there already is a
client, the compositor could either kill it first, or not exec a new
one.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2011-12-14 11:17:00 +02:00

52 lines
1.8 KiB
XML

<protocol name="desktop">
<interface name="desktop_shell" version="1">
<request name="set_background">
<arg name="output" type="object" interface="wl_output"/>
<arg name="surface" type="object" interface="wl_shell_surface"/>
</request>
<request name="set_panel">
<arg name="output" type="object" interface="wl_output"/>
<arg name="surface" type="object" interface="wl_shell_surface"/>
</request>
<request name="set_lock_surface">
<arg name="surface" type="object" interface="wl_shell_surface"/>
</request>
<request name="unlock"/>
<!-- We'll fold most of wl_shell into this interface and then
they'll share the configure event. -->
<event name="configure">
<arg name="time" type="uint"/>
<arg name="edges" type="uint"/>
<arg name="surface" type="object" interface="wl_shell_surface"/>
<arg name="width" type="int"/>
<arg name="height" type="int"/>
</event>
<!-- Tell the shell we want it to create and set the lock surface,
which is a GUI asking the user to unlock the screen. The lock
surface is announced with 'set_lock_surface'. Whether or not
the shell actually implements locking, it MUST send 'unlock'
request to let the normal desktop resume. -->
<event name="prepare_lock_surface"/>
</interface>
<!-- Only one client can bind this interface at a time. -->
<interface name="screensaver" version="1">
<!-- Set the surface type as a screensaver for a particular output.
A screensaver surface is normally hidden, and only visible after
an idle timeout. -->
<request name="set_surface">
<arg name="surface" type="object" interface="wl_shell_surface"/>
<arg name="output" type="object" interface="wl_output"/>
</request>
</interface>
</protocol>