Bug fix for TIVI-1002
[profile/ivi/ico-uxf-homescreen.git] / include / ico_uxf_proto.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 user experience library for HomeScreen
11  *
12  * @date    Feb-28-2013
13  */
14
15 #ifndef _ICO_UXF_PROTO_H_
16 #define _ICO_UXF_PROTO_H_
17
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21
22 /* Initialize/terminate/MainLoop/Others           */
23 struct wl_display;
24 int ico_uxf_init(const char *name);
25                                         /* Initialize(for general application)  */
26 int ico_uxf_shutdown(void);
27                                         /* Terminate                            */
28 void ico_uxf_main_loop_iterate(void);
29                                         /* Iterate mainLoop                     */
30 int ico_uxf_callback_set(const unsigned int mask,
31                          Ico_Uxf_Event_Cb func, const int arg);
32                                         /* Add event callback function          */
33 int ico_uxf_callback_remove(const unsigned int mask,
34                             Ico_Uxf_Event_Cb func, const int arg);
35                                         /* Remove event callback function       */
36 void ico_uxf_timer_wake(const int msec);
37                                         /* UX-FW timer                          */
38
39 /* Control window                               */
40 int ico_uxf_window_event_mask(const int window, const unsigned int mask);
41                                         /* Set event to receive through the window*/
42 int ico_uxf_window_attribute_get(const int window, Ico_Uxf_WindowAttr *attr);
43                                         /* Get window attribute                 */
44 int ico_uxf_window_query_display(const int display, Ico_Uxf_DisplayAttr *attr);
45                                         /* Get display attribute                */
46 int ico_uxf_window_query_displays(Ico_Uxf_DisplayAttr attr[], const int num);
47                                         /* Get all displays attribute           */
48 int ico_uxf_window_query_layer(const int display, const int layer,
49                                Ico_Uxf_LayerAttr *attr);
50                                         /* Get layer attribute                  */
51 int ico_uxf_window_query_layers(const int display,
52                                 Ico_Uxf_LayerAttr attr[], const int num);
53                                         /* Get all layers attribute             */
54 int ico_uxf_window_query_windows(const int display,
55                                  Ico_Uxf_WindowAttr attr[], const int num);
56                                         /* Get all windows attribute            */
57 void ico_uxf_window_screen_size_get(int *width, int *height);
58                                         /* Get display size                     */
59 int ico_uxf_window_layer(const int window, const int layer);
60                                         /* Set window layer                     */
61 int ico_uxf_layer_visible(const int display, const int layer, const int visible);
62                                         /* Show/Hide layer                      */
63 int ico_uxf_window_show(const int window);
64                                         /* Show window                          */
65 int ico_uxf_window_hide(const int window);
66                                         /* Hide window                          */
67 int ico_uxf_window_visible_animation(const int window, const int show);
68                                         /* Show/Hide with animation             */
69 int ico_uxf_window_visible_raise(const int window,
70                                  const int visible, const int raise);
71                                         /* Set window show/hide and raise/lower */
72 int ico_uxf_window_resize(const int window, const int w, const int h);
73                                         /* Resize window size                   */
74 int ico_uxf_window_move(const int window, const int x, const int y);
75                                         /* Move window                          */
76 int ico_uxf_window_raise(const int window);
77                                         /* Raise window                         */
78 int ico_uxf_window_lower(const int window);
79                                         /* Lower window                         */
80 int ico_uxf_window_active(const int window, const int target);
81                                         /* Activate window                      */
82 int ico_uxf_window_animation(const int window, const char *animation, const int time);
83                                         /* Set window animation                 */
84 void ico_uxf_window_animation_control(const int control, const int animation);
85                                         /* Set animation control                */
86 int ico_uxf_window_control(const char *appid, const int winidx,
87                            const int control, const int onoff);
88                                         /* Window visible control from AppsController*/
89 void ico_uxf_window_hook(Ico_Uxf_Hook func);
90                                         /* Set window control hook              */
91 /* Input switch                                 */
92 Ico_Uxf_InputDev *ico_uxf_inputdev_attribute_get(const int devidx);
93                                         /* get input device attribute           */
94 Ico_Uxf_InputSw  *ico_uxf_inputsw_attribute_get(Ico_Uxf_InputDev *inputdev, const int swidx);
95                                         /* get input switch attribute           */
96 int ico_uxf_input_control(const int add, const char *appid,
97                           const char *device, const int input);
98                                         /* control input switch                 */
99 /* Launcher API                                 */
100 int ico_uxf_process_execute(const char *name);
101                                         /* Start application                    */
102 int ico_uxf_process_terminate(const char *process);
103                                         /* Stop application                     */
104 int ico_uxf_process_attribute_get(const char *process, Ico_Uxf_ProcessAttr *attr);
105                                         /* Get application status               */
106 int ico_uxf_process_is_active(const char *process);
107                                         /* Get application activity             */
108 void *ico_uxf_process_exttable_get(const char *process);
109                                         /* Get extended table address           */
110 int ico_uxf_process_exttable_set(const char *process, void *table);
111                                         /* Set extended table address           */
112 int ico_uxf_process_window_get(const char *process,
113                                Ico_Uxf_ProcessWin *attr, const int num);
114                                         /* Get all windows of one application   */
115 int ico_uxf_process_window_get_one(const char *process,
116                                    Ico_Uxf_ProcessWin *attr, const int winidx);
117                                         /* Get one windows of one application   */
118 int ico_uxf_process_query_processes(Ico_Uxf_ProcessAttr attr[], const int num);
119                                         /* Get all aplications attribute        */
120 void ico_uxf_set_lastapp(const char *appid);
121                                         /* Set/Reset last application           */
122 char *ico_uxf_getchild_appid(const char *appid);
123                                         /* Get child applicationId              */
124
125 /* Wayland depend function                      */
126 int ico_uxf_wl_display_fd(void);
127                                         /* Get wayland connect file descriptor  */
128 struct wl_display *ico_uxf_wl_display(void);
129                                         /* Get wayland display                  */
130 struct wl_compositor *ico_uxf_wl_compositor(void);
131                                         /* Get wayland compositor               */
132 struct wl_egl_window *ico_uxf_wl_egl_window(const int window);
133                                         /* Get EGL window(surface)              */
134 struct wl_surface *ico_uxf_wayland_surface(const int window);
135                                         /* Get wayland surface                  */
136 int ico_uxf_wl_display_fd(void);
137                                         /* Get wayland connect file descriptor  */
138 #ifdef __cplusplus
139 }
140 #endif
141 #endif  /* _ICO_UXF_PROTO_H_ */
142