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 } Ico_Uxf_ProcessAttr;
138 /* Detail of event */
139 typedef union _Ico_Uxf_EventDetail {
140 int event; /* Event number */
141 struct { /* Window event */
142 int event; /* Event number */
143 /* Event about the state conversion of the window */
144 /* ICO_UXF_EVENT_VISIBLE,RESIZE,MOVE,REDRAW,NEWWINDOW,DESTORYWINDOW */
145 int display; /* Display ID */
146 int window; /* Window ID */
147 int layer; /* layer ID */
148 short x; /* Window position */
150 short w; /* Window size */
152 char visible; /* Visibility */
153 char raise; /* Raise/Lower */
154 char active; /* Active/inactive(not impliment) */
155 char res; /* (unuse) */
158 struct { /* Application event */
159 int event; /* Event number */
160 /* Event about the operating conditions change of the application */
161 /* EXECPROCESS, TERMPROCESS */
162 char process[ICO_UXF_MAX_PROCESS_NAME+1];
164 int status; /* Running status */
165 int regulation; /* Current regulation */
168 struct { /* Input Manager event */
169 int event; /* Event number */
170 /* Multi Input Manager event */
171 /* ICO_UXF_EVENT_EXINPUT */
172 char device[32]; /* input device name */
173 int input; /* input number */
174 int code; /* input code */
175 int state; /* input status */
178 } Ico_Uxf_EventDetail;
180 /* Event callback function */
181 typedef void (*Ico_Uxf_Event_Cb)(const int event,
182 const Ico_Uxf_EventDetail detail, int arg);
185 typedef void (*Ico_Uxf_Hook)(const char *appid, const int info1, const int info2);
190 #endif /* _ICO_UXF_TYPEDEF_H_ */