]> git.lizzy.rs Git - plan9front.git/blob - sys/src/9/omap/screen.h
kernel: make addbroken() static, remove misleading Proc* argument
[plan9front.git] / sys / src / 9 / omap / screen.h
1 typedef struct Cursor Cursor;
2 typedef struct OScreen OScreen;
3 typedef struct Omap3fb Omap3fb;
4 typedef struct Settings Settings;
5
6 /* devmouse.c */
7 extern Cursor   cursor;
8 extern void     mousetrack(int, int, int, ulong);
9 extern void     absmousetrack(int, int, int, ulong);
10 extern Point    mousexy(void);
11
12 extern void     mouseaccelerate(int);
13 extern void     mouseresize(void);
14 extern void     mouseredraw(void);
15
16 /* screen.c */
17 extern Memdata* attachscreen(Rectangle*, ulong*, int*, int*, int*);
18 extern void     flushmemscreen(Rectangle);
19 extern void     cursoron(void);
20 extern void     cursoroff(void);
21 extern void     setcursor(Cursor*);
22 extern int      screensize(int, int, int, ulong);
23 extern int      screenaperture(int, int);
24 extern Rectangle physgscreenr;  /* actual monitor size */
25 extern void     blankscreen(int);
26
27 /* devdraw.c */
28 extern void     deletescreenimage(void);
29 extern void     resetscreenimage(void);
30 extern void     setscreenimageclipr(Rectangle);
31 extern void     drawflush(void);
32 extern QLock    drawlock;
33
34 #define ishwimage(i)    0               /* for ../port/devdraw.c */
35
36 /* swcursor.c */
37 void            swcursorhide(int);
38 void            swcursoravoid(Rectangle);
39 void            swcursordraw(Point);
40 void            swcursorload(Cursor *);
41 void            swcursorinit(void);
42
43 /* for communication between devdss.c and screen.c */
44
45 enum {
46         /* maxima */
47         Wid             = 1280,
48         Ht              = 1024,
49         Depth           = 16,           /* bits per pixel */
50
51         Pcolours        = 256,          /* Palette */
52         Pred            = 0,
53         Pgreen          = 1,
54         Pblue           = 2,
55
56         Pblack          = 0x00,
57         Pwhite          = 0xFF,
58
59         /* settings indices */
60         Res800x600      = 0,
61         Res1024x768,
62         Res1280x1024,
63         Res1400x1050,
64 };
65
66 struct Settings {
67         uint    wid;            /* width in pixels */
68         uint    ht;             /* height in pixels */
69         uint    freq;           /* refresh frequency; only printed */
70         uint    chan;           /* draw chan */
71
72         /* shouldn't be needed? */
73         uint    pixelclock;
74
75         /* horizontal timing */
76         uint    hbp;            /* back porch: pixel clocks before scan line */
77         uint    hfp;            /* front porch: pixel clocks after scan line */
78         uint    hsw;            /* sync pulse width: more hfp */
79
80         /* vertical timing */
81         uint    vbp;            /* back porch: line clocks before frame */
82         uint    vfp;            /* front porch: line clocks after frame */
83         uint    vsw;            /* sync pulse width: more vfp */
84 };
85
86 struct OScreen {
87         Cursor;
88         Settings *settings;
89         int     open;
90 };
91
92 struct Omap3fb {                /* frame buffer for 24-bit active color */
93 //      short   palette[256];
94         /* pixel data, even; base type's width must match Depth */
95         ushort  pixel[Wid*Ht];
96 };