Learn how to evaluate and integrate the VNC SDK
Viewer¶
-
class Viewer¶ A VNC-compatible Viewer showing the screen of and controlling a remote computer.
For more information, see
vnc_Viewerin the C API documentation.
Nested classes¶
- Viewer.PeerVerificationCallback
- Viewer.FramebufferCallback
- Viewer.ServerEventCallback
- Viewer.AuthenticationCallback
- Viewer.ConnectionCallback
- Viewer.ConnectionStatus
- Viewer.EncryptionLevel
- Viewer.MouseButton
- Viewer.PictureQuality
- Viewer.DisconnectFlags
- Viewer.MouseWheel
Constructor summary
| Modifier and Type | Method and Description |
|---|---|
Viewer |
Creates and returns a new viewer. |
Method summary
| Modifier and Type | Method and Description |
|---|---|
void |
Destroys the viewer. |
void |
Sets the callbacks for the Viewer to call when various events occur during its lifetime. |
ConnectionHandler |
Returns the viewer’s |
ConnectionStatus |
Returns the status of the viewer’s connection. |
| String |
Returns the address of the viewer’s server. |
void |
Disconnects this viewer from the server. |
| String |
Returns a string ID representing the reason for the last viewer disconnection. |
| String |
Returns a human-readable message sent by the server for the last disconnection, or NULL if the last disconnection was not initiated by the server. |
void |
Sets the framebuffer callback for this viewer. |
void |
Sets the viewer framebuffer. |
| Int32 |
Gets the width of the viewer framebuffer. |
| Int32 |
Gets the height of the viewer framebuffer. |
ImmutablePixelFormat |
Gets the pixel format of the viewer framebuffer. |
ImmutableDataBuffer |
Returns the viewer framebuffer data for the given rectangle. |
| Int32 |
Returns the stride of the viewer framebuffer data in pixels, that is, the number of pixels from the start of each row until the start of the next. |
void |
Sets the server event callback for this viewer. |
void |
Copies the given text to the server’s clipboard. |
void |
Sends a pointer event to the server. |
void |
Sends a scroll wheel event to the server. |
void |
Sends a key down (press) event to the server. |
void |
Sends a key up (release) event to the server. |
void |
Send key up events for all currently pressed keys. |
void |
Sets the callback to be called when a username and/or password is required. |
void |
Provides the SDK with the result of a username/password request. |
void |
Sets the callbacks to be called to verify the identity of the peer (server). |
void |
Provides the SDK with the response to the Viewer.PeerVerificationCallback::verifyPeer request. |
AnnotationManager |
Obtains the Viewer’s |
PictureQuality |
Returns the viewer’s current picture quality. |
void |
Sets the desired picture quality of the session from the range of options
enumerated by |
MessagingManager |
Obtains the Viewer’s Messaging Manager for handling messaging |
void |
Sets the desired encryption level of the session from the range of options
enumerated by |
EncryptionLevel |
Returns the Viewer’s current encryption level. |
Constructors¶
-
Viewer()¶ Creates and returns a new viewer.
For more information, see
vnc_Viewer_create()in the C API documentation.
Methods¶
-
void
Viewer.Dispose()¶ Destroys the viewer.
For more information, see
vnc_Viewer_destroy()in the C API documentation.
-
void
Viewer.SetConnectionCallback(Viewer.ConnectionCallback a)¶ Sets the callbacks for the Viewer to call when various events occur during its lifetime.
For more information, see
vnc_Viewer_setConnectionCallback()in the C API documentation.
-
ConnectionHandler
Viewer.GetConnectionHandler()¶ Returns the viewer’s
ConnectionHandlerfor accepting connections.For more information, see
vnc_Viewer_getConnectionHandler()in the C API documentation.
-
ConnectionStatus
Viewer.GetConnectionStatus()¶ Returns the status of the viewer’s connection.
For more information, see
vnc_Viewer_getConnectionStatus()in the C API documentation.
-
String
Viewer.GetPeerAddress()¶ Returns the address of the viewer’s server.
For more information, see
vnc_Viewer_getPeerAddress()in the C API documentation.
-
void
Viewer.Disconnect()¶ Disconnects this viewer from the server.
For more information, see
vnc_Viewer_disconnect()in the C API documentation.
-
String
Viewer.GetDisconnectReason()¶ Returns a string ID representing the reason for the last viewer disconnection.
For more information, see
vnc_Viewer_getDisconnectReason()in the C API documentation.
-
String
Viewer.GetDisconnectMessage()¶ Returns a human-readable message sent by the server for the last disconnection, or NULL if the last disconnection was not initiated by the server.
For more information, see
vnc_Viewer_getDisconnectMessage()in the C API documentation.
-
void
Viewer.SetFramebufferCallback(Viewer.FramebufferCallback a)¶ Sets the framebuffer callback for this viewer.
For more information, see
vnc_Viewer_setFramebufferCallback()in the C API documentation.
-
void
Viewer.SetViewerFb(Byte[] a, ImmutablePixelFormat b, Int32 c, Int32 d, Int32 e)¶ Sets the viewer framebuffer.
For more information, see
vnc_Viewer_setViewerFb()in the C API documentation.
-
Int32
Viewer.GetViewerFbWidth()¶ Gets the width of the viewer framebuffer.
For more information, see
vnc_Viewer_getViewerFbWidth()in the C API documentation.
-
Int32
Viewer.GetViewerFbHeight()¶ Gets the height of the viewer framebuffer.
For more information, see
vnc_Viewer_getViewerFbHeight()in the C API documentation.
-
ImmutablePixelFormat
Viewer.GetViewerFbPixelFormat()¶ Gets the pixel format of the viewer framebuffer.
For more information, see
vnc_Viewer_getViewerFbPixelFormat()in the C API documentation.
-
ImmutableDataBuffer
Viewer.GetViewerFbData(Int32 a, Int32 b, Int32 c, Int32 d)¶ Returns the viewer framebuffer data for the given rectangle.
For more information, see
vnc_Viewer_getViewerFbData()in the C API documentation.
-
Int32
Viewer.GetViewerFbStride()¶ Returns the stride of the viewer framebuffer data in pixels, that is, the number of pixels from the start of each row until the start of the next.
For more information, see
vnc_Viewer_getViewerFbStride()in the C API documentation.
-
void
Viewer.SetServerEventCallback(Viewer.ServerEventCallback a)¶ Sets the server event callback for this viewer.
For more information, see
vnc_Viewer_setServerEventCallback()in the C API documentation.
-
void
Viewer.SendClipboardText(String a)¶ Copies the given text to the server’s clipboard.
For more information, see
vnc_Viewer_sendClipboardText()in the C API documentation.
-
void
Viewer.SendPointerEvent(Int32 a, Int32 b, Viewer.MouseButton c, Boolean d)¶ Sends a pointer event to the server.
For more information, see
vnc_Viewer_sendPointerEvent()in the C API documentation.
-
void
Viewer.SendScrollEvent(Int32 a, Viewer.MouseWheel b)¶ Sends a scroll wheel event to the server.
For more information, see
vnc_Viewer_sendScrollEvent()in the C API documentation.
-
void
Viewer.SendKeyDown(Int32 a, Int32 b)¶ Sends a key down (press) event to the server.
For more information, see
vnc_Viewer_sendKeyDown()in the C API documentation.
-
void
Viewer.SendKeyUp(Int32 a)¶ Sends a key up (release) event to the server.
For more information, see
vnc_Viewer_sendKeyUp()in the C API documentation.
-
void
Viewer.ReleaseAllKeys()¶ Send key up events for all currently pressed keys.
For more information, see
vnc_Viewer_releaseAllKeys()in the C API documentation.
-
void
Viewer.SetAuthenticationCallback(Viewer.AuthenticationCallback a)¶ Sets the callback to be called when a username and/or password is required.
For more information, see
vnc_Viewer_setAuthenticationCallback()in the C API documentation.
-
void
Viewer.SendAuthenticationResponse(Boolean a, String b, String c)¶ Provides the SDK with the result of a username/password request.
For more information, see
vnc_Viewer_sendAuthenticationResponse()in the C API documentation.
-
void
Viewer.SetPeerVerificationCallback(Viewer.PeerVerificationCallback a)¶ Sets the callbacks to be called to verify the identity of the peer (server).
For more information, see
vnc_Viewer_setPeerVerificationCallback()in the C API documentation.
-
void
Viewer.SendPeerVerificationResponse(Boolean a)¶ Provides the SDK with the response to the Viewer.PeerVerificationCallback::verifyPeer request.
For more information, see
vnc_Viewer_sendPeerVerificationResponse()in the C API documentation.
-
AnnotationManager
Viewer.GetAnnotationManager()¶ Obtains the Viewer’s
AnnotationManagerfor handling annotation operations.For more information, see
vnc_Viewer_getAnnotationManager()in the C API documentation.
-
PictureQuality
Viewer.GetPictureQuality()¶ Returns the viewer’s current picture quality.
For more information, see
vnc_Viewer_getPictureQuality()in the C API documentation.
-
void
Viewer.SetPictureQuality(Viewer.PictureQuality a)¶ Sets the desired picture quality of the session from the range of options enumerated by
Viewer.PictureQuality.For more information, see
vnc_Viewer_setPictureQuality()in the C API documentation.
-
MessagingManager
Viewer.GetMessagingManager()¶ Obtains the Viewer’s Messaging Manager for handling messaging
For more information, see
vnc_Viewer_getMessagingManager()in the C API documentation.
-
void
Viewer.SetEncryptionLevel(Viewer.EncryptionLevel a)¶ Sets the desired encryption level of the session from the range of options enumerated by
Viewer.EncryptionLevel.For more information, see
vnc_Viewer_setEncryptionLevel()in the C API documentation.
-
EncryptionLevel
Viewer.GetEncryptionLevel()¶ Returns the Viewer’s current encryption level.
For more information, see
vnc_Viewer_getEncryptionLevel()in the C API documentation.