]> git.wh0rd.org - ICEs.git/blame - 130161/ice.i.3
add bfin ice
[ICEs.git] / 130161 / ice.i.3
CommitLineData
45516216 1typedef unsigned int Color;
2typedef struct gimage {
3} GImage;
4typedef struct grect {
5} GRect;
6typedef struct gpoint {
7} GPoint;
8typedef struct {
9} FontRequest;
10typedef struct {
11} FontMods;
12typedef struct gwindow *GWindow;
13typedef struct gdisplay GDisplay;
14typedef struct gwindow_attrs {
15} GChar2b;
16struct displayfuncs {
17 void (*init) (GDisplay *);
18 void (*term) (GDisplay *);
19};
20typedef struct gpswindow {
21} *GPSWindow;
22typedef struct gpsdisplay {
23 struct displayfuncs *funcs;
24} GPSDisplay;
25extern void _GPSDraw_Image(GWindow, GImage *, GRect * src, int x, int y);
26extern void _GPSDraw_TileImage(GWindow, GImage *, GRect * src, int x, int y);
27extern void _GPSDraw_ImageMagnified(GWindow, GImage *, GRect * src, int x,
28 int y, int width, int height);
29extern void *_GPSDraw_LoadFontMetrics(GDisplay * gdisp, void *fd);
30extern struct font_data *_GPSDraw_ScaleFont(GDisplay * gdisp,
31 struct font_data *fd,
32 FontRequest * rq);
33extern struct font_data *_GPSDraw_StylizeFont(GDisplay * gdisp,
34 struct font_data *fd,
35 FontRequest * rq);
36static GImage *_PSDraw_CopyScreenToImage(GWindow w, GRect * rect)
37{
38}
39static void _PSDraw_Pixmap(GWindow _w, GWindow _pixmap, GRect * src, int x,
40 int y)
41{
42}
43static void _PSDraw_TilePixmap(GWindow _w, GWindow _pixmap, GRect * src, int x,
44 int y)
45{
46}
47static 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}
58static 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}
64static void PSDrawDrawCircle(GWindow w, GRect * rct, Color col)
65{
66}
67static void PSDrawFillCircle(GWindow w, GRect * rct, Color col)
68{
69 GPSWindow ps = (GPSWindow) w;
70 PSDrawElipse(ps, rct, "fill");
71}
72static void PSDrawDrawArc(GWindow w, GRect * rct, int sa, int ta, Color col)
73{
74}
75static void PSDrawDrawPoly(GWindow w, GPoint * pt, short cnt, Color col)
76{
77}
78static void _GPSDraw_Text1(GWindow gw, struct font_data *fd, int x, int y,
79 char *txt, int cnt, FontMods * mods, Color col)
80{
81}
82static void _GPSDraw_Text2(GWindow gw, struct font_data *fd, int x, int y,
83 GChar2b * txt, int cnt, FontMods * mods, Color col)
84{
85}
86static int GPSPrinterEndJob(GWindow w, int cancel)
87{
88}
89static 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};
96GDisplay *_GPSDraw_CreateDisplay()
97{
98 GPSDisplay *gdisp;
99 gdisp->funcs = &psfuncs;
100}