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