diff --git a/protocol/phosh-private.xml b/protocol/phosh-private.xml index 79b9b9b0d55952d9fa1b12c349c6b247b5151b0e..4eede1e58be63ed20b7086ba74cf7bfe456713c2 100644 --- a/protocol/phosh-private.xml +++ b/protocol/phosh-private.xml @@ -1,5 +1,5 @@ <protocol name="phosh"> - <interface name="phosh_private" version="1"> + <interface name="phosh_private" version="2"> <description summary="Phone shell extensions"> Private protocol between phosh and the compositor. </description> @@ -9,13 +9,61 @@ summary="an invalid argument was provided in a request"/> </enum> - <!-- only one display for now --> - <request name="rotate_display"> - <description summary="rotate display"> - Rotate the display clockwise 0, 90, 180 or 270 degree. + <!-- only primary output for now --> + <request name="rotate_display" since="1"> + <description summary="rotate output"> + Rotate the output clockwise 0, 90, 180 or 270 degree. </description> <arg name="surface" type="object" interface="wl_surface"/> <arg name="degree" type="uint"/> </request> + + <request name="get_xdg_switcher" since="2"> + <arg name="id" type="new_id" interface="phosh_private_xdg_switcher"/> + </request> + </interface> + + <!-- application switch handling --> + <interface name="phosh_private_xdg_switcher" version="2"> + <description summary="Interface to list and raise xdg surfaces"> + The interface is meant to list xdg surfaces (see the xdg-shell + stable wayland protocol) and to raise these surfaces to the top + of the window stack. + + It's up to the compositor if it only lists surfaces of the + xdg-shell stable protocol or also surfaces using unstable versions of + the xdg-shell protocol. + </description> + <enum name="error"> + <entry name="invalid_argument" value="0" + summary="an invalid argument was provided in a request"/> + </enum> + + <request name="list_xdg_surfaces" since="2"> + <description summary="Get current xdg surfaces"> + Request to list xdg shell toplevels. + </description> + </request> + + <request name="destroy" type="destructor" since="2"> + <description summary="destroy the xdg_switcher interface instance"/> + </request> + + <request name="raise_xdg_surface" since="2"> + <description summary="raise the given xdg surface to the top of the stack"> + </description> + <arg name="app_id" type="string" summary="The app_id of the xdg surface"/> + <arg name="title" type="string" summary="The title of the xdg surface" allow-null="true"/> + </request> + + <event name="xdg_surface" since="2"> + <description summary="report an xdg surface"/> + <arg name="app_id" type="string" summary="the app_id of the xdg surface"/> + <arg name="title" type="string" summary="the title of the xdg surface" allow-null="true"/> + </event> + + <event name="list_xdg_surfaces_done" since="2"> + <description summary="all xdg surfaces were sent"/> + </event> </interface> </protocol> diff --git a/src/phosh-wayland.c b/src/phosh-wayland.c index b3a8baf4e19ecec882c8aefb8b7dd7758bd24b5d..654e1ab20d88695321bdbfdcb4b40dcc0cd48f65 100644 --- a/src/phosh-wayland.c +++ b/src/phosh-wayland.c @@ -59,7 +59,7 @@ registry_handle_global (void *data, registry, name, &phosh_private_interface, - 1); + 2); } else if (!strcmp (interface, zwlr_layer_shell_v1_interface.name)) { priv->layer_shell = wl_registry_bind ( registry,