e38ac9e1a5f202894f6e4ce76fed534308427954
[profile/ivi/ico-uxf-homescreen.git] / include / ico_syc_inputctl.h
1 /*
2  * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
3  *
4  * This program is licensed under the terms and conditions of the
5  * Apache License, version 2.0.  The full text of the Apache License is at
6  * http://www.apache.org/licenses/LICENSE-2.0
7  *
8  */
9 /**
10  * @brief   header file of Input Control API
11  *          for privilege applications
12  *
13  * @date    Feb-21-2014
14  */
15
16 #ifndef _ICO_SYC_INPUTCTL_H_
17 #define _ICO_SYC_INPUTCTL_H_
18
19 #include <ico-uxf-weston-plugin/ico_input_mgr-client-protocol.h>
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25 /*============================================================================*/
26 /* enum                                                                       */
27 /*============================================================================*/
28 /*
29  * type of input event's allocation
30  * @ICO_SYC_INPUT_ALLOC_FIX: fixed allocation
31  * @ICO_SYC_INPUT_ALLOC_VARIABLE: variable allocation
32  */
33 typedef enum _input_alloc {
34     ICO_SYC_INPUT_ALLOC_FIX         = 1,
35     ICO_SYC_INPUT_ALLOC_VARIABLE    = 0
36 } ico_syc_input_alloc_e;
37
38 /*
39  * type of input event
40  * @ICO_SYC_INPUT_TYPE_POINTER: mouse event
41  * @ICO_SYC_INPUT_TYPE_KEYBOARD: keyboard event
42  * @ICO_SYC_INPUT_TYPE_TOUCH: touch panel event
43  * @ICO_SYC_INPUT_TYPE_SWITCH: switch event
44  */
45 typedef enum _input_type {
46     ICO_SYC_INPUT_TYPE_POINTER  = ICO_INPUT_MGR_DEVICE_TYPE_POINTER,
47     ICO_SYC_INPUT_TYPE_KEYBOARD = ICO_INPUT_MGR_DEVICE_TYPE_KEYBOARD,
48     ICO_SYC_INPUT_TYPE_TOUCH    = ICO_INPUT_MGR_DEVICE_TYPE_TOUCH,
49     ICO_SYC_INPUT_TYPE_SWITCH   = ICO_INPUT_MGR_DEVICE_TYPE_SWITCH
50 } ico_syc_input_type_e;
51
52 /*============================================================================*/
53 /* functions                                                                  */
54 /*============================================================================*/
55 /*--------------------------------------------------------------------------*/
56 /**
57  * @brief   ico_syc_add_input
58  *          Add the input event to the application.
59  *
60  * @param[in]   appid                   application id
61  * @param[in]   device                  input device
62  * @param[in]   input                   input number
63  * @param[in]   fix                     fixed allocation or variable allocation
64  * @param[in]   keycode                 keycode
65  *                                      (If set "0", not allocate to keycode)
66  * @return      result
67  * @retval      0                       success
68  * @retval      not 0                   error
69  * @see         ico_syc_input_alloc_e
70  */
71 /*--------------------------------------------------------------------------*/
72 int ico_syc_add_input(const char *appid, const char *device,
73                       int input, int fix, int keycode);
74
75 /*--------------------------------------------------------------------------*/
76 /**
77  * @brief   ico_syc_delete_input
78  *          Delete the input event assigned to the application.
79  *
80  * @param[in]   appid                   application id
81  * @param[in]   device                  input device
82  * @param[in]   input                   input number
83  * @return      result
84  * @retval      0                       success
85  * @retval      not 0                   error
86  */
87 /*--------------------------------------------------------------------------*/
88 int ico_syc_delete_input(const char *appid, const char *device, int input);
89
90 #ifdef __cplusplus
91 }
92 #endif
93 #endif /*_ICO_SYC_INPUTCTL_H_*/
94 /* vim:set expandtab ts=4 sw=4: */