Spice GTK Session

Spice GTK Session — handles GTK connection details

Stability Level

Stable, unless otherwise indicated

Synopsis

#include <spice-client-gtk.h>

SpiceGtkSession *   spice_gtk_session_get               (SpiceSession *session);
void                spice_gtk_session_copy_to_guest     (SpiceGtkSession *self);
void                spice_gtk_session_paste_from_guest  (SpiceGtkSession *self);

Description

The SpiceGtkSession class is the spice-client-gtk counter part of SpiceSession. It contains functionality which should be handled per session rather then per SpiceDisplay (one session can have multiple displays), but which cannot live in SpiceSession as it depends on GTK. For example the clipboard functionality.

There should always be a 1:1 relation between SpiceGtkSession objects and SpiceSession objects. Therefor there is no spice_gtk_session_new, instead there is spice_gtk_session_get() which ensures this 1:1 relation.

Client and guest clipboards will be shared automatically if "auto-clipboard" is set to TRUE. Alternatively, you can send / receive clipboard data from client to guest with spice_gtk_session_copy_to_guest() / spice_gtk_session_paste_from_guest().

Details

spice_gtk_session_get ()

SpiceGtkSession *   spice_gtk_session_get               (SpiceSession *session);

Gets the SpiceGtkSession associated with the passed in SpiceSession. A new SpiceGtkSession instance will be created the first time this function is called for a certain SpiceSession.

Note that this function returns a weak reference, which should not be used after the SpiceSession itself has been unref-ed by the caller.

session :

SpiceSession for which to get the SpiceGtkSession

Returns :

a weak reference to the SpiceGtkSession associated with the passed in SpiceSession Since 0.8. [transfer none]

spice_gtk_session_copy_to_guest ()

void                spice_gtk_session_copy_to_guest     (SpiceGtkSession *self);

Copy client-side clipboard to guest clipboard.

Since 0.8

self :

SpiceGtkSession

spice_gtk_session_paste_from_guest ()

void                spice_gtk_session_paste_from_guest  (SpiceGtkSession *self);

Copy guest clipboard to client-side clipboard.

Since 0.8

self :

SpiceGtkSession

See Also

SpiceSession, and the GTK widget SpiceDisplay