GtkVnc.Display¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.DrawingArea (1), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10)
- Structs:
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/c |
Whether we should resize the desktop to match widget size |
||
r |
The VNC connection |
||
r/w/c |
The color depth |
||
r/w/c |
Whether we should define the widget size |
||
r/w/c |
Whether we should grab the keyboard |
||
r/w/c |
The key grab sequence |
||
r/w/c |
Whether we should grab the pointer |
||
r |
The height of the remote screen |
||
r/w/c |
Keep the aspect ratio matching the framebuffer when scaling |
||
r/w/c |
Whether we should use the local pointer |
||
r/w/c |
Whether we should use a lossy encoding |
||
r/w/c |
Whether this connection is read-only mode |
||
r/w/c |
Rotate the image of the remote desktop 90° clockwise |
||
r/w/c |
Whether we should use scaling |
||
r/w/c |
Whether we should leave other clients connected to the server |
||
r/w/c |
Whether we should smoothly interpolate when scaling |
||
r |
The width of the remote screen |
||
r/w/c |
Zoom percentage level |
Style Properties¶
- Inherited:
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class GtkVnc.Display(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod get_option_entries()¶
- Returns:
the option entries
- Return type:
Get the array of command line option entries containing VNC specific otions
- classmethod get_option_group()¶
- Returns:
the option group
- Return type:
Get a command line option group containing VNC specific options.
- classmethod new()¶
- Returns:
the new VNC display widget
- Return type:
Create a new widget capable of connecting to a VNC server and displaying its contents
The widget will initially be in a disconnected state
- close()¶
Request that the connection to the remote display is closed. The actual close will complete asynchronously and the “vnc-disconnected” signal will be emitted once complete.
- force_grab(enable)¶
-
If enable is
True
, immediately grab the pointer. If enable isFalse
, immediately ungrab the pointer. This overrides any automatic grabs that may have been done.
- get_allow_resize()¶
-
Determine whether widget size is used to request rsize of the remote desktop
- get_connection()¶
- Returns:
the connection object
- Return type:
Get the VNC connection object associated with the display
- get_depth()¶
- Returns:
the color depth
- Return type:
Get the desired colour depth
- get_force_size()¶
-
Determine whether the widget size is being forced to match the desktop size
- get_grab_keys()¶
- Returns:
the current grab keys
- Return type:
Get the current grab key sequence
- get_height()¶
- Returns:
the remote desktop height
- Return type:
Get the height of the remote desktop. This is only valid after the “vnc-initialized” signal has been emitted
- get_keep_aspect_ratio()¶
-
Determine whether the framebuffer aspect ratio is preserved when scaling.
- get_keyboard_grab()¶
-
Determine if the keyboard will be grabbed when the widget has input focus.
- get_lossy_encoding()¶
-
Determine whether lossy framebuffer update encodings are permitted
- get_name()¶
- Returns:
the remote desktop name
- Return type:
Get the name of the remote desktop. This is only valid after the “vnc-initialized” signal has been emitted
- get_pixbuf()¶
- Returns:
a
GdkPixbuf.Pixbuf
with the screenshot image buffer- Return type:
Take a screenshot of the display.
- get_pointer_grab()¶
-
Determine if the mouse pointer will be grabbed on first click
- get_pointer_local()¶
-
Determine if a local pointer will be shown
- get_read_only()¶
-
Determine if the widget will operate in read-only mode, denying keyboard/mouse inputs
- get_rotation()¶
- Returns:
the rotation angle in clockwise direction
- Return type:
Determine the current rotation angle of the remote desktop.
- get_scaling()¶
-
Determine whether the widget is permitted to scale the remote desktop to fit the current widget size.
-
Determine if other clients are permitted to share the VNC connection
- get_smoothing()¶
-
Determine whether pixels are smoothly interpolated when scaling.
- get_width()¶
- Returns:
the remote desktop width
- Return type:
Get the width of the remote desktop. This is only valid after the “vnc-initialized” signal has been emitted
- get_zoom_level()¶
- Returns:
the zoom percentage level between 10-400
- Return type:
Determine the current constant scaling factor.
- is_open()¶
-
Check if the connection for the display is currently open
- is_pointer_absolute()¶
-
Determine if the pointer is operating in absolute mode. This is only valid after the “vnc-initialized” signal has been emitted
- open_addr(addr, hostname)¶
- Parameters:
addr (
Gio.SocketAddress
) – the socket address
- Returns:
- Return type:
Open a socket connection to server identified by addr. addr may refer to either a TCP address (IPv4/6) or a UNIX socket address. The hostname provided should reflect the name of the host that the addr provides a connection to, if it is not already available in addr. For example, if addr points to a proxy server, then hostname can be used to provide the name of the final endpoint. This will be used by some authentication schemes, for example x509 certificate validation against hostname.
- open_fd(fd)¶
- Parameters:
fd (
int
) – file descriptor to use for the connection- Returns:
- Return type:
Open a connection using fd as the transport. If fd refers to a TCP connection, it is recommended to use
GtkVnc.Display.open_fd_with_hostname
instead, to provide the remote hostname. This allows use of x509 based authentication which requires a hostname to be available.
- open_fd_with_hostname(fd, hostname)¶
- Parameters:
- Returns:
- Return type:
Open a connection using fd as the transport. The hostname provided should reflect the name of the host that the fd provides a connection to. This will be used by some authentication schemes, for example x509 certificate validation against hostname.
- open_host(host, port)¶
- Parameters:
- Returns:
- Return type:
Open a TCP connection to the remote desktop at host listening on port.
- send_keys(keyvals)¶
- Parameters:
keyvals ([
int
]) – Keyval array
Send keyval click events to the display. Al the key press events will be sent first and then all the key release events.
keyvals should contain the X11 key value constants
- send_keys_ex(keyvals, kind)¶
- Parameters:
keyvals ([
int
]) – Keyval arraykind (
GtkVnc.DisplayKeyEvent
) – the type of event to send
Sends key events to the remote server. keyvals should contain X11 key code values. These will be automatically converted to XT scancodes if needed
If kind is
GtkVnc.DisplayKeyEvent.CLICK
then all the key press events will be sent first, followed by all the key release events.
- send_pointer(x, y, button_mask)¶
- Parameters:
Move the remote pointer to position (x, y) and set the button state to button_mask. This method will only work if the desktop is using absolute pointer mode. It will be a no-op if in relative pointer mode.
- set_allow_resize(enable)¶
-
Set whether changes in the widget size will be translated into requests to resize the remote desktop. Resizing of the remote desktop is not guaranteed to be honoured by servers, but when it is, it will avoid the need to do scaling.
- set_credential(type, data)¶
- Parameters:
- Returns:
- Return type:
Sets the value of the authentication credential type to the string data.
type is one of the
GVnc.ConnectionCredential
enum vlaues
- set_depth(depth)¶
- Parameters:
depth (
GtkVnc.DisplayDepthColor
) – the desired colour depth
Set the desired colour depth. Higher quality colour depths will require greater network bandwidth. The colour depth must be set prior to connecting to the remote server
- set_force_size(enable)¶
-
Set whether the widget size will be forced to match the remote desktop size. If the widget size does not match the remote desktop size, and scaling is disabled, some of the remote desktop may be hidden, or black borders may be drawn.
- set_grab_keys(seq)¶
- Parameters:
seq (
GtkVnc.GrabSequence
) – the new grab sequence
Set the sequence of keys that must be pressed to activate keyborad and pointer grab
- set_keep_aspect_ratio(enable)¶
-
Set whether the aspect ratio of the framebuffer is preserved when scaling.
- set_keyboard_grab(enable)¶
-
Set whether the widget will grab the keyboard when it has focus. Grabbing the keyboard allows it to intercept special key sequences, ensuring they get sent to the remote desktop, rather than intepreted locally.
- set_lossy_encoding(enable)¶
-
Set whether the client is willing to accept lossy framebuffer update encodings. Lossy encodings can improve performance by lowering network bandwidth requirements, with a cost that the display received by the client will not be pixel perfect
- set_pointer_grab(enable)¶
-
Set whether the widget will automatically grab the mouse pointer upon a button click
- set_pointer_local(enable)¶
-
If enable is
True
, then a local mouse cursor will be made visible. If enable isFalse
, the local mouse cursor will be hidden.
- set_read_only(enable)¶
-
Set whether the widget is running in read-only mode. In read-only mode, keyboard and mouse events will not be sent to the remote desktop server. The widget will merely display activity from the server.
- set_rotation(rotation)¶
- Parameters:
rotation (
int
) – The angle of rotation, degrees clockwise.
Set the rotation angle to view the display of the remote desktop, in clockwise direction.
- set_scaling(enable)¶
- Parameters:
enable (
bool
) –True
to allow scaling the desktop to fit,False
otherwise- Returns:
True
always- Return type:
Set whether the remote desktop contents is automatically scaled to fit the available widget size, or whether it will be rendered at 1:1 size
- Parameters:
shared (
bool
) – the new sharing state
Set the shared state for the connection. A
True
value allow allow this client to co-exist with other existing clients. AFalse
value will cause other clients to be dropped
- set_smoothing(enable)¶
-
Set whether pixels are smoothly interpolated when scaling, to avoid aliasing.
- set_zoom_level(zoom)¶
- Parameters:
zoom (
int
) – the zoom percentage level
Requests a constant scaling factor to be applied to the remote desktop. The zoom value is a percentage in the range 10-400.
If scaling mode is not active, then this results in the remote desktop always being rendered at the requested zoom level.
If scaling mode is active, then the remote desktop will be scaled to fit the widget regardless of the zoom level.
In both cases, when the remote desktop size changes, the widget preferred size will reflect the zoom level.
- do_vnc_auth_credential(credList) virtual¶
- Parameters:
credList (
GObject.ValueArray
) –
- do_vnc_connected() virtual¶
- do_vnc_disconnected() virtual¶
- do_vnc_initialized() virtual¶
Signal Details¶
- GtkVnc.Display.signals.vnc_auth_credential(display, object)¶
- Signal Name:
vnc-auth-credential
- Flags:
- Parameters:
display (
GtkVnc.Display
) – The object which received the signalobject (
GObject.ValueArray
) –
- GtkVnc.Display.signals.vnc_auth_failure(display, object)¶
- Signal Name:
vnc-auth-failure
- Flags:
- Parameters:
display (
GtkVnc.Display
) – The object which received the signalobject (
str
) –
- GtkVnc.Display.signals.vnc_auth_unsupported(display, object)¶
- Signal Name:
vnc-auth-unsupported
- Flags:
- Parameters:
display (
GtkVnc.Display
) – The object which received the signalobject (
int
) –
- GtkVnc.Display.signals.vnc_bell(display)¶
- Signal Name:
vnc-bell
- Flags:
- Parameters:
display (
GtkVnc.Display
) – The object which received the signal
- GtkVnc.Display.signals.vnc_connected(display)¶
- Signal Name:
vnc-connected
- Flags:
- Parameters:
display (
GtkVnc.Display
) – The object which received the signal
- GtkVnc.Display.signals.vnc_desktop_rename(display, object)¶
- Signal Name:
vnc-desktop-rename
- Flags:
- Parameters:
display (
GtkVnc.Display
) – The object which received the signalobject (
str
) –
- GtkVnc.Display.signals.vnc_desktop_resize(display, object, p0)¶
- Signal Name:
vnc-desktop-resize
- Flags:
- Parameters:
display (
GtkVnc.Display
) – The object which received the signalobject (
int
) –p0 (
int
) –
- GtkVnc.Display.signals.vnc_disconnected(display)¶
- Signal Name:
vnc-disconnected
- Flags:
- Parameters:
display (
GtkVnc.Display
) – The object which received the signal
- GtkVnc.Display.signals.vnc_error(display, object)¶
- Signal Name:
vnc-error
- Flags:
- Parameters:
display (
GtkVnc.Display
) – The object which received the signalobject (
str
) –
- GtkVnc.Display.signals.vnc_initialized(display)¶
- Signal Name:
vnc-initialized
- Flags:
- Parameters:
display (
GtkVnc.Display
) – The object which received the signal
- GtkVnc.Display.signals.vnc_keyboard_grab(display)¶
- Signal Name:
vnc-keyboard-grab
- Flags:
- Parameters:
display (
GtkVnc.Display
) – The object which received the signal
- GtkVnc.Display.signals.vnc_keyboard_ungrab(display)¶
- Signal Name:
vnc-keyboard-ungrab
- Flags:
- Parameters:
display (
GtkVnc.Display
) – The object which received the signal
- GtkVnc.Display.signals.vnc_pointer_grab(display)¶
- Signal Name:
vnc-pointer-grab
- Flags:
- Parameters:
display (
GtkVnc.Display
) – The object which received the signal
- GtkVnc.Display.signals.vnc_pointer_ungrab(display)¶
- Signal Name:
vnc-pointer-ungrab
- Flags:
- Parameters:
display (
GtkVnc.Display
) – The object which received the signal
- GtkVnc.Display.signals.vnc_power_control_failed(display)¶
- Signal Name:
vnc-power-control-failed
- Flags:
- Parameters:
display (
GtkVnc.Display
) – The object which received the signal
- GtkVnc.Display.signals.vnc_power_control_initialized(display)¶
- Signal Name:
vnc-power-control-initialized
- Flags:
- Parameters:
display (
GtkVnc.Display
) – The object which received the signal
- GtkVnc.Display.signals.vnc_server_cut_text(display, object)¶
- Signal Name:
vnc-server-cut-text
- Flags:
- Parameters:
display (
GtkVnc.Display
) – The object which received the signalobject (
str
) –
Property Details¶
- GtkVnc.Display.props.allow_resize¶
-
Whether we should resize the desktop to match widget size
- GtkVnc.Display.props.connection¶
- Name:
connection
- Type:
- Default Value:
- Flags:
The VNC connection
- GtkVnc.Display.props.depth¶
- Name:
depth
- Type:
- Default Value:
- Flags:
The color depth
- GtkVnc.Display.props.force_size¶
-
Whether we should define the widget size
- GtkVnc.Display.props.grab_keyboard¶
-
Whether we should grab the keyboard
- GtkVnc.Display.props.grab_keys¶
- Name:
grab-keys
- Type:
- Default Value:
- Flags:
The key grab sequence
- GtkVnc.Display.props.grab_pointer¶
-
Whether we should grab the pointer
- GtkVnc.Display.props.height¶
-
The height of the remote screen
- GtkVnc.Display.props.keep_aspect_ratio¶
-
Keep the aspect ratio matching the framebuffer when scaling
- GtkVnc.Display.props.local_pointer¶
-
Whether we should use the local pointer
- GtkVnc.Display.props.lossy_encoding¶
-
Whether we should use a lossy encoding
- GtkVnc.Display.props.read_only¶
-
Whether this connection is read-only mode
- GtkVnc.Display.props.rotation¶
-
Rotate the image of the remote desktop 90° clockwise
- GtkVnc.Display.props.scaling¶
-
Whether we should use scaling
-
Whether we should leave other clients connected to the server
- GtkVnc.Display.props.smoothing¶
-
Whether we should smoothly interpolate when scaling
- GtkVnc.Display.props.width¶
-
The width of the remote screen