2 * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __TIZEN_SYSTEM_INPUT_INTERNAL_H__
18 #define __TIZEN_SYSTEM_INPUT_INTERNAL_H__
26 #include "device-error.h"
29 * @brief Enumeration for the distinction of input device types.
34 DEVICE_INPUT_TYPE_UNKNOWN = 0, /**< Input device type which is not defined. */
35 DEVICE_INPUT_TYPE_ALL, /**< Input device type which is all kinds of input devices */
36 DEVICE_INPUT_TYPE_MOUSE, /**< Input device type which is mouse-type */
37 DEVICE_INPUT_TYPE_KEYBOARD, /**< Input device type which is keyboard-type */
39 DEVICE_INPUT_TYPE_CUSTOM_KNOB = 1000, /**< Input device type which is customed knob-type */
40 } device_input_type_e;
43 * @brief Change input device event state by input device id.
45 * @remarks #DEVICE_ERROR_NOT_SUPPORTED is returned, when the trying to control DEVICE_INPUT_TYPE_KEYBOARD device
46 * and following feature is not supported: %http://tizen.org/feature/input.keyboard \n
47 * @param[in] input_device_id The input id of the input device under the sys/class/input node \n
48 * This is for the distinction and control of input devices. \n
49 * @param[in] on The value to be set for the input device event state \n
50 * @return @c 0 on success,
51 * otherwise a negative error value
52 * @retval #DEVICE_ERROR_NONE Successful
53 * @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported in this device
54 * @retval #DEVICE_ERROR_OPERATION_FAILED Operation not permitted
56 int device_input_set_event_state(int input_device_id, bool on);
59 * @brief Get input device event state by input device id.
61 * @remarks #DEVICE_ERROR_NOT_SUPPORTED is returned, when the trying to control DEVICE_INPUT_TYPE_KEYBOARD device
62 * and following feature is not supported: %http://tizen.org/feature/input.keyboard \n
63 * @param[in] input_device_id The input id of the input device under the sys/class/input node \n
64 * This is for the distinction and control of input devices. \n
65 * @param[out] on The value to be get from the input device event state \n
66 * @return @c 0 on success,
67 * otherwise a negative error value
68 * @retval #DEVICE_ERROR_NONE Successful
69 * @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported in this device
70 * @retval #DEVICE_ERROR_OPERATION_FAILED Operation not permitted
72 int device_input_get_event_state(int input_device_id, bool *on);
78 #endif /* __TIZEN_SYSTEM_INPUT_INTERNAL_H__ */