bugfix: TIVI-2396: Virtual Keyboard doesn't catch the mouse event with the ICO UI
[profile/ivi/ico-uxf-weston-plugin.git] / src / ico_window_mgr.h
1 /*
2  * Copyright © 2010-2011 Intel Corporation
3  * Copyright © 2008-2011 Kristian Høgsberg
4  * Copyright © 2013-2014 TOYOTA MOTOR CORPORATION.
5  *
6  * Permission to use, copy, modify, distribute, and sell this software and
7  * its documentation for any purpose is hereby granted without fee, provided
8  * that the above copyright notice appear in all copies and that both that
9  * copyright notice and this permission notice appear in supporting
10  * documentation, and that the name of the copyright holders not be used in
11  * advertising or publicity pertaining to distribution of the software
12  * without specific, written prior permission.  The copyright holders make
13  * no representations about the suitability of this software for any
14  * purpose.  It is provided "as is" without express or implied warranty.
15  *
16  * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
17  * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
18  * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
19  * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
20  * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
21  * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
22  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23  */
24 /**
25  * @brief   Public functions in ico_window_mgr Weston plugin
26  *
27  * @date    Jul-26-2013
28  */
29
30 #ifndef _ICO_WINDOW_MGR_H_
31 #define _ICO_WINDOW_MGR_H_
32
33 /* API flag                             */
34 #define ICO_UIFW_WINDOW_MGR_DECLARE_MANAGER         (1 << 0)
35 #define ICO_UIFW_WINDOW_MGR_SET_WINDOW_LAYER        (1 << 1)
36 #define ICO_UIFW_WINDOW_MGR_SET_POSITIONSIZE        (1 << 2)
37 #define ICO_UIFW_WINDOW_MGR_SET_VISIBLE             (1 << 3)
38 #define ICO_UIFW_WINDOW_MGR_SET_ANIMATION           (1 << 4)
39 #define ICO_UIFW_WINDOW_MGR_SET_ATTRIBUTES          (1 << 5)
40 #define ICO_UIFW_WINDOW_MGR_VISIBLE_ANIMATION       (1 << 6)
41 #define ICO_UIFW_WINDOW_MGR_SET_ACTIVE              (1 << 7)
42 #define ICO_UIFW_WINDOW_MGR_SET_LAYER_VISIBLE       (1 << 8)
43 #define ICO_UIFW_WINDOW_MGR_GET_SURFACES            (1 << 9)
44 #define ICO_UIFW_WINDOW_MGR_SET_MAP_BUFFER          (1 << 10)
45 #define ICO_UIFW_WINDOW_MGR_MAP_SURFACE             (1 << 11)
46 #define ICO_UIFW_WINDOW_MGR_UNMAP_SURFACE           (1 << 12)
47
48 #define ICO_UIFW_INPUT_MGR_CONTROL_ADD_INPUT_APP    (1 << 16)
49 #define ICO_UIFW_INPUT_MGR_CONTROL_DEL_INPUT_APP    (1 << 17)
50 #define ICO_UIFW_INPUT_MGR_CONTROL_SEND_INPUT_EVENT (1 << 18)
51 #define ICO_UIFW_EXINPUT_SET_INPUT_REGION           (1 << 19)
52 #define ICO_UIFW_EXINPUT_UNSET_INPUT_REGION         (1 << 20)
53 #define ICO_UIFW_INPUT_MGR_DEVICE_CONFIGURE_INPUT   (1 << 21)
54 #define ICO_UIFW_INPUT_MGR_DEVICE_CONFIGURE_CODE    (1 << 22)
55 #define ICO_UIFW_INPUT_MGR_DEVICE_INPUT_EVENT       (1 << 23)
56
57 /* surface image buffer in wl_shm_pool  */
58 struct ico_uifw_image_buffer    {
59     uint32_t    magich;                     /* Magic number, fixed "UIFH"(no NULL terminate)*/
60     uint32_t    surfaceid;                  /* surface id                           */
61     uint32_t    settime;                    /* buffer set time(set by weston)       */
62     uint32_t    width;                      /* width                                */
63     uint32_t    height;                     /* height                               */
64     uint32_t    reftime;                    /* buffer refer time(set by app)        */
65     uint32_t    res;                        /* (unused)                             */
66     uint32_t    magict;                     /* Magic number, fixed "UIFT"(no NULL terminate)*/
67     unsigned char image[4];                 /* surface image(variable length)       */
68 };
69 #define ICO_UIFW_IMAGE_HEADER_SIZE  ((int)sizeof(struct ico_uifw_image_buffer) - 4)
70
71 #define ICO_UIFW_IMAGE_BUFFER_MAGICH    "UIFH"
72 #define ICO_UIFW_IMAGE_BUFFER_MAGICT    "UIFT"
73
74 #endif  /*_ICO_WINDOW_MGR_H_*/