SpiceClientGtk.Display

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Bin Gtk.Bin Gtk.EventBox Gtk.EventBox Gtk.Bin->Gtk.EventBox Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container Gtk.Container->Gtk.Bin SpiceClientGtk.Display SpiceClientGtk.Display Gtk.EventBox->SpiceClientGtk.Display Gtk.Widget->Gtk.Container

Subclasses:

None

Methods

Inherited:

Gtk.EventBox (5), Gtk.Bin (1), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10)

Structs:

Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)

class

new (session, channel_id)

class

new_with_monitor (session, channel_id, monitor_id)

get_grab_keys ()

get_pixbuf ()

keyboard_ungrab ()

mouse_ungrab ()

send_keys (keyvals, kind)

set_grab_keys (seq)

Virtual Methods

Inherited:

Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10)

Properties

Inherited:

Gtk.EventBox (2), Gtk.Container (3), Gtk.Widget (39)

Name

Type

Flags

Short Description

channel-id

int

r/w/co

Channel ID for this display

disable-inputs

bool

r/w/c

Whether inputs should be disabled

grab-keyboard

bool

r/w/c

Whether we should grab the keyboard.

grab-mouse

bool

r/w/c

Whether we should grab the mouse.

keypress-delay

int

r/w/c

Keypress delay

monitor-id

int

r/w/c

Select monitor ID

only-downscale

bool

r/w/c

If scaling, only scale down, never up

ready

bool

r

Ready to display

resize-guest

bool

r/w/c

Try to adapt guest display on window resize. Requires guest cooperation.

scaling

bool

r/w/c

Whether we should use scaling

session

SpiceClientGLib.Session

r/w/co

SpiceClientGLib.Session

zoom-level

int

r/w/c

Zoom Level

Style Properties

Inherited:

Gtk.Widget (17)

Signals

Inherited:

Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Name

Short Description

grab-keys-pressed

Notify when the grab keys have been pressed

keyboard-grab

Notify when the keyboard grab is active or not.

mouse-grab

Notify when the mouse grab is active or not.

Fields

Inherited:

Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Class Details

class SpiceClientGtk.Display(**kwargs)
Bases:

Gtk.EventBox

Abstract:

No

Structure:

SpiceClientGtk.DisplayClass

The SpiceClientGtk.Display struct is opaque and should not be accessed directly.

classmethod new(session, channel_id)
Parameters:
Returns:

a new SpiceClientGtk.Display widget.

Return type:

SpiceClientGtk.Display

Creates a new SpiceClientGtk.Display widget.

classmethod new_with_monitor(session, channel_id, monitor_id)
Parameters:
Returns:

a new SpiceClientGtk.Display widget.

Return type:

SpiceClientGtk.Display

Creates a new SpiceClientGtk.Display widget associated with the monitor id.

New in version 0.13.

get_grab_keys()
Returns:

the current grab key combination.

Return type:

SpiceClientGtk.GrabSequence

Finds the current grab key combination for the self.

get_pixbuf()
Returns:

a GdkPixbuf.Pixbuf with the screenshot image buffer

Return type:

GdkPixbuf.Pixbuf

Take a screenshot of the display.

keyboard_ungrab()

Ungrab the keyboard.

New in version 0.40.

mouse_ungrab()

Ungrab the mouse.

send_keys(keyvals, kind)
Parameters:

Send keyval press/release events to the display.

set_grab_keys(seq)
Parameters:

seq (SpiceClientGtk.GrabSequence) – key sequence

Set the key combination to grab/ungrab the keyboard. The default is “Control L + Alt L”.

Signal Details

SpiceClientGtk.Display.signals.grab_keys_pressed(display)
Signal Name:

grab-keys-pressed

Flags:

RUN_FIRST

Parameters:

display (SpiceClientGtk.Display) – The object which received the signal

Notify when the grab keys have been pressed

SpiceClientGtk.Display.signals.keyboard_grab(display, status)
Signal Name:

keyboard-grab

Flags:

RUN_FIRST

Parameters:

Notify when the keyboard grab is active or not.

SpiceClientGtk.Display.signals.mouse_grab(display, status)
Signal Name:

mouse-grab

Flags:

RUN_FIRST

Parameters:

Notify when the mouse grab is active or not.

Property Details

SpiceClientGtk.Display.props.channel_id
Name:

channel-id

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

channel-id for this SpiceClientGtk.Display

SpiceClientGtk.Display.props.disable_inputs
Name:

disable-inputs

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

Disable all keyboard & mouse inputs.

New in version 0.8.

SpiceClientGtk.Display.props.grab_keyboard
Name:

grab-keyboard

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, CONSTRUCT

Whether we should grab the keyboard.

SpiceClientGtk.Display.props.grab_mouse
Name:

grab-mouse

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, CONSTRUCT

Whether we should grab the mouse.

SpiceClientGtk.Display.props.keypress_delay
Name:

keypress-delay

Type:

int

Default Value:

100

Flags:

READABLE, WRITABLE, CONSTRUCT

Delay in ms of non-modifiers key press events. If the key is released before this delay, a single press & release event is sent to the server. If the key is pressed longer than the keypress-delay, the server will receive the delayed press event, and a following release event when the key is released.

New in version 0.13.

SpiceClientGtk.Display.props.monitor_id
Name:

monitor-id

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, CONSTRUCT

Select monitor from SpiceClientGtk.Display to show. The value -1 means the whole display is shown. By default, the monitor 0 is selected.

New in version 0.13.

SpiceClientGtk.Display.props.only_downscale
Name:

only-downscale

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

If scaling, only scale down, never up.

New in version 0.14.

SpiceClientGtk.Display.props.ready
Name:

ready

Type:

bool

Default Value:

False

Flags:

READABLE

Indicate whether the display is ready to be shown. It takes into account several conditions, such as the channel display “mark” state, whether the monitor area is visible..

New in version 0.13.

SpiceClientGtk.Display.props.resize_guest
Name:

resize-guest

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

Try to adapt guest display on window resize. Requires guest cooperation.

SpiceClientGtk.Display.props.scaling
Name:

scaling

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, CONSTRUCT

Whether we should use scaling

SpiceClientGtk.Display.props.session
Name:

session

Type:

SpiceClientGLib.Session

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

SpiceClientGLib.Session for this SpiceClientGtk.Display

SpiceClientGtk.Display.props.zoom_level
Name:

zoom-level

Type:

int

Default Value:

100

Flags:

READABLE, WRITABLE, CONSTRUCT

Zoom level in percentage, from 10 to 400. Default to 100. (this option is only supported with cairo backend when scaling is enabled)

New in version 0.10.