SpiceClientGLib.MainChannel¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
Agent capability bits 0 -> 31 |
||
r |
Whether the agent is connected |
||
d/r/w/c |
Color depth |
||
r/w/c |
Disable guest animations |
||
r/w/c |
Disable display position alignment |
||
r/w/c |
Disable using display position when setting monitor config |
||
r/w/c |
Disable guest font smoothing |
||
r/w/c |
Disable guest wallpaper |
||
r/w/c |
Maximum clipboard data size |
||
r |
Mouse mode |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Notify when the |
|
Provides guest clipboard data requested by |
|
Inform when clipboard data is available from the guest, and for which types. |
|
Inform when the clipboard is released from the guest, when no clipboard data is available from the guest. |
|
Request clipboard data from the client. |
|
Informs that clipboard selection data are available. |
|
Inform when clipboard data is available from the guest, and for which types. |
|
Inform when the clipboard is released from the guest, when no clipboard data is available from the guest. |
|
Request clipboard data from the client. |
|
Notify when the mouse mode has changed. |
|
Inform when migration is starting. |
|
This signal is emitted when a new file transfer task has been initiated on this channel. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class SpiceClientGLib.MainChannel(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
The
SpiceClientGLib.MainChannel
struct is opaque and should not be accessed directly.- agent_test_capability(cap)¶
- Parameters:
cap (
int
) – an agent capability identifier- Returns:
True
if cap (channel kind capability) is available.- Return type:
Test capability of a remote agent.
New in version 0.35.
- clipboard_selection_grab(selection, types)¶
- Parameters:
Grab the guest clipboard, with #VD_AGENT_CLIPBOARD types.
New in version 0.35.
- clipboard_selection_notify(selection, type, data)¶
- Parameters:
Send the clipboard data to the guest.
New in version 0.35.
- clipboard_selection_release(selection)¶
- Parameters:
selection (
int
) – one of the clipboard #VD_AGENT_CLIPBOARD_SELECTION_*
Release the clipboard (for example, when the client loses the clipboard grab): Inform the guest no clipboard data is available.
New in version 0.35.
- clipboard_selection_request(selection, type)¶
- Parameters:
Request clipboard data of type from the guest. The reply is sent through the
SpiceClientGLib.MainChannel
::main-clipboard-selection
signal.New in version 0.35.
- file_copy_async(sources, flags, cancellable, progress_callback, progress_callback_data, callback, *user_data)¶
- Parameters:
sources ([
Gio.File
]) – aNone
-terminated array ofGio.File
objects to be transferredflags (
Gio.FileCopyFlags
) – set ofGio.FileCopyFlags
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object,None
to ignoreprogress_callback (
Gio.FileProgressCallback
orNone
) – function to callback with progress information, orNone
if progress information is not neededprogress_callback_data (
object
orNone
) – user data to pass to progress_callbackcallback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – the data to pass to callback function
Copies the file sources to guest
If cancellable is not
None
, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the errorGio.IOErrorEnum.CANCELLED
will be returned.If progress_callback is not
None
, then the operation can be monitored by setting this to aGio.FileProgressCallback
function. progress_callback_data will be passed to this function. It is guaranteed that this callback will be called after all data has been transferred with the total number of bytes copied during the operation. Note that before release 0.31, progress_callback was broken since it only provided status for a single file transfer, but did not provide a way to determine which file it referred to. In release 0.31, this behavior was changed so that progress_callback provides the status of all ongoing file transfers. If you need to monitor the status of individual files, please connect to theSpiceClientGLib.MainChannel
::new-file-transfer
signal.When the operation is finished, callback will be called. You can then call
SpiceClientGLib.main_file_copy_finish
() to get the result of the operation. Note that before release 0.33 the callback was called for each file in multiple file transfer. This behavior was changed for the same reason as the progress_callback (above). If you need to monitor the ending of individual files, you can connect to “finished” signal from eachSpiceClientGLib.FileTransferTask
.New in version 0.35.
- file_copy_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
.- Raises:
- Returns:
- Return type:
Finishes copying the file started with
SpiceClientGLib.main_file_copy_async
().
- request_mouse_mode(mode)¶
- Parameters:
mode (
int
) – a SPICE_MOUSE_MODE
Request a mouse mode to the server. The server may not be able to change the mouse mode, but spice-gtk will try to request it when possible.
New in version 0.35.
- send_monitor_config()¶
-
Send monitors configuration previously set with
SpiceClientGLib.main_set_display
() andSpiceClientGLib.main_set_display_enabled
()New in version 0.35.
- update_display(id, x, y, width, height, update)¶
- Parameters:
Update the display id resolution.
If update is
True
, the remote configuration will be updated too after 1 second without further changes. You can send when you want without delay the new configuration to the remote withSpiceClientGLib.main_send_monitor_config
()New in version 0.35.
- update_display_enabled(id, enabled, update)¶
- Parameters:
When sending monitor configuration to agent guest, if enabled is
False
, don’t set display id, which the agent translates to disabling the display id. If enabled isTrue
, the monitor will be included in the next monitor update. Note: this will take effect next time the monitor configuration is sent.If update is
False
, no server update will be triggered by this call, but the value will be saved and used in the next configuration update.New in version 0.35.
- update_display_mm(id, width_mm, height_mm, update)¶
- Parameters:
Update the display id physical size.
If update is
True
, the remote configuration will be updated too after 1 second without further changes. You can send when you want without delay the new configuration to the remote withSpiceClientGLib.main_send_monitor_config
()New in version 0.39.
Signal Details¶
- SpiceClientGLib.MainChannel.signals.main_agent_update(main_channel)¶
- Signal Name:
main-agent-update
- Flags:
- Parameters:
main_channel (
SpiceClientGLib.MainChannel
) – The object which received the signal
Notify when the
SpiceClientGLib.MainChannel
:agent-connected
orSpiceClientGLib.MainChannel
:agent-caps-0
property change.
- SpiceClientGLib.MainChannel.signals.main_clipboard(main_channel, type, data)¶
- Signal Name:
main-clipboard
- Flags:
- Parameters:
main_channel (
SpiceClientGLib.MainChannel
) – The object which received the signaltype (
int
) – the VD_AGENT_CLIPBOARD data typedata (
bytes
) – clipboard data
Provides guest clipboard data requested by
SpiceClientGLib.main_clipboard_request
().Deprecated since version 0.6: use
SpiceClientGLib.MainChannel
::main-clipboard-selection
instead.
- SpiceClientGLib.MainChannel.signals.main_clipboard_grab(main_channel, types)¶
- Signal Name:
main-clipboard-grab
- Flags:
- Parameters:
main_channel (
SpiceClientGLib.MainChannel
) – The object which received the signaltypes ([
int
]) – the VD_AGENT_CLIPBOARD data types
- Return type:
Inform when clipboard data is available from the guest, and for which types.
Deprecated since version 0.6: use
SpiceClientGLib.MainChannel
::main-clipboard-selection-grab
instead.
- SpiceClientGLib.MainChannel.signals.main_clipboard_release(main_channel)¶
- Signal Name:
main-clipboard-release
- Flags:
- Parameters:
main_channel (
SpiceClientGLib.MainChannel
) – The object which received the signal
Inform when the clipboard is released from the guest, when no clipboard data is available from the guest.
Deprecated since version 0.6: use
SpiceClientGLib.MainChannel
::main-clipboard-selection-release
instead.
- SpiceClientGLib.MainChannel.signals.main_clipboard_request(main_channel, types)¶
- Signal Name:
main-clipboard-request
- Flags:
- Parameters:
main_channel (
SpiceClientGLib.MainChannel
) – The object which received the signaltypes (
int
) – the VD_AGENT_CLIPBOARD request type
- Returns:
True
if the request is successful- Return type:
Request clipboard data from the client.
Deprecated since version 0.6: use
SpiceClientGLib.MainChannel
::main-clipboard-selection-request
instead.
- SpiceClientGLib.MainChannel.signals.main_clipboard_selection(main_channel, selection, type, data)¶
- Signal Name:
main-clipboard-selection
- Flags:
- Parameters:
main_channel (
SpiceClientGLib.MainChannel
) – The object which received the signalselection (
int
) – a VD_AGENT_CLIPBOARD_SELECTION clipboardtype (
int
) – the VD_AGENT_CLIPBOARD data typedata (
bytes
) – clipboard data
Informs that clipboard selection data are available.
New in version 0.6.
- SpiceClientGLib.MainChannel.signals.main_clipboard_selection_grab(main_channel, selection, types)¶
- Signal Name:
main-clipboard-selection-grab
- Flags:
- Parameters:
main_channel (
SpiceClientGLib.MainChannel
) – The object which received the signalselection (
int
) – a VD_AGENT_CLIPBOARD_SELECTION clipboardtypes ([
int
]) – the VD_AGENT_CLIPBOARD data types
- Return type:
Inform when clipboard data is available from the guest, and for which types.
New in version 0.6.
- SpiceClientGLib.MainChannel.signals.main_clipboard_selection_release(main_channel, selection)¶
- Signal Name:
main-clipboard-selection-release
- Flags:
- Parameters:
main_channel (
SpiceClientGLib.MainChannel
) – The object which received the signalselection (
int
) – a VD_AGENT_CLIPBOARD_SELECTION clipboard
Inform when the clipboard is released from the guest, when no clipboard data is available from the guest.
New in version 0.6.
- SpiceClientGLib.MainChannel.signals.main_clipboard_selection_request(main_channel, selection, types)¶
- Signal Name:
main-clipboard-selection-request
- Flags:
- Parameters:
main_channel (
SpiceClientGLib.MainChannel
) – The object which received the signalselection (
int
) – a VD_AGENT_CLIPBOARD_SELECTION clipboardtypes (
int
) – the VD_AGENT_CLIPBOARD request type
- Returns:
True
if the request is successful- Return type:
Request clipboard data from the client.
New in version 0.6.
- SpiceClientGLib.MainChannel.signals.main_mouse_update(main_channel)¶
- Signal Name:
main-mouse-update
- Flags:
- Parameters:
main_channel (
SpiceClientGLib.MainChannel
) – The object which received the signal
Notify when the mouse mode has changed.
- SpiceClientGLib.MainChannel.signals.migration_started(main_channel, session)¶
- Signal Name:
migration-started
- Flags:
- Parameters:
main_channel (
SpiceClientGLib.MainChannel
) – The object which received the signalsession (
GObject.Object
) – a migrationSpiceClientGLib.Session
Inform when migration is starting. Application wishing to make connections themself can set the
SpiceClientGLib.Session
:client-sockets
toTrue
, then followSpiceClientGLib.Session
::channel-new
creation, and useSpiceClientGLib.Channel.open_fd
() once the socket is created.
- SpiceClientGLib.MainChannel.signals.new_file_transfer(main_channel, task)¶
- Signal Name:
new-file-transfer
- Flags:
- Parameters:
main_channel (
SpiceClientGLib.MainChannel
) – The object which received the signaltask (
GObject.Object
) – aSpiceClientGLib.FileTransferTask
This signal is emitted when a new file transfer task has been initiated on this channel. Client applications may take a reference on the task object and use it to monitor the status of the file transfer task.
New in version 0.31.
Property Details¶
- SpiceClientGLib.MainChannel.props.agent_caps_0¶
-
Agent capability bits 0 -> 31
- SpiceClientGLib.MainChannel.props.agent_connected¶
-
Whether the agent is connected
- SpiceClientGLib.MainChannel.props.color_depth¶
- Name:
color-depth
- Type:
- Default Value:
0
- Flags:
Color depth
Deprecated since version 0.37: Deprecated due lack of support in drivers, only Windows 7 and older. This option is currently ignored.
- SpiceClientGLib.MainChannel.props.disable_animation¶
-
Disable guest animations
- SpiceClientGLib.MainChannel.props.disable_display_align¶
-
Disable automatic horizontal display position alignment.
New in version 0.13.
- SpiceClientGLib.MainChannel.props.disable_display_position¶
-
Disable using display position when setting monitor config
- SpiceClientGLib.MainChannel.props.disable_font_smooth¶
-
Disable guest font smoothing
- SpiceClientGLib.MainChannel.props.disable_wallpaper¶
-
Disable guest wallpaper
- SpiceClientGLib.MainChannel.props.max_clipboard¶
-
Maximum size of clipboard operations in bytes (default 100MB, -1 for unlimited size);
New in version 0.22.
- SpiceClientGLib.MainChannel.props.mouse_mode¶
-
Spice protocol specifies two mouse modes, client mode and server mode. In client mode (%SPICE_MOUSE_MODE_CLIENT), the affective mouse is the client side mouse: the client sends mouse position within the display and the server sends mouse shape messages. In server mode (%SPICE_MOUSE_MODE_SERVER), the client sends relative mouse movements and the server sends position and shape commands.