]> git.wh0rd.org - ICEs.git/blame - 130161/ice.i.1
initial import
[ICEs.git] / 130161 / ice.i.1
CommitLineData
45516216 1typedef int int32;
2typedef unsigned int uint32;
3typedef short int16;
4typedef unsigned short uint16;
5typedef unsigned char uint8;
6typedef uint16 unichar_t;
7enum charset {
8 em_none =
9 -1, em_iso8859_1, em_iso8859_2, em_iso8859_3, em_iso8859_4,
10 em_iso8859_5, em_iso8859_6, em_iso8859_7, em_iso8859_8,
11 em_iso8859_9, em_iso8859_10, em_iso8859_11, em_iso8859_13,
12 em_iso8859_14, em_iso8859_15, em_koi8_r, em_jis201, em_win, em_mac,
13 em_symbol, em_zapfding, em_user, em_adobestandard =
14 em_user, em_jis208, em_jis212, em_ksc5601, em_gb2312, em_big5,
15 em_big5hkscs, em_johab, em_unicode, em_unicode4, em_gb18030, em_max,
16 em_first2byte = em_jis208, em_last94x94 = em_gb2312
17};
18typedef uint32 Color;
19typedef struct gimage {
20} GImage;
21typedef struct grect {
22} GRect;
23typedef struct gpoint {
24} GPoint;
25typedef struct {
26} FontRequest;
27typedef struct {
28} FontMods;
29enum gic_style {
30 gic_overspot = 2, gic_root = 1, gic_hidden = 0, gic_orlesser =
31 4, gic_type = 3
32};
33typedef struct ginput_context GIC;
34enum selnames {
35 sn_primary, sn_clipboard, sn_drag_and_drop, sn_max
36};
37typedef struct gwindow *GWindow;
38typedef struct gdisplay GDisplay;
39typedef struct gtimer GTimer;
40typedef struct gevent {
41 enum event_type {
42 et_noevent =
43 -1, et_char, et_charup, et_mousemove, et_mousedown,
44 et_mouseup, et_crossing, et_focus, et_expose, et_visibility,
45 et_resize, et_timer, et_close, et_create, et_map,
46 et_destroy, et_selclear, et_drag, et_dragout, et_drop,
47 et_lastnativeevent = et_drop, et_controlevent, et_user
48 } type;
49} GEvent;
50typedef enum cursor_types {
51 ct_default, ct_pointer, ct_backpointer, ct_hand, ct_question, ct_cross,
52 ct_4way, ct_text, ct_watch, ct_draganddrop, ct_invisible, ct_user,
53 ct_user2
54} GCursor;
55typedef struct gwindow_attrs {
56} GWindowAttrs;
57typedef struct gprinter_attrs {
58} GPrinterAttrs;
59enum gzoom_flags {
60 gzf_pos = 1, gzf_size = 2
61};
62typedef struct {
63} GChar2b;
64struct displayfuncs {
65 void (*init) (GDisplay *);
66 void (*term) (GDisplay *);
67 void *(*nativeDisplay) (GDisplay *);
68 void (*setDefaultIcon) (GWindow);
69 GWindow(*createTopWindow) (GDisplay *, GRect * pos,
70 int (*eh) (GWindow, GEvent *),
71 void *user_data, GWindowAttrs *);
72 GWindow(*createSubWindow) (GWindow, GRect * pos,
73 int (*eh) (GWindow, GEvent *),
74 void *user_data, GWindowAttrs *);
75 GWindow(*createPixmap) (GDisplay *, uint16 width, uint16 height);
76 GWindow(*createBitmap) (GDisplay *, uint16 width, uint16 height,
77 uint8 * data);
78 GCursor(*createCursor) (GWindow src, GWindow mask, Color fg, Color bg,
79 int16 x, int16 y);
80 void (*destroyWindow) (GWindow);
81 void (*destroyCursor) (GDisplay *, GCursor);
82 int (*nativeWindowExists) (GDisplay *, void *native_window);
83 void (*setZoom) (GWindow, GRect * size, enum gzoom_flags flags);
84 void (*setWindowBorder) (GWindow, int width, Color);
85 int (*setDither) (GDisplay *, int);
86 void (*reparentWindow) (GWindow, GWindow, int, int);
87 void (*setVisible) (GWindow, int);
88 void (*move) (GWindow, int32, int32);
89 void (*trueMove) (GWindow, int32, int32);
90 void (*resize) (GWindow, int32, int32);
91 void (*moveResize) (GWindow, int32, int32, int32, int32);
92 void (*raise) (GWindow);
93 void (*raiseAbove) (GWindow, GWindow);
94 int (*isAbove) (GWindow, GWindow);
95 void (*lower) (GWindow);
96 void (*setWindowTitles) (GWindow, const unichar_t * title,
97 const unichar_t * icontitle);
98 void (*setWindowTitles8) (GWindow, const char *title,
99 const char *icontitle);
100 unichar_t *(*getWindowTitle) (GWindow);
101 char *(*getWindowTitle8) (GWindow);
102 void (*getPointerPos) (GWindow, GEvent *);
103 void (*setCursor) (GWindow, GCursor);
104 GCursor(*getCursor) (GWindow);
105 GWindow(*getRedirectWindow) (GDisplay * gd);
106 void (*translateCoordinates) (GWindow from, GWindow to, GPoint * pt);
107 void (*beep) (GDisplay *);
108 void (*flush) (GDisplay *);
109 void (*pushClip) (GWindow, GRect * rct, GRect * old);
110 void (*popClip) (GWindow, GRect * old);
111 void (*eventLoop) (GDisplay *);
112 void (*postEvent) (GEvent * e);
113 void (*postDragEvent) (GWindow w, GEvent * mouse, enum event_type et);
114 int (*requestDeviceEvents) (GWindow w, int devcnt,
115 struct gdeveventmask * de);
116 GTimer *(*requestTimer) (GWindow w, int32 time_from_now,
117 int32 frequency, void *userdata);
118 void (*cancelTimer) (GTimer * timer);
119 int (*endJob) (GWindow w, int cancel);
120};
121typedef struct gpswindow {
122} *GPSWindow;
123typedef struct gpsdisplay {
124 struct displayfuncs *funcs;
125} GPSDisplay;
126extern void _GPSDraw_Image(GWindow, GImage *, GRect * src, int32 x, int32 y);
127extern void _GPSDraw_TileImage(GWindow, GImage *, GRect * src, int32 x,
128 int32 y);
129extern void _GPSDraw_ImageMagnified(GWindow, GImage *, GRect * src, int32 x,
130 int32 y, int32 width, int32 height);
131extern void *_GPSDraw_LoadFontMetrics(GDisplay * gdisp, struct font_data *fd);
132extern struct font_data *_GPSDraw_ScaleFont(GDisplay * gdisp,
133 struct font_data *fd,
134 FontRequest * rq);
135extern struct font_data *_GPSDraw_StylizeFont(GDisplay * gdisp,
136 struct font_data *fd,
137 FontRequest * rq);
138static void PSDrawInit(GDisplay * gdisp)
139{
140}
141static void PSDrawTerm(GDisplay * gdisp)
142{
143}
144static void *PSDrawNativeDisplay(GDisplay * gdisp)
145{
146}
147static void PSDrawSetDefaultIcon(GWindow icon)
148{
149}
150static GWindow PSDrawCreateSubWindow(GWindow w, GRect * pos,
151 int (*eh) (GWindow, GEvent *),
152 void *user_data, GWindowAttrs * wattrs)
153{
154}
155static GWindow PSDrawCreatePixmap(GDisplay * gdisp, uint16 width, uint16 height)
156{
157}
158static GWindow PSDrawCreateBitmap(GDisplay * gdisp, uint16 width, uint16 height,
159 uint8 * data)
160{
161}
162static GCursor PSDrawCreateCursor(GWindow src, GWindow mask, Color fg, Color bg,
163 int16 x, int16 y)
164{
165}
166static void PSSetZoom(GWindow w, GRect * r, enum gzoom_flags flags)
167{
168}
169static void PSDestroyCursor(GDisplay * gdisp, GCursor ct)
170{
171}
172static int PSNativeWindowExists(GDisplay * gdisp, void *native)
173{
174}
175static void PSSetWindowBorder(GWindow w, int width, Color col)
176{
177}
178static int PSSetDither(GDisplay * gdisp, int dither)
179{
180}
181static void PSDrawReparentWindow(GWindow child, GWindow newparent, int x, int y)
182{
183}
184static void PSDrawSetVisible(GWindow w, int vis)
185{
186}
187static void PSDrawMove(GWindow w, int32 x, int32 y)
188{
189}
190static void PSDrawResize(GWindow w, int32 width, int32 height)
191{
192}
193static void PSDrawMoveResize(GWindow w, int32 x, int32 y, int32 width,
194 int32 height)
195{
196}
197static void PSDrawRaise(GWindow w)
198{
199}
200static void PSDrawRaiseAbove(GWindow w, GWindow below)
201{
202}
203static int PSDrawIsAbove(GWindow w, GWindow below)
204{
205}
206static void PSDrawLower(GWindow w)
207{
208}
209static void PSDrawSetWindowTitles(GWindow w, const unichar_t * title,
210 const unichar_t * icontit)
211{
212}
213static void PSDrawSetWindowTitles8(GWindow w, const char *title,
214 const char *icontit)
215{
216}
217static void PSDrawGetPointerPosition(GWindow w, GEvent * ret)
218{
219}
220static void PSDrawSetCursor(GWindow w, GCursor ct)
221{
222}
223static GCursor PSDrawGetCursor(GWindow w)
224{
225}
226static GWindow PSDrawGetRedirectWindow(GDisplay * gd)
227{
228}
229static unichar_t *PSDrawGetWindowTitle(GWindow w)
230{
231}
232static char *PSDrawGetWindowTitle8(GWindow w)
233{
234}
235static void PSDrawTranslateCoordinates(GWindow _from, GWindow _to, GPoint * pt)
236{
237}
238static void PSDrawScroll(GWindow w, GRect * rect, int32 hor, int32 vert)
239{
240}
241static void PSDrawBeep(GDisplay * gdisp)
242{
243}
244static void PSDrawFlush(GDisplay * gdisp)
245{
246}
247static GIC *PSDrawCreateInputContext(GWindow w, enum gic_style def_style)
248{
249}
250static void PSDrawSetGIC(GWindow w, GIC * gic, int x, int y)
251{
252}
253static void PSDrawPointerUngrab(GDisplay * gdisp)
254{
255}
256static void PSDrawPointerGrab(GWindow w)
257{
258}
259static void PSDrawGrabSelection(GWindow w, enum selnames sel)
260{
261}
262static void PSDrawAddSelectionType(GWindow w, enum selnames sel, char *type,
263 void *data, int32 len, int32 unitsize,
264 void *(*gendata) (void *, int32 * len),
265 void (*freedata) (void *))
266{
267}
268static void *PSDrawRequestSelection(GWindow w, enum selnames sn, char *typename,
269 int32 * len)
270{
271}
272static int PSDrawSelectionHasType(GWindow w, enum selnames sn, char *typename)
273{
274}
275static void PSDrawRequestExpose(GWindow gw, GRect * rect, int doclear)
276{
277}
278static GTimer *PSDrawRequestTimer(GWindow w, int32 time_from_now,
279 int32 frequency, void *userdata)
280{
281}
282static void PSDrawCancelTimer(GTimer * timer)
283{
284}
285static void PSDrawSyncThread(GDisplay * gdisp, void (*func) (void *),
286 void *data)
287{
288}
289static void PSDrawForceUpdate(GWindow gw)
290{
291}
292static void PSDrawSync(GDisplay * gdisp)
293{
294}
295static void PSDrawSkipMouseMoveEvents(GWindow gw, GEvent * last)
296{
297}
298static void PSDrawProcessPendingEvents(GDisplay * gdisp)
299{
300}
301static void PSDrawProcessWindowEvents(GWindow gw)
302{
303}
304static void PSDrawEventLoop(GDisplay * gd)
305{
306}
307static void PSDrawPostEvent(GEvent * e)
308{
309}
310static void PSDrawPostDragEvent(GWindow w, GEvent * mouse, enum event_type et)
311{
312}
313static int PSDrawRequestDeviceEvents(GWindow w, int devcnt,
314 struct gdeveventmask *de)
315{
316}
317static GImage *_PSDraw_CopyScreenToImage(GWindow w, GRect * rect)
318{
319}
320static void _PSDraw_Pixmap(GWindow _w, GWindow _pixmap, GRect * src, int32 x,
321 int32 y)
322{
323}
324static void _PSDraw_TilePixmap(GWindow _w, GWindow _pixmap, GRect * src,
325 int32 x, int32 y)
326{
327}
328static void PSMyArc(GPSWindow ps, double cx, double cy, double radx,
329 double rady, double sa, double ta)
330{
331 double ea, temp;
332 ea = sa + ta;
333 while (sa < ea) {
334 temp = ((int)((sa + 90) / 90)) * 90;
335 PSDoArc(ps, cx, cy, radx, rady, sa, ea < temp ? ea : temp);
336 sa = temp;
337 }
338}
339static void PSDrawElipse(GPSWindow ps, GRect * rct, char *command)
340{
341 float cx, cy, radx, rady;
342 if (radx != rady)
343 PSMyArc(ps, cx, cy, radx, rady, 0, 360);
344}
345static void PSDrawPushClip(GWindow w, GRect * rct, GRect * old)
346{
347}
348static void PSDrawPopClip(GWindow w, GRect * old)
349{
350}
351static void PSDrawDrawLine(GWindow w, int32 x, int32 y, int32 xend, int32 yend,
352 Color col)
353{
354}
355static void PSDrawDrawArrowLine(GWindow w, int32 x, int32 y, int32 xend,
356 int32 yend, int16 arrows, Color col)
357{
358}
359static void PSDrawDrawRect(GWindow w, GRect * rct, Color col)
360{
361}
362static void PSDrawFillRect(GWindow w, GRect * rct, Color col)
363{
364}
365static void PSDrawClear(GWindow w, GRect * rect)
366{
367}
368static void PSDrawDrawCircle(GWindow w, GRect * rct, Color col)
369{
370}
371static void PSDrawFillCircle(GWindow w, GRect * rct, Color col)
372{
373 GPSWindow ps = (GPSWindow) w;
374 PSDrawElipse(ps, rct, "fill");
375}
376static void PSDrawDrawArc(GWindow w, GRect * rct, int32 sa, int32 ta, Color col)
377{
378}
379static void PSDrawDrawPoly(GWindow w, GPoint * pt, int16 cnt, Color col)
380{
381}
382static void PSDrawFillPoly(GWindow w, GPoint * pt, int16 cnt, Color col)
383{
384}
385static void _GPSDraw_Text1(GWindow gw, struct font_data *fd, int32 x, int32 y,
386 char *txt, int32 cnt, FontMods * mods, Color col)
387{
388}
389static void _GPSDraw_Text2(GWindow gw, struct font_data *fd, int32 x, int32 y,
390 GChar2b * txt, int32 cnt, FontMods * mods, Color col)
391{
392}
393static GWindow GPSPrinterStartJob(GDisplay * gd, void *user_data,
394 GPrinterAttrs * attrs)
395{
396}
397static void GPSPrinterNextPage(GWindow w)
398{
399}
400static int GPSPrinterEndJob(GWindow w, int cancel)
401{
402}
403static GWindow PSDrawCreateTopWindow(GDisplay * gdisp, GRect * pos,
404 int (*eh) (GWindow, GEvent *),
405 void *user_data, GWindowAttrs * wattrs)
406{
407}
408static void PSDrawDestroyWindow(GWindow w)
409{
410}
411static struct displayfuncs psfuncs = {
412 PSDrawInit, PSDrawTerm, PSDrawNativeDisplay, PSDrawSetDefaultIcon,
413 PSDrawCreateTopWindow, PSDrawCreateSubWindow, PSDrawCreatePixmap,
414 PSDrawCreateBitmap, PSDrawCreateCursor, PSDrawDestroyWindow,
415 PSDestroyCursor, PSNativeWindowExists, PSSetZoom, PSSetWindowBorder,
416 PSSetDither, PSDrawReparentWindow, PSDrawSetVisible, PSDrawMove,
417 PSDrawMove, PSDrawResize, PSDrawMoveResize, PSDrawRaise,
418 PSDrawRaiseAbove, PSDrawIsAbove, PSDrawLower, PSDrawSetWindowTitles,
419 PSDrawSetWindowTitles8, PSDrawGetWindowTitle, PSDrawGetWindowTitle8,
420 PSDrawGetPointerPosition, PSDrawSetCursor, PSDrawGetCursor,
421 PSDrawGetRedirectWindow, PSDrawTranslateCoordinates, PSDrawBeep,
422 PSDrawFlush, PSDrawPushClip, PSDrawPopClip, PSDrawClear,
423 PSDrawDrawLine, PSDrawDrawArrowLine, PSDrawDrawRect, PSDrawFillRect,
424 PSDrawDrawCircle, PSDrawFillCircle, PSDrawDrawArc, PSDrawDrawPoly,
425 PSDrawFillPoly, PSDrawScroll, _GPSDraw_Image, _GPSDraw_TileImage,
426 _GPSDraw_ImageMagnified, _PSDraw_CopyScreenToImage, _PSDraw_Pixmap,
427 _PSDraw_TilePixmap, _GPSDraw_ScaleFont, _GPSDraw_StylizeFont,
428 _GPSDraw_LoadFontMetrics, _GPSDraw_Text1, _GPSDraw_Text2,
429 PSDrawCreateInputContext, PSDrawSetGIC, PSDrawGrabSelection,
430 PSDrawAddSelectionType, PSDrawRequestSelection,
431 PSDrawSelectionHasType, PSDrawPointerUngrab, PSDrawPointerGrab,
432 PSDrawRequestExpose, PSDrawForceUpdate, PSDrawSync,
433 PSDrawSkipMouseMoveEvents, PSDrawProcessPendingEvents,
434 PSDrawProcessWindowEvents, PSDrawProcessPendingEvents,
435 PSDrawEventLoop, PSDrawPostEvent, PSDrawPostDragEvent,
436 PSDrawRequestDeviceEvents, PSDrawRequestTimer, PSDrawCancelTimer,
437 PSDrawSyncThread, GPSPrinterStartJob, GPSPrinterNextPage,
438 GPSPrinterEndJob
439};
440GDisplay *_GPSDraw_CreateDisplay()
441{
442 GPSDisplay *gdisp;
443 gdisp->funcs = &psfuncs;
444}