plan9fox/sys/src/9/sgi/screen.h
cinap_lenrek 1fe3143e4c kernel: cleanup the software mouse cursor mess
The swcursor used a 32x32 image for saving/restoring
screen contents for no reason.

Add a doflush argument to swcursorhide(), so that
disabling software cursor with a double buffered
softscreen is properly hidden. The doflush parameter
should be set to 0 in all other cases as swcursordraw()
will flushes both (current and previours) locations.

Make sure swcursorinit() and swcursorhide() clear the
visibility flag, even when gscreen is nil.

Remove the cursor locking and just do everything within
the drawlock. All cursor functions such as curson(),
cursoff() and setcursor() will be called drawlock
locked. This also means &cursor can be read.

Fix devmouse cursor reads and writes. We now have the
global cursor variable that is only modified under
the drawlock. So copy under drawlock.

Move the pc software cursor implementation into vgasoft
driver, so screen.c does not need to handle it as
a special case.

Remove unused functions such as drawhasclients().
2020-04-10 17:12:51 +02:00

30 lines
779 B
C

/* devmouse.c */
typedef struct Cursor Cursor;
extern Cursor cursor;
extern void mousetrack(int, int, int, ulong);
extern void absmousetrack(int, int, int, ulong);
extern Point mousexy(void);
extern void mouseaccelerate(int);
extern int m3mouseputc(Queue*, int);
extern int m5mouseputc(Queue*, int);
extern int mouseputc(Queue*, int);
/* mouse.c */
extern void mousectl(Cmdbuf*);
extern void mouseresize(void);
extern void mouseredraw(void);
/* screen.c */
extern void blankscreen(int);
extern void flushmemscreen(Rectangle);
extern Memdata* attachscreen(Rectangle*, ulong*, int*, int*, int*);
extern void cursoron(void);
extern void cursoroff(void);
extern void setcursor(Cursor*);
/* devdraw.c */
extern QLock drawlock;
#define ishwimage(i) 0 /* for ../port/devdraw.c */