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
11d64787
Commit
11d64787
authored
Sep 27, 2001
by
dscho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added setTranslateFunction as member of rfbScreenInfo,
cursor may be NULL (no cursor).
parent
080ad356
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
4 deletions
+26
-4
README
README
+4
-1
cursor.c
cursor.c
+4
-1
main.c
main.c
+1
-0
rfb.h
rfb.h
+16
-1
rfbserver.c
rfbserver.c
+1
-1
No files found.
README
View file @
11d64787
...
@@ -128,9 +128,12 @@ There is only one hook:
...
@@ -128,9 +128,12 @@ There is only one hook:
newClientHook(rfbClientPtr cl)
newClientHook(rfbClientPtr cl)
is called when a new client has connected.
is called when a new client has connected.
You can also override the following method:
You can also override the following method
s
:
getCursorPtr(rfbClientPtr cl)
getCursorPtr(rfbClientPtr cl)
This could be used to make an animated cursor (if you really want ...)
This could be used to make an animated cursor (if you really want ...)
setTranslateFunction(rfbClientPtr cl)
If you insist on colour maps or something more obscure, you have to
implement this. Default is a trueColour mapping.
Cursor handling
Cursor handling
---------------
---------------
...
...
cursor.c
View file @
11d64787
...
@@ -370,7 +370,10 @@ void rfbDrawCursor(rfbClientPtr cl)
...
@@ -370,7 +370,10 @@ void rfbDrawCursor(rfbClientPtr cl)
rfbCursorPtr
c
=
s
->
cursor
;
rfbCursorPtr
c
=
s
->
cursor
;
int
i
,
j
,
x1
,
x2
,
y1
,
y2
,
i1
,
j1
,
bpp
=
s
->
rfbServerFormat
.
bitsPerPixel
/
8
,
int
i
,
j
,
x1
,
x2
,
y1
,
y2
,
i1
,
j1
,
bpp
=
s
->
rfbServerFormat
.
bitsPerPixel
/
8
,
rowstride
=
s
->
paddedWidthInBytes
,
rowstride
=
s
->
paddedWidthInBytes
,
bufSize
=
c
->
width
*
c
->
height
*
bpp
,
w
=
(
c
->
width
+
7
)
/
8
;
bufSize
,
w
;
if
(
!
c
)
return
;
bufSize
=
c
->
width
*
c
->
height
*
bpp
;
w
=
(
c
->
width
+
7
)
/
8
;
if
(
s
->
cursorIsDrawn
)
if
(
s
->
cursorIsDrawn
)
rfbUndrawCursor
(
cl
);
rfbUndrawCursor
(
cl
);
if
(
s
->
underCursorBufferLen
<
bufSize
)
{
if
(
s
->
underCursorBufferLen
<
bufSize
)
{
...
...
main.c
View file @
11d64787
...
@@ -415,6 +415,7 @@ rfbScreenInfoPtr rfbGetScreen(int argc,char** argv,
...
@@ -415,6 +415,7 @@ rfbScreenInfoPtr rfbGetScreen(int argc,char** argv,
rfbScreen
->
setXCutText
=
defaultSetXCutText
;
rfbScreen
->
setXCutText
=
defaultSetXCutText
;
rfbScreen
->
getCursorPtr
=
defaultGetCursorPtr
;
rfbScreen
->
getCursorPtr
=
defaultGetCursorPtr
;
rfbScreen
->
cursor
=
&
myCursor
;
rfbScreen
->
cursor
=
&
myCursor
;
rfbScreen
->
setTranslateFunction
=
rfbSetTranslateFunction
;
rfbScreen
->
newClientHook
=
doNothingWithClient
;
rfbScreen
->
newClientHook
=
doNothingWithClient
;
/* initialize client list and iterator mutex */
/* initialize client list and iterator mutex */
...
...
rfb.h
View file @
11d64787
...
@@ -91,6 +91,7 @@ typedef void (*KbdReleaseAllKeysProcPtr) (struct rfbClientRec* cl);
...
@@ -91,6 +91,7 @@ typedef void (*KbdReleaseAllKeysProcPtr) (struct rfbClientRec* cl);
typedef
void
(
*
PtrAddEventProcPtr
)
(
int
buttonMask
,
int
x
,
int
y
,
struct
rfbClientRec
*
cl
);
typedef
void
(
*
PtrAddEventProcPtr
)
(
int
buttonMask
,
int
x
,
int
y
,
struct
rfbClientRec
*
cl
);
typedef
void
(
*
SetXCutTextProcPtr
)
(
char
*
str
,
int
len
,
struct
rfbClientRec
*
cl
);
typedef
void
(
*
SetXCutTextProcPtr
)
(
char
*
str
,
int
len
,
struct
rfbClientRec
*
cl
);
typedef
struct
rfbCursor
*
(
*
GetCursorProcPtr
)
(
struct
rfbClientRec
*
pScreen
);
typedef
struct
rfbCursor
*
(
*
GetCursorProcPtr
)
(
struct
rfbClientRec
*
pScreen
);
typedef
Bool
(
*
SetTranslateFunctionProcPtr
)(
struct
rfbClientRec
*
cl
);
typedef
void
(
*
NewClientHookPtr
)(
struct
rfbClientRec
*
cl
);
typedef
void
(
*
NewClientHookPtr
)(
struct
rfbClientRec
*
cl
);
/*
/*
...
@@ -110,6 +111,12 @@ typedef struct
...
@@ -110,6 +111,12 @@ typedef struct
Pixel
blackPixel
;
Pixel
blackPixel
;
Pixel
whitePixel
;
Pixel
whitePixel
;
/* some screen specific data can be put into a struct where screenData
* points to. You need this if you have more than one screen at the
* same time while using the same functions.
*/
void
*
screenData
;
/* The following two members are used to minimise the amount of unnecessary
/* The following two members are used to minimise the amount of unnecessary
drawing caused by cursor movement. Whenever any drawing affects the
drawing caused by cursor movement. Whenever any drawing affects the
part of the screen where the cursor is, the cursor is removed first and
part of the screen where the cursor is, the cursor is removed first and
...
@@ -212,7 +219,8 @@ typedef struct
...
@@ -212,7 +219,8 @@ typedef struct
PtrAddEventProcPtr
ptrAddEvent
;
PtrAddEventProcPtr
ptrAddEvent
;
SetXCutTextProcPtr
setXCutText
;
SetXCutTextProcPtr
setXCutText
;
GetCursorProcPtr
getCursorPtr
;
GetCursorProcPtr
getCursorPtr
;
SetTranslateFunctionProcPtr
setTranslateFunction
;
/* the following members are hooks, i.e. they are called if set,
/* the following members are hooks, i.e. they are called if set,
but not overriding original functionality */
but not overriding original functionality */
/* newClientHook is called just after a new client is created */
/* newClientHook is called just after a new client is created */
...
@@ -264,7 +272,14 @@ typedef struct RegionRec {
...
@@ -264,7 +272,14 @@ typedef struct RegionRec {
typedef
void
(
*
ClientGoneHookPtr
)(
struct
rfbClientRec
*
cl
);
typedef
void
(
*
ClientGoneHookPtr
)(
struct
rfbClientRec
*
cl
);
typedef
struct
rfbClientRec
{
typedef
struct
rfbClientRec
{
/* back pointer to the screen */
rfbScreenInfoPtr
screen
;
rfbScreenInfoPtr
screen
;
/* private data. You should put any application client specific data
* into a struct and let clientData point to it. Don't forget to
* free the struct via clientGoneHook!
*/
void
*
clientData
;
void
*
clientData
;
ClientGoneHookPtr
clientGoneHook
;
ClientGoneHookPtr
clientGoneHook
;
...
...
rfbserver.c
View file @
11d64787
...
@@ -533,8 +533,8 @@ rfbProcessClientNormalMessage(cl)
...
@@ -533,8 +533,8 @@ rfbProcessClientNormalMessage(cl)
cl
->
format
.
blueShift
=
msg
.
spf
.
format
.
blueShift
;
cl
->
format
.
blueShift
=
msg
.
spf
.
format
.
blueShift
;
cl
->
readyForSetColourMapEntries
=
TRUE
;
cl
->
readyForSetColourMapEntries
=
TRUE
;
cl
->
screen
->
setTranslateFunction
(
cl
);
rfbSetTranslateFunction
(
cl
);
return
;
return
;
...
...
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