Class
MksSession
Description [src]
final class Mks.Session : GObject.Object
implements Gio.AsyncInitable, Gio.Initable {
/* No available fields */
}
Session connected to a QEMU VM
The MksSession
represents a connection to a QEMU VM instance. It contains
devices such as the mouse, keyboard, and screen which can be used with GTK.
You may monitor MksSession:devices
using GListModel::items-changed
to be
notified of changes to available devices in the session.
Connecting To QEMU
To use MksSession
, you should create your QEMU instance using dbus
for
the various devices that support it. You’ll need to provide your P2P D-Bus
address when connecting to QEMU.
Using the same GDBusConnection
, create a MksSession
with
mks_session_new_for_connection()
. The MksSession
instance will negotiate
with the peer to determine what devices are available and expose them
via the MksSession:devices
GListModel
.
Creating Widgets
You can create a new widget to embed in your application by calling
mks_session_ref_screen()
and set the screen for the MksDisplay
with mks_display_set_screen()
.
Constructors
mks_session_new_for_connection_finish
Completes a request to create a MksSession
for a GDBusConnection
.
Instance methods
Methods inherited from GAsyncInitable (3)
g_async_initable_init_async
Starts asynchronous initialization of the object implementing the
interface. This must be done before any real use of the object after
initial construction. If the object also implements GInitable
you can
optionally call g_initable_init()
instead.
g_async_initable_init_finish
Finishes asynchronous initialization and returns the result. See g_async_initable_init_async().
g_async_initable_new_finish
Finishes the async construction for the various g_async_initable_new
calls, returning the created object or NULL
on error.
Methods inherited from GInitable (1)
g_initable_init
Initializes the object implementing the interface.
Properties
Mks.Session:devices
A GListModel
of devices that have been
discovered on the GDBusConnection
to QEMU.
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.