In-vehicle infotainment application

ivi_surface

版本 1
IVI compositor 中 surface 的应用程序接口
destroy
类型: destructor
destroy()
销毁 ivi_surface

这会移除从 ivi_id 到 wl_surface 的链接并销毁 ivi_surface。ID(ivi_id)将被释放,可以再次用于 surface_create。

configure(width: int, height: int)
参数
类型
描述
widthint
heightint
建议调整大小

configure 事件请求客户端调整其 surface 的大小。

该大小是一个提示,客户端可以自由忽略它(如果不调整大小),或选择较小的大小(以满足宽高比或按 NxM 像素的步长调整大小)。

客户端可以自由忽略除最后一个收到的 configure 事件之外的所有事件。

width 和 height 参数指定窗口在 surface 本地坐标中的大小。


创建 IVI 风格的 surface

此接口作为全局单例公开。此接口由提供 IVI 风格用户界面的服务器实现。它允许客户端将 ivi_surface 与 wl_surface 关联。

surface_create(ivi_id: uint, surface: object<wl_surface>, id: new_id<ivi_surface>)
参数
类型
描述
ivi_iduint
surfaceobject<wl_surface>
idnew_id<ivi_surface>
在 IVI compositor 中创建具有数字 ID 的 ivi_surface

此请求赋予 wl_surface 一个 IVI Surface 角色。不允许为一个 wl_surface 创建多个 ivi_surface。请注意,这仍然允许以下示例:

1. 创建 wl_surface 2. 为 wl_surface 创建 ivi_surface 3. 销毁 ivi_surface 4. 为 wl_surface 创建 ivi_surface(使用与之前相同或不同的 ivi_id)

surface_create 将在 IVI compositor 中创建一个具有数字 ID(ivi_id)的 interface:ivi_surface。这些 ivi_id 在系统中被定义为唯一,以在 IVI compositor 中标识它。IVI compositor 实现了如何根据系统状态设置具有 ivi_id 的 surface 属性的业务逻辑。例如,车载导航应用程序的唯一 ID 用于实现有关应用程序应位于何处的特殊逻辑。 服务器将以下情况视为协议错误并断开客户端连接。

  • wl_surface 已经有另一个角色。
  • ivi_id 已分配给另一个 wl_surface。

如果客户端销毁 ivi_surface 或分配给 ivi_surface 的 wl_surface,则分配给 ivi_surface 的 ivi_id 将被释放以供重用。

error { role, ivi_id } 
参数
描述
role0
给定的 wl_surface 有另一个角色
ivi_id1
给定的 ivi_id 已分配给另一个 wl_surface

合成器支持

未发现合成器支持

Copyright (C) 2013 DENSO CORPORATION Copyright (c) 2013 BMW Car IT GmbH

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.

Footer

© 2026 Wayland Explorer

本网站与 Wayland 官方项目无任何关联。网站所有内容均根据 Wayland 协议 XML 文件自动生成。

本网站使用的 Visual Studio Code - Codicons 遵循 CC BY 4.0 许可。