Learn how to evaluate and integrate the VNC SDK

We're here if you need help.

Viewer

class Viewer

A VNC-compatible Viewer showing the screen of and controlling a remote computer.

For more information, see vnc_Viewer in the C API documentation.

Nested classes

Constructor summary

Modifier and Type Method and Description
Viewer

Viewer()

Creates and returns a new viewer.

Method summary

Modifier and Type Method and Description
void

Viewer.Dispose()

Destroys the viewer.

void

Viewer.SetConnectionCallback(Viewer.ConnectionCallback)

Sets the callbacks for the Viewer to call when various events occur during its lifetime.

ConnectionHandler

Viewer.GetConnectionHandler()

Returns the viewer’s ConnectionHandler for accepting connections.

ConnectionStatus

Viewer.GetConnectionStatus()

Returns the status of the viewer’s connection.

String

Viewer.GetPeerAddress()

Returns the address of the viewer’s server.

void

Viewer.Disconnect()

Disconnects this viewer from the server.

String

Viewer.GetDisconnectReason()

Returns a string ID representing the reason for the last viewer disconnection.

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.

void

Viewer.SetFramebufferCallback(Viewer.FramebufferCallback)

Sets the framebuffer callback for this viewer.

void

Viewer.SetViewerFb(Byte [], ImmutablePixelFormat, Int32, Int32, Int32)

Sets the viewer framebuffer.

Int32

Viewer.GetViewerFbWidth()

Gets the width of the viewer framebuffer.

Int32

Viewer.GetViewerFbHeight()

Gets the height of the viewer framebuffer.

ImmutablePixelFormat

Viewer.GetViewerFbPixelFormat()

Gets the pixel format of the viewer framebuffer.

ImmutableDataBuffer

Viewer.GetViewerFbData(Int32, Int32, Int32, Int32)

Returns the viewer framebuffer data for the given rectangle.

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.

void

Viewer.SetServerEventCallback(Viewer.ServerEventCallback)

Sets the server event callback for this viewer.

void

Viewer.SendClipboardText(String)

Copies the given text to the server’s clipboard.

void

Viewer.SendPointerEvent(Int32, Int32, Viewer.MouseButton, Boolean)

Sends a pointer event to the server.

void

Viewer.SendScrollEvent(Int32, Viewer.MouseWheel)

Sends a scroll wheel event to the server.

void

Viewer.SendKeyDown(Int32, Int32)

Sends a key down (press) event to the server.

void

Viewer.SendKeyUp(Int32)

Sends a key up (release) event to the server.

void

Viewer.ReleaseAllKeys()

Send key up events for all currently pressed keys.

void

Viewer.SetAuthenticationCallback(Viewer.AuthenticationCallback)

Sets the callback to be called when a username and/or password is required.

void

Viewer.SendAuthenticationResponse(Boolean, String, String)

Provides the SDK with the result of a username/password request.

void

Viewer.SetPeerVerificationCallback(Viewer.PeerVerificationCallback)

Sets the callbacks to be called to verify the identity of the peer (server).

void

Viewer.SendPeerVerificationResponse(Boolean)

Provides the SDK with the response to the Viewer.PeerVerificationCallback::verifyPeer request.

AnnotationManager

Viewer.GetAnnotationManager()

Obtains the Viewer’s AnnotationManager for handling annotation operations.

PictureQuality

Viewer.GetPictureQuality()

Returns the viewer’s current picture quality.

void

Viewer.SetPictureQuality(Viewer.PictureQuality)

Sets the desired picture quality of the session from the range of options enumerated by Viewer.PictureQuality.

MessagingManager

Viewer.GetMessagingManager()

Obtains the Viewer’s Messaging Manager for handling messaging

void

Viewer.SetEncryptionLevel(Viewer.EncryptionLevel)

Sets the desired encryption level of the session from the range of options enumerated by Viewer.EncryptionLevel.

EncryptionLevel

Viewer.GetEncryptionLevel()

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 ConnectionHandler for 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 AnnotationManager for 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.

×