Commit Graph

61 Commits

Author SHA1 Message Date
Pavel Grunt
74ce2dd227 file-transfer: Add documentation for public functions
Acked-by: Victor Toso <victortoso@redhat.com>
2016-09-01 14:10:13 +02:00
Marc-André Lureau
038af442b5 doc: fix unused warning
Fix gtk-doc warning by ignoring the new private header.

./spice-gtk-unused.txt:1: warning: 12 unused declarations.They should be
added to spice-gtk-sections.txt in the appropriate place.

While at it, fix grabsequence header incorrect file name.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-07-07 18:11:12 +02:00
Marc-André Lureau
320a58d8fc doc: fix unused declarations
Fix all the gtk-doc: "unused declarations. They should be added to
spice-gtk-sections.txt in the appropriate place."

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
2016-05-31 13:35:52 +02:00
Pavel Grunt
2210a5c220 file-transfer-task: Hide internals of SpiceFileTransferTask
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2016-05-25 17:01:21 +02:00
Marc-André Lureau
5f89a4df03 gtk: add spice_main_request_mouse_mode()
Send a SpiceMsgcMainMouseModeRequest message to request a mouse mode.

This allows to switch between client/absolute and server/relative mouse
modes.

This is necessary for some applications that require pointer
re-positioning, which we can't provide through a remote protocol easily
with client pointer (no such hardware-level message exists afaik).

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Victor Toso <victortoso@redhat.com>
2016-05-10 10:56:16 +02:00
Pavel Grunt
dd31fc1414 doc: Ignore spicy-connect
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-03-30 11:39:23 +02:00
Pavel Grunt
af82fd1ed7 doc: Remove private structs
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-03-30 11:39:06 +02:00
Pavel Grunt
61f502f876 usb-device-manager: Fix docstring
Add description, "Since" and change the parameter name in the docstring
to match parameter name in the function definition.

Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-03-30 11:38:58 +02:00
Pavel Grunt
2123b023f5 doc: Remove dropped functions
Dropped in 70a00b8fcc

Acked-by: Marc-André Lureau <mlureau@redhat.com>
2016-03-29 21:38:53 +02:00
Pavel Grunt
0a9ec4ec01 Adjust to GLib 2.36
Dependency since 8693e7d3f7

Remove glib-compat files and most of GLIB_CHECK_VERSION guards

Acked-by: Victor Toso <victortoso@redhat.com>
2016-03-18 11:42:31 +01:00
Marc-André Lureau
0917002c48 Drop GTK+ 2.0
Not so many systems require gtk+ 2.0 these days, let's move on.

This drops the old python bindings (non-gir based), and the
unsteady/experimental gtk2-only XShm support.

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2016-03-14 12:02:52 +01:00
Marc-André Lureau
1e4c78e304 glib: add local GL scanout support
Add spice-glib support for gl scanout messages.

A note about SpiceGlScanout: it is struct with scanout details,
registered as a boxed type, with associated gl-scanout property. That
way, it doesn't need a seperate signal for change notification and the
current scanout can be retrieve with gobject getter. Since boxed
property are always duplicated by g_object_get(), an additional
spice_display_get_gl_scanout() method returns the current scanout
without duplication (that's what spice-gtk display widget will use).

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-02-13 11:28:26 +01:00
Pavel Grunt
471cf42264 channel-display: Add spice_display_change_preferred_compression 2015-11-18 08:26:06 +01:00
Jonathon Jongsma
2c26ee3c37 New file transfer API
There were several shortcomings to the existing file transfer API,
particularly in terms of monitoring ongoing file transfers. The major
issue is that spice_main_file_copy_async() allows you to pass an array
of files, but the progress callback does not provide a way to
identify which file the callback is associated with. This makes it
nearly impossible for an application to monitor file transfers.

In addition, the SpiceDisplay widget automatically handles drag-and-drop
actions on the widget, and initiates file transfers without allowing the
application to specify a progress callback. So there's no way for an app
to monitor file transfers that are initiated via drag and drop.

http://lists.freedesktop.org/archives/spice-devel/2015-September/021931.html
has a more detailed explanation of the issues.

This change doesn't break the existing API, but adds some new API that
will allow an application to monitor file transfer progress, even for
transfers that are initiated within spice-gtk itself.

- A new public SpiceFileTransferTask object is added.
- The SpiceMainChannel object gains a "new-file-transfer" signal that is
  emitted whenever a new file transfer is initiated. The
  SpiceFileTransferTask object is passed to the signal handler.
- The application can retain this object and monitor its 'progress'
  property to be notified when the progress of the file transfer
  changes. The SpiceFileTransferTask::finished signal indicates when the
  given file transfer has completed. The application can also cancel the
  file transfer by calling the _cancel() method.

The 'spicy' test application has been updated to use this new API and
display a simple dialog showing the progress of individual files.
2015-10-09 15:42:56 -05:00
Jonathon Jongsma
d2f33178c4 Glib applications should only include spice-client.h
Generate a compiler warning if an application attempts to include a
different header.
2015-10-09 10:00:56 -05:00
Pavel Grunt
4c1c868b73 docs: Move SPICE_TYPE_USB_DEVICE to standard subsection 2015-09-25 13:39:18 +02:00
Pavel Grunt
0795754fdc docs: Add Version Information section 2015-09-25 13:39:12 +02:00
Pavel Grunt
d732f13ae6 docs: Update for missing symbols 2015-09-25 13:39:06 +02:00
Jonathon Jongsma
94347e71d2 Add spice_main_update_display_enabled()
This is a new function that allows the caller to decide whether to send
the new status down to the server or not (analogous to the difference
between spice_main_set_display() vs spice_man_update_display()).

This new function is needed to reduce unnecessary MonitorsConfig
messages from being sent to the server. Because spice-gtk does not
maintain any display state internally, it depends on the application to
maintain that state. Some state changes come from the server itself
(e.g. the guest has changed resolution due to some activity within the
guest), and some come from the application (e.g. the user has resized
the window of the client). Changes that come from server updates do not
need to be sent back down to the server, whereas those that originate
from the application *do* need to be sent to the server.
2015-09-10 15:52:12 -05:00
Jeremy White
bf69423ffc Add the gtk libraries to the gtk-scandoc link line.
This prevents a compile error on Debian Jessie, when building from git.

This is fairly subtle, and Debian specific.  It only happens when you use
autoreconf to generate a new libtool script.  Debian patches that script
to require an explicit setting to link with all dependent libraries.

It should be harmless on other distros, and it does save us Debian guys some
hassle.
2015-07-28 10:48:57 -05:00
Marc-André Lureau
caf28401ca Move gtk/ -> src/
For historical reasons, the code was placed under gtk/ subdirectory.
If it was always bugging you, bug no more!
2015-06-08 17:38:58 +02:00
Marc-André Lureau
770369a521 docs: improvements for 0.27 release 2014-12-11 14:59:07 +01:00
Marc-André Lureau
5811432f49 Add spice_session_is_for_migration() 2014-12-01 17:29:56 +01:00
Christophe Fergeau
8ed3d76afd Remove blank lines at end of files 2014-10-30 17:47:15 +01:00
Marc-André Lureau
382ecfa16f Add webdav channel
See spice-common for protocol details.  phodav, a webdav server library,
is imported thanks to a submodule, until this project has a stable API
and releases.

The webdav channel is reponsible for handling port events and
multiplexing the request streams. Extra care has been made to avoid
blocking and to enable some fairness between concurrent streams, however
this has been particularly tricky and is likely to have some issues
left.

The webdav server is run in a seperate thread, using libsoup. The client
communication is done via a local tcp socket, but protected to only
accept local connection and with a pretty strong password.

The home directory is exported for the remote to browse, which seems to
be a sensible default atm.
2014-03-19 15:24:23 +01:00
Marc-André Lureau
e124a3b2e8 Add a SPICE_GTK_CHECK_VERSION macro 2014-02-24 15:59:41 +01:00
Marc-André Lureau
8cbdc3d2d6 session: add spice_session_get_proxy_uri()
Learn to return the currently configured proxy, to allow
client to tweak parameters, such as username and password.
2014-02-21 12:23:16 +01:00
Marc-André Lureau
3edcc04f20 channel: add spice_channel_get_error()
Add a function to retrieve the last GError from a channel, this may be
useful to provide additional error details to the client.
2014-02-21 12:23:12 +01:00
Marc-André Lureau
7c909790ca Make SpiceURI a public API
Generalize a little bit SpiceProxy to allow easy URI manipulation by
clients.
2014-02-21 12:23:01 +01:00
Jonathon Jongsma
2ef5ef5932 Revert "Add ability to get SpiceDisplay resolution"
This reverts commit a285e0187d.

This API was not actually needed for what I intended to use it for.  So revert
for now.  We can always add it back if necessary in the future.

Conflicts:
	gtk/spice-widget.c
2013-11-07 14:20:10 -06:00
Jonathon Jongsma
a285e0187d Add ability to get SpiceDisplay resolution
Add spice_display_get_monitor_config() to get the current configuration of the
display.
2013-11-04 13:26:41 -06:00
Hans de Goede
b85ca792af Add spice_channel_string_to_type to map files
And document both spice_channel_string_to_type and
spice_channel_type_to_string.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-06-27 14:26:33 +02:00
Marc-André Lureau
c85636feef doc: add missing symbols and versions 2013-06-26 16:34:40 +02:00
Hans de Goede
0ebcc23c06 usb-device-manager: Add spice_usb_device_manager_get_devices_with_filter (fdo#63807)
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-04-24 09:25:46 +02:00
Marc-André Lureau
a95e445606 Add a port channel
A Spice port channel carry arbitrary data between the Spice client and
the Spice server. It may be used to provide additional services on top
of a Spice connection. For example, a channel can be associated with
the qemu monitor for the client to interact with it, just like any
qemu chardev. Or it may be used with various protocols, such as the
Spice Controller.

A port kind is identified simply by a fqdn, such as org.qemu.monitor,
org.spice.spicy.test or org.ovirt.controller...
2012-12-05 11:26:35 +01:00
Marc-André Lureau
a1beca2fa1 channel: add flush_async()
Add spice_channel_flush_async() that asynchronously will write all the
pending channel data.
2012-12-05 11:26:34 +01:00
Marc-André Lureau
92f04cbcb8 inputs: add spice_inputs_key_press_and_release()
If the server is capable of SPICE_INPUTS_CAP_SCANCODE, then we send
can send a single message with key press and release, to avoid
unwanted guest side key repeatition due to network jitter.

If the server is not capable, spice-gtk will use some compatibility
mode and send the existing DOWN and UP key events seperately.
2012-08-28 18:50:11 +02:00
Marc-André Lureau
db1929a970 Release v0.13 2012-08-28 18:32:24 +02:00
Marc-André Lureau
66deab923d widget: add monitor property with ctor 2012-07-16 17:46:41 +02:00
Marc-André Lureau
05a203af12 build-sys: move codegen & proto to spice-common
With this iteration, all the spice_codegen.py/proto/marshaller
generation has been moved to spice-common.

The spice-common directory will ship spice-protocol, since it's needed
there too to build libspice-common.

Again, make distcheck passes. Build with mingw & fedora linux.
2012-03-25 19:22:52 +02:00
Marc-André Lureau
b9b658f6ea doc: gtk-doc cleanup
Fix all the unused symbols and a few warnings (a lot left)
2012-03-20 02:15:21 +01:00
Marc-André Lureau
126794d301 Add SPICE_DISABLE_DEPRECATED guard 2012-03-20 00:52:38 +01:00
Marc-André Lureau
5f39af6b88 Do not grab/release the clipboard on guest without clipboard support
Add an agent capability check before calling those functions from
gtk-session. Avoid extra warnings.
2012-01-31 23:23:22 +01:00
Hans de Goede
bf0350423c Add a USB device selection widget
This patch adds a SpiceUsbDeviceWidget which apps can use to easily
add an UI to select USB devices to redirect (or unredirect).

See spicy for an example usage.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-01-31 14:31:38 +01:00
Hans de Goede
fde996526b Remove auto-generated .gitignore files from git
Auto-generated files do not belong in git. Having these in git causes
changes to them accidentally ending up in other commits.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2011-10-10 11:55:57 +02:00
Hans de Goede
971eb9be73 usb-device-manager: One instance per session instead of a singleton
Since usb device manager keeps track of which usb channels there are and
if they have usb devices attached there should be one usb-device-manager
instance per session, rather then one global singleton.

Tying the usb-device-manager to the session also allows us to get rid of
spice_usb_device_manager_[un]register_channel and the need for SpiceDisplay
to call these.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2011-10-07 10:59:14 +02:00
Hans de Goede
91eeacbeef Move clipboard handling to SpiceGtkSession
This fixes copy and paste with multi-monitor guests. There still is
one small issue left with this patch, changing the setting for auto-clipboard
in one spicy window, does not get reflected in the Options menu of the
other spicy windows.

This can be fixed by listening to the notify signal, this also requires
SpiceDisplay to listen to property changes on its SpiceGtkSession and
then do a g_object_set on itself to update its own property (and also
emit its own notify signal.

I'll write a separate patch for this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2011-10-06 11:36:39 +02:00
Hans de Goede
f6766163d2 Add a SpiceGtkSession Class
This initial commit of the SpiceGtkSession Class only adds the empty
class and the 1:1 linkage to SpiceSession through 2 new private methods
added to SpiceSession: spice_session_{get|set}_gtk_session.

The following commits will move things which are currently per SpiceDisplay,
but which really should be global, such as the clipboard, over to
SpiceGtkSession.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2011-10-06 11:36:39 +02:00
Hans de Goede
03b67fe957 usb-device-manager: Add a spice_usb_device_get_description() method
This is just a place holder for now. A better implementation requires
gusb changes, and I hope there will be an official gusb release by the
time I get around to fixing this up.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2011-09-01 11:51:14 +02:00
Marc-André Lureau
097356b437 doc: various improvements 2011-08-31 14:28:12 +02:00