diff options
author | Emre Ucan <eucan@de.adit-jv.com> | 2015-04-08 13:34:21 +0200 |
---|---|---|
committer | Nobuhiko Tanibata <nobuhiko_tanibata@xddp.denso.co.jp> | 2015-05-13 16:06:25 +0900 |
commit | 6eca92a12aebf41ed2f43a3293c60de00b0d9851 (patch) | |
tree | 1f19abb013e4743d26dfeff5de575fc3e3b1d8d2 /protocol | |
parent | 7f37251f6adafed2691e852a88dbe1970d633b48 (diff) | |
download | wayland-ivi-extension-6eca92a12aebf41ed2f43a3293c60de00b0d9851.tar.gz |
protocol: add ivi-input protocol
Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Diffstat (limited to 'protocol')
-rw-r--r-- | protocol/CMakeLists.txt | 54 | ||||
-rw-r--r-- | protocol/ivi-input.xml | 99 |
2 files changed, 153 insertions, 0 deletions
diff --git a/protocol/CMakeLists.txt b/protocol/CMakeLists.txt index 71bf552..796fa6e 100644 --- a/protocol/CMakeLists.txt +++ b/protocol/CMakeLists.txt @@ -75,6 +75,30 @@ add_custom_command( DEPENDS ${CMAKE_SOURCE_DIR}/protocol/ivi-controller.xml ) +add_custom_command( + OUTPUT ivi-input-client-protocol.h + COMMAND ${WAYLAND_SCANNER_EXECUTABLE} client-header + < ${CMAKE_SOURCE_DIR}/protocol/ivi-input.xml + > ${CMAKE_CURRENT_BINARY_DIR}/ivi-input-client-protocol.h + DEPENDS ${CMAKE_SOURCE_DIR}/protocol/ivi-input.xml +) + +add_custom_command( + OUTPUT ivi-input-server-protocol.h + COMMAND ${WAYLAND_SCANNER_EXECUTABLE} server-header + < ${CMAKE_SOURCE_DIR}/protocol/ivi-input.xml + > ${CMAKE_CURRENT_BINARY_DIR}/ivi-input-server-protocol.h + DEPENDS ${CMAKE_SOURCE_DIR}/protocol/ivi-input.xml +) + +add_custom_command( + OUTPUT ivi-input-protocol.c + COMMAND ${WAYLAND_SCANNER_EXECUTABLE} code + < ${CMAKE_SOURCE_DIR}/protocol/ivi-input.xml + > ${CMAKE_CURRENT_BINARY_DIR}/ivi-input-protocol.c + DEPENDS ${CMAKE_SOURCE_DIR}/protocol/ivi-input.xml +) + include_directories( ${CMAKE_CURRENT_BINARY_DIR} ${WAYLAND_CLIENT_INCLUDE_DIRS} @@ -93,6 +117,9 @@ add_library(${PROJECT_NAME} STATIC ${CMAKE_CURRENT_BINARY_DIR}/ivi-controller-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/ivi-controller-server-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/ivi-controller-protocol.c + ${CMAKE_CURRENT_BINARY_DIR}/ivi-input-client-protocol.h + ${CMAKE_CURRENT_BINARY_DIR}/ivi-input-server-protocol.h + ${CMAKE_CURRENT_BINARY_DIR}/ivi-input-protocol.c ) @@ -152,3 +179,30 @@ add_custom_target(ivi-controller-doc COMMENT "Generating ivi-controller-api-${IVI_EXTENSION_VERSION}.pdf" ) +#============================================================================================= +# generate documentation ivi-input API +#============================================================================================= +SET(IVI_CTL_INP_XML ${CMAKE_CURRENT_SOURCE_DIR}/ivi-input.xml) +SET(IVI_CTL_INP_CLIENT_H ${CMAKE_CURRENT_BINARY_DIR}/ivi-input-client.h) +SET(IVI_CTL_INP_SERVER_H ${CMAKE_CURRENT_BINARY_DIR}/ivi-input-server.h) + +add_custom_target(ivi-input-doc + COMMAND wayland-scanner client-header < ${IVI_CTL_INP_XML} > ${IVI_CTL_INP_CLIENT_H} + COMMAND wayland-scanner server-header < ${IVI_CTL_INP_XML} > ${IVI_CTL_INP_SERVER_H} + + COMMAND cat ${CMAKE_SOURCE_DIR}/doc/Doxyfile.template + | sed 's!___DOC_NAME___!IVI Controller API!' + | sed 's!___DOC_VERSION___!${IVI_EXTENSION_VERSION}!' + | sed 's!___INPUT_FILE___!${IVI_CTL_INP_CLIENT_H} ${IVI_CTL_INP_SERVER_H}!' + | sed 's!___OUTPUT_DIR___!ivi-input-tmp!' + | doxygen - + + COMMAND make --silent -C ivi-input-tmp/latex + + COMMAND cp ivi-input-tmp/latex/refman.pdf + ${CMAKE_BINARY_DIR}/ivi-input-api-${IVI_EXTENSION_VERSION}.pdf + + DEPENDS ${IVI_CTL_INP_XML} + + COMMENT "Generating ivi-input-api-${IVI_EXTENSION_VERSION}.pdf" +) diff --git a/protocol/ivi-input.xml b/protocol/ivi-input.xml new file mode 100644 index 0000000..f8ca77e --- /dev/null +++ b/protocol/ivi-input.xml @@ -0,0 +1,99 @@ +<?xml version="1.0" encoding="UTF-8"?> +<protocol name="ivi_input"> + <copyright> + Copyright (c) 2015 Codethink Ltd + + 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 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. + </copyright> + <interface name="ivi_input" version="1"> + <description summary="controller interface to the input system"> + This includes handling the existence of seats, seat capabilities, + seat acceptance and input focus. + </description> + <event name="seat_created"> + <description summary="A new seat has appeared"> + </description> + <arg name="name" type="string"/> + <arg name="capabilities" type="uint"/> + </event> + <event name="seat_capabilities"> + <description summary="A seat's capabilities have changed"> + </description> + <arg name="name" type="string"/> + <arg name="capabilities" type="uint"/> + </event> + <event name="seat_destroyed"> + <description summary="A seat is no longer available"> + </description> + <arg name="name" type="string"/> + </event> + <request name="set_input_focus"> + <description summary="set input focus for a given surface ID"> + Set input focus state of surface in ivi compositor. If the surface has input + focus, all non-graphical inputs (e.g. keyboard) are directed to the application + providing the content for this surface. + Multiple surfaces can have input focus at a time. + If argument enabled is ILM_TRUE, input focus for this surface is enabled. + If argument enabled is not ILM_TRUE, the input focus from this surface is removed. + </description> + + <arg name="surface" type="uint"/> + <arg name="device" type="uint"/> + <arg name="enabled" type="int"/> + </request> + + <event name="input_focus"> + <description summary="input focus of surface in ivi compositor has changed"> + The new input focus state is provided in argument enabled: + If enabled is ILM_TRUE, this surface now has input focus enabled. + If enabled is not ILM_TRUE, this surface no longer has input focus. + </description> + <arg name="surface" type="uint"/> + <arg name="device" type="uint"/> + <arg name="enabled" type="int"/> + </event> + + <request name="set_input_acceptance"> + <description summary="set a surface's input acceptance for a seat"> + Set input acceptance of one seat for a surface. Surfaces may + accept input acceptance from multiple seats at once. + If argument 'accepted' is ILM_TRUE, the given seat's name will + be added to the list of accepted seats. + If argument 'accepted' is not ILM_TRUE, the given seat's name + will be removed from the list of accepted seats. + </description> + <arg name="surface" type="uint"/> + <arg name="seat" type="string"/> + <arg name="accepted" type="int"/> + </request> + + <event name="input_acceptance"> + <description summary="input acceptance has changed"> + A surface has changed its input acceptance for a specific seat. + If argument 'accepted' is ILM_TRUE, the surface now accepts + the seat. + If argument 'accepted' is not ILM_TRUE, the surface no longer + accepts the seat. + </description> + <arg name="surface" type="uint"/> + <arg name="seat" type="string"/> + <arg name="accepted" type="int"/> + </event> + </interface> +</protocol> |