]> git.wh0rd.org - ICEs.git/blob - 130161/ice.i.3
more
[ICEs.git] / 130161 / ice.i.3
1 typedef unsigned int Color;
2 typedef struct gimage {
3 } GImage;
4 typedef struct grect {
5 } GRect;
6 typedef struct gpoint {
7 } GPoint;
8 typedef struct {
9 } FontRequest;
10 typedef struct {
11 } FontMods;
12 typedef struct gwindow *GWindow;
13 typedef struct gdisplay GDisplay;
14 typedef struct gwindow_attrs {
15 } GChar2b;
16 struct displayfuncs {
17 void (*init) (GDisplay *);
18 void (*term) (GDisplay *);
19 };
20 typedef struct gpswindow {
21 } *GPSWindow;
22 typedef struct gpsdisplay {
23 struct displayfuncs *funcs;
24 } GPSDisplay;
25 extern void _GPSDraw_Image(GWindow, GImage *, GRect * src, int x, int y);
26 extern void _GPSDraw_TileImage(GWindow, GImage *, GRect * src, int x, int y);
27 extern void _GPSDraw_ImageMagnified(GWindow, GImage *, GRect * src, int x,
28 int y, int width, int height);
29 extern void *_GPSDraw_LoadFontMetrics(GDisplay * gdisp, void *fd);
30 extern struct font_data *_GPSDraw_ScaleFont(GDisplay * gdisp,
31 struct font_data *fd,
32 FontRequest * rq);
33 extern struct font_data *_GPSDraw_StylizeFont(GDisplay * gdisp,
34 struct font_data *fd,
35 FontRequest * rq);
36 static GImage *_PSDraw_CopyScreenToImage(GWindow w, GRect * rect)
37 {
38 }
39 static void _PSDraw_Pixmap(GWindow _w, GWindow _pixmap, GRect * src, int x,
40 int y)
41 {
42 }
43 static void _PSDraw_TilePixmap(GWindow _w, GWindow _pixmap, GRect * src, int x,
44 int y)
45 {
46 }
47 static void PSMyArc(GPSWindow ps, double cx, double cy, double radx,
48 double rady, double sa, double ta)
49 {
50 double ea, temp;
51 ea = sa + ta;
52 while (sa < ea) {
53 temp = ((int)((sa + 90) / 90)) * 90;
54 PSDoArc(ps, cx, cy, radx, rady, sa, ea < temp ? ea : temp);
55 sa = temp;
56 }
57 }
58 static void PSDrawElipse(GPSWindow ps, GRect * rct, char *command)
59 {
60 float cx, cy, radx, rady;
61 if (radx != rady)
62 PSMyArc(ps, cx, cy, radx, rady, 0, 360);
63 }
64 static void PSDrawDrawCircle(GWindow w, GRect * rct, Color col)
65 {
66 }
67 static void PSDrawFillCircle(GWindow w, GRect * rct, Color col)
68 {
69 GPSWindow ps = (GPSWindow) w;
70 PSDrawElipse(ps, rct, "fill");
71 }
72 static void PSDrawDrawArc(GWindow w, GRect * rct, int sa, int ta, Color col)
73 {
74 }
75 static void PSDrawDrawPoly(GWindow w, GPoint * pt, short cnt, Color col)
76 {
77 }
78 static void _GPSDraw_Text1(GWindow gw, struct font_data *fd, int x, int y,
79 char *txt, int cnt, FontMods * mods, Color col)
80 {
81 }
82 static void _GPSDraw_Text2(GWindow gw, struct font_data *fd, int x, int y,
83 GChar2b * txt, int cnt, FontMods * mods, Color col)
84 {
85 }
86 static int GPSPrinterEndJob(GWindow w, int cancel)
87 {
88 }
89 static struct displayfuncs psfuncs = {
90 PSDrawDrawCircle, PSDrawFillCircle, PSDrawDrawArc, PSDrawDrawPoly,
91 _GPSDraw_Image, _GPSDraw_TileImage, _GPSDraw_ImageMagnified,
92 _PSDraw_CopyScreenToImage, _PSDraw_Pixmap, _PSDraw_TilePixmap,
93 _GPSDraw_ScaleFont, _GPSDraw_StylizeFont, _GPSDraw_LoadFontMetrics,
94 _GPSDraw_Text1, _GPSDraw_Text2, GPSPrinterEndJob
95 };
96 GDisplay *_GPSDraw_CreateDisplay()
97 {
98 GPSDisplay *gdisp;
99 gdisp->funcs = &psfuncs;
100 }