Bug fix TIVI-839 ,change the design and permit operation of the music player while...
[profile/ivi/ico-uxf-homescreen.git] / include / home_screen_parser.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 command parser tools
11  *
12  * @date    Feb-15-2013
13  */
14
15 #ifndef _HOME_SCREEN_PARSER_H_
16 #define _HOME_SCREEN_PARSER_H_
17
18 #include <stdio.h>
19 #include <stdlib.h>
20 #include <string.h>
21 #include <getopt.h>
22 #include <glib-object.h>
23 #include <json-glib/json-glib.h>
24
25 #include "ico_uxf.h"
26 #include "home_screen.h"
27 #include "ico_uxf_conf.h"
28
29 /*============================================================================*/
30 /* definition                                                                 */
31 /*============================================================================*/
32 #define UNEXECUTED          0
33 #define EXECUTED            1
34
35 #define IGNORE              (-1)
36 #define EXECUTE             (0)
37
38 typedef struct _hs_command_req hs_command_req_t;
39 struct _hs_command_req {
40     struct {
41         char    appid[ICO_UXF_MAX_PROCESS_NAME+1];
42         struct {
43             char    *appid;
44         } execute;
45         struct {
46             char *appid;
47         } terminate;
48         struct {
49             char *appid;
50         } suspend;
51         struct {
52             char *appid;
53         } resume;
54     } program;
55     struct {
56         int status;
57         struct {
58             int window;
59         } show;
60         struct {
61             int window;
62         } hide;
63         struct {
64             int window;
65             int visible;
66             int raise;
67         } visible_raise;
68         struct {
69             int window;
70             int w;
71             int h;
72         } resize;
73         struct {
74             int window;
75             int size_m;
76             int size_n;
77         } resize_tile;
78         struct {
79             int window;
80             int x;
81             int y;
82         } move;
83         struct {
84             int window;
85             int m;
86             int n;
87         } move_tile;
88         struct {
89             int window;
90         } raise;
91         struct {
92             int window;
93         } lower;
94         struct {
95             int window;
96             unsigned int    mask;
97         } event_mask;
98     } window[ICO_HS_WINDOW_NUM_MAX];
99     struct {
100         struct {
101             int  input;
102         } add_app;
103         struct {
104             int  input;
105         } del_app;
106     } input;
107 };
108
109 /*============================================================================*/
110 /* functions                                                                  */
111 /*============================================================================*/
112 extern int hs_parse_form(char *, int);
113 extern int hs_conftrol_form(const char*, int);
114 extern void hs_dump_app(void);
115 extern int hs_control_app_screen(void);
116 extern void hs_get_tilescreendata(void);
117
118 extern int hs_req_touch;
119 extern int hs_stat_touch;
120
121 #endif /* _HOME_SCREEN_PARSER_H_ */