[gnome-boxes] display: API to send key combos to guest
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] display: API to send key combos to guest
- Date: Fri, 12 Dec 2014 18:42:05 +0000 (UTC)
commit abfd78ab0ff13aef4d194968fbcc833daf47c8ad
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Fri Dec 12 18:34:44 2014 +0000
display: API to send key combos to guest
https://bugzilla.gnome.org/show_bug.cgi?id=725303
src/display.vala | 1 +
src/spice-display.vala | 7 +++++++
src/vnc-display.vala | 4 ++++
3 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/display.vala b/src/display.vala
index ffe1b0e..3f7952e 100644
--- a/src/display.vala
+++ b/src/display.vala
@@ -33,6 +33,7 @@ private abstract class Boxes.Display: GLib.Object, Boxes.IPropertiesProvider {
public virtual void collect_logs (StringBuilder builder) {
}
+ public abstract void send_keys (uint[] keyvals);
public abstract List<Boxes.Property> get_properties (Boxes.PropertiesPage page, ref PropertyCreationFlag
flags);
diff --git a/src/spice-display.vala b/src/spice-display.vala
index b86009d..9989ddb 100644
--- a/src/spice-display.vala
+++ b/src/spice-display.vala
@@ -351,6 +351,13 @@ private class Boxes.SpiceDisplay: Boxes.Display {
return list;
}
+
+ public override void send_keys (uint[] keyvals) {
+ // TODO: multi display
+ var display = get_display (0) as Spice.Display;
+
+ display.send_keys (keyvals, DisplayKeyEvent.CLICK);
+ }
}
// FIXME: this kind of function should be part of spice-gtk
diff --git a/src/vnc-display.vala b/src/vnc-display.vala
index e6ab98e..b95ea04 100644
--- a/src/vnc-display.vala
+++ b/src/vnc-display.vala
@@ -148,4 +148,8 @@ private class Boxes.VncDisplay: Boxes.Display {
return list;
}
+
+ public override void send_keys (uint[] keyvals) {
+ display.send_keys (keyvals);
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]