Support all reasonable cursor sizes. Reduce the size of the standard
cursor from 16x16 (with 6 columns unused) to 10x16 and rename it to the "small" cursor. Add a "large" 19x32 cursor and use it for screen widths larger than 800 pixels. Use libvgl's too-small indentation for the large data declarations. MOUSE_IMG_SIZE = 16 is still part of the API. If an application supplies invalid bitmaps for the cursor, then the results may be different from before.
This commit is contained in:
parent
c038ca255f
commit
5ed15f8bbd
@ -43,52 +43,132 @@ static void VGLMouseAction(int dummy);
|
|||||||
|
|
||||||
#define BORDER 0xff /* default border -- light white in rgb 3:3:2 */
|
#define BORDER 0xff /* default border -- light white in rgb 3:3:2 */
|
||||||
#define INTERIOR 0xa0 /* default interior -- red in rgb 3:3:2 */
|
#define INTERIOR 0xa0 /* default interior -- red in rgb 3:3:2 */
|
||||||
|
#define LARGE_MOUSE_IMG_XSIZE 19
|
||||||
|
#define LARGE_MOUSE_IMG_YSIZE 32
|
||||||
|
#define SMALL_MOUSE_IMG_XSIZE 10
|
||||||
|
#define SMALL_MOUSE_IMG_YSIZE 16
|
||||||
#define X 0xff /* any nonzero in And mask means part of cursor */
|
#define X 0xff /* any nonzero in And mask means part of cursor */
|
||||||
#define B BORDER
|
#define B BORDER
|
||||||
#define I INTERIOR
|
#define I INTERIOR
|
||||||
static byte StdAndMask[MOUSE_IMG_SIZE*MOUSE_IMG_SIZE] = {
|
static byte LargeAndMask[] = {
|
||||||
X,X,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
X,X,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
X,X,X,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
X,X,X,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
X,X,X,X,0,0,0,0,0,0,0,0,0,0,0,0,
|
X,X,X,X,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
X,X,X,X,X,0,0,0,0,0,0,0,0,0,0,0,
|
X,X,X,X,X,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
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,X,X,X,X,X,X,X,X,
|
||||||
|
X,X,X,X,X,X,X,X,X,X,
|
||||||
|
X,X,X,X,X,X,X,0,0,0,
|
||||||
|
X,X,X,0,X,X,X,X,0,0,
|
||||||
|
X,X,0,0,X,X,X,X,0,0,
|
||||||
|
0,0,0,0,0,X,X,X,X,0,
|
||||||
|
0,0,0,0,0,X,X,X,X,0,
|
||||||
|
0,0,0,0,0,0,X,X,0,0,
|
||||||
|
};
|
||||||
|
static byte SmallOrMask[] = {
|
||||||
|
B,B,0,0,0,0,0,0,0,0,
|
||||||
|
B,I,B,0,0,0,0,0,0,0,
|
||||||
|
B,I,I,B,0,0,0,0,0,0,
|
||||||
|
B,I,I,I,B,0,0,0,0,0,
|
||||||
|
B,I,I,I,I,B,0,0,0,0,
|
||||||
|
B,I,I,I,I,I,B,0,0,0,
|
||||||
|
B,I,I,I,I,I,I,B,0,0,
|
||||||
|
B,I,I,I,I,I,I,I,B,0,
|
||||||
|
B,I,I,I,I,I,I,I,I,B,
|
||||||
|
B,I,I,I,I,I,B,B,B,B,
|
||||||
|
B,I,I,B,I,I,B,0,0,0,
|
||||||
|
B,I,B,0,B,I,I,B,0,0,
|
||||||
|
B,B,0,0,B,I,I,B,0,0,
|
||||||
|
0,0,0,0,0,B,I,I,B,0,
|
||||||
|
0,0,0,0,0,B,I,I,B,0,
|
||||||
|
0,0,0,0,0,0,B,B,0,0,
|
||||||
};
|
};
|
||||||
#undef X
|
#undef X
|
||||||
#undef B
|
#undef B
|
||||||
#undef I
|
#undef I
|
||||||
static VGLBitmap VGLMouseStdAndMask =
|
static VGLBitmap VGLMouseLargeAndMask =
|
||||||
VGLBITMAP_INITIALIZER(MEMBUF, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE, StdAndMask);
|
VGLBITMAP_INITIALIZER(MEMBUF, LARGE_MOUSE_IMG_XSIZE, LARGE_MOUSE_IMG_YSIZE,
|
||||||
static VGLBitmap VGLMouseStdOrMask =
|
LargeAndMask);
|
||||||
VGLBITMAP_INITIALIZER(MEMBUF, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE, StdOrMask);
|
static VGLBitmap VGLMouseLargeOrMask =
|
||||||
|
VGLBITMAP_INITIALIZER(MEMBUF, LARGE_MOUSE_IMG_XSIZE, LARGE_MOUSE_IMG_YSIZE,
|
||||||
|
LargeOrMask);
|
||||||
|
static VGLBitmap VGLMouseSmallAndMask =
|
||||||
|
VGLBITMAP_INITIALIZER(MEMBUF, SMALL_MOUSE_IMG_XSIZE, SMALL_MOUSE_IMG_YSIZE,
|
||||||
|
SmallAndMask);
|
||||||
|
static VGLBitmap VGLMouseSmallOrMask =
|
||||||
|
VGLBITMAP_INITIALIZER(MEMBUF, SMALL_MOUSE_IMG_XSIZE, SMALL_MOUSE_IMG_YSIZE,
|
||||||
|
SmallOrMask);
|
||||||
static VGLBitmap *VGLMouseAndMask, *VGLMouseOrMask;
|
static VGLBitmap *VGLMouseAndMask, *VGLMouseOrMask;
|
||||||
static int VGLMouseShown = VGL_MOUSEHIDE;
|
static int VGLMouseShown = VGL_MOUSEHIDE;
|
||||||
static int VGLMouseXpos = 0;
|
static int VGLMouseXpos = 0;
|
||||||
@ -113,17 +193,17 @@ __VGLMouseMode(int mode)
|
|||||||
if (mode == VGL_MOUSESHOW) {
|
if (mode == VGL_MOUSESHOW) {
|
||||||
if (VGLMouseShown == VGL_MOUSEHIDE) {
|
if (VGLMouseShown == VGL_MOUSEHIDE) {
|
||||||
VGLMouseShown = VGL_MOUSESHOW;
|
VGLMouseShown = VGL_MOUSESHOW;
|
||||||
__VGLBitmapCopy(&VGLVDisplay, VGLMouseXpos, VGLMouseYpos, VGLDisplay,
|
__VGLBitmapCopy(&VGLVDisplay, VGLMouseXpos, VGLMouseYpos,
|
||||||
VGLMouseXpos, VGLMouseYpos,
|
VGLDisplay, VGLMouseXpos, VGLMouseYpos,
|
||||||
MOUSE_IMG_SIZE, -MOUSE_IMG_SIZE);
|
VGLMouseAndMask->VXsize, -VGLMouseAndMask->VYsize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (VGLMouseShown == VGL_MOUSESHOW) {
|
if (VGLMouseShown == VGL_MOUSESHOW) {
|
||||||
VGLMouseShown = VGL_MOUSEHIDE;
|
VGLMouseShown = VGL_MOUSEHIDE;
|
||||||
__VGLBitmapCopy(&VGLVDisplay, VGLMouseXpos, VGLMouseYpos, VGLDisplay,
|
__VGLBitmapCopy(&VGLVDisplay, VGLMouseXpos, VGLMouseYpos,
|
||||||
VGLMouseXpos, VGLMouseYpos,
|
VGLDisplay, VGLMouseXpos, VGLMouseYpos,
|
||||||
MOUSE_IMG_SIZE, MOUSE_IMG_SIZE);
|
VGLMouseAndMask->VXsize, VGLMouseAndMask->VYsize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
INTON();
|
INTON();
|
||||||
@ -193,13 +273,17 @@ VGLMouseSetImage(VGLBitmap *AndMask, VGLBitmap *OrMask)
|
|||||||
void
|
void
|
||||||
VGLMouseSetStdImage()
|
VGLMouseSetStdImage()
|
||||||
{
|
{
|
||||||
VGLMouseSetImage(&VGLMouseStdAndMask, &VGLMouseStdOrMask);
|
if (VGLDisplay->VXsize > 800)
|
||||||
|
VGLMouseSetImage(&VGLMouseLargeAndMask, &VGLMouseLargeOrMask);
|
||||||
|
else
|
||||||
|
VGLMouseSetImage(&VGLMouseSmallAndMask, &VGLMouseSmallOrMask);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
VGLMouseInit(int mode)
|
VGLMouseInit(int mode)
|
||||||
{
|
{
|
||||||
struct mouse_info mouseinfo;
|
struct mouse_info mouseinfo;
|
||||||
|
VGLBitmap *ormask;
|
||||||
int andmask, border, error, i, interior;
|
int andmask, border, error, i, interior;
|
||||||
|
|
||||||
switch (VGLModeInfo.vi_mem_model) {
|
switch (VGLModeInfo.vi_mem_model) {
|
||||||
@ -226,9 +310,14 @@ VGLMouseInit(int mode)
|
|||||||
border = strtoul(getenv("VGLMOUSEBORDERCOLOR"), NULL, 0);
|
border = strtoul(getenv("VGLMOUSEBORDERCOLOR"), NULL, 0);
|
||||||
if (getenv("VGLMOUSEINTERIORCOLOR") != NULL)
|
if (getenv("VGLMOUSEINTERIORCOLOR") != NULL)
|
||||||
interior = strtoul(getenv("VGLMOUSEINTERIORCOLOR"), NULL, 0);
|
interior = strtoul(getenv("VGLMOUSEINTERIORCOLOR"), NULL, 0);
|
||||||
for (i = 0; i < MOUSE_IMG_SIZE*MOUSE_IMG_SIZE; i++)
|
ormask = &VGLMouseLargeOrMask;
|
||||||
VGLMouseStdOrMask.Bitmap[i] = VGLMouseStdOrMask.Bitmap[i] == BORDER ?
|
for (i = 0; i < ormask->VXsize * ormask->VYsize; i++)
|
||||||
border : VGLMouseStdOrMask.Bitmap[i] == INTERIOR ? interior : 0;
|
ormask->Bitmap[i] = ormask->Bitmap[i] == BORDER ? border :
|
||||||
|
ormask->Bitmap[i] == INTERIOR ? interior : 0;
|
||||||
|
ormask = &VGLMouseSmallOrMask;
|
||||||
|
for (i = 0; i < ormask->VXsize * ormask->VYsize; i++)
|
||||||
|
ormask->Bitmap[i] = ormask->Bitmap[i] == BORDER ? border :
|
||||||
|
ormask->Bitmap[i] == INTERIOR ? interior : 0;
|
||||||
VGLMouseSetStdImage();
|
VGLMouseSetStdImage();
|
||||||
mouseinfo.operation = MOUSE_MODE;
|
mouseinfo.operation = MOUSE_MODE;
|
||||||
mouseinfo.u.mode.signal = SIGUSR2;
|
mouseinfo.u.mode.signal = SIGUSR2;
|
||||||
@ -283,9 +372,10 @@ VGLMouseFreezeXY(int x, int y)
|
|||||||
INTOFF();
|
INTOFF();
|
||||||
if (VGLMouseShown != VGL_MOUSESHOW)
|
if (VGLMouseShown != VGL_MOUSESHOW)
|
||||||
return 0;
|
return 0;
|
||||||
if (x >= VGLMouseXpos && x < VGLMouseXpos + MOUSE_IMG_SIZE &&
|
if (x >= VGLMouseXpos && x < VGLMouseXpos + VGLMouseAndMask->VXsize &&
|
||||||
y >= VGLMouseYpos && y < VGLMouseYpos + MOUSE_IMG_SIZE &&
|
y >= VGLMouseYpos && y < VGLMouseYpos + VGLMouseAndMask->VYsize &&
|
||||||
VGLMouseAndMask->Bitmap[(y-VGLMouseYpos)*MOUSE_IMG_SIZE+(x-VGLMouseXpos)])
|
VGLMouseAndMask->Bitmap[(y-VGLMouseYpos)*VGLMouseAndMask->VXsize+
|
||||||
|
(x-VGLMouseXpos)])
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -298,13 +388,13 @@ VGLMouseOverlap(int x, int y, int width, int hight)
|
|||||||
if (VGLMouseShown != VGL_MOUSESHOW)
|
if (VGLMouseShown != VGL_MOUSESHOW)
|
||||||
return 0;
|
return 0;
|
||||||
if (x > VGLMouseXpos)
|
if (x > VGLMouseXpos)
|
||||||
overlap = (VGLMouseXpos + MOUSE_IMG_SIZE) - x;
|
overlap = (VGLMouseXpos + VGLMouseAndMask->VXsize) - x;
|
||||||
else
|
else
|
||||||
overlap = (x + width) - VGLMouseXpos;
|
overlap = (x + width) - VGLMouseXpos;
|
||||||
if (overlap <= 0)
|
if (overlap <= 0)
|
||||||
return 0;
|
return 0;
|
||||||
if (y > VGLMouseYpos)
|
if (y > VGLMouseYpos)
|
||||||
overlap = (VGLMouseYpos + MOUSE_IMG_SIZE) - y;
|
overlap = (VGLMouseYpos + VGLMouseAndMask->VYsize) - y;
|
||||||
else
|
else
|
||||||
overlap = (y + hight) - VGLMouseYpos;
|
overlap = (y + hight) - VGLMouseYpos;
|
||||||
return overlap > 0;
|
return overlap > 0;
|
||||||
@ -319,10 +409,10 @@ VGLMouseMerge(int x, int y, int width, byte *line)
|
|||||||
if (xstart < VGLMouseXpos)
|
if (xstart < VGLMouseXpos)
|
||||||
xstart = VGLMouseXpos;
|
xstart = VGLMouseXpos;
|
||||||
xend = x + width;
|
xend = x + width;
|
||||||
if (xend > VGLMouseXpos + MOUSE_IMG_SIZE)
|
if (xend > VGLMouseXpos + VGLMouseAndMask->VXsize)
|
||||||
xend = VGLMouseXpos + MOUSE_IMG_SIZE;
|
xend = VGLMouseXpos + VGLMouseAndMask->VXsize;
|
||||||
for (x1 = xstart; x1 < xend; x1++) {
|
for (x1 = xstart; x1 < xend; x1++) {
|
||||||
pos = (y - VGLMouseYpos) * MOUSE_IMG_SIZE + x1 - VGLMouseXpos;
|
pos = (y - VGLMouseYpos) * VGLMouseAndMask->VXsize + x1 - VGLMouseXpos;
|
||||||
if (VGLMouseAndMask->Bitmap[pos])
|
if (VGLMouseAndMask->Bitmap[pos])
|
||||||
bcopy(&VGLMouseOrMask->Bitmap[pos * VGLDisplay->PixelBytes],
|
bcopy(&VGLMouseOrMask->Bitmap[pos * VGLDisplay->PixelBytes],
|
||||||
&line[(x1 - x) * VGLDisplay->PixelBytes], VGLDisplay->PixelBytes);
|
&line[(x1 - x) * VGLDisplay->PixelBytes], VGLDisplay->PixelBytes);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user