diff options
author | Paul Olav Tvete <paul.tvete@gmail.com> | 2016-09-07 10:15:28 +0200 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@qt.io> | 2016-09-30 13:56:36 +0000 |
commit | 5372ec5c131e23cccfbabc43d700ffbbbad973ec (patch) | |
tree | 270f29ece9b8c58dd0b22faf3006f6260b9bb488 /examples/wayland/custom-extension/protocol | |
parent | f7896fdc6505d8c6f3b3a239884dadab034e1fb5 (diff) |
Make the custom extension example more interesting
Define a protocol that does something visible.
Change-Id: I29133eeffbb2c98a61ee59b241dcf6a6a0f543cb
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Diffstat (limited to 'examples/wayland/custom-extension/protocol')
-rw-r--r-- | examples/wayland/custom-extension/protocol/custom.xml | 75 |
1 files changed, 60 insertions, 15 deletions
diff --git a/examples/wayland/custom-extension/protocol/custom.xml b/examples/wayland/custom-extension/protocol/custom.xml index bda678299..9bbe50d6e 100644 --- a/examples/wayland/custom-extension/protocol/custom.xml +++ b/examples/wayland/custom-extension/protocol/custom.xml @@ -39,24 +39,69 @@ </copyright> <interface name="qt_example_extension" version="1"> - <event name="qtevent"> - <description summary="Qt example event"> - Example event from server to client - </description> - <arg name="surface" type="object" interface="wl_surface"/> - <arg name="time" type="uint"/> - <arg name="text" type="string"/> - <arg name="value" type="uint"/> - </event> + <description summary="example extension for surfaces"> + This example shows how to add extra functionality to the Wayland + through an extension. + </description> + + <request name="register_surface"> + <description summary="Register a surface with the example extension"> + Inform the compositor that the client has a new surface that is + covered by the extension. + </description> + + <arg name="surface" type="object" interface="wl_surface"/> + </request> + + <request name="bounce"> + <description summary="Move the surface around for a little while"> + The compositor should perform a move animation on the surface. + </description> + <arg name="surface" type="object" interface="wl_surface"/> + <arg name="duration" type="uint" summary="duration in ms"/> + </request> + + <request name="spin"> + <description summary="Rotate the surface for a little while"> + The compositor should perform a rotating animation on the surface. + </description> + <arg name="surface" type="object" interface="wl_surface"/> + <arg name="duration" type="uint" summary="duration in ms"/> + </request> + + <event name="close"> + <description summary="close window"> + Ask the client to close the window for the surface. + </description> + <arg name="surface" type="object" interface="wl_surface"/> + </event> - <request name="qtrequest"> - <description summary="Qt example event"> - Example request from client to server + <event name="set_font_size"> + <description summary="change the font size"> + Ask the client to change the font size on the surface. + </description> + <arg name="surface" type="object" interface="wl_surface"/> + <arg name="pixel_size" type="uint"/> + </event> + + <event name="set_window_decoration"> + <description summary="turn window decoration on/off"> + Ask the client to turn window decoration on/off on all surfaces. + </description> + + <enum name="decoration_state"> + <description summary="window decoration state"> + Describes whether window decorations should be shown. </description> + <entry name="hidden" value="0" summary="Decorations are not shown"/> + <entry name="shown" value="1" summary="Decorations are shown"/> + </enum> + + <arg name="state" type="uint"/> + </event> - <arg name="text" type="string"/> - <arg name="value" type="int"/> - </request> </interface> + + </protocol> |