Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
libvncserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
libvncserver
Commits
c30ded8d
Commit
c30ded8d
authored
Sep 28, 2001
by
dscho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
exported rfbReverseByte
parent
0ea0b7f0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
+8
-10
cursor.c
cursor.c
+4
-10
rfb.h
rfb.h
+4
-0
No files found.
cursor.c
View file @
c30ded8d
...
@@ -134,9 +134,6 @@ rfbSendCursorShape(cl)
...
@@ -134,9 +134,6 @@ rfbSendCursorShape(cl)
for
(
i
=
0
;
i
<
pCursor
->
height
;
i
++
)
{
for
(
i
=
0
;
i
<
pCursor
->
height
;
i
++
)
{
for
(
j
=
0
;
j
<
bitmapRowBytes
;
j
++
)
{
for
(
j
=
0
;
j
<
bitmapRowBytes
;
j
++
)
{
bitmapByte
=
bitmapData
[
i
*
bitmapRowBytes
+
j
];
bitmapByte
=
bitmapData
[
i
*
bitmapRowBytes
+
j
];
/*if (screenInfo.bitmapBitOrder == LSBFirst) {
bitmapByte = _reverse_byte[bitmapByte];
}*/
cl
->
updateBuf
[
cl
->
ublen
++
]
=
(
char
)
bitmapByte
;
cl
->
updateBuf
[
cl
->
ublen
++
]
=
(
char
)
bitmapByte
;
}
}
}
}
...
@@ -160,9 +157,6 @@ rfbSendCursorShape(cl)
...
@@ -160,9 +157,6 @@ rfbSendCursorShape(cl)
for
(
i
=
0
;
i
<
pCursor
->
height
;
i
++
)
{
for
(
i
=
0
;
i
<
pCursor
->
height
;
i
++
)
{
for
(
j
=
0
;
j
<
bitmapRowBytes
;
j
++
)
{
for
(
j
=
0
;
j
<
bitmapRowBytes
;
j
++
)
{
bitmapByte
=
bitmapData
[
i
*
bitmapRowBytes
+
j
];
bitmapByte
=
bitmapData
[
i
*
bitmapRowBytes
+
j
];
/*if (screenInfo.bitmapBitOrder == LSBFirst) {
bitmapByte = _reverse_byte[bitmapByte];
}*/
cl
->
updateBuf
[
cl
->
ublen
++
]
=
(
char
)
bitmapByte
;
cl
->
updateBuf
[
cl
->
ublen
++
]
=
(
char
)
bitmapByte
;
}
}
}
}
...
@@ -179,7 +173,7 @@ rfbSendCursorShape(cl)
...
@@ -179,7 +173,7 @@ rfbSendCursorShape(cl)
}
}
/* conversion routine for predefined cursors in LSB order */
/* conversion routine for predefined cursors in LSB order */
static
unsigned
char
_reverse_b
yte
[
0x100
]
=
{
unsigned
char
rfbReverseB
yte
[
0x100
]
=
{
/* copied from Xvnc/lib/font/util/utilbitmap.c */
/* copied from Xvnc/lib/font/util/utilbitmap.c */
0x00
,
0x80
,
0x40
,
0xc0
,
0x20
,
0xa0
,
0x60
,
0xe0
,
0x00
,
0x80
,
0x40
,
0xc0
,
0x20
,
0xa0
,
0x60
,
0xe0
,
0x10
,
0x90
,
0x50
,
0xd0
,
0x30
,
0xb0
,
0x70
,
0xf0
,
0x10
,
0x90
,
0x50
,
0xd0
,
0x30
,
0xb0
,
0x70
,
0xf0
,
...
@@ -219,7 +213,7 @@ void rfbConvertLSBCursorBitmapOrMask(int width,int height,unsigned char* bitmap)
...
@@ -219,7 +213,7 @@ void rfbConvertLSBCursorBitmapOrMask(int width,int height,unsigned char* bitmap)
{
{
int
i
,
t
=
(
width
+
7
)
/
8
*
height
;
int
i
,
t
=
(
width
+
7
)
/
8
*
height
;
for
(
i
=
0
;
i
<
t
;
i
++
)
for
(
i
=
0
;
i
<
t
;
i
++
)
bitmap
[
i
]
=
_reverse_b
yte
[(
int
)
bitmap
[
i
]];
bitmap
[
i
]
=
rfbReverseB
yte
[(
int
)
bitmap
[
i
]];
}
}
/* Cursor creation. You "paint" a cursor and let these routines do the work */
/* Cursor creation. You "paint" a cursor and let these routines do the work */
...
@@ -350,12 +344,12 @@ void rfbUndrawCursor(rfbClientPtr cl)
...
@@ -350,12 +344,12 @@ void rfbUndrawCursor(rfbClientPtr cl)
x2
=
x1
+
c
->
width
;
x2
=
x1
+
c
->
width
;
if
(
x1
<
0
)
x1
=
0
;
if
(
x1
<
0
)
x1
=
0
;
if
(
x2
>=
s
->
width
)
x2
=
s
->
width
-
1
;
if
(
x2
>=
s
->
width
)
x2
=
s
->
width
-
1
;
x2
-=
x1
;
x2
-=
x1
;
if
(
x2
<=
0
)
return
;
y1
=
s
->
cursorY
-
c
->
yhot
;
y1
=
s
->
cursorY
-
c
->
yhot
;
y2
=
y1
+
c
->
height
;
y2
=
y1
+
c
->
height
;
if
(
y1
<
0
)
y1
=
0
;
if
(
y1
<
0
)
y1
=
0
;
if
(
y2
>=
s
->
height
)
y2
=
s
->
height
-
1
;
if
(
y2
>=
s
->
height
)
y2
=
s
->
height
-
1
;
y2
-=
y1
;
y2
-=
y1
;
if
(
y2
<=
0
)
return
;
for
(
j
=
0
;
j
<
y2
;
j
++
)
for
(
j
=
0
;
j
<
y2
;
j
++
)
memcpy
(
s
->
frameBuffer
+
(
y1
+
j
)
*
rowstride
+
x1
*
bpp
,
memcpy
(
s
->
frameBuffer
+
(
y1
+
j
)
*
rowstride
+
x1
*
bpp
,
s
->
underCursorBuffer
+
j
*
x2
*
bpp
,
s
->
underCursorBuffer
+
j
*
x2
*
bpp
,
...
...
rfb.h
View file @
c30ded8d
...
@@ -605,6 +605,7 @@ typedef struct rfbCursor {
...
@@ -605,6 +605,7 @@ typedef struct rfbCursor {
}
rfbCursor
,
*
rfbCursorPtr
;
}
rfbCursor
,
*
rfbCursorPtr
;
extern
Bool
rfbSendCursorShape
(
rfbClientPtr
cl
/*, rfbScreenInfoPtr pScreen*/
);
extern
Bool
rfbSendCursorShape
(
rfbClientPtr
cl
/*, rfbScreenInfoPtr pScreen*/
);
extern
unsigned
char
rfbReverseByte
[
0x100
];
extern
void
rfbConvertLSBCursorBitmapOrMask
(
int
width
,
int
height
,
unsigned
char
*
bitmap
);
extern
void
rfbConvertLSBCursorBitmapOrMask
(
int
width
,
int
height
,
unsigned
char
*
bitmap
);
extern
rfbCursorPtr
rfbMakeXCursor
(
int
width
,
int
height
,
char
*
cursorString
,
char
*
maskString
);
extern
rfbCursorPtr
rfbMakeXCursor
(
int
width
,
int
height
,
char
*
cursorString
,
char
*
maskString
);
extern
char
*
rfbMakeMaskForXCursor
(
int
width
,
int
height
,
char
*
cursorString
);
extern
char
*
rfbMakeMaskForXCursor
(
int
width
,
int
height
,
char
*
cursorString
);
...
@@ -614,6 +615,9 @@ extern void rfbFreeCursor(rfbCursorPtr cursor);
...
@@ -614,6 +615,9 @@ extern void rfbFreeCursor(rfbCursorPtr cursor);
extern
void
rfbDrawCursor
(
rfbClientPtr
cl
);
extern
void
rfbDrawCursor
(
rfbClientPtr
cl
);
extern
void
rfbUndrawCursor
(
rfbClientPtr
cl
);
extern
void
rfbUndrawCursor
(
rfbClientPtr
cl
);
/* cursor handling for the pointer */
extern
void
defaultPtrAddEvent
(
int
buttonMask
,
int
x
,
int
y
,
rfbClientPtr
cl
);
/* stats.c */
/* stats.c */
extern
void
rfbResetStats
(
rfbClientPtr
cl
);
extern
void
rfbResetStats
(
rfbClientPtr
cl
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment