Sync with the latest tizen 2.x
[apps/native/widget/widget.git] / include / binder.h
1 /*
2  * Copyright 2013  Samsung Electronics Co., Ltd
3  *
4  * Licensed under the Flora License, Version 1.1 (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://floralicense.org/license/
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 /**
18  * @brief
19  * Abstracted Data Type of Virtual Window
20  */
21 typedef struct virtual_window_info {
22         enum _state {
23                 VWIN_INFO_CREATED = 0x00beef00,
24                 VWIN_INFO_DESTROYED = 0x00dead00
25         } state;
26         char *id; /**< Identification */
27         widget_buffer_h handle; /**< Livebox buffer handle */
28         enum win_type {
29                 VWIN_SW_BUF = 0x00, /**< S/W buffer */
30                 VWIN_GEM    = 0x01, /**< GEM buffer */
31                 VWIN_PIXMAP = 0x02, /**< PIXMAP */
32                 VWIN_ERROR  = 0x03  /**< Unknown */
33         } type;
34         Ecore_Evas *ee;
35         Evas *e;
36         int w;
37         int h;
38         unsigned int *resource_array;
39         int resource_cnt;
40
41         int pressed;    /* Bit mask (32 bits for 32 devices) */
42
43         int orientation;
44
45         Ecore_Timer *pended_events_consumer;
46         Eina_List *pended_events_list;
47
48         struct _vwin_ctrl_mode {
49                 int dump_to_file;
50         } ctrl_mode;
51
52         union _flags {
53                 unsigned int mask;
54                 struct _field {
55                         unsigned int deleted: 1;
56                         unsigned int is_gbar: 1;
57                         unsigned int on_hold_before_down: 1;
58                         unsigned int on_scroll_before_down: 1;
59
60                         unsigned int reserved: 28;
61                 } field;
62         } flags;
63 } *vwin_info_t;
64
65 extern int binder_widget_send_updated(const char *pkgname, const char *id, widget_buffer_h handle, int idx, int x, int y, int w, int h, int gbar, const char *descfile);
66 extern int binder_widget_update_extra_info(const char *id, const char *content, const char *title, const char *icon, const char *name);
67 extern const char *binder_widget_find_pkgname(const char *uri);
68 extern Ecore_Evas *binder_ecore_evas_new(vwin_info_t info);
69 extern int binder_widget_auto_align(void);
70
71 #define GL_ENGINE_X11 "opengl_x11"
72 #define GL_ENGINE     "opengl"
73
74 /* End of a file */