This commit is contained in:
parent
85c5409790
commit
da20432c31
8 changed files with 149 additions and 1483 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -605,6 +605,8 @@ HCURSOR MwLLGDICreateCursor(MwCursor* image, MwCursor* mask) {
|
||||||
ys = mask->height + mask->y;
|
ys = mask->height + mask->y;
|
||||||
ys = image->height + image->y - ys;
|
ys = image->height + image->y - ys;
|
||||||
|
|
||||||
|
if(ys < 0) ys = -ys;
|
||||||
|
|
||||||
memset(dmask, 0xff, (MwCursorDataHeight / 8) * MwCursorDataHeight);
|
memset(dmask, 0xff, (MwCursorDataHeight / 8) * MwCursorDataHeight);
|
||||||
memset(dimage, 0, (MwCursorDataHeight / 8) * MwCursorDataHeight);
|
memset(dimage, 0, (MwCursorDataHeight / 8) * MwCursorDataHeight);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1754,8 +1754,16 @@ static void clip(MwLL handle) {
|
||||||
my = MIN(my, y + ws[i]->wayland.wh);
|
my = MIN(my, y + ws[i]->wayland.wh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cx = cy = 50;
|
||||||
|
|
||||||
|
if(mx < cx) mx = cx;
|
||||||
|
if(my < cy) my = cy;
|
||||||
|
|
||||||
arrfree(ws);
|
arrfree(ws);
|
||||||
|
|
||||||
|
if(mx < cx) mx = cx;
|
||||||
|
if(my < cy) my = cy;
|
||||||
|
|
||||||
handle->wayland.clipping_rect.x = cx - x;
|
handle->wayland.clipping_rect.x = cx - x;
|
||||||
handle->wayland.clipping_rect.y = cy - y;
|
handle->wayland.clipping_rect.y = cy - y;
|
||||||
handle->wayland.clipping_rect.width = mx - cx;
|
handle->wayland.clipping_rect.width = mx - cx;
|
||||||
|
|
@ -2432,17 +2440,19 @@ static void MwLLSetCursorImpl(MwLL handle, MwCursor* image, MwCursor* mask) {
|
||||||
buffer_destroy(&handle->wayland.cursor);
|
buffer_destroy(&handle->wayland.cursor);
|
||||||
wl_surface_destroy(handle->wayland.cursor.surface);
|
wl_surface_destroy(handle->wayland.cursor.surface);
|
||||||
}
|
}
|
||||||
buffer_setup(&handle->wayland.cursor, image->width, image->height);
|
buffer_setup(&handle->wayland.cursor, mask->width, mask->height);
|
||||||
memset(handle->wayland.cursor.buf_back, 0, handle->wayland.cursor.buf_size);
|
memset(handle->wayland.cursor.buf_back, 0, handle->wayland.cursor.buf_size);
|
||||||
|
|
||||||
xs = -mask->x + image->x;
|
xs = -mask->x + image->x;
|
||||||
ys = mask->height + mask->y;
|
ys = mask->height + mask->y;
|
||||||
ys = image->height + image->y - ys;
|
ys = image->height + image->y - ys;
|
||||||
|
|
||||||
|
if(ys < 0) ys = -ys;
|
||||||
|
|
||||||
for(y = 0; y < mask->height; y++) {
|
for(y = 0; y < mask->height; y++) {
|
||||||
unsigned int d = mask->data[y];
|
unsigned int d = mask->data[y];
|
||||||
for(x = mask->width - 1; x >= 0; x--) {
|
for(x = mask->width - 1; x >= 0; x--) {
|
||||||
int idx = ((y * image->width) + x) * 4;
|
int idx = ((y * mask->width) + x) * 4;
|
||||||
|
|
||||||
if(d & 1) {
|
if(d & 1) {
|
||||||
handle->wayland.cursor.buf_back[idx + 3] = 255;
|
handle->wayland.cursor.buf_back[idx + 3] = 255;
|
||||||
|
|
@ -2454,7 +2464,7 @@ static void MwLLSetCursorImpl(MwLL handle, MwCursor* image, MwCursor* mask) {
|
||||||
unsigned int d = image->data[y];
|
unsigned int d = image->data[y];
|
||||||
for(x = image->width - 1; x >= 0; x--) {
|
for(x = image->width - 1; x >= 0; x--) {
|
||||||
int px = 0;
|
int px = 0;
|
||||||
int idx = (((y + ys) * image->width) + (x + xs)) * 4;
|
int idx = (((y + ys) * mask->width) + (x + xs)) * 4;
|
||||||
|
|
||||||
if(d & 1) {
|
if(d & 1) {
|
||||||
px = 255;
|
px = 255;
|
||||||
|
|
|
||||||
|
|
@ -1124,6 +1124,8 @@ Cursor MwLLX11CreateCursor(Display* display, MwCursor* image, MwCursor* mask) {
|
||||||
ys = mask->height + mask->y;
|
ys = mask->height + mask->y;
|
||||||
ys = image->height + image->y - ys;
|
ys = image->height + image->y - ys;
|
||||||
|
|
||||||
|
if(ys < 0) ys = -ys;
|
||||||
|
|
||||||
memset(cimage->data, 0, cimage->bytes_per_line * cimage->height);
|
memset(cimage->data, 0, cimage->bytes_per_line * cimage->height);
|
||||||
memset(cmask->data, 0, cmask->bytes_per_line * cmask->height);
|
memset(cmask->data, 0, cmask->bytes_per_line * cmask->height);
|
||||||
for(y = 0; y < mask->height; y++) {
|
for(y = 0; y < mask->height; y++) {
|
||||||
|
|
|
||||||
|
|
@ -1,51 +1,35 @@
|
||||||
#include <Mw/Milsko.h>
|
#include <Mw/Milsko.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Created by bitmaptobdf
|
||||||
|
*
|
||||||
* Copyright notice:
|
* Copyright notice:
|
||||||
* Copyright (c) Digital Equipment Corporation,1988. All Rights Reserved.
|
* These ""glyphs"" are unencumbered
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* Permission to use, copy, modify, and distribute this software and
|
|
||||||
* its documentation for any purpose and without fee is hereby granted,
|
|
||||||
* provided that the above copyright notices appear in all copies and
|
|
||||||
* that both those copyright notices and this permission notice appear
|
|
||||||
* in supporting documentation, and that the name
|
|
||||||
* Digital Equipment Corporation not be used in advertising or
|
|
||||||
* publicity pertaining to distribution of the software without
|
|
||||||
* specific, written prior permission. Digital
|
|
||||||
* Equipment Corporation makes no representations about the suitability
|
|
||||||
* of this software for any purpose. It is provided "as is" without
|
|
||||||
* express or implied warranty.
|
|
||||||
* DIGITAL EQUIPMENT CORPORATION DISCLAIMS ALL
|
|
||||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
|
||||||
* DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY SPECIAL,
|
|
||||||
* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
|
|
||||||
* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
|
|
||||||
* CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
|
||||||
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
MwCursor MwCursorArrow = {
|
MwCursor MwCursorArrow = {
|
||||||
16, 16, -15, -15, {
|
14, 14, -13, -14,
|
||||||
0, /* ................ */
|
{
|
||||||
6, /* .............##. */
|
3, /* ............## */
|
||||||
30, /* ...........####. */
|
15, /* ..........#### */
|
||||||
124, /* .........#####.. */
|
62, /* ........#####. */
|
||||||
508, /* .......#######.. */
|
254, /* ......#######. */
|
||||||
2040, /* .....########... */
|
1020, /* ....########.. */
|
||||||
8184, /* ...##########... */
|
4092, /* ..##########.. */
|
||||||
496, /* .......#####.... */
|
248, /* ......#####... */
|
||||||
1008, /* ......######.... */
|
504, /* .....######... */
|
||||||
1888, /* .....###.##..... */
|
944, /* ....###.##.... */
|
||||||
3680, /* ....###..##..... */
|
1840, /* ...###..##.... */
|
||||||
7232, /* ...###...#...... */
|
3616, /* ..###...#..... */
|
||||||
14400, /* ..###....#...... */
|
7200, /* .###....#..... */
|
||||||
28672, /* .###............ */
|
14336, /* ###........... */
|
||||||
8192, /* ..#............. */
|
4096, /* .#............ */
|
||||||
0 /* ................ */
|
0,
|
||||||
}};
|
0
|
||||||
|
}
|
||||||
|
};
|
||||||
MwCursor MwCursorArrowMask = {
|
MwCursor MwCursorArrowMask = {
|
||||||
16, 16, -15, -15, {
|
16, 16, -14, -15,
|
||||||
|
{
|
||||||
7, /* .............### */
|
7, /* .............### */
|
||||||
31, /* ...........##### */
|
31, /* ...........##### */
|
||||||
127, /* .........####### */
|
127, /* .........####### */
|
||||||
|
|
@ -53,7 +37,7 @@ MwCursor MwCursorArrowMask = {
|
||||||
2046, /* .....##########. */
|
2046, /* .....##########. */
|
||||||
8188, /* ...###########.. */
|
8188, /* ...###########.. */
|
||||||
16380, /* ..############.. */
|
16380, /* ..############.. */
|
||||||
8184, /* ...##########... */
|
16376, /* ..###########... */
|
||||||
2040, /* .....########... */
|
2040, /* .....########... */
|
||||||
4080, /* ....########.... */
|
4080, /* ....########.... */
|
||||||
8176, /* ...#########.... */
|
8176, /* ...#########.... */
|
||||||
|
|
@ -62,4 +46,5 @@ MwCursor MwCursorArrowMask = {
|
||||||
63552, /* #####....#...... */
|
63552, /* #####....#...... */
|
||||||
28672, /* .###............ */
|
28672, /* .###............ */
|
||||||
8192 /* ..#............. */
|
8192 /* ..#............. */
|
||||||
}};
|
}
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,55 +1,8 @@
|
||||||
#include <Mw/Milsko.h>
|
#include <Mw/Milsko.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Created by bitmaptobdf
|
||||||
|
*
|
||||||
* Copyright notice:
|
* Copyright notice:
|
||||||
* Copyright (c) Digital Equipment Corporation,1988. All Rights Reserved.
|
* These ""glyphs"" are unencumbered
|
||||||
*/
|
*/
|
||||||
/**
|
|
||||||
* Permission to use, copy, modify, and distribute this software and
|
|
||||||
* its documentation for any purpose and without fee is hereby granted,
|
|
||||||
* provided that the above copyright notices appear in all copies and
|
|
||||||
* that both those copyright notices and this permission notice appear
|
|
||||||
* in supporting documentation, and that the name
|
|
||||||
* Digital Equipment Corporation not be used in advertising or
|
|
||||||
* publicity pertaining to distribution of the software without
|
|
||||||
* specific, written prior permission. Digital
|
|
||||||
* Equipment Corporation makes no representations about the suitability
|
|
||||||
* of this software for any purpose. It is provided "as is" without
|
|
||||||
* express or implied warranty.
|
|
||||||
* DIGITAL EQUIPMENT CORPORATION DISCLAIMS ALL
|
|
||||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
|
||||||
* DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY SPECIAL,
|
|
||||||
* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
|
|
||||||
* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
|
|
||||||
* CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
|
||||||
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
|
||||||
MwCursor MwCursorCross = {
|
|
||||||
13, 12, -6, -6, {7175, /* ###.......### */
|
|
||||||
4617, /* #..#.....#..# */
|
|
||||||
2322, /* .#..#...#..#. */
|
|
||||||
1188, /* ..#..#.#..#.. */
|
|
||||||
584, /* ...#..#..#... */
|
|
||||||
272, /* ....#...#.... */
|
|
||||||
272, /* ....#...#.... */
|
|
||||||
584, /* ...#..#..#... */
|
|
||||||
1188, /* ..#..#.#..#.. */
|
|
||||||
2322, /* .#..#...#..#. */
|
|
||||||
4617, /* #..#.....#..# */
|
|
||||||
7175, /* ###.......### */
|
|
||||||
0, 0, 0, 0}};
|
|
||||||
MwCursor MwCursorCrossMask = {
|
|
||||||
13, 12, -6, -6, {7175, /* ###.......### */
|
|
||||||
7695, /* ####.....#### */
|
|
||||||
3870, /* .####...####. */
|
|
||||||
1980, /* ..####.####.. */
|
|
||||||
1016, /* ...#######... */
|
|
||||||
496, /* ....#####.... */
|
|
||||||
496, /* ....#####.... */
|
|
||||||
1016, /* ...#######... */
|
|
||||||
1980, /* ..####.####.. */
|
|
||||||
3870, /* .####...####. */
|
|
||||||
7695, /* ####.....#### */
|
|
||||||
7175, /* ###.......### */
|
|
||||||
0, 0, 0, 0}};
|
|
||||||
|
|
|
||||||
|
|
@ -1,65 +1,50 @@
|
||||||
#include <Mw/Milsko.h>
|
#include <Mw/Milsko.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Created by bitmaptobdf
|
||||||
|
*
|
||||||
* Copyright notice:
|
* Copyright notice:
|
||||||
* Copyright (c) Digital Equipment Corporation,1988. All Rights Reserved.
|
* These ""glyphs"" are unencumbered
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* Permission to use, copy, modify, and distribute this software and
|
|
||||||
* its documentation for any purpose and without fee is hereby granted,
|
|
||||||
* provided that the above copyright notices appear in all copies and
|
|
||||||
* that both those copyright notices and this permission notice appear
|
|
||||||
* in supporting documentation, and that the name
|
|
||||||
* Digital Equipment Corporation not be used in advertising or
|
|
||||||
* publicity pertaining to distribution of the software without
|
|
||||||
* specific, written prior permission. Digital
|
|
||||||
* Equipment Corporation makes no representations about the suitability
|
|
||||||
* of this software for any purpose. It is provided "as is" without
|
|
||||||
* express or implied warranty.
|
|
||||||
* DIGITAL EQUIPMENT CORPORATION DISCLAIMS ALL
|
|
||||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
|
||||||
* DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY SPECIAL,
|
|
||||||
* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
|
|
||||||
* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
|
|
||||||
* CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
|
||||||
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
MwCursor MwCursorDefault = {
|
MwCursor MwCursorDefault = {
|
||||||
16, 16, 0, -15, {
|
8, 14, 0, -14,
|
||||||
0, /* ................ */
|
{
|
||||||
24576, /* .##............. */
|
128, /* #....... */
|
||||||
30720, /* .####........... */
|
192, /* ##...... */
|
||||||
15872, /* ..#####......... */
|
224, /* ###..... */
|
||||||
16256, /* ..#######....... */
|
240, /* ####.... */
|
||||||
8160, /* ...########..... */
|
248, /* #####... */
|
||||||
8184, /* ...##########... */
|
252, /* ######.. */
|
||||||
3968, /* ....#####....... */
|
254, /* #######. */
|
||||||
4032, /* ....######...... */
|
255, /* ######## */
|
||||||
1760, /* .....##.###..... */
|
248, /* #####... */
|
||||||
1648, /* .....##..###.... */
|
216, /* ##.##... */
|
||||||
568, /* ......#...###... */
|
140, /* #...##.. */
|
||||||
540, /* ......#....###.. */
|
12, /* ....##.. */
|
||||||
14, /* ............###. */
|
6, /* .....##. */
|
||||||
4, /* .............#.. */
|
6, /* .....##. */
|
||||||
0 /* ................ */
|
0,
|
||||||
}};
|
0
|
||||||
|
}
|
||||||
|
};
|
||||||
MwCursor MwCursorDefaultMask = {
|
MwCursor MwCursorDefaultMask = {
|
||||||
16, 16, 0, -15, {
|
10, 16, -1, -15,
|
||||||
57344, /* ###............. */
|
{
|
||||||
63488, /* #####........... */
|
768, /* ##........ */
|
||||||
65024, /* #######......... */
|
896, /* ###....... */
|
||||||
32640, /* .########....... */
|
960, /* ####...... */
|
||||||
32736, /* .##########..... */
|
992, /* #####..... */
|
||||||
16376, /* ..###########... */
|
1008, /* ######.... */
|
||||||
16380, /* ..############.. */
|
1016, /* #######... */
|
||||||
8184, /* ...##########... */
|
1020, /* ########.. */
|
||||||
8160, /* ...########..... */
|
1022, /* #########. */
|
||||||
4080, /* ....########.... */
|
1023, /* ########## */
|
||||||
4088, /* ....#########... */
|
1023, /* ########## */
|
||||||
1916, /* .....###.#####.. */
|
1016, /* #######... */
|
||||||
1854, /* .....###..#####. */
|
956, /* ###.####.. */
|
||||||
543, /* ......#....##### */
|
828, /* ##..####.. */
|
||||||
14, /* ............###. */
|
30, /* .....####. */
|
||||||
4 /* .............#.. */
|
30, /* .....####. */
|
||||||
}};
|
12 /* ......##.. */
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,65 +1,50 @@
|
||||||
#include <Mw/Milsko.h>
|
#include <Mw/Milsko.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Created by bitmaptobdf
|
||||||
|
*
|
||||||
* Copyright notice:
|
* Copyright notice:
|
||||||
* Copyright (c) Digital Equipment Corporation,1988. All Rights Reserved.
|
* These ""glyphs"" are unencumbered
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* Permission to use, copy, modify, and distribute this software and
|
|
||||||
* its documentation for any purpose and without fee is hereby granted,
|
|
||||||
* provided that the above copyright notices appear in all copies and
|
|
||||||
* that both those copyright notices and this permission notice appear
|
|
||||||
* in supporting documentation, and that the name
|
|
||||||
* Digital Equipment Corporation not be used in advertising or
|
|
||||||
* publicity pertaining to distribution of the software without
|
|
||||||
* specific, written prior permission. Digital
|
|
||||||
* Equipment Corporation makes no representations about the suitability
|
|
||||||
* of this software for any purpose. It is provided "as is" without
|
|
||||||
* express or implied warranty.
|
|
||||||
* DIGITAL EQUIPMENT CORPORATION DISCLAIMS ALL
|
|
||||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
|
||||||
* DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY SPECIAL,
|
|
||||||
* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
|
|
||||||
* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
|
|
||||||
* CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
|
||||||
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
MwCursor MwCursorText = {
|
MwCursor MwCursorText = {
|
||||||
7, 16, -3, -7, {
|
7, 14, -3, -7,
|
||||||
0, /* ....... */
|
{
|
||||||
68, /* #...#.. */
|
119, /* ###.### */
|
||||||
40, /* .#.#... */
|
28, /* ..###.. */
|
||||||
16, /* ..#.... */
|
8, /* ...#... */
|
||||||
16, /* ..#.... */
|
8, /* ...#... */
|
||||||
16, /* ..#.... */
|
8, /* ...#... */
|
||||||
16, /* ..#.... */
|
8, /* ...#... */
|
||||||
16, /* ..#.... */
|
8, /* ...#... */
|
||||||
16, /* ..#.... */
|
8, /* ...#... */
|
||||||
16, /* ..#.... */
|
8, /* ...#... */
|
||||||
16, /* ..#.... */
|
8, /* ...#... */
|
||||||
16, /* ..#.... */
|
8, /* ...#... */
|
||||||
16, /* ..#.... */
|
8, /* ...#... */
|
||||||
40, /* .#.#... */
|
28, /* ..###.. */
|
||||||
68, /* #...#.. */
|
119, /* ###.### */
|
||||||
0 /* ....... */
|
0,
|
||||||
}};
|
0
|
||||||
|
}
|
||||||
|
};
|
||||||
MwCursor MwCursorTextMask = {
|
MwCursor MwCursorTextMask = {
|
||||||
7, 16, -3, -7, {
|
9, 16, -4, -8,
|
||||||
0, /* ....... */
|
{
|
||||||
102, /* ##..##. */
|
495, /* ####.#### */
|
||||||
60, /* .####.. */
|
511, /* ######### */
|
||||||
24, /* ..##... */
|
511, /* ######### */
|
||||||
24, /* ..##... */
|
124, /* ..#####.. */
|
||||||
24, /* ..##... */
|
56, /* ...###... */
|
||||||
24, /* ..##... */
|
56, /* ...###... */
|
||||||
24, /* ..##... */
|
56, /* ...###... */
|
||||||
24, /* ..##... */
|
56, /* ...###... */
|
||||||
24, /* ..##... */
|
56, /* ...###... */
|
||||||
24, /* ..##... */
|
56, /* ...###... */
|
||||||
24, /* ..##... */
|
56, /* ...###... */
|
||||||
24, /* ..##... */
|
56, /* ...###... */
|
||||||
60, /* .####.. */
|
124, /* ..#####.. */
|
||||||
102, /* ##..##. */
|
511, /* ######### */
|
||||||
0 /* ....... */
|
511, /* ######### */
|
||||||
}};
|
495 /* ####.#### */
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue