f22cdd13d9288f82f686d42049862c38b71ce5d6
[platform/hal/api/device.git] / include / backend / hal-device-input-interface.h
1 /*
2  * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 #ifndef __HAL_DEVICE_INPUT_INTERFACE_H__
18 #define __HAL_DEVICE_INPUT_INTERFACE_H__
19
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23
24 typedef enum {
25         HAL_DEVICE_INPUT_TYPE_UNKNOWN = 0, /**< Input device type which is not defined. */
26         HAL_DEVICE_INPUT_TYPE_ALL, /**< Input device type which is all kinds of input devices */
27         HAL_DEVICE_INPUT_TYPE_MOUSE, /**< Input device type which is mouse-type */
28         HAL_DEVICE_INPUT_TYPE_KEYBOARD, /**< Input device type which is keyboard-type */
29
30         HAL_DEVICE_INPUT_TYPE_CUSTOM_KNOB = 1000, /**< Input device type which is customed knob-type */
31 } hal_device_input_type;
32
33 typedef struct _hal_backend_device_input_funcs {
34         /* Control input device event */
35         int (*set_event_state)(int input_device_id, int on);
36         int (*get_event_state)(int input_device_id, int* on);
37 } hal_backend_device_input_funcs;
38
39 #ifdef __cplusplus
40 }
41 #endif
42 #endif /* __HAL_DEVICE_INPUT_INTERFACE_H__ */