65c7f6de6e88f7264f9f555a80b066fe71666b47
[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 #ifdef __cplusplus
20 extern "C" {
21 #endif
22
23 /*============================================================================*/
24 /* enum                                                                       */
25 /*============================================================================*/
26 /*
27  * type of input event's allocation
28  * @ICO_SYC_INPUT_ALLOC_FIX: fixed allocation
29  * @ICO_SYC_INPUT_ALLOC_VARIABLE: variable allocation
30  */
31 typedef enum _input_alloc {
32     ICO_SYC_INPUT_ALLOC_FIX         = 1,
33     ICO_SYC_INPUT_ALLOC_VARIABLE    = 0
34 } ico_syc_input_alloc_e;
35
36 /*
37  * type of input event
38  * @ICO_SYC_INPUT_TYPE_POINTER: mouse event
39  * @ICO_SYC_INPUT_TYPE_KEYBOARD: keyboard event
40  * @ICO_SYC_INPUT_TYPE_TOUCH: touch panel event
41  * @ICO_SYC_INPUT_TYPE_SWITCH: switch event
42  */
43 typedef enum _input_type {
44     ICO_SYC_INPUT_TYPE_POINTER  = 1,
45     ICO_SYC_INPUT_TYPE_KEYBOARD = 2,
46     ICO_SYC_INPUT_TYPE_TOUCH    = 4,
47     ICO_SYC_INPUT_TYPE_SWITCH   = 8
48 } ico_syc_input_type_e;
49
50 /*============================================================================*/
51 /* functions                                                                  */
52 /*============================================================================*/
53 /*--------------------------------------------------------------------------*/
54 /**
55  * @brief   ico_syc_add_input
56  *          Add the input event to the application.
57  *
58  * @param[in]   appid                   application id
59  * @param[in]   device                  input device
60  * @param[in]   input                   input number
61  * @param[in]   fix                     fixed allocation or variable allocation
62  * @param[in]   keycode                 keycode
63  *                                      (If set "0", not allocate to keycode)
64  * @return      result
65  * @retval      0                       success
66  * @retval      not 0                   error
67  * @see         ico_syc_input_alloc_e
68  */
69 /*--------------------------------------------------------------------------*/
70 int ico_syc_add_input(const char *appid, const char *device,
71                       int input, int fix, int keycode);
72
73 /*--------------------------------------------------------------------------*/
74 /**
75  * @brief   ico_syc_delete_input
76  *          Delete the input event assigned to the application.
77  *
78  * @param[in]   appid                   application id
79  * @param[in]   device                  input device
80  * @param[in]   input                   input number
81  * @return      result
82  * @retval      0                       success
83  * @retval      not 0                   error
84  */
85 /*--------------------------------------------------------------------------*/
86 int ico_syc_delete_input(const char *appid, const char *device, int input);
87
88 #ifdef __cplusplus
89 }
90 #endif
91 #endif /*_ICO_SYC_INPUTCTL_H_*/
92 /* vim:set expandtab ts=4 sw=4: */