2011-03-30 12:46:40 +00:00
|
|
|
typedef struct Cursor Cursor;
|
|
|
|
typedef struct OScreen OScreen;
|
|
|
|
typedef struct Omap3fb Omap3fb;
|
|
|
|
typedef struct Settings Settings;
|
|
|
|
|
|
|
|
/* devmouse.c */
|
2020-04-10 15:12:51 +00:00
|
|
|
extern Cursor cursor;
|
|
|
|
extern void mousetrack(int, int, int, ulong);
|
|
|
|
extern void absmousetrack(int, int, int, ulong);
|
|
|
|
extern Point mousexy(void);
|
2011-03-30 12:46:40 +00:00
|
|
|
|
|
|
|
extern void mouseaccelerate(int);
|
|
|
|
extern void mouseresize(void);
|
2013-04-14 14:28:54 +00:00
|
|
|
extern void mouseredraw(void);
|
2011-03-30 12:46:40 +00:00
|
|
|
|
|
|
|
/* screen.c */
|
2019-01-30 17:22:52 +00:00
|
|
|
extern Memdata* attachscreen(Rectangle*, ulong*, int*, int*, int*);
|
2011-03-30 12:46:40 +00:00
|
|
|
extern void flushmemscreen(Rectangle);
|
2013-04-14 14:28:54 +00:00
|
|
|
extern void cursoron(void);
|
|
|
|
extern void cursoroff(void);
|
2011-03-30 12:46:40 +00:00
|
|
|
extern void setcursor(Cursor*);
|
|
|
|
extern int screensize(int, int, int, ulong);
|
|
|
|
extern int screenaperture(int, int);
|
|
|
|
extern Rectangle physgscreenr; /* actual monitor size */
|
|
|
|
extern void blankscreen(int);
|
|
|
|
|
|
|
|
/* devdraw.c */
|
|
|
|
extern void deletescreenimage(void);
|
|
|
|
extern void resetscreenimage(void);
|
|
|
|
extern void setscreenimageclipr(Rectangle);
|
|
|
|
extern void drawflush(void);
|
|
|
|
extern QLock drawlock;
|
|
|
|
|
|
|
|
#define ishwimage(i) 0 /* for ../port/devdraw.c */
|
|
|
|
|
2013-04-14 14:28:54 +00:00
|
|
|
/* swcursor.c */
|
2020-04-10 15:12:51 +00:00
|
|
|
void swcursorhide(int);
|
2013-04-14 14:28:54 +00:00
|
|
|
void swcursoravoid(Rectangle);
|
|
|
|
void swcursordraw(Point);
|
|
|
|
void swcursorload(Cursor *);
|
|
|
|
void swcursorinit(void);
|
|
|
|
|
2011-03-30 12:46:40 +00:00
|
|
|
/* for communication between devdss.c and screen.c */
|
|
|
|
|
|
|
|
enum {
|
|
|
|
/* maxima */
|
|
|
|
Wid = 1280,
|
|
|
|
Ht = 1024,
|
|
|
|
Depth = 16, /* bits per pixel */
|
|
|
|
|
|
|
|
Pcolours = 256, /* Palette */
|
|
|
|
Pred = 0,
|
|
|
|
Pgreen = 1,
|
|
|
|
Pblue = 2,
|
|
|
|
|
|
|
|
Pblack = 0x00,
|
|
|
|
Pwhite = 0xFF,
|
|
|
|
|
|
|
|
/* settings indices */
|
|
|
|
Res800x600 = 0,
|
|
|
|
Res1024x768,
|
|
|
|
Res1280x1024,
|
|
|
|
Res1400x1050,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Settings {
|
|
|
|
uint wid; /* width in pixels */
|
|
|
|
uint ht; /* height in pixels */
|
|
|
|
uint freq; /* refresh frequency; only printed */
|
|
|
|
uint chan; /* draw chan */
|
|
|
|
|
|
|
|
/* shouldn't be needed? */
|
|
|
|
uint pixelclock;
|
|
|
|
|
|
|
|
/* horizontal timing */
|
|
|
|
uint hbp; /* back porch: pixel clocks before scan line */
|
|
|
|
uint hfp; /* front porch: pixel clocks after scan line */
|
|
|
|
uint hsw; /* sync pulse width: more hfp */
|
|
|
|
|
|
|
|
/* vertical timing */
|
|
|
|
uint vbp; /* back porch: line clocks before frame */
|
|
|
|
uint vfp; /* front porch: line clocks after frame */
|
|
|
|
uint vsw; /* sync pulse width: more vfp */
|
|
|
|
};
|
|
|
|
|
|
|
|
struct OScreen {
|
|
|
|
Cursor;
|
|
|
|
Settings *settings;
|
|
|
|
int open;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Omap3fb { /* frame buffer for 24-bit active color */
|
|
|
|
// short palette[256];
|
|
|
|
/* pixel data, even; base type's width must match Depth */
|
|
|
|
ushort pixel[Wid*Ht];
|
|
|
|
};
|