mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
ui/dbus: add clipboard interface
Expose the clipboard API over D-Bus. See the interface documentation for further details. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
739362d420
commit
ff1a5810f6
6 changed files with 579 additions and 0 deletions
14
ui/dbus.h
14
ui/dbus.h
|
@ -27,9 +27,16 @@
|
|||
#include "qemu/dbus.h"
|
||||
#include "qom/object.h"
|
||||
#include "ui/console.h"
|
||||
#include "ui/clipboard.h"
|
||||
|
||||
#include "dbus-display1.h"
|
||||
|
||||
typedef struct DBusClipboardRequest {
|
||||
GDBusMethodInvocation *invocation;
|
||||
QemuClipboardType type;
|
||||
guint timeout_id;
|
||||
} DBusClipboardRequest;
|
||||
|
||||
struct DBusDisplay {
|
||||
Object parent;
|
||||
|
||||
|
@ -44,6 +51,11 @@ struct DBusDisplay {
|
|||
QemuDBusDisplay1VM *iface;
|
||||
GPtrArray *consoles;
|
||||
GCancellable *add_client_cancellable;
|
||||
|
||||
QemuClipboardPeer clipboard_peer;
|
||||
QemuDBusDisplay1Clipboard *clipboard;
|
||||
QemuDBusDisplay1Clipboard *clipboard_proxy;
|
||||
DBusClipboardRequest clipboard_request[QEMU_CLIPBOARD_SELECTION__COUNT];
|
||||
};
|
||||
|
||||
#define TYPE_DBUS_DISPLAY "dbus-display"
|
||||
|
@ -83,4 +95,6 @@ dbus_display_listener_get_bus_name(DBusDisplayListener *ddl);
|
|||
extern const DisplayChangeListenerOps dbus_gl_dcl_ops;
|
||||
extern const DisplayChangeListenerOps dbus_dcl_ops;
|
||||
|
||||
void dbus_clipboard_init(DBusDisplay *dpy);
|
||||
|
||||
#endif /* UI_DBUS_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue