2 * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
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
10 * @brief header file of user experience library for HomeScreen(data structure)
15 #ifndef _ICO_UXF_TYPEDEF_H_
16 #define _ICO_UXF_TYPEDEF_H_
22 /* Structure of display attribute */
23 typedef struct _Ico_Uxf_DisplayAttr {
24 int display; /* Display ID */
26 short num_layers; /* Number of layers */
27 short hostId; /* Host ID */
28 short displayNo; /* Consecutive numbers */
29 short w; /* The number of the lateral pixels */
30 short h; /* The number of vertical pixels */
31 short inch; /* Screen physical size(0.1 inches of units)*/
32 short pWidth; /* compositor width */
33 short pHeight; /* compositor height */
35 #define ICO_UXF_ORIENTATION_HORIZONTAL (0)
36 #define ICO_UXF_ORIENTATION_VERTICAL (1)
37 char name[ICO_UXF_MAX_WIN_NAME+1];
39 } Ico_Uxf_DisplayAttr;
41 /* Structure of layer attribute */
42 typedef struct _Ico_Uxf_LayerAttr {
43 int layer; /* Layer ID */
44 int display; /* Display ID */
45 short w; /* The number of the lateral pixels */
46 short h; /* The number of vertical pixels */
49 /* Structure of display zone attribute */
50 typedef struct _Ico_Uxf_DispZoneAttr {
51 int zone; /* Zone ID */
52 int display; /* Display ID */
53 short x; /* Left upper X coordinate of the screen*/
54 short y; /* Left upper Y coordinate of the screen*/
55 short w; /* The number of the lateral pixels */
56 short h; /* The number of vertical pixels */
57 } Ico_Uxf_DispZoneAttr;
59 /* Structure of window attribute */
60 typedef struct _Ico_Uxf_WindowAttr {
61 int window; /* Window ID */
62 int display; /* Display ID */
63 int layer; /* Layer ID */
64 int zone; /* Display Zone ID */
65 char process[ICO_UXF_MAX_PROCESS_NAME+1];
67 int subwindow; /* Main window(=0) or Sub window(>0) */
68 unsigned int eventmask; /* Event to receive through this window */
69 short x; /* Upper left X coordinate of the window*/
70 short y; /* Upper left Y coordinate of the window*/
71 short w; /* Width of window */
72 short h; /* height of window */
73 char control; /* Visibility control from AppsController*/
74 char visible; /* Visibility */
75 char raise; /* Raise/Lower */
76 char active; /* Active/Inactive */
79 /* Structure of input code */
80 typedef struct _Ico_Uxf_InputCode {
81 int code; /* input switch code value */
82 char codename[20]; /* input switch code name */
85 /* Structure of input switch */
86 typedef struct _Ico_Uxf_InputSw {
87 struct _Ico_Uxf_InputSw *next; /* next input switch table */
88 char swname[20]; /* input switch name */
89 int input; /* input switch number */
90 short fix; /* fixed application switch */
91 short numCode; /* number of codes */
92 Ico_Uxf_InputCode inputCode[8]; /* code table */
95 /* Structure of input device */
96 typedef struct _Ico_Uxf_InputDev {
97 struct _Ico_Uxf_InputDev *next; /* next input device */
98 char device[32]; /* input device name */
99 int type; /* input device type(unused) */
100 int numInputSw; /* number of input switch */
101 Ico_Uxf_InputSw *inputSw; /* input switch list */
104 /* Structure of window of application */
105 typedef struct _Ico_Uxf_ProcessWin {
106 int window; /* Window ID */
107 /* (0 if window not create) */
108 int windowtype; /* Type */
109 int display; /* Display ID */
110 int layer; /* Layer ID */
111 int zone; /* Zone ID */
112 short x; /* Default X coordinate of the window */
113 short y; /* Default Y coordinate of the window */
114 short w; /* Default width of window */
115 short h; /* Default height of window */
116 char name[ICO_UXF_MAX_WIN_NAME+1];
118 } Ico_Uxf_ProcessWin;
120 /* Structure of application attribute */
121 typedef struct _Ico_Uxf_ProcessAttr {
122 char process[ICO_UXF_MAX_PROCESS_NAME+1];
124 int internalid; /* ProcessID */
126 short hostId; /* Host ID who works of the application */
127 short myHost; /* Works in my host(=1) or Other host(=0)*/
128 short numwindows; /* Number of windows */
129 short numsounds; /* Number of sound */
130 short numinputs; /* Number of input */
131 Ico_Uxf_ProcessWin mainwin; /* Main window of application */
132 Ico_Uxf_ProcessWin *subwin; /* Sub window of application */
133 short status; /* Running status */
134 char active; /* Active/Inactive */
135 char child; /* Child process */
136 char noicon; /* No icon flag */
137 char autostart; /* Autostart flag */
138 char suspend; /* application susupend flag */
139 unsigned char invisiblecpu; /* cpu % at invisible */
140 } Ico_Uxf_ProcessAttr;
142 /* Detail of event */
143 typedef union _Ico_Uxf_EventDetail {
144 int event; /* Event number */
145 struct { /* Window event */
146 int event; /* Event number */
147 /* Event about the state conversion of the window */
148 /* ICO_UXF_EVENT_VISIBLE,RESIZE,MOVE,REDRAW,NEWWINDOW,DESTORYWINDOW */
149 int display; /* Display ID */
150 int window; /* Window ID */
151 int layer; /* layer ID */
152 short x; /* Window position */
154 short w; /* Window size */
156 char visible; /* Visibility */
157 char raise; /* Raise/Lower */
158 char active; /* Active/inactive(not impliment) */
159 char res; /* (unuse) */
162 struct { /* Application event */
163 int event; /* Event number */
164 /* Event about the operating conditions change of the application */
165 /* EXECPROCESS, TERMPROCESS */
166 char process[ICO_UXF_MAX_PROCESS_NAME+1];
168 int status; /* Running status */
169 int regulation; /* Current regulation */
172 struct { /* Input Manager event */
173 int event; /* Event number */
174 /* Multi Input Manager event */
175 /* ICO_UXF_EVENT_EXINPUT */
176 char device[32]; /* input device name */
177 int input; /* input number */
178 int code; /* input code */
179 int state; /* input status */
182 } Ico_Uxf_EventDetail;
184 /* Event callback function */
185 typedef void (*Ico_Uxf_Event_Cb)(const int event,
186 const Ico_Uxf_EventDetail detail, int arg);
189 typedef void (*Ico_Uxf_Hook)(const char *appid, const int info1, const int info2);
194 #endif /* _ICO_UXF_TYPEDEF_H_ */