summaryrefslogtreecommitdiff
path: root/ivi-layermanagement-api/ilmInput/include/ilm_input.h
blob: 7c0008e6f8c1f23f10e36fc3bd3e33a6d3e3c19e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/***************************************************************************
*
* Copyright 2015, Codethink Ltd.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*        http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
****************************************************************************/
#ifndef _ILM_INPUT_H_
#define _ILM_INPUT_H_

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

#include "ilm_common.h"

/**
 * \brief      Set the surface's accepted seats to the list specified
 * \ingroup    ilmControl
 * \param[in]  surfaceID   The surface whose list of accepted seats is to be
 *                         changed
 * \param[in]  num_seats   The number of seats stored in seats
 * \param[in]  seats       A pointer to an array of strings listing each seat
 *                         to accept by its seat name
 * \return     ILM_SUCCESS if the method call was successful
 * \return     ILM_FAILED  if the client cannot call the method on the surface
 */
ilmErrorTypes
ilm_setInputAcceptanceOn(t_ilm_surface surfaceID, t_ilm_uint num_seats,
                         t_ilm_string *seats);

/**
 * \brief      Get the surface's list of accepted seats
 * \ingroup    ilmControl
 * \param[in]  surfaceID   The surface that the list of seats comes from
 * \param[out] num_seats   The number of seats returned
 * \param[out] seats       A pointer to the memory where an array of seats is
 *                         stored. It is the caller's responsibility to free
 *                         this memory after use.
 * \return     ILM_SUCCESS if the method call was successful
 * \return     ILM_FAILED  if the client cannot call the method on the surface
 */
ilmErrorTypes
ilm_getInputAcceptanceOn(t_ilm_surface surfaceID, t_ilm_uint *num_seats,
                         t_ilm_string **seats);

/**
 * \brief      Get the list of seats that support the device types specified in
 *             bitmask
 * \ingroup    ilmControl
 * \param[in]  bitmask      The bitmask that indicates what type of devices
 *                          are requested (e.g. ILM_INPUT_DEVICE_POINTER)
 * \param[out] num_seats    The number of seats returned
 * \param[out] seats        A pointer to the memory where an array of seats is
 *                          stored. It is the caller's responsibility to free
 *                          this memory after use.
 * \return     ILM_SUCCESS  if the method call was successful
 * \return     ILM_FAILED   if the method call was unsuccessful
 */
ilmErrorTypes
ilm_getInputDevices(ilmInputDevice bitmask, t_ilm_uint *num_seats,
                    t_ilm_string **seats);
/**
 * \brief      Get the device capabilities of a seat
 * \ingroup    ilmControl
 * \param[in]  seat_name    The name of the seat
 * \param[out] bitmask      A pointer to the bitmask that should be set
 * \return     ILM_SUCCESS  if the method call was successful
 * \return     ILM_FAILED   if the method call was unsuccessful
 */
ilmErrorTypes
ilm_getInputDeviceCapabilities(t_ilm_string seat_name, ilmInputDevice* bitmask);

/**
 * \brief      Set whether the specified surfaces have input focus set for the
 *             given device types
 * \ingroup    ilmControl
 * \param[in]  surfaceIDs   An array of surface IDs whose input focus may be
 *                          changed
 * \param[in]  num_surfaces The number of surfaces in surfaceIDs
 * \param[in]  bitmask      A bitmask of the types of device for which focus
 *                          will be set
 * \param[in]  is_set       ILM_TRUE if focus is to be set, ILM_FALSE if focus
 *                          is to be unset
 * \return     ILM_SUCCESS if the method call was successful
 * \return     ILM_FAILED  if the method call was unsuccessful
 */
ilmErrorTypes
ilm_setInputFocus(t_ilm_surface *surfaceIDs, t_ilm_uint num_surfaces,
                  ilmInputDevice bitmask, t_ilm_bool is_set);

/**
 * \brief      Get all surface IDs and their corresponding focus bitmasks
 * \ingroup    ilmControl
 * \param[out] surfaceIDs  A pointer to the memory where an array of surface
 *                         IDs will be created. The caller is responsible for
 *                         freeing this memory after use.
 * \param[out] bitmasks    A pointer to the memory where an array of bitmasks
 *                         will be created. The caller is responsible for
 *                         freeing this memory after use.
 * \param[out] num_ids     The number of surface IDs that were returned
 * \return     ILM_SUCCESS if the method call was successful
 * \return     ILM_FAILED  if the method call was unsuccessful
 */
ilmErrorTypes
ilm_getInputFocus(t_ilm_surface **surfaceIDs, ilmInputDevice** bitmasks,
                  t_ilm_uint *num_ids);

#ifdef __cplusplus
} /**/
#endif /* __cplusplus */

#endif /* _ILM_INPUT_H_ */