<p dir="ltr"><br>
On Mar 6, 2014 3:53 AM, "Nobuhiko Tanibata" <<a href="mailto:NOBUHIKO_TANIBATA@xddp.denso.co.jp">NOBUHIKO_TANIBATA@xddp.denso.co.jp</a>> wrote:<br>
><br>
> Add interface ivi_application, which creates ivi_surface objects tied<br>
> to a given wl_surface with a given id. The given id can be used in a<br>
> shell to identify which application is assigned to a wl_surface and<br>
> layout the surface wherever the shell wants. ivi_surface objects can<br>
> be used to receive status of wl_surface in the scenegraph of the<br>
> compositor.</p>
<p dir="ltr">In general, I think this looks pretty good. It's nice and simple and only adds what's needed for clients. I do have a couple comments below.<br>
--Jason Ekstrand</p>
<p dir="ltr">><br>
> Signed-off-by: Nobuhiko Tanibata <<a href="mailto:NOBUHIKO_TANIBATA@xddp.denso.co.jp">NOBUHIKO_TANIBATA@xddp.denso.co.jp</a>><br>
> ---<br>
> protocol/ivi-application.xml | 88 ++++++++++++++++++++++++++++++++++++++++++++<br>
> 1 file changed, 88 insertions(+)<br>
> create mode 100644 protocol/ivi-application.xml<br>
><br>
> diff --git a/protocol/ivi-application.xml b/protocol/ivi-application.xml<br>
> new file mode 100644<br>
> index 0000000..e58ad26<br>
> --- /dev/null<br>
> +++ b/protocol/ivi-application.xml<br>
> @@ -0,0 +1,88 @@<br>
> +<?xml version="1.0" encoding="UTF-8"?><br>
> +<protocol name="ivi_application"><br>
> +<br>
> + <copyright><br>
> + Copyright (C) 2013 DENSO CORPORATION<br>
> + Copyright (c) 2013 BMW Car IT GmbH<br>
> +<br>
> + Permission is hereby granted, free of charge, to any person obtaining a copy<br>
> + of this software and associated documentation files (the "Software"), to deal<br>
> + in the Software without restriction, including without limitation the rights<br>
> + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell<br>
> + copies of the Software, and to permit persons to whom the Software is<br>
> + furnished to do so, subject to the following conditions:<br>
> +<br>
> + The above copyright notice and this permission notice shall be included in<br>
> + all copies or substantial portions of the Software.<br>
> +<br>
> + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR<br>
> + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,<br>
> + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE<br>
> + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER<br>
> + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,<br>
> + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN<br>
> + THE SOFTWARE.<br>
> + </copyright><br>
> +<br>
> + <interface name="ivi_surface" version="1"><br>
> + <description summary="application interface to surface in ivi compositor"/><br>
> +<br>
> + <request name="destroy" type="destructor"><br>
> + <description summary="destroy ivi_surface"/><br>
> + </request><br>
> +<br>
> + <event name="visibility"><br>
> + <description summary="visibility of surface in ivi compositor has changed"><br>
> + The new visibility state is provided in argument visibility.<br>
> + If visibility is 0, the surface has become invisible.<br>
> + If visibility is not 0, the surface has become visible.<br>
> + </description><br>
> + <arg name="visibility" type="int"/><br>
> + </event><br>
> +<br>
> + </interface><br>
> +<br>
> + <interface name="ivi_application" version="1"><br>
> + <description summary="interface for ivi applications to use ivi compositor features"/><br>
> +<br>
> + <request name="surface_create"><br>
> + <description summary="create surface in ivi compositor"><br>
> + surface_create will create a new surface with surface_id in ivi compositor,<br>
> + if it does not yet exists. If the surface with surface_id already exists in<br>
> + ivi compositor, the application content provided in argument surface will<br>
> + be used as surface content. If an other ivi application already registered<br>
> + content for surface with surface_id, an error event will indicate the problem.<br>
> + </description><br>
> + <arg name="id_surface" type="uint"/><br>
> + <arg name="surface" type="object" interface="wl_surface"/><br>
> + <arg name="id" type="new_id" interface="ivi_surface"/><br>
> + </request><br>
> +<br>
> + <enum name="error_code"><br>
> + <description summary="possible error codes returned by ivi compositor"><br>
> + These error codes define all possible error codes returned by ivi compositor<br>
> + on server-side errors.<br>
> + </description><br>
> + <entry name="unknown_error" value="1" summary="unknown error encountered"/></p>
<p dir="ltr">What kinds of things do you use "unknown error" for? I'm not sure how that's useful to the client.</p>
<p dir="ltr">> + <entry name="resource_in_use" value="2" summary="resource is in use and can not be shared"/></p>
<p dir="ltr">What kind of resource does this refer to? It looks like you use it if someone tries to call surface_create twice on the same surface, but you don't specify.</p>
<p dir="ltr">> + </enum><br>
> +<br>
> + <event name="error"><br>
> + <description summary="server-side error detected"><br>
> + The ivi compositor encountered error while processing a request by this<br>
> + application. The error is defined by argument error_code and optional<br>
> + error_text.<br>
> + If the application requires to associate this error event to a request,<br>
> + it can<br>
> + 1. send request<br>
> + 2. force display roundtrip<br>
> + 3. check, if error event was received<br>
> + but this restricts the application to have only one open request at a time.<br>
> + </description><br>
> + <arg name="error_code" type="int"/><br>
> + <arg name="error_text" type="string" allow-null="true"/><br>
> + </event></p>
<p dir="ltr">Why are you using this rather than the built-in wl_display.error? The built-in wl_display.error also terminates the client when an error is sent. Under what error conditions would you want the client to continue?</p>
<p dir="ltr">> +<br>
> + </interface><br>
> +<br>
> +</protocol><br>
> --<br>
> 1.8.3.1<br>
><br>
> _______________________________________________<br>
> wayland-devel mailing list<br>
> <a href="mailto:wayland-devel@lists.freedesktop.org">wayland-devel@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
</p>