18eed91d50c808b83e36b801b05a2916272a82dc
[profile/ivi/ico-uxf-homescreen.git] / lib / system-controller / CicoSCWlInputMgrIF.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 tWlExt of the Apache License is at
6  * http://www.apache.org/licenses/LICENSE-2.0
7  *
8  */
9
10 //==========================================================================
11 /**
12  *  @file   CicoSCWlInputMgrIF.cpp
13  *
14  *  @brief  This file is definition of CicoSCInputDevConf class
15  */
16 //==========================================================================
17 #ifndef __CICO_SC_WL_INPUT_MGR_IF_H__
18 #define __CICO_SC_WL_INPUT_MGR_IF_H__
19
20 #include <string>
21 #include "CicoSCWaylandIF.h"
22
23 //--------------------------------------------------------------------------
24 /**
25  *  @brief  This class is wayland interface of multi input manager
26  */
27 //--------------------------------------------------------------------------
28 class CicoSCWlInputMgrIF : public CicoSCWaylandIF
29 {
30 public:
31     // initialize interface
32     void initInterface(void               *data,
33                        struct wl_registry *registry,
34                        uint32_t           name,
35                        const char         *interface,
36                        uint32_t           version);
37
38     // capabilities callback function
39     void capabilitiesCB(void               *data,
40                         const char         *device,
41                         int32_t            type,
42                         const char         *swname,
43                         int32_t            input,
44                         const char          *codename,
45                         int32_t            code);
46
47     // code callback function
48     void codeCB(void               *data,
49                 const char         *device,
50                 int32_t            input,
51                 const char         *codename,
52                 int32_t            code);
53
54     // input callback function
55     void inputCB(void               *data,
56                  uint32_t           time,
57                  const char         *device,
58                  int32_t            input,
59                  int32_t            code,
60                  int32_t            state);
61
62     // region callback function
63     void regionCB(void                        *data,
64                   struct wl_array             *region);
65
66 protected:
67     // default constructor
68     CicoSCWlInputMgrIF();
69
70     // destructor
71     virtual ~CicoSCWlInputMgrIF();
72
73     // assignment operator
74     CicoSCWlInputMgrIF& operator=(const CicoSCWlInputMgrIF &object);
75
76     // copy constructor
77     CicoSCWlInputMgrIF(const CicoSCWlInputMgrIF &object);
78
79     // wrapper function add_input_app
80     void addInputApp(const std::string &appid,
81                      const std::string &device,
82                      int               input,
83                      int               fix,
84                      int               keycode);
85
86     // wrapper function del_input_app
87     void delInputApp(const std::string &appid,
88                      const std::string &device,
89                      int               input);
90
91     // wrapper function input_region
92     void setInputRegion(const std::string &target,
93                         int x,
94                         int y,
95                         int width,
96                         int height,
97                         int hotspot_x,
98                         int hotspot_y,
99                         int cursor_x,
100                         int cursor_y,
101                         int cursor_width,
102                         int cursor_height,
103                         int attr);
104
105     // wrapper function unset_input_region
106     void unsetInputRegion(const std::string &target,
107                           int x,
108                           int y,
109                           int width,
110                           int height);
111
112 private:
113     // wayland capabilities callback function
114     static void wlCapabilitiesCB(void               *data,
115                                  const char         *device,
116                                  int32_t            type,
117                                  const char         *swname,
118                                  int32_t            input,
119                                  const char         *codename,
120                                  int32_t            code);
121
122     // wayland code callback function
123     static void wlCodeCB(void               *data,
124                          const char         *device,
125                          int32_t            input,
126                          const char         *codename,
127                          int32_t            code);
128
129     // wayland input callback function
130     static void wlInputCB(void               *data,
131                           uint32_t           time,
132                           const char         *device,
133                           int32_t            input,
134                           int32_t            code,
135                           int32_t            state);
136
137     // wayland region callback function
138     static void wlRegionCB(void                        *data,
139                            struct wl_array             *region);
140
141 protected:
142
143 private:
144
145 };
146 #endif  // __CICO_SC_WL_INPUT_MGR_IF_H__
147 // vim:set expandtab ts=4 sw=4: