Overview
SpiceClientGtk Overview
SpiceClientGtk provides GTK widgets for embedding a SPICE display in a GTK application.
Display Widget
The SpiceDisplay widget renders the guest framebuffer
and handles keyboard and mouse input. It supports both software rendering
and OpenGL acceleration.
SpiceDisplay *display = spice_display_new(session, 0);
gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(display));
Keyboard and Mouse Grabbing
The display widget can grab keyboard and mouse input to provide a
seamless guest interaction experience. Grabbing behavior is controlled
by the SpiceDisplay:grab-keyboard and
SpiceDisplay:grab-mouse properties. A custom
key sequence can be configured to release grabs using
spice_display_set_grab_keys().
Scaling and Zoom
The widget supports display scaling (controlled by
SpiceDisplay:scaling) and zoom level adjustment
(SpiceDisplay:zoom-level).
GTK Session
SpiceGtkSession provides GTK integration for clipboard
sharing and automatic USB redirection, bridging the GTK clipboard with
the SPICE agent clipboard.
USB Device Widget
SpiceUsbDeviceWidget is a ready-made widget that
lists available USB devices with connect/disconnect toggle buttons.