Merge branch 'master' of https://git.maemo.org/projects/erwise
[erwise] / Ui / UiTypes.h
1 typedef struct {
2     int TopMargin, BottomMargin;
3     int LeftMargin, RightMargin;
4     int UseFixed;
5     int FixedWidth;
6     int OnePageMode;
7 } uiPageSettings_t;
8
9
10 typedef struct {
11     int X, Y;
12     int Width, Height;
13     int VirtualWidth, VirtualHeight;
14 } uiPageLayout_t;
15
16
17 typedef struct {
18     Widget TopWdg;
19     Widget FormWdg;
20     Widget MenuWdg;
21     Widget DrawAreaWdg;
22     Widget HScrollBarWdg;
23     Widget VScrollBarWdg;
24     Widget FindFrameWdg;
25     Widget FindWdg;
26     Widget FindTextWdg;
27     Widget ControlWdg;
28 } uiPageGfx_t;
29
30
31 struct _uipage;
32
33 typedef struct {
34     char *ActionName;
35     struct _uipage *Page;
36 } uiActionData_t;
37
38
39 typedef struct _pagecblist {
40     uiActionData_t ActionData;
41     struct _pagecblist *Next;
42 } uiPageCBList_t;
43
44
45 struct _uihierarchy;
46
47 typedef struct _uipage {
48     HText_t *HText;
49     HTextObject_t *HTextObject;
50     int Visible;
51     struct _uihierarchy *Hierarchy;
52     uiPageSettings_t Settings;
53     uiPageLayout_t Layout;
54     uiPageGfx_t Gfx;
55     uiPageCBList_t *Callbacks;
56     struct _uipage *Next;
57 } uiPage_t;
58
59
60 typedef struct _uihierarchy {
61     char *Address;
62     uiPage_t *Pages;
63     struct _uihierarchy *Next;
64 } uiHierarchy_t;
65
66
67 typedef struct _uiaction {
68     char *Name;
69     void (*Callback) (char *address, HText_t * htext,
70                        HTextObject_t * htextobject, void *parameter);
71     void *Parameter;
72     struct _uiaction *Next;
73 } uiAction_t;
74
75
76 typedef struct _uikey {
77     char *Name;
78     int Modifier;
79     void (*Callback) (char *address, HText_t * htext,
80                        HTextObject_t * htextobject, void *parameter);
81     void *Parameter;
82     struct _uikey *Next;
83 } uiKey_t;
84
85
86 typedef enum {
87     uiWTtext,
88     uiWToptionmenu,
89     uiWTradiobox,
90     uiWTcheckbutton,
91     uiWTscale
92 } uiWdgType_t;
93
94
95 typedef struct _uivariable {
96     char *Name;
97     void *Value;
98     uiVarType_t VarType;
99     Widget Wdg;
100     uiWdgType_t WdgType;
101     struct _uivariable *Next;
102 } uiVariable_t;
103
104
105 typedef struct {
106     int TopMargin, BottomMargin;
107     int LeftMargin, RightMargin;
108     int UseFixed;
109     int FixedWidth;
110     int OnePageMode;
111     int Width;
112     int Height;
113     int SearchPlacement;
114     int ControlPanelPlacement;
115     int ListPlacement;
116     int RecallPlacement;
117     int PageSettingsPlacement;
118     Time DoubleClickTime;
119 } uiGlobalSettings_t;
120
121
122 typedef struct {
123     Widget TopWdg;
124     Widget FormWdg;
125     Widget InfoWdg;
126     Widget OpenWdg;
127     Widget QuitWdg;
128     Widget HelpWdg;
129 } uiTopLevelGfx_t;
130
131
132 typedef struct {
133     Widget FormWdg;
134     Widget FSBoxWdg;
135     Widget SeparatorWdg;
136     Widget ListWdg;
137     Widget AddWdg;
138     Widget DeleteWdg;
139 } uiSelectionBoxGfx_t;
140
141
142 typedef struct {
143     Widget FormWdg;
144     Widget TextWdg;
145     Widget LevelWdg;
146     Widget LevelFormWdg;
147     Widget LevelDownWdg;
148     Widget LevelUpWdg;
149     Widget CaseWdg;
150     Widget BackwardWdg;
151     Widget ForwardWdg;
152     Widget LabelWdg;
153     Widget CloseWdg;
154 } uiSearchGfx_t;
155
156
157 typedef struct {
158     Widget FormWdg;
159     Widget LabelWdg;
160     Widget LeftMarginWdg;
161     Widget RightMarginWdg;
162     Widget TopMarginWdg;
163     Widget BottomMarginWdg;
164     Widget LeftMarginTextWdg;
165     Widget RightMarginTextWdg;
166     Widget TopMarginTextWdg;
167     Widget BottomMarginTextWdg;
168     Widget UseFixedWdg;
169     Widget UseFixedTextWdg;
170     Widget SinglePageWdg;
171 } uiPageSettingsGfx_t;
172
173
174 typedef struct {
175     Widget FormWdg;
176     Widget PrintCmdWdg;
177     Widget PrintFileWdg;
178     Widget LeftMarginWdg;
179     Widget RightMarginWdg;
180     Widget TopMarginWdg;
181     Widget BottomMarginWdg;
182     Widget LeftMarginTextWdg;
183     Widget RightMarginTextWdg;
184     Widget TopMarginTextWdg;
185     Widget BottomMarginTextWdg;
186     Widget WidthWdg;
187 } uiPrintGfx_t;
188
189
190 typedef struct {
191     Widget FormWdg;
192     Widget LabelWdg;
193     Widget ListWdg;
194     Widget SeparatorWdg;
195     Widget OpenWdg;
196     Widget CloseWdg;
197 } uiListGfx_t;
198
199
200 typedef struct {
201     Widget FormWdg;
202     Widget LabelWdg;
203     Widget ListWdg;
204     Widget SeparatorWdg;
205     Widget OpenWdg;
206     Widget CloseWdg;
207 } uiRecallGfx_t;
208
209
210 typedef struct {
211     Widget FormWdg;
212     Widget OkWdg;
213 } uiInfoGfx_t;
214
215
216 typedef struct {
217     Widget SearchWdg;
218     Widget FormWdg;
219     Widget HomeWdg;
220     Widget RecallWdg;
221     Widget CloseWdg;
222     Widget LabelWdg;
223     Widget DialogCloseWdg;
224     Widget ListWdg;
225 } uiControlPanelGfx_t;
226
227
228 typedef struct {
229     Widget FormWdg;
230     Widget LabelWdg;
231     Widget SearchWindow;
232     Widget ControlPanel;
233     Widget ListWindow;
234     Widget RecallWindow;
235     Widget PageSettings;
236     Widget CloseWdg;
237 } uiDefaultsGfx_t;
238
239
240 typedef struct {
241     Widget FormWdg;
242     Widget LabelWdg;
243     Widget KillWdg;
244     Widget CloseWdg;
245     Widget SeparatorWdg;
246     Widget ListWdg;
247 } uiConnectionsGfx_t;
248
249
250 typedef struct {
251     Widget FormWdg;
252     Widget FSBoxWdg;
253 } uiFileSelectionGfx_t;
254
255
256 typedef struct {
257     uiHierarchy_t *Hierarchies;
258     uiAction_t *Actions;
259     uiKey_t *Keys;
260     uiVariable_t *Variables;
261     uiGlobalSettings_t GlobalSettings;
262     uiTopLevelGfx_t TopGfx;
263     uiSelectionBoxGfx_t SBGfx;
264     uiSearchGfx_t SearchGfx;
265     uiPageSettingsGfx_t PageSettingsGfx;
266     uiListGfx_t ListGfx;
267     uiRecallGfx_t RecallGfx;
268     uiInfoGfx_t InfoGfx;
269     uiControlPanelGfx_t ControlPanelGfx;
270     uiDefaultsGfx_t DefaultsGfx;
271     uiPrintGfx_t PrintGfx;
272     uiConnectionsGfx_t ConnectionsGfx;
273     uiFileSelectionGfx_t FSGfx;
274 } uiTopLevel_t;
275
276
277 typedef struct {
278     uiPage_t *CurrentPage;
279     Widget Wdg;
280     void *CallData;
281 } uiPageInfo_t;