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