[Spice-commits] 4 commits - configure.ac data/gtkrc .gitignore gtk/channel-base.c gtk/channel-cursor.c gtk/channel-cursor.h gtk/channel-display.c gtk/channel-display.h gtk/channel-display-priv.h gtk/channel-inputs.c gtk/channel-inputs.h gtk/channel-main.c gtk/channel-main.h gtk/channel-playback.c gtk/channel-playback.h gtk/channel-record.c gtk/channel-record.h gtk/channel-smartcard.c gtk/channel-smartcard.h gtk/.gitignore gtk/Makefile.am gtk/spice-channel.c gtk/spice-channel.h gtk/spice-channel-priv.h gtk/spice-client-gtk.defs gtk/spice-client.h gtk/spice-grabsequence.c gtk/spice-option.c gtk/spice-option.h gtk/spice-session.c gtk/spice-session.h gtk/spice-types.h gtk/spice-widget.c gtk/spice-widget-cairo.c gtk/spice-widget.h gtk/spice-widget-priv.h gtk/spice-widget-x11.c NEWS po/POTFILES.in README TODO

Marc-André Lureau elmarco at kemper.freedesktop.org
Mon Jul 18 12:04:25 PDT 2011


 .gitignore                 |   43 ++++++------
 NEWS                       |   14 ++++
 README                     |   25 ++++---
 TODO                       |    6 +
 configure.ac               |    2 
 data/gtkrc                 |    1 
 gtk/.gitignore             |    5 +
 gtk/Makefile.am            |   38 ++++++++---
 gtk/channel-base.c         |   34 ++++-----
 gtk/channel-cursor.c       |   48 +++++++-------
 gtk/channel-cursor.h       |    4 -
 gtk/channel-display-priv.h |    6 -
 gtk/channel-display.c      |  154 ++++++++++++++++++++++-----------------------
 gtk/channel-display.h      |    4 -
 gtk/channel-inputs.c       |   74 ++++++++++-----------
 gtk/channel-inputs.h       |    8 +-
 gtk/channel-main.c         |  112 ++++++++++++++++----------------
 gtk/channel-main.h         |    4 -
 gtk/channel-playback.c     |   40 +++++------
 gtk/channel-playback.h     |    4 -
 gtk/channel-record.c       |   42 ++++++------
 gtk/channel-record.h       |    6 -
 gtk/channel-smartcard.c    |   26 +++----
 gtk/channel-smartcard.h    |    4 -
 gtk/spice-channel-priv.h   |   54 +++++++--------
 gtk/spice-channel.c        |  148 +++++++++++++++++++++----------------------
 gtk/spice-channel.h        |   12 +--
 gtk/spice-client-gtk.defs  |   21 +++++-
 gtk/spice-client.h         |    1 
 gtk/spice-grabsequence.c   |    4 -
 gtk/spice-option.c         |    7 +-
 gtk/spice-option.h         |    2 
 gtk/spice-session.c        |   85 ++++++++++++------------
 gtk/spice-session.h        |    2 
 gtk/spice-types.h          |    4 -
 gtk/spice-widget-cairo.c   |   10 +-
 gtk/spice-widget-priv.h    |    4 -
 gtk/spice-widget-x11.c     |    8 +-
 gtk/spice-widget.c         |  118 +++++++++++++++++-----------------
 gtk/spice-widget.h         |    4 -
 po/POTFILES.in             |    2 
 41 files changed, 632 insertions(+), 558 deletions(-)

New commits:
commit 5be4767449b5a23d7d707b1021ba96aed82b74ef
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Mon Jul 18 17:14:14 2011 +0200

    Release v0.7

diff --git a/NEWS b/NEWS
index c2b09ee..5ce9dd9 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,17 @@
+v0.7
+====
+
+- smartcard support
+- better video playback performance (jpeg-turbo & audio improvements)
+- support for audio volume (needs qemu support)
+- controller support for Windows (NamedPipe)
+- make perl-Text-CSV optional for tarball builds
+- new spice_get_option_group()/spice_set_session_option()
+- keyboard improvements, grab-sequence can be configured, various windows fixes
+- new tool spicy-stats, to collect informations during a session
+- bugfixes: memleak fixes, SASL fixes, crash with virt-manager
+- various build fixes, should build on MacOS as well now
+
 v0.6
 ====
 
diff --git a/README b/README
index c5c87e6..e435994 100644
--- a/README
+++ b/README
@@ -27,33 +27,42 @@ snappy
    Command line tool, connects to spice server and writes out a
    screen shot.
 
+spicy-stats
+   Command line tool, connects to spice server and writes out a
+   summary of connection details, amount of bytes transferred...
+
 SpiceClientGtk python module (only built with Gtk+ 2.0)
 
 SpiceClientGlib and SpiceClientGtk GObject-introspection modules.
 
-Build depedencies:
+Build dependencies:
 ------------------
 
-On Fedora: (gtk2-devel if building with --with-gtk=2.0)
+. On Fedora: (gtk2-devel if building with --with-gtk=2.0)
 
-gtk3-devel spice-protocol pygtk2-devel intltool celt051-devel
-openssl-devel pulseaudio-libs-devel pixman-devel python perl-Text-CSV
+gtk3-devel spice-protocol intltool celt051-devel
+openssl-devel pulseaudio-libs-devel pixman-devel
 gobject-introspection-devel libjpeg-turbo-devel zlib-devel
 cyrus-sasl-devel gtk-doc
 
-The experimental GStreamer backend needs:
+. To build python bindings for virt-manager, you need gtk2, and:
+
+pygtk2-devel python
+
+. The experimental GStreamer backend needs:
 
 gstreamer-devel gstreamer-plugins-base-devel
 
-If you build from git, you'll also need:
+. If you build from git, you'll also need:
 
-libtool automake pyparsing vala
+libtool automake pyparsing vala perl-Text-CSV
 
 
 current state
 -------------
 
-Some features are missing, see TODO
+There are some known bugs, check the TODO list and
+bugzilla.freedesktop.org.
 
 Copyright 2009-2011 Red Hat, Inc. and/or its affiliates.
 
diff --git a/TODO b/TODO
index 1b54cc2..3bff1e2 100644
--- a/TODO
+++ b/TODO
@@ -1,4 +1,6 @@
+* Pointer/cursor issues if no agent:
+** https://bugs.freedesktop.org/show_bug.cgi?id=36323
+** https://bugs.freedesktop.org/show_bug.cgi?id=38008
+** https://bugs.freedesktop.org/show_bug.cgi?id=38024
 * TunnelChannel
-* ungrab pointer when clicking for drag&drop in multi-display is broken if releasing outside
 * create a ChannelBaseAudio
-* document SmartcardChannel
diff --git a/configure.ac b/configure.ac
index 8c2802b..8c9c5db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -61,7 +61,7 @@ AC_CHECK_HEADERS([sys/socket.h netinet/in.h arpa/inet.h])
 
 dnl =========================================================================
 dnl Chek optional features
-PKG_CHECK_MODULES(PROTOCOL, spice-protocol >= 0.6.3)
+PKG_CHECK_MODULES(PROTOCOL, spice-protocol >= 0.8.1)
 AC_SUBST(PROTOCOL_CFLAGS)
 
 SPICE_GLIB_REQUIRES=""
commit e5fca5c02b6b7db6344f356feb4f2588e03980cc
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Mon Jul 18 20:18:40 2011 +0200

    build: update library version
    
    client-glib interfaces have been changed or added, but binary compatibility has been preserved, change to current+1:0:age+1
    
    client-gtk updated code, same API: increment revision.

diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 9925e4e..1a9cf27 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -75,7 +75,7 @@ AM_CPPFLAGS = \
 
 # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
 SPICE_GTK_LDFLAGS_COMMON =		\
-	-version-number 1:1:0		\
+	-version-number 1:2:0		\
 	-no-undefined			\
 	$(VERSION_LDFLAGS)		\
 	$(NULL)
@@ -127,7 +127,7 @@ libspice_client_gtkinclude_HEADERS =	\
 	$(NULL)
 
 libspice_client_glib_2_0_la_LDFLAGS =	\
-	-version-number 3:0:2		\
+	-version-number 4:0:3		\
 	-no-undefined			\
 	$(VERSION_LDFLAGS)		\
 	$(NULL)
commit 9af74fb6043b41c60f7179bdc1312ca34d7a47bc
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Mon Jul 18 19:51:24 2011 +0200

    build: fix make distcheck

diff --git a/.gitignore b/.gitignore
index 1a1a970..0991c6d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,13 +1,17 @@
-/*.bak
-/*.lo
-/*.o
-/*.orig
-/*.rej
-/*.tab.c
-/*~
-/.*.sw[nop]
-/.deps
-/.gitignore
+*.bak
+*.lo
+*.o
+*.orig
+*.rej
+*.tab.c
+*~
+.*.sw[nop]
+.deps
+.libs
+*.gir
+*.typelib
+*.la
+*.stamp
 /.libs
 /.version
 /ABOUT-NLS
@@ -16,8 +20,8 @@
 /GSYMS
 /GTAGS
 /ID
-/Makefile
-/Makefile.in
+Makefile
+Makefile.in
 /TAGS
 /_libs
 /aclocal.m4
@@ -87,15 +91,7 @@
 /m4/wchar_t.m4
 /m4/wint_t.m4
 /m4/xsize.m4
-/po/*.gmo
-/po/*.mo
-/po/.intltool-merge-cache
-/po/Makefile
-/po/Makefile.in
-/po/Makefile.in.in
-/po/POTFILES
-/po/spice-gtk.pot
-/po/stamp-it
+po/*
 /so_locations
 /spice-client-glib-2.0.pc
 /spice-client-gtk-2.0.pc
@@ -103,3 +99,8 @@
 /spice-controller.pc
 /stamp-h1
 /tags
+gtk/controller/controller.c
+gtk/controller/menu.c
+gtk/controller/spice-controller.h
+gtk/controller/test-controller
+doc/reference/spice-gtk-overrides.txt
diff --git a/data/gtkrc b/data/gtkrc
new file mode 100644
index 0000000..4a0ddd0
--- /dev/null
+++ b/data/gtkrc
@@ -0,0 +1 @@
+gtk-theme-name = "MS-Windows"
diff --git a/gtk/.gitignore b/gtk/.gitignore
index 2ae158f..f070332 100644
--- a/gtk/.gitignore
+++ b/gtk/.gitignore
@@ -20,6 +20,9 @@
 /SpiceClientGLib-2.0.typelib
 /SpiceClientGtk-3.0.gir
 /SpiceClientGtk-3.0.typelib
+/SpiceClientGtk-2.0.gir
+/SpiceClientGtk-2.0.typelib
+/SpiceClientGtk.la
 /TAGS
 /_libs
 /generated_demarshallers.c
@@ -27,9 +30,11 @@
 /generated_marshallers.c
 /generated_marshallers1.c
 /libspice-client-glib-2.0.la
+/libspice-client-gtk-2.0.la
 /libspice-client-gtk-3.0.la
 /snappy
 /so_locations
+/spice-client-gtk-module.defs.c
 /spice-glib-enums.c
 /spice-glib-enums.h
 /spice-marshal.c
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 8899365..9925e4e 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -388,16 +388,16 @@ spice-widget-enums.h: spice-widget.h
 
 
 generated_demarshallers.c: $(top_srcdir)/spice.proto
-	$(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-demarshallers --client --include messages.h $< $@
+	$(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-demarshallers --client --include messages.h $< $@ >/dev/null
 
 generated_demarshallers1.c: $(top_srcdir)/spice1.proto
-	$(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-demarshallers --client --include messages.h --prefix 1 --ptrsize 8 $< $@
+	$(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-demarshallers --client --include messages.h --prefix 1 --ptrsize 8 $< $@ >/dev/null
 
 generated_marshallers.c: $(top_srcdir)/spice.proto
-	$(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-marshallers -P --include messages.h --include marshallers.h --client $< $@
+	$(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-marshallers -P --include messages.h --include marshallers.h --client $< $@ >/dev/null
 
 generated_marshallers1.c: $(top_srcdir)/spice1.proto
-	$(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-marshallers -P --include messages.h --include marshallers.h --client --prefix 1 --ptrsize 8 $< $@
+	$(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-marshallers -P --include messages.h --include marshallers.h --client --prefix 1 --ptrsize 8 $< $@ >/dev/null
 
 vncdisplaykeymap.c: $(KEYMAPS)
 
diff --git a/gtk/spice-client-gtk.defs b/gtk/spice-client-gtk.defs
index fda17dc..f718c8c 100644
--- a/gtk/spice-client-gtk.defs
+++ b/gtk/spice-client-gtk.defs
@@ -383,7 +383,7 @@
   (c-name "spice_channel_disconnect")
   (return-type "none")
   (parameters
-    '("SpiceChannelEvent" "event")
+    '("SpiceChannelEvent" "reason")
   )
 )
 
@@ -470,6 +470,23 @@
 
 
 
+;; From spice-option.h
+
+(define-function spice_get_option_group
+  (c-name "spice_get_option_group")
+  (return-type "GOptionGroup*")
+)
+
+(define-function spice_set_session_option
+  (c-name "spice_set_session_option")
+  (return-type "none")
+  (parameters
+    '("SpiceSession*" "session")
+  )
+)
+
+
+
 ;; From channel-cursor.h
 
 (define-function spice_cursor_channel_get_type
@@ -618,7 +635,7 @@
     '("SpiceRecordChannel*" "channel")
     '("gpointer" "data")
     '("gsize" "bytes")
-    '("uint32_t" "time")
+    '("guint32" "time")
   )
 )
 
diff --git a/gtk/spice-option.h b/gtk/spice-option.h
index 69351d3..ce24f65 100644
--- a/gtk/spice-option.h
+++ b/gtk/spice-option.h
@@ -19,7 +19,7 @@
 #define SPICE_OPTION_H
 
 #include <glib.h>
-#include <spice-session.h>
+#include "spice-session.h"
 
 G_BEGIN_DECLS
 
diff --git a/po/POTFILES.in b/po/POTFILES.in
index a79f4c5..a1875c5 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -8,3 +8,5 @@ gtk/display/gnome-rr-config.c
 gtk/display/gnome-rr-windows.c
 gtk/display/gnome-rr-x11.c
 gtk/display/gnome-rr-generic.c
+gtk/spice-option.c
+gtk/spicy-stats.c
commit f1943df6680cd2d9b7b515c7d806a67ff91d2036
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Mon Jul 18 19:27:37 2011 +0200

    build: fix introspection warnings
    
    The only one left is related to GOptionGroup, which is not boxed.

diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 35e39c2..8899365 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -468,12 +468,32 @@ PREFIX_ARGS = --strip-prefix=Spice
 endif
 
 INTROSPECTION_GIRS =
-INTROSPECTION_SCANNER_ARGS = --add-include-path=$(builddir) $(PREFIX_ARGS)
+INTROSPECTION_SCANNER_ARGS = --warn-all --add-include-path=$(builddir) $(PREFIX_ARGS)
 INTROSPECTION_COMPILER_ARGS = --includedir=$(builddir)
 
 if HAVE_INTROSPECTION
-glib_introspection_files = $(libspice_client_glibinclude_HEADERS)
-gtk_introspection_files = $(libspice_client_gtkinclude_HEADERS)
+glib_introspection_files =			\
+	$(libspice_client_glibinclude_HEADERS)	\
+	spice-audio.c				\
+	spice-client.c				\
+	spice-session.c				\
+	spice-channel.c				\
+	spice-glib-enums.c			\
+	spice-option.c				\
+	channel-cursor.c			\
+	channel-display.c			\
+	channel-inputs.c			\
+	channel-main.c				\
+	channel-playback.c			\
+	channel-record.c			\
+	channel-smartcard.c			\
+	$(NULL)
+
+gtk_introspection_files =			\
+	$(libspice_client_gtkinclude_HEADERS)	\
+	spice-widget.c				\
+	spice-grabsequence.c			\
+	$(NULL)
 
 SpiceClientGLib-2.0.gir: libspice-client-glib-2.0.la
 SpiceClientGLib_2_0_gir_INCLUDES = GObject-2.0
diff --git a/gtk/channel-base.c b/gtk/channel-base.c
index abbafbb..c689c71 100644
--- a/gtk/channel-base.c
+++ b/gtk/channel-base.c
@@ -23,11 +23,11 @@
 
 /* coroutine context */
 G_GNUC_INTERNAL
-void spice_channel_handle_set_ack(SpiceChannel *channel, spice_msg_in *in)
+void spice_channel_handle_set_ack(SpiceChannel *channel, SpiceMsgIn *in)
 {
-    spice_channel *c = channel->priv;
+    SpiceChannelPrivate *c = channel->priv;
     SpiceMsgSetAck* ack = spice_msg_in_parsed(in);
-    spice_msg_out *out = spice_msg_out_new(channel, SPICE_MSGC_ACK_SYNC);
+    SpiceMsgOut *out = spice_msg_out_new(channel, SPICE_MSGC_ACK_SYNC);
     SpiceMsgcAckSync sync = {
         .generation = ack->generation,
     };
@@ -40,11 +40,11 @@ void spice_channel_handle_set_ack(SpiceChannel *channel, spice_msg_in *in)
 
 /* coroutine context */
 G_GNUC_INTERNAL
-void spice_channel_handle_ping(SpiceChannel *channel, spice_msg_in *in)
+void spice_channel_handle_ping(SpiceChannel *channel, SpiceMsgIn *in)
 {
-    spice_channel *c = channel->priv;
+    SpiceChannelPrivate *c = channel->priv;
     SpiceMsgPing *ping = spice_msg_in_parsed(in);
-    spice_msg_out *pong = spice_msg_out_new(channel, SPICE_MSGC_PONG);
+    SpiceMsgOut *pong = spice_msg_out_new(channel, SPICE_MSGC_PONG);
 
     c->marshallers->msgc_pong(pong->marshaller, ping);
     spice_msg_out_send_internal(pong);
@@ -53,9 +53,9 @@ void spice_channel_handle_ping(SpiceChannel *channel, spice_msg_in *in)
 
 /* coroutine context */
 G_GNUC_INTERNAL
-void spice_channel_handle_notify(SpiceChannel *channel, spice_msg_in *in)
+void spice_channel_handle_notify(SpiceChannel *channel, SpiceMsgIn *in)
 {
-    spice_channel *c = channel->priv;
+    SpiceChannelPrivate *c = channel->priv;
     static const char* severity_strings[] = {"info", "warn", "error"};
     static const char* visibility_strings[] = {"!", "!!", "!!!"};
 
@@ -84,7 +84,7 @@ void spice_channel_handle_notify(SpiceChannel *channel, spice_msg_in *in)
 
 /* coroutine context */
 G_GNUC_INTERNAL
-void spice_channel_handle_disconnect(SpiceChannel *channel, spice_msg_in *in)
+void spice_channel_handle_disconnect(SpiceChannel *channel, SpiceMsgIn *in)
 {
     SpiceMsgDisconnect *disconnect = spice_msg_in_parsed(in);
 
@@ -94,18 +94,18 @@ void spice_channel_handle_disconnect(SpiceChannel *channel, spice_msg_in *in)
 
 /* coroutine context */
 G_GNUC_INTERNAL
-void spice_channel_handle_wait_for_channels(SpiceChannel *channel, spice_msg_in *in)
+void spice_channel_handle_wait_for_channels(SpiceChannel *channel, SpiceMsgIn *in)
 {
-    /* spice_channel *c = channel->priv;
+    /* SpiceChannelPrivate *c = channel->priv;
        SpiceMsgWaitForChannels *wfc = spice_msg_in_parsed(in); */
 
     SPICE_DEBUG("%s TODO", __FUNCTION__);
 }
 
 static void
-get_msg_handler(SpiceChannel *channel, spice_msg_in *in, gpointer data)
+get_msg_handler(SpiceChannel *channel, SpiceMsgIn *in, gpointer data)
 {
-    spice_msg_in **msg = data;
+    SpiceMsgIn **msg = data;
 
     g_return_if_fail(msg != NULL);
     g_return_if_fail(*msg == NULL);
@@ -116,12 +116,12 @@ get_msg_handler(SpiceChannel *channel, spice_msg_in *in, gpointer data)
 
 /* coroutine context */
 G_GNUC_INTERNAL
-void spice_channel_handle_migrate(SpiceChannel *channel, spice_msg_in *in)
+void spice_channel_handle_migrate(SpiceChannel *channel, SpiceMsgIn *in)
 {
-    spice_msg_out *out;
-    spice_msg_in *data = NULL;
+    SpiceMsgOut *out;
+    SpiceMsgIn *data = NULL;
     SpiceMsgMigrate *mig = spice_msg_in_parsed(in);
-    spice_channel *c = channel->priv;
+    SpiceChannelPrivate *c = channel->priv;
 
     SPICE_DEBUG("%s: channel %s flags %u", __FUNCTION__, c->name, mig->flags);
     if (mig->flags & SPICE_MIGRATE_NEED_FLUSH) {
diff --git a/gtk/channel-cursor.c b/gtk/channel-cursor.c
index a05ba87..9df5b40 100644
--- a/gtk/channel-cursor.c
+++ b/gtk/channel-cursor.c
@@ -39,7 +39,7 @@
  */
 
 #define SPICE_CURSOR_CHANNEL_GET_PRIVATE(obj)                                  \
-    (G_TYPE_INSTANCE_GET_PRIVATE((obj), SPICE_TYPE_CURSOR_CHANNEL, spice_cursor_channel))
+    (G_TYPE_INSTANCE_GET_PRIVATE((obj), SPICE_TYPE_CURSOR_CHANNEL, SpiceCursorChannelPrivate))
 
 typedef struct display_cursor display_cursor;
 
@@ -50,7 +50,7 @@ struct display_cursor {
     guint32                     data[];
 };
 
-struct spice_cursor_channel {
+struct _SpiceCursorChannelPrivate {
     display_cache               cursors;
     gboolean                    init_done;
 };
@@ -66,7 +66,7 @@ enum {
 
 static guint signals[SPICE_CURSOR_LAST_SIGNAL];
 
-static void spice_cursor_handle_msg(SpiceChannel *channel, spice_msg_in *msg);
+static void spice_cursor_handle_msg(SpiceChannel *channel, SpiceMsgIn *msg);
 static void delete_cursor_all(SpiceChannel *channel);
 static display_cursor * display_cursor_ref(display_cursor *cursor);
 static void display_cursor_unref(display_cursor *cursor);
@@ -77,7 +77,7 @@ G_DEFINE_TYPE(SpiceCursorChannel, spice_cursor_channel, SPICE_TYPE_CHANNEL)
 
 static void spice_cursor_channel_init(SpiceCursorChannel *channel)
 {
-    spice_cursor_channel *c;
+    SpiceCursorChannelPrivate *c;
 
     c = channel->priv = SPICE_CURSOR_CHANNEL_GET_PRIVATE(channel);
     memset(c, 0, sizeof(*c));
@@ -182,7 +182,7 @@ static void spice_cursor_channel_class_init(SpiceCursorChannelClass *klass)
                      G_TYPE_NONE,
                      0);
 
-    g_type_class_add_private(klass, sizeof(spice_cursor_channel));
+    g_type_class_add_private(klass, sizeof(SpiceCursorChannelPrivate));
 }
 
 /* signal trampoline---------------------------------------------------------- */
@@ -316,7 +316,7 @@ static void display_cursor_unref(display_cursor *cursor)
 
 static display_cursor *set_cursor(SpiceChannel *channel, SpiceCursor *scursor)
 {
-    spice_cursor_channel *c = SPICE_CURSOR_CHANNEL(channel)->priv;
+    SpiceCursorChannelPrivate *c = SPICE_CURSOR_CHANNEL(channel)->priv;
     SpiceCursorHeader *hdr = &scursor->header;
     display_cache_item *item;
     display_cursor *cursor;
@@ -419,7 +419,7 @@ cache_add:
 
 static void delete_cursor_one(SpiceChannel *channel, display_cache_item *item)
 {
-    spice_cursor_channel *c = SPICE_CURSOR_CHANNEL(channel)->priv;
+    SpiceCursorChannelPrivate *c = SPICE_CURSOR_CHANNEL(channel)->priv;
 
     display_cursor_unref((display_cursor*)item->ptr);
     cache_del(&c->cursors, item);
@@ -427,7 +427,7 @@ static void delete_cursor_one(SpiceChannel *channel, display_cache_item *item)
 
 static void delete_cursor_all(SpiceChannel *channel)
 {
-    spice_cursor_channel *c = SPICE_CURSOR_CHANNEL(channel)->priv;
+    SpiceCursorChannelPrivate *c = SPICE_CURSOR_CHANNEL(channel)->priv;
     display_cache_item *item;
 
     for (;;) {
@@ -450,10 +450,10 @@ static void emit_cursor_set(SpiceChannel *channel, display_cursor *cursor)
 }
 
 /* coroutine context */
-static void cursor_handle_init(SpiceChannel *channel, spice_msg_in *in)
+static void cursor_handle_init(SpiceChannel *channel, SpiceMsgIn *in)
 {
     SpiceMsgCursorInit *init = spice_msg_in_parsed(in);
-    spice_cursor_channel *c = SPICE_CURSOR_CHANNEL(channel)->priv;
+    SpiceCursorChannelPrivate *c = SPICE_CURSOR_CHANNEL(channel)->priv;
     display_cursor *cursor;
 
     g_return_if_fail(c->init_done == FALSE);
@@ -470,9 +470,9 @@ static void cursor_handle_init(SpiceChannel *channel, spice_msg_in *in)
 }
 
 /* coroutine context */
-static void cursor_handle_reset(SpiceChannel *channel, spice_msg_in *in)
+static void cursor_handle_reset(SpiceChannel *channel, SpiceMsgIn *in)
 {
-    spice_cursor_channel *c = SPICE_CURSOR_CHANNEL(channel)->priv;
+    SpiceCursorChannelPrivate *c = SPICE_CURSOR_CHANNEL(channel)->priv;
 
     SPICE_DEBUG("%s, init_done: %d", __FUNCTION__, c->init_done);
 
@@ -482,10 +482,10 @@ static void cursor_handle_reset(SpiceChannel *channel, spice_msg_in *in)
 }
 
 /* coroutine context */
-static void cursor_handle_set(SpiceChannel *channel, spice_msg_in *in)
+static void cursor_handle_set(SpiceChannel *channel, SpiceMsgIn *in)
 {
     SpiceMsgCursorSet *set = spice_msg_in_parsed(in);
-    spice_cursor_channel *c = SPICE_CURSOR_CHANNEL(channel)->priv;
+    SpiceCursorChannelPrivate *c = SPICE_CURSOR_CHANNEL(channel)->priv;
     display_cursor *cursor;
 
     g_return_if_fail(c->init_done == TRUE);
@@ -502,10 +502,10 @@ static void cursor_handle_set(SpiceChannel *channel, spice_msg_in *in)
 }
 
 /* coroutine context */
-static void cursor_handle_move(SpiceChannel *channel, spice_msg_in *in)
+static void cursor_handle_move(SpiceChannel *channel, SpiceMsgIn *in)
 {
     SpiceMsgCursorMove *move = spice_msg_in_parsed(in);
-    spice_cursor_channel *c = SPICE_CURSOR_CHANNEL(channel)->priv;
+    SpiceCursorChannelPrivate *c = SPICE_CURSOR_CHANNEL(channel)->priv;
 
     g_return_if_fail(c->init_done == TRUE);
 
@@ -514,10 +514,10 @@ static void cursor_handle_move(SpiceChannel *channel, spice_msg_in *in)
 }
 
 /* coroutine context */
-static void cursor_handle_hide(SpiceChannel *channel, spice_msg_in *in)
+static void cursor_handle_hide(SpiceChannel *channel, SpiceMsgIn *in)
 {
 #ifdef EXTRA_CHECKS
-    spice_cursor_channel *c = SPICE_CURSOR_CHANNEL(channel)->priv;
+    SpiceCursorChannelPrivate *c = SPICE_CURSOR_CHANNEL(channel)->priv;
 
     g_return_if_fail(c->init_done == TRUE);
 #endif
@@ -526,9 +526,9 @@ static void cursor_handle_hide(SpiceChannel *channel, spice_msg_in *in)
 }
 
 /* coroutine context */
-static void cursor_handle_trail(SpiceChannel *channel, spice_msg_in *in)
+static void cursor_handle_trail(SpiceChannel *channel, SpiceMsgIn *in)
 {
-    spice_cursor_channel *c = SPICE_CURSOR_CHANNEL(channel)->priv;
+    SpiceCursorChannelPrivate *c = SPICE_CURSOR_CHANNEL(channel)->priv;
 
     g_return_if_fail(c->init_done == TRUE);
 
@@ -536,9 +536,9 @@ static void cursor_handle_trail(SpiceChannel *channel, spice_msg_in *in)
 }
 
 /* coroutine context */
-static void cursor_handle_inval_one(SpiceChannel *channel, spice_msg_in *in)
+static void cursor_handle_inval_one(SpiceChannel *channel, SpiceMsgIn *in)
 {
-    spice_cursor_channel *c = SPICE_CURSOR_CHANNEL(channel)->priv;
+    SpiceCursorChannelPrivate *c = SPICE_CURSOR_CHANNEL(channel)->priv;
     SpiceMsgDisplayInvalOne *zap = spice_msg_in_parsed(in);
     display_cache_item *item;
 
@@ -549,7 +549,7 @@ static void cursor_handle_inval_one(SpiceChannel *channel, spice_msg_in *in)
 }
 
 /* coroutine context */
-static void cursor_handle_inval_all(SpiceChannel *channel, spice_msg_in *in)
+static void cursor_handle_inval_all(SpiceChannel *channel, SpiceMsgIn *in)
 {
     delete_cursor_all(channel);
 }
@@ -566,7 +566,7 @@ static const spice_msg_handler cursor_handlers[] = {
 };
 
 /* coroutine context */
-static void spice_cursor_handle_msg(SpiceChannel *channel, spice_msg_in *msg)
+static void spice_cursor_handle_msg(SpiceChannel *channel, SpiceMsgIn *msg)
 {
     int type = spice_msg_in_type(msg);
     SpiceChannelClass *parent_class;
diff --git a/gtk/channel-cursor.h b/gtk/channel-cursor.h
index 9983694..4f44d16 100644
--- a/gtk/channel-cursor.h
+++ b/gtk/channel-cursor.h
@@ -31,11 +31,11 @@ G_BEGIN_DECLS
 
 typedef struct _SpiceCursorChannel SpiceCursorChannel;
 typedef struct _SpiceCursorChannelClass SpiceCursorChannelClass;
-typedef struct spice_cursor_channel spice_cursor_channel;
+typedef struct _SpiceCursorChannelPrivate SpiceCursorChannelPrivate;
 
 struct _SpiceCursorChannel {
     SpiceChannel parent;
-    spice_cursor_channel *priv;
+    SpiceCursorChannelPrivate *priv;
     /* Do not add fields to this struct */
 };
 
diff --git a/gtk/channel-display-priv.h b/gtk/channel-display-priv.h
index 61be409..332d271 100644
--- a/gtk/channel-display-priv.h
+++ b/gtk/channel-display-priv.h
@@ -54,9 +54,9 @@ typedef struct display_surface {
 } display_surface;
 
 typedef struct display_stream {
-    spice_msg_in                *msg_create;
-    spice_msg_in                *msg_clip;
-    spice_msg_in                *msg_data;
+    SpiceMsgIn                  *msg_create;
+    SpiceMsgIn                  *msg_clip;
+    SpiceMsgIn                  *msg_data;
 
     /* from messages */
     display_surface             *surface;
diff --git a/gtk/channel-display.c b/gtk/channel-display.c
index 385224b..206e630 100644
--- a/gtk/channel-display.c
+++ b/gtk/channel-display.c
@@ -56,9 +56,9 @@
  */
 
 #define SPICE_DISPLAY_CHANNEL_GET_PRIVATE(obj)                                  \
-    (G_TYPE_INSTANCE_GET_PRIVATE((obj), SPICE_TYPE_DISPLAY_CHANNEL, spice_display_channel))
+    (G_TYPE_INSTANCE_GET_PRIVATE((obj), SPICE_TYPE_DISPLAY_CHANNEL, SpiceDisplayChannelPrivate))
 
-struct spice_display_channel {
+struct _SpiceDisplayChannelPrivate {
     Ring                        surfaces;
     display_cache               *images;
     display_cache               *palettes;
@@ -95,20 +95,20 @@ enum {
 
 static guint signals[SPICE_DISPLAY_LAST_SIGNAL];
 
-static void spice_display_handle_msg(SpiceChannel *channel, spice_msg_in *msg);
+static void spice_display_handle_msg(SpiceChannel *channel, SpiceMsgIn *msg);
 static void spice_display_channel_init(SpiceDisplayChannel *channel);
 static void spice_display_channel_up(SpiceChannel *channel);
 
 static void clear_surfaces(SpiceChannel *channel);
 static void clear_streams(SpiceChannel *channel);
-static display_surface *find_surface(spice_display_channel *c, int surface_id);
+static display_surface *find_surface(SpiceDisplayChannelPrivate *c, int surface_id);
 static gboolean display_stream_render(display_stream *st);
 
 /* ------------------------------------------------------------------ */
 
 static void spice_display_channel_dispose(GObject *object)
 {
-    spice_display_channel *c = SPICE_DISPLAY_CHANNEL(object)->priv;
+    SpiceDisplayChannelPrivate *c = SPICE_DISPLAY_CHANNEL(object)->priv;
 
     if (c->mark_false_event_id != 0) {
         g_source_remove(c->mark_false_event_id);
@@ -130,7 +130,7 @@ static void spice_display_channel_finalize(GObject *obj)
 
 static void spice_display_channel_constructed(GObject *object)
 {
-    spice_display_channel *c = SPICE_DISPLAY_CHANNEL(object)->priv;
+    SpiceDisplayChannelPrivate *c = SPICE_DISPLAY_CHANNEL(object)->priv;
     SpiceSession *s = spice_channel_get_session(SPICE_CHANNEL(object));
 
     g_return_if_fail(s != NULL);
@@ -150,7 +150,7 @@ static void spice_display_get_property(GObject    *object,
                                        GValue     *value,
                                        GParamSpec *pspec)
 {
-    spice_display_channel *c = SPICE_DISPLAY_CHANNEL(object)->priv;
+    SpiceDisplayChannelPrivate *c = SPICE_DISPLAY_CHANNEL(object)->priv;
 
     switch (prop_id) {
     case PROP_WIDTH: {
@@ -303,7 +303,7 @@ static void spice_display_channel_class_init(SpiceDisplayChannelClass *klass)
                      1,
                      G_TYPE_INT);
 
-    g_type_class_add_private(klass, sizeof(spice_display_channel));
+    g_type_class_add_private(klass, sizeof(SpiceDisplayChannelPrivate));
 
     sw_canvas_init();
     quic_init();
@@ -368,8 +368,8 @@ static void do_emit_main_context(GObject *object, int signum, gpointer params)
 
 static void image_put(SpiceImageCache *cache, uint64_t id, pixman_image_t *image)
 {
-    spice_display_channel *c =
-        SPICE_CONTAINEROF(cache, spice_display_channel, image_cache);
+    SpiceDisplayChannelPrivate *c =
+        SPICE_CONTAINEROF(cache, SpiceDisplayChannelPrivate, image_cache);
     display_cache_item *item;
 
     item = cache_find(c->images, id);
@@ -384,8 +384,8 @@ static void image_put(SpiceImageCache *cache, uint64_t id, pixman_image_t *image
 
 static pixman_image_t *image_get(SpiceImageCache *cache, uint64_t id)
 {
-    spice_display_channel *c =
-        SPICE_CONTAINEROF(cache, spice_display_channel, image_cache);
+    SpiceDisplayChannelPrivate *c =
+        SPICE_CONTAINEROF(cache, SpiceDisplayChannelPrivate, image_cache);
     display_cache_item *item;
 
     item = cache_find(c->images, id);
@@ -398,8 +398,8 @@ static pixman_image_t *image_get(SpiceImageCache *cache, uint64_t id)
 
 static void image_remove(SpiceImageCache *cache, uint64_t id)
 {
-    spice_display_channel *c =
-        SPICE_CONTAINEROF(cache, spice_display_channel, image_cache);
+    SpiceDisplayChannelPrivate *c =
+        SPICE_CONTAINEROF(cache, SpiceDisplayChannelPrivate, image_cache);
     display_cache_item *item;
 
     item = cache_find(c->images, id);
@@ -412,8 +412,8 @@ static void image_remove(SpiceImageCache *cache, uint64_t id)
 
 static void palette_put(SpicePaletteCache *cache, SpicePalette *palette)
 {
-    spice_display_channel *c =
-        SPICE_CONTAINEROF(cache, spice_display_channel, palette_cache);
+    SpiceDisplayChannelPrivate *c =
+        SPICE_CONTAINEROF(cache, SpiceDisplayChannelPrivate, palette_cache);
     display_cache_item *item;
 
     item = cache_add(c->palettes, palette->unique);
@@ -423,8 +423,8 @@ static void palette_put(SpicePaletteCache *cache, SpicePalette *palette)
 
 static SpicePalette *palette_get(SpicePaletteCache *cache, uint64_t id)
 {
-    spice_display_channel *c =
-        SPICE_CONTAINEROF(cache, spice_display_channel, palette_cache);
+    SpiceDisplayChannelPrivate *c =
+        SPICE_CONTAINEROF(cache, SpiceDisplayChannelPrivate, palette_cache);
     display_cache_item *item;
 
     item = cache_find(c->palettes, id);
@@ -437,8 +437,8 @@ static SpicePalette *palette_get(SpicePaletteCache *cache, uint64_t id)
 
 static void palette_remove(SpicePaletteCache *cache, uint32_t id)
 {
-    spice_display_channel *c =
-        SPICE_CONTAINEROF(cache, spice_display_channel, palette_cache);
+    SpiceDisplayChannelPrivate *c =
+        SPICE_CONTAINEROF(cache, SpiceDisplayChannelPrivate, palette_cache);
     display_cache_item *item;
 
     item = cache_find(c->palettes, id);
@@ -459,8 +459,8 @@ static void palette_release(SpicePaletteCache *cache, SpicePalette *palette)
 static void image_put_lossy(SpiceImageCache *cache, uint64_t id,
                             pixman_image_t *surface)
 {
-    spice_display_channel *c =
-        SPICE_CONTAINEROF(cache, spice_display_channel, image_cache);
+    SpiceDisplayChannelPrivate *c =
+        SPICE_CONTAINEROF(cache, SpiceDisplayChannelPrivate, image_cache);
     display_cache_item *item;
 
 #ifndef NDEBUG
@@ -475,8 +475,8 @@ static void image_put_lossy(SpiceImageCache *cache, uint64_t id,
 static void image_replace_lossy(SpiceImageCache *cache, uint64_t id,
                                 pixman_image_t *surface)
 {
-    spice_display_channel *c =
-        SPICE_CONTAINEROF(cache, spice_display_channel, image_cache);
+    SpiceDisplayChannelPrivate *c =
+        SPICE_CONTAINEROF(cache, SpiceDisplayChannelPrivate, image_cache);
     display_cache_item *item;
 
     item = cache_find(c->images, id);
@@ -489,8 +489,8 @@ static void image_replace_lossy(SpiceImageCache *cache, uint64_t id,
 
 static pixman_image_t* image_get_lossless(SpiceImageCache *cache, uint64_t id)
 {
-    spice_display_channel *c =
-        SPICE_CONTAINEROF(cache, spice_display_channel, image_cache);
+    SpiceDisplayChannelPrivate *c =
+        SPICE_CONTAINEROF(cache, SpiceDisplayChannelPrivate, image_cache);
     display_cache_item *item;
 
     item = cache_find(c->images, id);
@@ -509,8 +509,8 @@ static pixman_image_t* image_get_lossless(SpiceImageCache *cache, uint64_t id)
 SpiceCanvas *surfaces_get(SpiceImageSurfaces *surfaces,
                           uint32_t surface_id)
 {
-    spice_display_channel *c =
-        SPICE_CONTAINEROF(surfaces, spice_display_channel, image_surfaces);
+    SpiceDisplayChannelPrivate *c =
+        SPICE_CONTAINEROF(surfaces, SpiceDisplayChannelPrivate, image_surfaces);
 
     display_surface *s =
         find_surface(c, surface_id);
@@ -552,7 +552,7 @@ static HDC create_compatible_dc(void)
 
 static void spice_display_channel_init(SpiceDisplayChannel *channel)
 {
-    spice_display_channel *c;
+    SpiceDisplayChannelPrivate *c;
 
     c = channel->priv = SPICE_DISPLAY_CHANNEL_GET_PRIVATE(channel);
     memset(c, 0, sizeof(*c));
@@ -570,7 +570,7 @@ static void spice_display_channel_init(SpiceDisplayChannel *channel)
 
 static int create_canvas(SpiceChannel *channel, display_surface *surface)
 {
-    spice_display_channel *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
+    SpiceDisplayChannelPrivate *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
 
     if (surface->primary) {
         SPICE_DEBUG("display: create primary canvas");
@@ -647,7 +647,7 @@ static void destroy_canvas(display_surface *surface)
     surface->canvas = NULL;
 }
 
-static display_surface *find_surface(spice_display_channel *c, int surface_id)
+static display_surface *find_surface(SpiceDisplayChannelPrivate *c, int surface_id)
 {
     display_surface *surface;
     RingItem *item;
@@ -664,7 +664,7 @@ static display_surface *find_surface(spice_display_channel *c, int surface_id)
 
 static void clear_surfaces(SpiceChannel *channel)
 {
-    spice_display_channel *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
+    SpiceDisplayChannelPrivate *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
     display_surface *surface;
     RingItem *item;
 
@@ -691,7 +691,7 @@ static void emit_invalidate(SpiceChannel *channel, SpiceRect *bbox)
 /* coroutine context */
 static void spice_display_channel_up(SpiceChannel *channel)
 {
-    spice_msg_out *out;
+    SpiceMsgOut *out;
     SpiceMsgcDisplayInit init = {
         .pixmap_cache_id            = 1,
         .pixmap_cache_size          = DISPLAY_PIXMAP_CACHE,
@@ -718,9 +718,9 @@ static void spice_display_channel_up(SpiceChannel *channel)
 }
 
 /* coroutine context */
-static void display_handle_mode(SpiceChannel *channel, spice_msg_in *in)
+static void display_handle_mode(SpiceChannel *channel, SpiceMsgIn *in)
 {
-    spice_display_channel *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
+    SpiceDisplayChannelPrivate *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
     SpiceMsgDisplayMode *mode = spice_msg_in_parsed(in);
     display_surface *surface = find_surface(c, 0);
 
@@ -754,9 +754,9 @@ static void display_handle_mode(SpiceChannel *channel, spice_msg_in *in)
 }
 
 /* coroutine context */
-static void display_handle_mark(SpiceChannel *channel, spice_msg_in *in)
+static void display_handle_mark(SpiceChannel *channel, SpiceMsgIn *in)
 {
-    spice_display_channel *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
+    SpiceDisplayChannelPrivate *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
     display_surface *surface = find_surface(c, 0);
 
     SPICE_DEBUG("%s", __FUNCTION__);
@@ -770,9 +770,9 @@ static void display_handle_mark(SpiceChannel *channel, spice_msg_in *in)
 }
 
 /* coroutine context */
-static void display_handle_reset(SpiceChannel *channel, spice_msg_in *in)
+static void display_handle_reset(SpiceChannel *channel, SpiceMsgIn *in)
 {
-    spice_display_channel *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
+    SpiceDisplayChannelPrivate *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
     display_surface *surface = find_surface(c, 0);
 
     SPICE_DEBUG("%s: TODO detach_from_screen", __FUNCTION__);
@@ -787,10 +787,10 @@ static void display_handle_reset(SpiceChannel *channel, spice_msg_in *in)
 }
 
 /* coroutine context */
-static void display_handle_copy_bits(SpiceChannel *channel, spice_msg_in *in)
+static void display_handle_copy_bits(SpiceChannel *channel, SpiceMsgIn *in)
 {
     SpiceMsgDisplayCopyBits *op = spice_msg_in_parsed(in);
-    spice_display_channel *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
+    SpiceDisplayChannelPrivate *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
     display_surface *surface = find_surface(c, op->base.surface_id);
 
     g_return_if_fail(surface != NULL);
@@ -802,9 +802,9 @@ static void display_handle_copy_bits(SpiceChannel *channel, spice_msg_in *in)
 }
 
 /* coroutine context */
-static void display_handle_inv_list(SpiceChannel *channel, spice_msg_in *in)
+static void display_handle_inv_list(SpiceChannel *channel, SpiceMsgIn *in)
 {
-    spice_display_channel *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
+    SpiceDisplayChannelPrivate *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
     SpiceResourceList *list = spice_msg_in_parsed(in);
     int i;
 
@@ -821,22 +821,22 @@ static void display_handle_inv_list(SpiceChannel *channel, spice_msg_in *in)
 }
 
 /* coroutine context */
-static void display_handle_inv_pixmap_all(SpiceChannel *channel, spice_msg_in *in)
+static void display_handle_inv_pixmap_all(SpiceChannel *channel, SpiceMsgIn *in)
 {
     spice_session_images_clear(spice_channel_get_session(channel));
 }
 
 /* coroutine context */
-static void display_handle_inv_palette(SpiceChannel *channel, spice_msg_in *in)
+static void display_handle_inv_palette(SpiceChannel *channel, SpiceMsgIn *in)
 {
-    spice_display_channel *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
+    SpiceDisplayChannelPrivate *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
     SpiceMsgDisplayInvalOne* op = spice_msg_in_parsed(in);
 
     palette_remove(&c->palette_cache, op->id);
 }
 
 /* coroutine context */
-static void display_handle_inv_palette_all(SpiceChannel *channel, spice_msg_in *in)
+static void display_handle_inv_palette_all(SpiceChannel *channel, SpiceMsgIn *in)
 {
     spice_session_palettes_clear(spice_channel_get_session(channel));
 }
@@ -863,9 +863,9 @@ static void display_update_stream_region(display_stream *st)
 }
 
 /* coroutine context */
-static void display_handle_stream_create(SpiceChannel *channel, spice_msg_in *in)
+static void display_handle_stream_create(SpiceChannel *channel, SpiceMsgIn *in)
 {
-    spice_display_channel *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
+    SpiceDisplayChannelPrivate *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
     SpiceMsgDisplayStreamCreate *op = spice_msg_in_parsed(in);
     display_stream *st;
 
@@ -909,7 +909,7 @@ static gboolean display_stream_schedule(display_stream *st)
 {
     guint32 time, d;
     SpiceMsgDisplayStreamData *op;
-    spice_msg_in *in;
+    SpiceMsgIn *in;
 
     if (st->timeout)
         return TRUE;
@@ -938,7 +938,7 @@ static gboolean display_stream_schedule(display_stream *st)
 /* main context */
 static gboolean display_stream_render(display_stream *st)
 {
-    spice_msg_in *in;
+    SpiceMsgIn *in;
 
     st->timeout = 0;
     do {
@@ -996,9 +996,9 @@ static gboolean display_stream_render(display_stream *st)
 }
 
 /* coroutine context */
-static void display_handle_stream_data(SpiceChannel *channel, spice_msg_in *in)
+static void display_handle_stream_data(SpiceChannel *channel, SpiceMsgIn *in)
 {
-    spice_display_channel *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
+    SpiceDisplayChannelPrivate *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
     SpiceMsgDisplayStreamData *op = spice_msg_in_parsed(in);
     display_stream *st = c->streams[op->id];
     guint32 mmtime;
@@ -1022,9 +1022,9 @@ static void display_handle_stream_data(SpiceChannel *channel, spice_msg_in *in)
 }
 
 /* coroutine context */
-static void display_handle_stream_clip(SpiceChannel *channel, spice_msg_in *in)
+static void display_handle_stream_clip(SpiceChannel *channel, SpiceMsgIn *in)
 {
-    spice_display_channel *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
+    SpiceDisplayChannelPrivate *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
     SpiceMsgDisplayStreamClip *op = spice_msg_in_parsed(in);
     display_stream *st = c->streams[op->id];
 
@@ -1044,7 +1044,7 @@ static void _msg_in_unref_func(gpointer data, gpointer user_data)
 
 static void destroy_stream(SpiceChannel *channel, int id)
 {
-    spice_display_channel *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
+    SpiceDisplayChannelPrivate *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
     display_stream *st;
 
     g_return_if_fail(c != NULL);
@@ -1074,7 +1074,7 @@ static void destroy_stream(SpiceChannel *channel, int id)
 
 static void clear_streams(SpiceChannel *channel)
 {
-    spice_display_channel *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
+    SpiceDisplayChannelPrivate *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
     int i;
 
     for (i = 0; i < c->nstreams; i++) {
@@ -1086,7 +1086,7 @@ static void clear_streams(SpiceChannel *channel)
 }
 
 /* coroutine context */
-static void display_handle_stream_destroy(SpiceChannel *channel, spice_msg_in *in)
+static void display_handle_stream_destroy(SpiceChannel *channel, SpiceMsgIn *in)
 {
     SpiceMsgDisplayStreamDestroy *op = spice_msg_in_parsed(in);
 
@@ -1096,7 +1096,7 @@ static void display_handle_stream_destroy(SpiceChannel *channel, spice_msg_in *i
 }
 
 /* coroutine context */
-static void display_handle_stream_destroy_all(SpiceChannel *channel, spice_msg_in *in)
+static void display_handle_stream_destroy_all(SpiceChannel *channel, SpiceMsgIn *in)
 {
     clear_streams(channel);
 }
@@ -1104,92 +1104,92 @@ static void display_handle_stream_destroy_all(SpiceChannel *channel, spice_msg_i
 /* ------------------------------------------------------------------ */
 
 /* coroutine context */
-static void display_handle_draw_fill(SpiceChannel *channel, spice_msg_in *in)
+static void display_handle_draw_fill(SpiceChannel *channel, SpiceMsgIn *in)
 {
     SpiceMsgDisplayDrawFill *op = spice_msg_in_parsed(in);
     DRAW(fill);
 }
 
 /* coroutine context */
-static void display_handle_draw_opaque(SpiceChannel *channel, spice_msg_in *in)
+static void display_handle_draw_opaque(SpiceChannel *channel, SpiceMsgIn *in)
 {
     SpiceMsgDisplayDrawOpaque *op = spice_msg_in_parsed(in);
     DRAW(opaque);
 }
 
 /* coroutine context */
-static void display_handle_draw_copy(SpiceChannel *channel, spice_msg_in *in)
+static void display_handle_draw_copy(SpiceChannel *channel, SpiceMsgIn *in)
 {
     SpiceMsgDisplayDrawCopy *op = spice_msg_in_parsed(in);
     DRAW(copy);
 }
 
 /* coroutine context */
-static void display_handle_draw_blend(SpiceChannel *channel, spice_msg_in *in)
+static void display_handle_draw_blend(SpiceChannel *channel, SpiceMsgIn *in)
 {
     SpiceMsgDisplayDrawBlend *op = spice_msg_in_parsed(in);
     DRAW(blend);
 }
 
 /* coroutine context */
-static void display_handle_draw_blackness(SpiceChannel *channel, spice_msg_in *in)
+static void display_handle_draw_blackness(SpiceChannel *channel, SpiceMsgIn *in)
 {
     SpiceMsgDisplayDrawBlackness *op = spice_msg_in_parsed(in);
     DRAW(blackness);
 }
 
-static void display_handle_draw_whiteness(SpiceChannel *channel, spice_msg_in *in)
+static void display_handle_draw_whiteness(SpiceChannel *channel, SpiceMsgIn *in)
 {
     SpiceMsgDisplayDrawWhiteness *op = spice_msg_in_parsed(in);
     DRAW(whiteness);
 }
 
 /* coroutine context */
-static void display_handle_draw_invers(SpiceChannel *channel, spice_msg_in *in)
+static void display_handle_draw_invers(SpiceChannel *channel, SpiceMsgIn *in)
 {
     SpiceMsgDisplayDrawInvers *op = spice_msg_in_parsed(in);
     DRAW(invers);
 }
 
 /* coroutine context */
-static void display_handle_draw_rop3(SpiceChannel *channel, spice_msg_in *in)
+static void display_handle_draw_rop3(SpiceChannel *channel, SpiceMsgIn *in)
 {
     SpiceMsgDisplayDrawRop3 *op = spice_msg_in_parsed(in);
     DRAW(rop3);
 }
 
 /* coroutine context */
-static void display_handle_draw_stroke(SpiceChannel *channel, spice_msg_in *in)
+static void display_handle_draw_stroke(SpiceChannel *channel, SpiceMsgIn *in)
 {
     SpiceMsgDisplayDrawStroke *op = spice_msg_in_parsed(in);
     DRAW(stroke);
 }
 
 /* coroutine context */
-static void display_handle_draw_text(SpiceChannel *channel, spice_msg_in *in)
+static void display_handle_draw_text(SpiceChannel *channel, SpiceMsgIn *in)
 {
     SpiceMsgDisplayDrawText *op = spice_msg_in_parsed(in);
     DRAW(text);
 }
 
 /* coroutine context */
-static void display_handle_draw_transparent(SpiceChannel *channel, spice_msg_in *in)
+static void display_handle_draw_transparent(SpiceChannel *channel, SpiceMsgIn *in)
 {
     SpiceMsgDisplayDrawTransparent *op = spice_msg_in_parsed(in);
     DRAW(transparent);
 }
 
 /* coroutine context */
-static void display_handle_draw_alpha_blend(SpiceChannel *channel, spice_msg_in *in)
+static void display_handle_draw_alpha_blend(SpiceChannel *channel, SpiceMsgIn *in)
 {
     SpiceMsgDisplayDrawAlphaBlend *op = spice_msg_in_parsed(in);
     DRAW(alpha_blend);
 }
 
 /* coroutine context */
-static void display_handle_surface_create(SpiceChannel *channel, spice_msg_in *in)
+static void display_handle_surface_create(SpiceChannel *channel, SpiceMsgIn *in)
 {
-    spice_display_channel *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
+    SpiceDisplayChannelPrivate *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
     SpiceMsgSurfaceCreate *create = spice_msg_in_parsed(in);
     display_surface *surface = spice_new0(display_surface, 1);
 
@@ -1221,7 +1221,7 @@ static void display_handle_surface_create(SpiceChannel *channel, spice_msg_in *i
 static gboolean display_mark_false(gpointer data)
 {
     SpiceChannel *channel = data;
-    spice_display_channel *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
+    SpiceDisplayChannelPrivate *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
 
     c->mark = FALSE;
     g_signal_emit(channel, signals[SPICE_DISPLAY_MARK], 0, FALSE);
@@ -1231,10 +1231,10 @@ static gboolean display_mark_false(gpointer data)
 }
 
 /* coroutine context */
-static void display_handle_surface_destroy(SpiceChannel *channel, spice_msg_in *in)
+static void display_handle_surface_destroy(SpiceChannel *channel, SpiceMsgIn *in)
 {
     SpiceMsgSurfaceDestroy *destroy = spice_msg_in_parsed(in);
-    spice_display_channel *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
+    SpiceDisplayChannelPrivate *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
     display_surface *surface;
 
     g_return_if_fail(destroy != NULL);
@@ -1294,7 +1294,7 @@ static const spice_msg_handler display_handlers[] = {
 };
 
 /* coroutine context */
-static void spice_display_handle_msg(SpiceChannel *channel, spice_msg_in *msg)
+static void spice_display_handle_msg(SpiceChannel *channel, SpiceMsgIn *msg)
 {
     int type = spice_msg_in_type(msg);
     SpiceChannelClass *parent_class;
diff --git a/gtk/channel-display.h b/gtk/channel-display.h
index da61efa..bccf78c 100644
--- a/gtk/channel-display.h
+++ b/gtk/channel-display.h
@@ -31,11 +31,11 @@ G_BEGIN_DECLS
 
 typedef struct _SpiceDisplayChannel SpiceDisplayChannel;
 typedef struct _SpiceDisplayChannelClass SpiceDisplayChannelClass;
-typedef struct spice_display_channel spice_display_channel;
+typedef struct _SpiceDisplayChannelPrivate SpiceDisplayChannelPrivate;
 
 struct _SpiceDisplayChannel {
     SpiceChannel parent;
-    spice_display_channel *priv;
+    SpiceDisplayChannelPrivate *priv;
     /* Do not add fields to this struct */
 };
 
diff --git a/gtk/channel-inputs.c b/gtk/channel-inputs.c
index 285f646..e1d0d60 100644
--- a/gtk/channel-inputs.c
+++ b/gtk/channel-inputs.c
@@ -39,9 +39,9 @@
  */
 
 #define SPICE_INPUTS_CHANNEL_GET_PRIVATE(obj)                                  \
-    (G_TYPE_INSTANCE_GET_PRIVATE((obj), SPICE_TYPE_INPUTS_CHANNEL, spice_inputs_channel))
+    (G_TYPE_INSTANCE_GET_PRIVATE((obj), SPICE_TYPE_INPUTS_CHANNEL, SpiceInputsChannelPrivate))
 
-struct spice_inputs_channel {
+struct _SpiceInputsChannelPrivate {
     int                         bs;
     int                         dx, dy;
     unsigned int                x, y, dpy;
@@ -67,14 +67,14 @@ enum {
 
 static guint signals[SPICE_INPUTS_LAST_SIGNAL];
 
-static void spice_inputs_handle_msg(SpiceChannel *channel, spice_msg_in *msg);
+static void spice_inputs_handle_msg(SpiceChannel *channel, SpiceMsgIn *msg);
 static void spice_inputs_channel_up(SpiceChannel *channel);
 
 /* ------------------------------------------------------------------ */
 
 static void spice_inputs_channel_init(SpiceInputsChannel *channel)
 {
-    spice_inputs_channel *c;
+    SpiceInputsChannelPrivate *c;
 
     c = channel->priv = SPICE_INPUTS_CHANNEL_GET_PRIVATE(channel);
     memset(c, 0, sizeof(*c));
@@ -85,7 +85,7 @@ static void spice_inputs_get_property(GObject    *object,
                                       GValue     *value,
                                       GParamSpec *pspec)
 {
-    spice_inputs_channel *c = SPICE_INPUTS_CHANNEL(object)->priv;
+    SpiceInputsChannelPrivate *c = SPICE_INPUTS_CHANNEL(object)->priv;
 
     switch (prop_id) {
     case PROP_KEY_MODIFIERS:
@@ -143,7 +143,7 @@ static void spice_inputs_channel_class_init(SpiceInputsChannelClass *klass)
                      G_TYPE_NONE,
                      0);
 
-    g_type_class_add_private(klass, sizeof(spice_inputs_channel));
+    g_type_class_add_private(klass, sizeof(SpiceInputsChannelPrivate));
 }
 
 /* signal trampoline---------------------------------------------------------- */
@@ -166,11 +166,11 @@ static void do_emit_main_context(GObject *object, int signum, gpointer params)
 
 /* ------------------------------------------------------------------ */
 
-static spice_msg_out* mouse_motion(SpiceInputsChannel *channel)
+static SpiceMsgOut* mouse_motion(SpiceInputsChannel *channel)
 {
-    spice_inputs_channel *c = channel->priv;
+    SpiceInputsChannelPrivate *c = channel->priv;
     SpiceMsgcMouseMotion motion;
-    spice_msg_out *msg;
+    SpiceMsgOut *msg;
 
     if (!c->dx && !c->dy)
         return NULL;
@@ -189,11 +189,11 @@ static spice_msg_out* mouse_motion(SpiceInputsChannel *channel)
     return msg;
 }
 
-static spice_msg_out* mouse_position(SpiceInputsChannel *channel)
+static SpiceMsgOut* mouse_position(SpiceInputsChannel *channel)
 {
-    spice_inputs_channel *c = channel->priv;
+    SpiceInputsChannelPrivate *c = channel->priv;
     SpiceMsgcMousePosition position;
-    spice_msg_out *msg;
+    SpiceMsgOut *msg;
 
     if (c->dpy == -1)
         return NULL;
@@ -216,7 +216,7 @@ static spice_msg_out* mouse_position(SpiceInputsChannel *channel)
 /* main context */
 static void send_position(SpiceInputsChannel *channel)
 {
-    spice_msg_out *msg;
+    SpiceMsgOut *msg;
 
     msg = mouse_position(channel);
     if (!msg) /* if no motion */
@@ -229,7 +229,7 @@ static void send_position(SpiceInputsChannel *channel)
 /* main context */
 static void send_motion(SpiceInputsChannel *channel)
 {
-    spice_msg_out *msg;
+    SpiceMsgOut *msg;
 
     msg = mouse_motion(channel);
     if (!msg) /* if no motion */
@@ -240,9 +240,9 @@ static void send_motion(SpiceInputsChannel *channel)
 }
 
 /* coroutine context */
-static void inputs_handle_init(SpiceChannel *channel, spice_msg_in *in)
+static void inputs_handle_init(SpiceChannel *channel, SpiceMsgIn *in)
 {
-    spice_inputs_channel *c = SPICE_INPUTS_CHANNEL(channel)->priv;
+    SpiceInputsChannelPrivate *c = SPICE_INPUTS_CHANNEL(channel)->priv;
     SpiceMsgInputsInit *init = spice_msg_in_parsed(in);
 
     c->modifiers = init->keyboard_modifiers;
@@ -250,9 +250,9 @@ static void inputs_handle_init(SpiceChannel *channel, spice_msg_in *in)
 }
 
 /* coroutine context */
-static void inputs_handle_modifiers(SpiceChannel *channel, spice_msg_in *in)
+static void inputs_handle_modifiers(SpiceChannel *channel, SpiceMsgIn *in)
 {
-    spice_inputs_channel *c = SPICE_INPUTS_CHANNEL(channel)->priv;
+    SpiceInputsChannelPrivate *c = SPICE_INPUTS_CHANNEL(channel)->priv;
     SpiceMsgInputsKeyModifiers *modifiers = spice_msg_in_parsed(in);
 
     c->modifiers = modifiers->modifiers;
@@ -260,10 +260,10 @@ static void inputs_handle_modifiers(SpiceChannel *channel, spice_msg_in *in)
 }
 
 /* coroutine context */
-static void inputs_handle_ack(SpiceChannel *channel, spice_msg_in *in)
+static void inputs_handle_ack(SpiceChannel *channel, SpiceMsgIn *in)
 {
-    spice_inputs_channel *c = SPICE_INPUTS_CHANNEL(channel)->priv;
-    spice_msg_out *msg;
+    SpiceInputsChannelPrivate *c = SPICE_INPUTS_CHANNEL(channel)->priv;
+    SpiceMsgOut *msg;
 
     c->motion_count -= SPICE_INPUT_MOTION_ACK_BUNCH;
 
@@ -287,7 +287,7 @@ static const spice_msg_handler inputs_handlers[] = {
 };
 
 /* coroutine context */
-static void spice_inputs_handle_msg(SpiceChannel *channel, spice_msg_in *msg)
+static void spice_inputs_handle_msg(SpiceChannel *channel, SpiceMsgIn *msg)
 {
     int type = spice_msg_in_type(msg);
     SpiceChannelClass *parent_class;
@@ -316,7 +316,7 @@ static void spice_inputs_handle_msg(SpiceChannel *channel, spice_msg_in *msg)
 void spice_inputs_motion(SpiceInputsChannel *channel, gint dx, gint dy,
                          gint button_state)
 {
-    spice_inputs_channel *c;
+    SpiceInputsChannelPrivate *c;
 
     g_return_if_fail(channel != NULL);
     g_return_if_fail(SPICE_CHANNEL(channel)->priv->state != SPICE_CHANNEL_STATE_UNCONNECTED);
@@ -346,7 +346,7 @@ void spice_inputs_motion(SpiceInputsChannel *channel, gint dx, gint dy,
 void spice_inputs_position(SpiceInputsChannel *channel, gint x, gint y,
                            gint display, gint button_state)
 {
-    spice_inputs_channel *c;
+    SpiceInputsChannelPrivate *c;
 
     g_return_if_fail(channel != NULL);
 
@@ -377,9 +377,9 @@ void spice_inputs_position(SpiceInputsChannel *channel, gint x, gint y,
 void spice_inputs_button_press(SpiceInputsChannel *channel, gint button,
                                gint button_state)
 {
-    spice_inputs_channel *c;
+    SpiceInputsChannelPrivate *c;
     SpiceMsgcMousePress press;
-    spice_msg_out *msg;
+    SpiceMsgOut *msg;
 
     g_return_if_fail(channel != NULL);
 
@@ -423,9 +423,9 @@ void spice_inputs_button_press(SpiceInputsChannel *channel, gint button,
 void spice_inputs_button_release(SpiceInputsChannel *channel, gint button,
                                  gint button_state)
 {
-    spice_inputs_channel *c;
+    SpiceInputsChannelPrivate *c;
     SpiceMsgcMouseRelease release;
-    spice_msg_out *msg;
+    SpiceMsgOut *msg;
 
     g_return_if_fail(channel != NULL);
 
@@ -468,7 +468,7 @@ void spice_inputs_button_release(SpiceInputsChannel *channel, gint button,
 void spice_inputs_key_press(SpiceInputsChannel *channel, guint scancode)
 {
     SpiceMsgcKeyDown down;
-    spice_msg_out *msg;
+    SpiceMsgOut *msg;
 
     g_return_if_fail(channel != NULL);
     g_return_if_fail(SPICE_CHANNEL(channel)->priv->state != SPICE_CHANNEL_STATE_UNCONNECTED);
@@ -499,7 +499,7 @@ void spice_inputs_key_press(SpiceInputsChannel *channel, guint scancode)
 void spice_inputs_key_release(SpiceInputsChannel *channel, guint scancode)
 {
     SpiceMsgcKeyUp up;
-    spice_msg_out *msg;
+    SpiceMsgOut *msg;
 
     g_return_if_fail(channel != NULL);
     g_return_if_fail(SPICE_CHANNEL(channel)->priv->state != SPICE_CHANNEL_STATE_UNCONNECTED);
@@ -521,12 +521,12 @@ void spice_inputs_key_release(SpiceInputsChannel *channel, guint scancode)
 }
 
 /* main or coroutine context */
-static spice_msg_out* set_key_locks(SpiceInputsChannel *channel, guint locks)
+static SpiceMsgOut* set_key_locks(SpiceInputsChannel *channel, guint locks)
 {
     SpiceMsgcKeyModifiers modifiers;
-    spice_msg_out *msg;
-    spice_inputs_channel *ic;
-    spice_channel *c;
+    SpiceMsgOut *msg;
+    SpiceInputsChannelPrivate *ic;
+    SpiceChannelPrivate *c;
 
     g_return_val_if_fail(SPICE_IS_INPUTS_CHANNEL(channel), NULL);
 
@@ -553,7 +553,7 @@ static spice_msg_out* set_key_locks(SpiceInputsChannel *channel, guint locks)
  **/
 void spice_inputs_set_key_locks(SpiceInputsChannel *channel, guint locks)
 {
-    spice_msg_out *msg;
+    SpiceMsgOut *msg;
 
     msg = set_key_locks(channel, locks);
     if (!msg) /* you can set_key_locks() even if the channel is not ready */
@@ -566,8 +566,8 @@ void spice_inputs_set_key_locks(SpiceInputsChannel *channel, guint locks)
 /* coroutine context */
 static void spice_inputs_channel_up(SpiceChannel *channel)
 {
-    spice_inputs_channel *c = SPICE_INPUTS_CHANNEL(channel)->priv;
-    spice_msg_out *msg;
+    SpiceInputsChannelPrivate *c = SPICE_INPUTS_CHANNEL(channel)->priv;
+    SpiceMsgOut *msg;
 
     msg = set_key_locks(SPICE_INPUTS_CHANNEL(channel), c->locks);
     spice_msg_out_send_internal(msg);
diff --git a/gtk/channel-inputs.h b/gtk/channel-inputs.h
index c2f1f1d..bd3923b 100644
--- a/gtk/channel-inputs.h
+++ b/gtk/channel-inputs.h
@@ -31,7 +31,7 @@ G_BEGIN_DECLS
 
 typedef struct _SpiceInputsChannel SpiceInputsChannel;
 typedef struct _SpiceInputsChannelClass SpiceInputsChannelClass;
-typedef struct spice_inputs_channel spice_inputs_channel;
+typedef struct _SpiceInputsChannelPrivate SpiceInputsChannelPrivate;
 
 typedef enum {
     SPICE_INPUTS_SCROLL_LOCK = (1 << 0),
@@ -41,7 +41,7 @@ typedef enum {
 
 struct _SpiceInputsChannel {
     SpiceChannel parent;
-    spice_inputs_channel *priv;
+    SpiceInputsChannelPrivate *priv;
     /* Do not add fields to this struct */
 };
 
@@ -65,8 +65,8 @@ void spice_inputs_button_press(SpiceInputsChannel *channel, gint button,
                                gint button_state);
 void spice_inputs_button_release(SpiceInputsChannel *channel, gint button,
                                  gint button_state);
-void spice_inputs_key_press(SpiceInputsChannel *channel, guint keyval);
-void spice_inputs_key_release(SpiceInputsChannel *channel, guint keyval);
+void spice_inputs_key_press(SpiceInputsChannel *channel, guint scancode);
+void spice_inputs_key_release(SpiceInputsChannel *channel, guint scancode);
 void spice_inputs_set_key_locks(SpiceInputsChannel *channel, guint locks);
 
 G_END_DECLS
diff --git a/gtk/channel-main.c b/gtk/channel-main.c
index 43dd43a..2b8d88f 100644
--- a/gtk/channel-main.c
+++ b/gtk/channel-main.c
@@ -41,11 +41,11 @@
  */
 
 #define SPICE_MAIN_CHANNEL_GET_PRIVATE(obj)                             \
-    (G_TYPE_INSTANCE_GET_PRIVATE((obj), SPICE_TYPE_MAIN_CHANNEL, spice_main_channel))
+    (G_TYPE_INSTANCE_GET_PRIVATE((obj), SPICE_TYPE_MAIN_CHANNEL, SpiceMainChannelPrivate))
 
 #define MAX_DISPLAY 16
 
-struct spice_main_channel {
+struct _SpiceMainChannelPrivate  {
     enum SpiceMouseMode         mouse_mode;
     bool                        agent_connected;
     bool                        agent_caps_received;
@@ -119,7 +119,7 @@ enum {
 
 static guint signals[SPICE_MAIN_LAST_SIGNAL];
 
-static void spice_main_handle_msg(SpiceChannel *channel, spice_msg_in *msg);
+static void spice_main_handle_msg(SpiceChannel *channel, SpiceMsgIn *msg);
 static void agent_send_msg_queue(SpiceMainChannel *channel);
 static void migrate_channel_event_cb(SpiceChannel *channel, SpiceChannelEvent event,
                                      gpointer data);
@@ -152,7 +152,7 @@ static const char *agent_caps[] = {
 
 static void spice_main_channel_init(SpiceMainChannel *channel)
 {
-    spice_main_channel *c;
+    SpiceMainChannelPrivate *c;
 
     c = channel->priv = SPICE_MAIN_CHANNEL_GET_PRIVATE(channel);
     memset(c, 0, sizeof(*c));
@@ -164,7 +164,7 @@ static void spice_main_get_property(GObject    *object,
                                     GValue     *value,
                                     GParamSpec *pspec)
 {
-    spice_main_channel *c = SPICE_MAIN_CHANNEL(object)->priv;
+    SpiceMainChannelPrivate *c = SPICE_MAIN_CHANNEL(object)->priv;
 
     switch (prop_id) {
     case PROP_MOUSE_MODE:
@@ -200,7 +200,7 @@ static void spice_main_get_property(GObject    *object,
 static void spice_main_set_property(GObject *gobject, guint prop_id,
                                     const GValue *value, GParamSpec *pspec)
 {
-    spice_main_channel *c = SPICE_MAIN_CHANNEL(gobject)->priv;
+    SpiceMainChannelPrivate *c = SPICE_MAIN_CHANNEL(gobject)->priv;
 
     switch (prop_id) {
     case PROP_DISPLAY_DISABLE_WALLPAPER:
@@ -229,7 +229,7 @@ static void spice_main_set_property(GObject *gobject, guint prop_id,
 
 static void spice_main_channel_dispose(GObject *obj)
 {
-    spice_main_channel *c = SPICE_MAIN_CHANNEL(obj)->priv;
+    SpiceMainChannelPrivate *c = SPICE_MAIN_CHANNEL(obj)->priv;
 
     if (c->timer_id) {
         g_source_remove(c->timer_id);
@@ -247,7 +247,7 @@ static void spice_main_channel_dispose(GObject *obj)
 
 static void spice_main_channel_finalize(GObject *obj)
 {
-    spice_main_channel *c = SPICE_MAIN_CHANNEL(obj)->priv;
+    SpiceMainChannelPrivate *c = SPICE_MAIN_CHANNEL(obj)->priv;
 
     g_free(c->agent_msg_data);
     g_queue_free(c->agent_msg_queue);
@@ -592,7 +592,7 @@ static void spice_main_channel_class_init(SpiceMainChannelClass *klass)
                      G_TYPE_OBJECT);
 
 
-    g_type_class_add_private(klass, sizeof(spice_main_channel));
+    g_type_class_add_private(klass, sizeof(SpiceMainChannelPrivate));
 }
 
 /* signal trampoline---------------------------------------------------------- */
@@ -709,8 +709,8 @@ static void do_emit_main_context(GObject *object, int signum, gpointer params)
 /* coroutine context */
 static void agent_send_msg_queue(SpiceMainChannel *channel)
 {
-    spice_main_channel *c = channel->priv;
-    spice_msg_out *out;
+    SpiceMainChannelPrivate *c = channel->priv;
+    SpiceMsgOut *out;
 
     while (c->agent_tokens > 0 &&
            !g_queue_is_empty(c->agent_msg_queue)) {
@@ -725,8 +725,8 @@ static void agent_send_msg_queue(SpiceMainChannel *channel)
    you can wakeup() the channel coroutine or send_msg_queue() */
 static void agent_msg_queue(SpiceMainChannel *channel, int type, int size, void *data)
 {
-    spice_main_channel *c = channel->priv;
-    spice_msg_out *out;
+    SpiceMainChannelPrivate *c = channel->priv;
+    SpiceMsgOut *out;
     VDAgentMessage msg;
     void *payload;
     guint32 paysize;
@@ -762,7 +762,7 @@ static void agent_msg_queue(SpiceMainChannel *channel, int type, int size, void
    you can wakeup() the channel coroutine or send_msg_queue() */
 gboolean spice_main_send_monitor_config(SpiceMainChannel *channel)
 {
-    spice_main_channel *c;
+    SpiceMainChannelPrivate *c;
     VDAgentMonitorsConfig *mon;
     int i, j, monitors;
     size_t size;
@@ -811,7 +811,7 @@ gboolean spice_main_send_monitor_config(SpiceMainChannel *channel)
    you can wakeup() the channel coroutine or send_msg_queue() */
 static void agent_display_config(SpiceMainChannel *channel)
 {
-    spice_main_channel *c = channel->priv;
+    SpiceMainChannelPrivate *c = channel->priv;
     VDAgentDisplayConfig config = { 0, };
 
     if (c->display_disable_wallpaper) {
@@ -840,7 +840,7 @@ static void agent_display_config(SpiceMainChannel *channel)
    you can wakeup() the channel coroutine or send_msg_queue() */
 static void agent_announce_caps(SpiceMainChannel *channel)
 {
-    spice_main_channel *c = channel->priv;
+    SpiceMainChannelPrivate *c = channel->priv;
     VDAgentAnnounceCapabilities *caps;
     size_t size;
 
@@ -870,7 +870,7 @@ static void agent_announce_caps(SpiceMainChannel *channel)
 static void agent_clipboard_grab(SpiceMainChannel *channel, guint selection,
                                  guint32 *types, int ntypes)
 {
-    spice_main_channel *c = channel->priv;
+    SpiceMainChannelPrivate *c = channel->priv;
     guint8 *msg;
     VDAgentClipboardGrab *grab;
     size_t size;
@@ -912,7 +912,7 @@ static void agent_clipboard_grab(SpiceMainChannel *channel, guint selection,
 static void agent_clipboard_notify(SpiceMainChannel *channel, guint selection,
                                    guint32 type, const guchar *data, size_t size)
 {
-    spice_main_channel *c = channel->priv;
+    SpiceMainChannelPrivate *c = channel->priv;
     VDAgentClipboard *cb;
     guint8 *msg;
     size_t msgsize;
@@ -950,7 +950,7 @@ static void agent_clipboard_notify(SpiceMainChannel *channel, guint selection,
    you can wakeup() the channel coroutine or send_msg_queue() */
 static void agent_clipboard_request(SpiceMainChannel *channel, guint selection, guint32 type)
 {
-    spice_main_channel *c = channel->priv;
+    SpiceMainChannelPrivate *c = channel->priv;
     VDAgentClipboardRequest *request;
     guint8 *msg;
     size_t msgsize;
@@ -987,7 +987,7 @@ static void agent_clipboard_request(SpiceMainChannel *channel, guint selection,
    you can wakeup() the channel coroutine or send_msg_queue() */
 static void agent_clipboard_release(SpiceMainChannel *channel, guint selection)
 {
-    spice_main_channel *c = channel->priv;
+    SpiceMainChannelPrivate *c = channel->priv;
     guint8 msg[4] = { 0, };
     guint8 msgsize = 0;
 
@@ -1010,11 +1010,11 @@ static void agent_clipboard_release(SpiceMainChannel *channel, guint selection)
 /* coroutine context  */
 static void agent_start(SpiceMainChannel *channel)
 {
-    spice_main_channel *c = channel->priv;
+    SpiceMainChannelPrivate *c = channel->priv;
     SpiceMsgcMainAgentStart agent_start = {
         .num_tokens = ~0,
     };
-    spice_msg_out *out;
+    SpiceMsgOut *out;
 
     c->agent_connected = true;
     c->agent_caps_received = false;
@@ -1034,7 +1034,7 @@ static void agent_start(SpiceMainChannel *channel)
 /* coroutine context  */
 static void agent_stopped(SpiceMainChannel *channel)
 {
-    spice_main_channel *c = SPICE_MAIN_CHANNEL(channel)->priv;
+    SpiceMainChannelPrivate *c = SPICE_MAIN_CHANNEL(channel)->priv;
 
     c->agent_connected = false;
     c->agent_caps_received = false;
@@ -1045,7 +1045,7 @@ static void agent_stopped(SpiceMainChannel *channel)
 /* coroutine context */
 static void set_mouse_mode(SpiceMainChannel *channel, uint32_t supported, uint32_t current)
 {
-    spice_main_channel *c = channel->priv;
+    SpiceMainChannelPrivate *c = channel->priv;
 
     if (c->mouse_mode != current) {
         c->mouse_mode = current;
@@ -1058,7 +1058,7 @@ static void set_mouse_mode(SpiceMainChannel *channel, uint32_t supported, uint32
         SpiceMsgcMainMouseModeRequest req = {
             .mode = SPICE_MOUSE_MODE_CLIENT,
         };
-        spice_msg_out *out;
+        SpiceMsgOut *out;
         out = spice_msg_out_new(SPICE_CHANNEL(channel), SPICE_MSGC_MAIN_MOUSE_MODE_REQUEST);
         out->marshallers->msgc_main_mouse_mode_request(out->marshaller, &req);
         spice_msg_out_send_internal(out);
@@ -1067,12 +1067,12 @@ static void set_mouse_mode(SpiceMainChannel *channel, uint32_t supported, uint32
 }
 
 /* coroutine context */
-static void main_handle_init(SpiceChannel *channel, spice_msg_in *in)
+static void main_handle_init(SpiceChannel *channel, SpiceMsgIn *in)
 {
-    spice_main_channel *c = SPICE_MAIN_CHANNEL(channel)->priv;
+    SpiceMainChannelPrivate *c = SPICE_MAIN_CHANNEL(channel)->priv;
     SpiceMsgMainInit *init = spice_msg_in_parsed(in);
     SpiceSession *session;
-    spice_msg_out *out;
+    SpiceMsgOut *out;
 
     session = spice_channel_get_session(channel);
     spice_session_set_connection_id(session, init->session_id);
@@ -1093,7 +1093,7 @@ static void main_handle_init(SpiceChannel *channel, spice_msg_in *in)
 }
 
 /* coroutine context */
-static void main_handle_mm_time(SpiceChannel *channel, spice_msg_in *in)
+static void main_handle_mm_time(SpiceChannel *channel, SpiceMsgIn *in)
 {
     SpiceSession *session;
     SpiceMsgMainMultiMediaTime *msg = spice_msg_in_parsed(in);
@@ -1122,7 +1122,7 @@ static gboolean _channel_new(channel_new_t *c)
 }
 
 /* coroutine context */
-static void main_handle_channels_list(SpiceChannel *channel, spice_msg_in *in)
+static void main_handle_channels_list(SpiceChannel *channel, SpiceMsgIn *in)
 {
     SpiceMsgChannels *msg = spice_msg_in_parsed(in);
     SpiceSession *session;
@@ -1144,20 +1144,20 @@ static void main_handle_channels_list(SpiceChannel *channel, spice_msg_in *in)
 }
 
 /* coroutine context */
-static void main_handle_mouse_mode(SpiceChannel *channel, spice_msg_in *in)
+static void main_handle_mouse_mode(SpiceChannel *channel, SpiceMsgIn *in)
 {
     SpiceMsgMainMouseMode *msg = spice_msg_in_parsed(in);
     set_mouse_mode(SPICE_MAIN_CHANNEL(channel), msg->supported_modes, msg->current_mode);
 }
 
 /* coroutine context */
-static void main_handle_agent_connected(SpiceChannel *channel, spice_msg_in *in)
+static void main_handle_agent_connected(SpiceChannel *channel, SpiceMsgIn *in)
 {
     agent_start(SPICE_MAIN_CHANNEL(channel));
 }
 
 /* coroutine context */
-static void main_handle_agent_disconnected(SpiceChannel *channel, spice_msg_in *in)
+static void main_handle_agent_disconnected(SpiceChannel *channel, SpiceMsgIn *in)
 {
     agent_stopped(SPICE_MAIN_CHANNEL(channel));
 }
@@ -1166,7 +1166,7 @@ static void main_handle_agent_disconnected(SpiceChannel *channel, spice_msg_in *
 static void main_agent_handle_msg(SpiceChannel *channel,
                                   VDAgentMessage *msg, gpointer payload)
 {
-    spice_main_channel *c = SPICE_MAIN_CHANNEL(channel)->priv;
+    SpiceMainChannelPrivate *c = SPICE_MAIN_CHANNEL(channel)->priv;
     guint8 selection = VD_AGENT_CLIPBOARD_SELECTION_CLIPBOARD;
 
     g_return_if_fail(msg->protocol == VD_AGENT_PROTOCOL);
@@ -1274,7 +1274,7 @@ static void main_agent_handle_msg(SpiceChannel *channel,
 /* coroutine context */
 static void main_handle_agent_data_msg(SpiceChannel* channel, int* msg_size, guchar** msg_pos)
 {
-    spice_main_channel *c = SPICE_MAIN_CHANNEL(channel)->priv;
+    SpiceMainChannelPrivate *c = SPICE_MAIN_CHANNEL(channel)->priv;
     int n;
 
     if (c->agent_msg_pos < sizeof(VDAgentMessage)) {
@@ -1308,9 +1308,9 @@ static void main_handle_agent_data_msg(SpiceChannel* channel, int* msg_size, guc
 }
 
 /* coroutine context */
-static void main_handle_agent_data(SpiceChannel *channel, spice_msg_in *in)
+static void main_handle_agent_data(SpiceChannel *channel, SpiceMsgIn *in)
 {
-    spice_main_channel *c = SPICE_MAIN_CHANNEL(channel)->priv;
+    SpiceMainChannelPrivate *c = SPICE_MAIN_CHANNEL(channel)->priv;
     guint8 *data;
     int len;
 
@@ -1335,10 +1335,10 @@ static void main_handle_agent_data(SpiceChannel *channel, spice_msg_in *in)
 }
 
 /* coroutine context */
-static void main_handle_agent_token(SpiceChannel *channel, spice_msg_in *in)
+static void main_handle_agent_token(SpiceChannel *channel, SpiceMsgIn *in)
 {
     SpiceMsgMainAgentTokens *tokens = spice_msg_in_parsed(in);
-    spice_main_channel *c = SPICE_MAIN_CHANNEL(channel)->priv;
+    SpiceMainChannelPrivate *c = SPICE_MAIN_CHANNEL(channel)->priv;
 
     c->agent_tokens = tokens->num_tokens;
     agent_send_msg_queue(SPICE_MAIN_CHANNEL(channel));
@@ -1365,7 +1365,7 @@ static void migrate_channel_event_cb(SpiceChannel *channel, SpiceChannelEvent ev
                                      gpointer data)
 {
     spice_migrate *mig = data;
-    spice_channel *c = SPICE_CHANNEL(channel)->priv;
+    SpiceChannelPrivate  *c = SPICE_CHANNEL(channel)->priv;
     SpiceSession *session;
 
     g_return_if_fail(mig->nchannels > 0);
@@ -1382,7 +1382,7 @@ static void migrate_channel_event_cb(SpiceChannel *channel, SpiceChannelEvent ev
             GList *channels, *l;
             l = channels = spice_session_get_channels(session);
             while (l != NULL) {
-                spice_channel *curc = SPICE_CHANNEL(l->data)->priv;
+                SpiceChannelPrivate  *curc = SPICE_CHANNEL(l->data)->priv;
                 l = l->next;
                 if (curc->channel_type == SPICE_CHANNEL_MAIN)
                     continue;
@@ -1417,7 +1417,7 @@ typedef struct __declspec(align(1)) OldRedMigrationBegin {
 static gboolean migrate_connect(gpointer data)
 {
     spice_migrate *mig = data;
-    spice_channel *c;
+    SpiceChannelPrivate  *c;
     int port, sport;
     const char *host;
     SpiceSession *session;
@@ -1475,11 +1475,11 @@ static gboolean migrate_connect(gpointer data)
 }
 
 /* coroutine context */
-static void main_handle_migrate_begin(SpiceChannel *channel, spice_msg_in *in)
+static void main_handle_migrate_begin(SpiceChannel *channel, SpiceMsgIn *in)
 {
     SpiceMsgMainMigrationBegin *msg = spice_msg_in_parsed(in);
     spice_migrate mig = { 0, };
-    spice_msg_out *out;
+    SpiceMsgOut *out;
     int reply_type;
 
     mig.channel = channel;
@@ -1513,7 +1513,7 @@ static gboolean switch_host_delayed(gpointer data)
 {
     SpiceChannel *channel = data;
     SpiceSession *session;
-    spice_main_channel *c = SPICE_MAIN_CHANNEL(channel)->priv;
+    SpiceMainChannelPrivate *c = SPICE_MAIN_CHANNEL(channel)->priv;
 
     g_warn_if_fail(c->switch_host_delayed_id != 0);
     c->switch_host_delayed_id = 0;
@@ -1530,13 +1530,13 @@ static gboolean switch_host_delayed(gpointer data)
 }
 
 /* coroutine context */
-static void main_handle_migrate_switch_host(SpiceChannel *channel, spice_msg_in *in)
+static void main_handle_migrate_switch_host(SpiceChannel *channel, SpiceMsgIn *in)
 {
     SpiceMsgMainMigrationSwitchHost *mig = spice_msg_in_parsed(in);
     SpiceSession *session;
     char *host = (char *)mig->host_data;
     char *subject = NULL;
-    spice_main_channel *c = SPICE_MAIN_CHANNEL(channel)->priv;
+    SpiceMainChannelPrivate *c = SPICE_MAIN_CHANNEL(channel)->priv;
 
     g_return_if_fail(host[mig->host_size - 1] == '\0');
 
@@ -1565,7 +1565,7 @@ static void main_handle_migrate_switch_host(SpiceChannel *channel, spice_msg_in
 
 /* coroutine context */
 static void main_handle_migrate_cancel(SpiceChannel *channel,
-                                       spice_msg_in *in G_GNUC_UNUSED)
+                                       SpiceMsgIn *in G_GNUC_UNUSED)
 {
     SpiceSession *session;
 
@@ -1591,7 +1591,7 @@ static const spice_msg_handler main_handlers[] = {
 };
 
 /* coroutine context */
-static void spice_main_handle_msg(SpiceChannel *channel, spice_msg_in *msg)
+static void spice_main_handle_msg(SpiceChannel *channel, SpiceMsgIn *msg)
 {
     int type = spice_msg_in_type(msg);
     SpiceChannelClass *parent_class;
@@ -1612,7 +1612,7 @@ static void spice_main_handle_msg(SpiceChannel *channel, spice_msg_in *msg)
 static gboolean timer_set_display(gpointer data)
 {
     SpiceChannel *channel = data;
-    spice_main_channel *c = SPICE_MAIN_CHANNEL(channel)->priv;
+    SpiceMainChannelPrivate *c = SPICE_MAIN_CHANNEL(channel)->priv;
 
     c->timer_id = 0;
     if (c->agent_connected)
@@ -1637,7 +1637,7 @@ static gboolean timer_set_display(gpointer data)
 void spice_main_set_display(SpiceMainChannel *channel, int id,
                             int x, int y, int width, int height)
 {
-    spice_main_channel *c;
+    SpiceMainChannelPrivate *c;
 
     g_return_if_fail(channel != NULL);
     g_return_if_fail(SPICE_IS_MAIN_CHANNEL(channel));
@@ -1722,7 +1722,7 @@ void spice_main_clipboard_selection_release(SpiceMainChannel *channel, guint sel
     g_return_if_fail(channel != NULL);
     g_return_if_fail(SPICE_IS_MAIN_CHANNEL(channel));
 
-    spice_main_channel *c = channel->priv;
+    SpiceMainChannelPrivate *c = channel->priv;
 
     if (!c->agent_connected)
         return;
@@ -1808,13 +1808,13 @@ void spice_main_clipboard_selection_request(SpiceMainChannel *channel, guint sel
 
 /**
  * spice_main_set_display_enabled:
- * @channel:
+ * @channel: a #SpiceMainChannel
  * @id: display channel ID
  * @enabled: wether display @id is enabled
  *
  * When sending monitor configuration to agent guest, don't set
- * display @id, which the agent translates to disabling the display of
- * @id. Note: this will take effect next time the monitor
+ * display @id, which the agent translates to disabling the display
+ * id. Note: this will take effect next time the monitor
  * configuration is sent.
  *
  * Since: 0.6
@@ -1824,6 +1824,6 @@ void spice_main_set_display_enabled(SpiceMainChannel *channel, int id, gboolean
     g_return_if_fail(channel != NULL);
     g_return_if_fail(SPICE_IS_MAIN_CHANNEL(channel));
 
-    spice_main_channel *c = channel->priv;
+    SpiceMainChannelPrivate *c = channel->priv;
     c->display[id].enabled = enabled;
 }
diff --git a/gtk/channel-main.h b/gtk/channel-main.h
index 1b4ee29..d34993b 100644
--- a/gtk/channel-main.h
+++ b/gtk/channel-main.h
@@ -31,11 +31,11 @@ G_BEGIN_DECLS
 
 typedef struct _SpiceMainChannel SpiceMainChannel;
 typedef struct _SpiceMainChannelClass SpiceMainChannelClass;
-typedef struct spice_main_channel spice_main_channel;
+typedef struct _SpiceMainChannelPrivate SpiceMainChannelPrivate;
 
 struct _SpiceMainChannel {
     SpiceChannel parent;
-    spice_main_channel *priv;
+    SpiceMainChannelPrivate *priv;
     /* Do not add fields to this struct */
 };
 
diff --git a/gtk/channel-playback.c b/gtk/channel-playback.c
index 145cd58..29fe218 100644
--- a/gtk/channel-playback.c
+++ b/gtk/channel-playback.c
@@ -44,9 +44,9 @@
  */
 
 #define SPICE_PLAYBACK_CHANNEL_GET_PRIVATE(obj)                                  \
-    (G_TYPE_INSTANCE_GET_PRIVATE((obj), SPICE_TYPE_PLAYBACK_CHANNEL, spice_playback_channel))
+    (G_TYPE_INSTANCE_GET_PRIVATE((obj), SPICE_TYPE_PLAYBACK_CHANNEL, SpicePlaybackChannelPrivate))
 
-struct spice_playback_channel {
+struct _SpicePlaybackChannelPrivate {
     int                         mode;
     CELTMode                    *celt_mode;
     CELTDecoder                 *celt_decoder;
@@ -79,13 +79,13 @@ enum {
 
 static guint signals[SPICE_PLAYBACK_LAST_SIGNAL];
 
-static void spice_playback_handle_msg(SpiceChannel *channel, spice_msg_in *msg);
+static void spice_playback_handle_msg(SpiceChannel *channel, SpiceMsgIn *msg);
 
 /* ------------------------------------------------------------------ */
 
 static void spice_playback_channel_init(SpicePlaybackChannel *channel)
 {
-    spice_playback_channel *c;
+    SpicePlaybackChannelPrivate *c;
 
     c = channel->priv = SPICE_PLAYBACK_CHANNEL_GET_PRIVATE(channel);
     memset(c, 0, sizeof(*c));
@@ -95,7 +95,7 @@ static void spice_playback_channel_init(SpicePlaybackChannel *channel)
 
 static void spice_playback_channel_finalize(GObject *obj)
 {
-    spice_playback_channel *c = SPICE_PLAYBACK_CHANNEL(obj)->priv;
+    SpicePlaybackChannelPrivate *c = SPICE_PLAYBACK_CHANNEL(obj)->priv;
 
     if (c->celt_decoder) {
         celt051_decoder_destroy(c->celt_decoder);
@@ -120,7 +120,7 @@ static void spice_playback_channel_get_property(GObject    *gobject,
                                                 GParamSpec *pspec)
 {
     SpicePlaybackChannel *channel = SPICE_PLAYBACK_CHANNEL(gobject);
-    spice_playback_channel *c = channel->priv;
+    SpicePlaybackChannelPrivate *c = channel->priv;
 
     switch (prop_id) {
     case PROP_VOLUME:
@@ -264,7 +264,7 @@ static void spice_playback_channel_class_init(SpicePlaybackChannelClass *klass)
                      G_TYPE_NONE,
                      0);
 
-    g_type_class_add_private(klass, sizeof(spice_playback_channel));
+    g_type_class_add_private(klass, sizeof(SpicePlaybackChannelPrivate));
 }
 
 /* signal trampoline---------------------------------------------------------- */
@@ -315,9 +315,9 @@ static void do_emit_main_context(GObject *object, int signum, gpointer params)
 /* ------------------------------------------------------------------ */
 
 /* coroutine context */
-static void playback_handle_data(SpiceChannel *channel, spice_msg_in *in)
+static void playback_handle_data(SpiceChannel *channel, SpiceMsgIn *in)
 {
-    spice_playback_channel *c = SPICE_PLAYBACK_CHANNEL(channel)->priv;
+    SpicePlaybackChannelPrivate *c = SPICE_PLAYBACK_CHANNEL(channel)->priv;
     SpiceMsgPlaybackPacket *packet = spice_msg_in_parsed(in);
 
 #ifdef DEBUG
@@ -361,9 +361,9 @@ static void playback_handle_data(SpiceChannel *channel, spice_msg_in *in)
 }
 
 /* coroutine context */
-static void playback_handle_mode(SpiceChannel *channel, spice_msg_in *in)
+static void playback_handle_mode(SpiceChannel *channel, SpiceMsgIn *in)
 {
-    spice_playback_channel *c = SPICE_PLAYBACK_CHANNEL(channel)->priv;
+    SpicePlaybackChannelPrivate *c = SPICE_PLAYBACK_CHANNEL(channel)->priv;
     SpiceMsgPlaybackMode *mode = spice_msg_in_parsed(in);
 
     SPICE_DEBUG("%s: time %d mode %d data %p size %d", __FUNCTION__,
@@ -381,9 +381,9 @@ static void playback_handle_mode(SpiceChannel *channel, spice_msg_in *in)
 }
 
 /* coroutine context */
-static void playback_handle_start(SpiceChannel *channel, spice_msg_in *in)
+static void playback_handle_start(SpiceChannel *channel, SpiceMsgIn *in)
 {
-    spice_playback_channel *c = SPICE_PLAYBACK_CHANNEL(channel)->priv;
+    SpicePlaybackChannelPrivate *c = SPICE_PLAYBACK_CHANNEL(channel)->priv;
     SpiceMsgPlaybackStart *start = spice_msg_in_parsed(in);
     int celt_mode_err;
 
@@ -424,15 +424,15 @@ static void playback_handle_start(SpiceChannel *channel, spice_msg_in *in)
 }
 
 /* coroutine context */
-static void playback_handle_stop(SpiceChannel *channel, spice_msg_in *in)
+static void playback_handle_stop(SpiceChannel *channel, SpiceMsgIn *in)
 {
     emit_main_context(channel, SPICE_PLAYBACK_STOP);
 }
 
 /* coroutine context */
-static void playback_handle_set_volume(SpiceChannel *channel, spice_msg_in *in)
+static void playback_handle_set_volume(SpiceChannel *channel, SpiceMsgIn *in)
 {
-    spice_playback_channel *c = SPICE_PLAYBACK_CHANNEL(channel)->priv;
+    SpicePlaybackChannelPrivate *c = SPICE_PLAYBACK_CHANNEL(channel)->priv;
     SpiceMsgAudioVolume *vol = spice_msg_in_parsed(in);
 
     g_free(c->volume);
@@ -443,9 +443,9 @@ static void playback_handle_set_volume(SpiceChannel *channel, spice_msg_in *in)
 }
 
 /* coroutine context */
-static void playback_handle_set_mute(SpiceChannel *channel, spice_msg_in *in)
+static void playback_handle_set_mute(SpiceChannel *channel, SpiceMsgIn *in)
 {
-    spice_playback_channel *c = SPICE_PLAYBACK_CHANNEL(channel)->priv;
+    SpicePlaybackChannelPrivate *c = SPICE_PLAYBACK_CHANNEL(channel)->priv;
     SpiceMsgAudioMute *m = spice_msg_in_parsed(in);
 
     c->mute = m->mute;
@@ -462,7 +462,7 @@ static const spice_msg_handler playback_handlers[] = {
 };
 
 /* coroutine context */
-static void spice_playback_handle_msg(SpiceChannel *channel, spice_msg_in *msg)
+static void spice_playback_handle_msg(SpiceChannel *channel, SpiceMsgIn *msg)
 {
     int type = spice_msg_in_type(msg);
     SpiceChannelClass *parent_class;
@@ -481,7 +481,7 @@ static void spice_playback_handle_msg(SpiceChannel *channel, spice_msg_in *msg)
 
 void spice_playback_channel_set_delay(SpicePlaybackChannel *channel, guint32 delay_ms)
 {
-    spice_playback_channel *c;
+    SpicePlaybackChannelPrivate *c;
 
     g_return_if_fail(SPICE_IS_PLAYBACK_CHANNEL(channel));
 
diff --git a/gtk/channel-playback.h b/gtk/channel-playback.h
index c1d83e1..5e63c21 100644
--- a/gtk/channel-playback.h
+++ b/gtk/channel-playback.h
@@ -31,11 +31,11 @@ G_BEGIN_DECLS
 
 typedef struct _SpicePlaybackChannel SpicePlaybackChannel;
 typedef struct _SpicePlaybackChannelClass SpicePlaybackChannelClass;
-typedef struct spice_playback_channel spice_playback_channel;
+typedef struct _SpicePlaybackChannelPrivate SpicePlaybackChannelPrivate;
 
 struct _SpicePlaybackChannel {
     SpiceChannel parent;
-    spice_playback_channel *priv;
+    SpicePlaybackChannelPrivate *priv;
     /* Do not add fields to this struct */
 };
 
diff --git a/gtk/channel-record.c b/gtk/channel-record.c
index 127ba0b..33fd222 100644
--- a/gtk/channel-record.c
+++ b/gtk/channel-record.c
@@ -46,9 +46,9 @@
  */
 
 #define SPICE_RECORD_CHANNEL_GET_PRIVATE(obj)                                  \
-    (G_TYPE_INSTANCE_GET_PRIVATE((obj), SPICE_TYPE_RECORD_CHANNEL, spice_record_channel))
+    (G_TYPE_INSTANCE_GET_PRIVATE((obj), SPICE_TYPE_RECORD_CHANNEL, SpiceRecordChannelPrivate))
 
-struct spice_record_channel {
+struct _SpiceRecordChannelPrivate {
     int                         mode;
     gboolean                    started;
     CELTMode                    *celt_mode;
@@ -81,7 +81,7 @@ enum {
 
 static guint signals[SPICE_RECORD_LAST_SIGNAL];
 
-static void spice_record_handle_msg(SpiceChannel *channel, spice_msg_in *msg);
+static void spice_record_handle_msg(SpiceChannel *channel, SpiceMsgIn *msg);
 static void channel_up(SpiceChannel *channel);
 
 #define FRAME_SIZE 256
@@ -91,7 +91,7 @@ static void channel_up(SpiceChannel *channel);
 
 static void spice_record_channel_init(SpiceRecordChannel *channel)
 {
-    spice_record_channel *c;
+    SpiceRecordChannelPrivate *c;
 
     c = channel->priv = SPICE_RECORD_CHANNEL_GET_PRIVATE(channel);
     memset(c, 0, sizeof(*c));
@@ -101,7 +101,7 @@ static void spice_record_channel_init(SpiceRecordChannel *channel)
 
 static void spice_record_channel_finalize(GObject *obj)
 {
-    spice_record_channel *c = SPICE_RECORD_CHANNEL(obj)->priv;
+    SpiceRecordChannelPrivate *c = SPICE_RECORD_CHANNEL(obj)->priv;
 
     g_free(c->last_frame);
     c->last_frame = NULL;
@@ -129,7 +129,7 @@ static void spice_record_channel_get_property(GObject    *gobject,
                                               GParamSpec *pspec)
 {
     SpiceRecordChannel *channel = SPICE_RECORD_CHANNEL(gobject);
-    spice_record_channel *c = channel->priv;
+    SpiceRecordChannelPrivate *c = channel->priv;
 
     switch (prop_id) {
     case PROP_VOLUME:
@@ -238,7 +238,7 @@ static void spice_record_channel_class_init(SpiceRecordChannelClass *klass)
                      G_TYPE_NONE,
                      0);
 
-    g_type_class_add_private(klass, sizeof(spice_record_channel));
+    g_type_class_add_private(klass, sizeof(SpiceRecordChannelPrivate));
 }
 
 /* signal trampoline---------------------------------------------------------- */
@@ -276,7 +276,7 @@ static void spice_record_mode(SpiceRecordChannel *channel, uint32_t time,
                               uint32_t mode, uint8_t *data, uint32_t data_size)
 {
     SpiceMsgcRecordMode m = {0, };
-    spice_msg_out *msg;
+    SpiceMsgOut *msg;
 
     g_return_if_fail(channel != NULL);
 
@@ -294,7 +294,7 @@ static void spice_record_mode(SpiceRecordChannel *channel, uint32_t time,
 /* coroutine context */
 static void channel_up(SpiceChannel *channel)
 {
-    spice_record_channel *rc;
+    SpiceRecordChannelPrivate *rc;
 
     rc = SPICE_RECORD_CHANNEL(channel)->priv;
     if (spice_channel_test_capability(channel, SPICE_RECORD_CAP_CELT_0_5_1)) {
@@ -308,7 +308,7 @@ static void channel_up(SpiceChannel *channel)
 static void spice_record_start_mark(SpiceRecordChannel *channel, uint32_t time)
 {
     SpiceMsgcRecordStartMark m = {0, };
-    spice_msg_out *msg;
+    SpiceMsgOut *msg;
 
     g_return_if_fail(channel != NULL);
 
@@ -332,7 +332,7 @@ static void spice_record_start_mark(SpiceRecordChannel *channel, uint32_t time)
 void spice_record_send_data(SpiceRecordChannel *channel, gpointer data,
                             gsize bytes, uint32_t time)
 {
-    spice_record_channel *rc;
+    SpiceRecordChannelPrivate *rc;
     SpiceMsgcRecordPacket p = {0, };
     int celt_compressed_frame_bytes = FRAME_SIZE * CELT_BIT_RATE / 44100 / 8;
     uint8_t *celt_buf = NULL;
@@ -354,7 +354,7 @@ void spice_record_send_data(SpiceRecordChannel *channel, gpointer data,
 
     while (bytes > 0) {
         gsize n, frame_size;
-        spice_msg_out *msg;
+        SpiceMsgOut *msg;
         uint8_t *frame;
 
         if (rc->last_frame_current > 0) {
@@ -408,9 +408,9 @@ void spice_record_send_data(SpiceRecordChannel *channel, gpointer data,
 /* ------------------------------------------------------------------ */
 
 /* coroutine context */
-static void record_handle_start(SpiceChannel *channel, spice_msg_in *in)
+static void record_handle_start(SpiceChannel *channel, SpiceMsgIn *in)
 {
-    spice_record_channel *c = SPICE_RECORD_CHANNEL(channel)->priv;
+    SpiceRecordChannelPrivate *c = SPICE_RECORD_CHANNEL(channel)->priv;
     SpiceMsgRecordStart *start = spice_msg_in_parsed(in);
 
     SPICE_DEBUG("%s: fmt %d channels %d freq %d", __FUNCTION__,
@@ -455,18 +455,18 @@ static void record_handle_start(SpiceChannel *channel, spice_msg_in *in)
 }
 
 /* coroutine context */
-static void record_handle_stop(SpiceChannel *channel, spice_msg_in *in)
+static void record_handle_stop(SpiceChannel *channel, SpiceMsgIn *in)
 {
-    spice_record_channel *rc = SPICE_RECORD_CHANNEL(channel)->priv;
+    SpiceRecordChannelPrivate *rc = SPICE_RECORD_CHANNEL(channel)->priv;
 
     emit_main_context(channel, SPICE_RECORD_STOP);
     rc->started = FALSE;
 }
 
 /* coroutine context */
-static void record_handle_set_volume(SpiceChannel *channel, spice_msg_in *in)
+static void record_handle_set_volume(SpiceChannel *channel, SpiceMsgIn *in)
 {
-    spice_record_channel *c = SPICE_RECORD_CHANNEL(channel)->priv;
+    SpiceRecordChannelPrivate *c = SPICE_RECORD_CHANNEL(channel)->priv;
     SpiceMsgAudioVolume *vol = spice_msg_in_parsed(in);
 
     g_free(c->volume);
@@ -477,9 +477,9 @@ static void record_handle_set_volume(SpiceChannel *channel, spice_msg_in *in)
 }
 
 /* coroutine context */
-static void record_handle_set_mute(SpiceChannel *channel, spice_msg_in *in)
+static void record_handle_set_mute(SpiceChannel *channel, SpiceMsgIn *in)
 {
-    spice_record_channel *c = SPICE_RECORD_CHANNEL(channel)->priv;
+    SpiceRecordChannelPrivate *c = SPICE_RECORD_CHANNEL(channel)->priv;
     SpiceMsgAudioMute *m = spice_msg_in_parsed(in);
 
     c->mute = m->mute;
@@ -494,7 +494,7 @@ static const spice_msg_handler record_handlers[] = {
 };
 
 /* coroutine context */
-static void spice_record_handle_msg(SpiceChannel *channel, spice_msg_in *msg)
+static void spice_record_handle_msg(SpiceChannel *channel, SpiceMsgIn *msg)
 {
     int type = spice_msg_in_type(msg);
 
diff --git a/gtk/channel-record.h b/gtk/channel-record.h
index a8d3470..0a6a7a7 100644
--- a/gtk/channel-record.h
+++ b/gtk/channel-record.h
@@ -31,11 +31,11 @@ G_BEGIN_DECLS
 
 typedef struct _SpiceRecordChannel SpiceRecordChannel;
 typedef struct _SpiceRecordChannelClass SpiceRecordChannelClass;
-typedef struct spice_record_channel spice_record_channel;
+typedef struct _SpiceRecordChannelPrivate SpiceRecordChannelPrivate;
 
 struct _SpiceRecordChannel {
     SpiceChannel parent;
-    spice_record_channel *priv;
+    SpiceRecordChannelPrivate *priv;
     /* Do not add fields to this struct */
 };
 
@@ -58,7 +58,7 @@ struct _SpiceRecordChannelClass {
 
 GType	        spice_record_channel_get_type(void);
 void            spice_record_send_data(SpiceRecordChannel *channel, gpointer data,
-                                       gsize bytes, uint32_t time);
+                                       gsize bytes, guint32 time);
 
 G_END_DECLS
 
diff --git a/gtk/channel-smartcard.c b/gtk/channel-smartcard.c
index 4d4ddac..5fec217 100644
--- a/gtk/channel-smartcard.c
+++ b/gtk/channel-smartcard.c
@@ -49,18 +49,18 @@
  */
 
 #define SPICE_SMARTCARD_CHANNEL_GET_PRIVATE(obj)                                  \
-    (G_TYPE_INSTANCE_GET_PRIVATE((obj), SPICE_TYPE_SMARTCARD_CHANNEL, spice_smartcard_channel))
+    (G_TYPE_INSTANCE_GET_PRIVATE((obj), SPICE_TYPE_SMARTCARD_CHANNEL, SpiceSmartcardChannelPrivate))
 
 struct _SpiceSmartcardChannelMessage {
 #ifdef USE_SMARTCARD
     VSCMsgType message_type;
 #endif
-    spice_msg_out *message;
+    SpiceMsgOut *message;
 };
 typedef struct _SpiceSmartcardChannelMessage SpiceSmartcardChannelMessage;
 
 
-struct spice_smartcard_channel {
+struct _SpiceSmartcardChannelPrivate {
     /* track readers that have been added but for which we didn't receive
      * an ack from the spice server yet. We rely on the fact that the
      * readers in this list are ordered by the time we sent the request to
@@ -94,9 +94,9 @@ enum {
     SPICE_SMARTCARD_LAST_SIGNAL,
 };
 
-static void spice_smartcard_handle_msg(SpiceChannel *channel, spice_msg_in *msg);
+static void spice_smartcard_handle_msg(SpiceChannel *channel, SpiceMsgIn *msg);
 static void spice_smartcard_channel_up(SpiceChannel *channel);
-static void handle_smartcard_msg(SpiceChannel *channel, spice_msg_in *in);
+static void handle_smartcard_msg(SpiceChannel *channel, SpiceMsgIn *in);
 static void smartcard_message_free(SpiceSmartcardChannelMessage *message);
 
 /* ------------------------------------------------------------------ */
@@ -113,7 +113,7 @@ static void card_removed_cb(SpiceSmartcardManager *manager, VReader *reader,
 
 static void spice_smartcard_channel_init(SpiceSmartcardChannel *channel)
 {
-    spice_smartcard_channel *priv;
+    SpiceSmartcardChannelPrivate *priv;
 
     channel->priv = SPICE_SMARTCARD_CHANNEL_GET_PRIVATE(channel);
     priv = channel->priv;
@@ -178,7 +178,7 @@ static void spice_smartcard_channel_class_init(SpiceSmartcardChannelClass *klass
     channel_class->handle_msg   = spice_smartcard_handle_msg;
     channel_class->channel_up   = spice_smartcard_channel_up;
 
-    g_type_class_add_private(klass, sizeof(spice_smartcard_channel));
+    g_type_class_add_private(klass, sizeof(SpiceSmartcardChannelPrivate));
 }
 
 static const spice_msg_handler smartcard_handlers[] = {
@@ -248,7 +248,7 @@ spice_channel_drop_pending_reader_removal(SpiceSmartcardChannel *channel,
 }
 
 static SpiceSmartcardChannelMessage *
-smartcard_message_new(VSCMsgType msg_type, spice_msg_out *msg_out)
+smartcard_message_new(VSCMsgType msg_type, SpiceMsgOut *msg_out)
 {
     SpiceSmartcardChannelMessage *message;
 
@@ -277,7 +277,7 @@ smartcard_message_complete_in_flight(SpiceSmartcardChannel *channel)
 
 static void smartcard_message_send(SpiceSmartcardChannel *channel,
                                    VSCMsgType msg_type,
-                                   spice_msg_out *msg_out, gboolean queue)
+                                   SpiceMsgOut *msg_out, gboolean queue)
 {
     SpiceSmartcardChannelMessage *message;
 
@@ -305,7 +305,7 @@ send_msg_generic_with_data(SpiceSmartcardChannel *channel, VReader *reader,
                            const uint8_t *data, gsize data_len,
                            gboolean serialize_msg)
 {
-    spice_msg_out *msg_out;
+    SpiceMsgOut *msg_out;
     VSCMsgHeader header = {
         .type = msg_type,
         .length = data_len
@@ -397,7 +397,7 @@ static void card_removed_cb(SpiceSmartcardManager *manager, VReader *reader,
 #endif /* USE_SMARTCARD */
 
 /* coroutine context */
-static void spice_smartcard_handle_msg(SpiceChannel *channel, spice_msg_in *msg)
+static void spice_smartcard_handle_msg(SpiceChannel *channel, SpiceMsgIn *msg)
 {
     int type = spice_msg_in_type(msg);
     SpiceChannelClass *parent_class;
@@ -444,10 +444,10 @@ static void spice_smartcard_channel_up(SpiceChannel *channel)
     g_object_unref(session);
 }
 
-static void handle_smartcard_msg(SpiceChannel *channel, spice_msg_in *in)
+static void handle_smartcard_msg(SpiceChannel *channel, SpiceMsgIn *in)
 {
 #ifdef USE_SMARTCARD
-    spice_smartcard_channel *priv = SPICE_SMARTCARD_CHANNEL_GET_PRIVATE(channel);
+    SpiceSmartcardChannelPrivate *priv = SPICE_SMARTCARD_CHANNEL_GET_PRIVATE(channel);
     SpiceMsgSmartcard *msg = spice_msg_in_parsed(in);
     VReader *reader;
 
diff --git a/gtk/channel-smartcard.h b/gtk/channel-smartcard.h
index d2e9a27..146fef5 100644
--- a/gtk/channel-smartcard.h
+++ b/gtk/channel-smartcard.h
@@ -31,13 +31,13 @@ G_BEGIN_DECLS
 
 typedef struct _SpiceSmartcardChannel SpiceSmartcardChannel;
 typedef struct _SpiceSmartcardChannelClass SpiceSmartcardChannelClass;
-typedef struct spice_smartcard_channel spice_smartcard_channel;
+typedef struct _SpiceSmartcardChannelPrivate SpiceSmartcardChannelPrivate;
 
 struct _SpiceSmartcardChannel {
     SpiceChannel parent;
 
     /*< private >*/
-    spice_smartcard_channel *priv;
+    SpiceSmartcardChannelPrivate *priv;
     /* Do not add fields to this struct */
 };
 
diff --git a/gtk/spice-channel-priv.h b/gtk/spice-channel-priv.h
index dfd35eb..86b22e1 100644
--- a/gtk/spice-channel-priv.h
+++ b/gtk/spice-channel-priv.h
@@ -40,7 +40,7 @@
 
 G_BEGIN_DECLS
 
-struct spice_msg_out {
+struct _SpiceMsgOut {
     int                   refcount;
     SpiceChannel          *channel;
     SpiceMessageMarshallers *marshallers;
@@ -48,7 +48,7 @@ struct spice_msg_out {
     SpiceDataHeader       *header;
 };
 
-struct spice_msg_in {
+struct _SpiceMsgIn {
     int                   refcount;
     SpiceChannel          *channel;
     SpiceDataHeader       header;
@@ -57,7 +57,7 @@ struct spice_msg_in {
     uint8_t               *parsed;
     size_t                psize;
     message_destructor_t  pfree;
-    spice_msg_in          *parent;
+    SpiceMsgIn            *parent;
 };
 
 enum spice_channel_state {
@@ -71,7 +71,7 @@ enum spice_channel_state {
     SPICE_CHANNEL_STATE_MIGRATING,
 };
 
-struct spice_channel {
+struct _SpiceChannelPrivate {
     /* swapped on migration */
     SSL_CTX                     *ctx;
     SSL                         *ssl;
@@ -115,7 +115,7 @@ struct spice_channel {
     SpiceLinkReply*             peer_msg;
     int                         peer_pos;
 
-    spice_msg_in                *msg_in;
+    SpiceMsgIn                  *msg_in;
     int                         message_ack_window;
     int                         message_ack_count;
 
@@ -127,22 +127,22 @@ struct spice_channel {
     gsize                       total_read_bytes;
 };
 
-spice_msg_in *spice_msg_in_new(SpiceChannel *channel);
-spice_msg_in *spice_msg_in_sub_new(SpiceChannel *channel, spice_msg_in *parent,
+SpiceMsgIn *spice_msg_in_new(SpiceChannel *channel);
+SpiceMsgIn *spice_msg_in_sub_new(SpiceChannel *channel, SpiceMsgIn *parent,
                                    SpiceSubMessage *sub);
-void spice_msg_in_ref(spice_msg_in *in);
-void spice_msg_in_unref(spice_msg_in *in);
-int spice_msg_in_type(spice_msg_in *in);
-void *spice_msg_in_parsed(spice_msg_in *in);
-void *spice_msg_in_raw(spice_msg_in *in, int *len);
-void spice_msg_in_hexdump(spice_msg_in *in);
-
-spice_msg_out *spice_msg_out_new(SpiceChannel *channel, int type);
-void spice_msg_out_ref(spice_msg_out *out);
-void spice_msg_out_unref(spice_msg_out *out);
-void spice_msg_out_send(spice_msg_out *out);
-void spice_msg_out_send_internal(spice_msg_out *out);
-void spice_msg_out_hexdump(spice_msg_out *out, unsigned char *data, int len);
+void spice_msg_in_ref(SpiceMsgIn *in);
+void spice_msg_in_unref(SpiceMsgIn *in);
+int spice_msg_in_type(SpiceMsgIn *in);
+void *spice_msg_in_parsed(SpiceMsgIn *in);
+void *spice_msg_in_raw(SpiceMsgIn *in, int *len);
+void spice_msg_in_hexdump(SpiceMsgIn *in);
+
+SpiceMsgOut *spice_msg_out_new(SpiceChannel *channel, int type);
+void spice_msg_out_ref(SpiceMsgOut *out);
+void spice_msg_out_unref(SpiceMsgOut *out);
+void spice_msg_out_send(SpiceMsgOut *out);
+void spice_msg_out_send_internal(SpiceMsgOut *out);
+void spice_msg_out_hexdump(SpiceMsgOut *out, unsigned char *data, int len);
 
 void spice_channel_up(SpiceChannel *channel);
 void spice_channel_wakeup(SpiceChannel *channel);
@@ -150,17 +150,17 @@ void spice_channel_wakeup(SpiceChannel *channel);
 SpiceSession* spice_channel_get_session(SpiceChannel *channel);
 
 /* coroutine context */
-typedef void (*handler_msg_in)(SpiceChannel *channel, spice_msg_in *msg, gpointer data);
+typedef void (*handler_msg_in)(SpiceChannel *channel, SpiceMsgIn *msg, gpointer data);
 void spice_channel_recv_msg(SpiceChannel *channel, handler_msg_in handler, gpointer data);
 
 /* channel-base.c */
 /* coroutine context */
-void spice_channel_handle_set_ack(SpiceChannel *channel, spice_msg_in *in);
-void spice_channel_handle_ping(SpiceChannel *channel, spice_msg_in *in);
-void spice_channel_handle_notify(SpiceChannel *channel, spice_msg_in *in);
-void spice_channel_handle_disconnect(SpiceChannel *channel, spice_msg_in *in);
-void spice_channel_handle_wait_for_channels(SpiceChannel *channel, spice_msg_in *in);
-void spice_channel_handle_migrate(SpiceChannel *channel, spice_msg_in *in);
+void spice_channel_handle_set_ack(SpiceChannel *channel, SpiceMsgIn *in);
+void spice_channel_handle_ping(SpiceChannel *channel, SpiceMsgIn *in);
+void spice_channel_handle_notify(SpiceChannel *channel, SpiceMsgIn *in);
+void spice_channel_handle_disconnect(SpiceChannel *channel, SpiceMsgIn *in);
+void spice_channel_handle_wait_for_channels(SpiceChannel *channel, SpiceMsgIn *in);
+void spice_channel_handle_migrate(SpiceChannel *channel, SpiceMsgIn *in);
 
 gint spice_channel_get_channel_id(SpiceChannel *channel);
 gint spice_channel_get_channel_type(SpiceChannel *channel);
diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
index c780189..8834143 100644
--- a/gtk/spice-channel.c
+++ b/gtk/spice-channel.c
@@ -41,8 +41,8 @@
 
 #include "gio-coroutine.h"
 
-static void spice_channel_handle_msg(SpiceChannel *channel, spice_msg_in *msg);
-static void spice_channel_send_msg(SpiceChannel *channel, spice_msg_out *out, gboolean buffered);
+static void spice_channel_handle_msg(SpiceChannel *channel, SpiceMsgIn *msg);
+static void spice_channel_send_msg(SpiceChannel *channel, SpiceMsgOut *out, gboolean buffered);
 static void spice_channel_send_link(SpiceChannel *channel);
 static void channel_disconnect(SpiceChannel *channel);
 
@@ -64,7 +64,7 @@ static void channel_disconnect(SpiceChannel *channel);
 /* gobject glue                                                       */
 
 #define SPICE_CHANNEL_GET_PRIVATE(obj)                                  \
-    (G_TYPE_INSTANCE_GET_PRIVATE ((obj), SPICE_TYPE_CHANNEL, spice_channel))
+    (G_TYPE_INSTANCE_GET_PRIVATE ((obj), SPICE_TYPE_CHANNEL, SpiceChannelPrivate))
 
 G_DEFINE_TYPE(SpiceChannel, spice_channel, G_TYPE_OBJECT);
 
@@ -92,7 +92,7 @@ static void spice_channel_iterate_read(SpiceChannel *channel);
 
 static void spice_channel_init(SpiceChannel *channel)
 {
-    spice_channel *c;
+    SpiceChannelPrivate *c;
 
     c = channel->priv = SPICE_CHANNEL_GET_PRIVATE(channel);
 
@@ -109,7 +109,7 @@ static void spice_channel_init(SpiceChannel *channel)
 static void spice_channel_constructed(GObject *gobject)
 {
     SpiceChannel *channel = SPICE_CHANNEL(gobject);
-    spice_channel *c = channel->priv;
+    SpiceChannelPrivate *c = channel->priv;
     const char *desc = spice_channel_type_to_string(c->channel_type);
 
     snprintf(c->name, sizeof(c->name), "%s-%d:%d",
@@ -127,7 +127,7 @@ static void spice_channel_constructed(GObject *gobject)
 static void spice_channel_dispose(GObject *gobject)
 {
     SpiceChannel *channel = SPICE_CHANNEL(gobject);
-    spice_channel *c = channel->priv;
+    SpiceChannelPrivate *c = channel->priv;
 
     SPICE_DEBUG("%s: %s %p", c->name, __FUNCTION__, gobject);
 
@@ -149,7 +149,7 @@ static void spice_channel_dispose(GObject *gobject)
 static void spice_channel_finalize(GObject *gobject)
 {
     SpiceChannel *channel = SPICE_CHANNEL(gobject);
-    spice_channel *c = channel->priv;
+    SpiceChannelPrivate *c = channel->priv;
 
     SPICE_DEBUG("%s: %s %p", c->name, __FUNCTION__, gobject);
 
@@ -178,7 +178,7 @@ static void spice_channel_get_property(GObject    *gobject,
                                        GParamSpec *pspec)
 {
     SpiceChannel *channel = SPICE_CHANNEL(gobject);
-    spice_channel *c = channel->priv;
+    SpiceChannelPrivate *c = channel->priv;
 
     switch (prop_id) {
     case PROP_SESSION:
@@ -202,7 +202,7 @@ static void spice_channel_get_property(GObject    *gobject,
 G_GNUC_INTERNAL
 gint spice_channel_get_channel_id(SpiceChannel *channel)
 {
-    spice_channel *c = SPICE_CHANNEL_GET_PRIVATE(channel);
+    SpiceChannelPrivate *c = SPICE_CHANNEL_GET_PRIVATE(channel);
 
     g_return_val_if_fail(c != NULL, 0);
     return c->channel_id;
@@ -211,7 +211,7 @@ gint spice_channel_get_channel_id(SpiceChannel *channel)
 G_GNUC_INTERNAL
 gint spice_channel_get_channel_type(SpiceChannel *channel)
 {
-    spice_channel *c = SPICE_CHANNEL_GET_PRIVATE(channel);
+    SpiceChannelPrivate *c = SPICE_CHANNEL_GET_PRIVATE(channel);
 
     g_return_val_if_fail(c != NULL, 0);
     return c->channel_type;
@@ -223,7 +223,7 @@ static void spice_channel_set_property(GObject      *gobject,
                                        GParamSpec   *pspec)
 {
     SpiceChannel *channel = SPICE_CHANNEL(gobject);
-    spice_channel *c = channel->priv;
+    SpiceChannelPrivate *c = channel->priv;
 
     switch (prop_id) {
     case PROP_SESSION:
@@ -334,7 +334,7 @@ static void spice_channel_class_init(SpiceChannelClass *klass)
                      1,
                      G_TYPE_INT);
 
-    g_type_class_add_private(klass, sizeof(spice_channel));
+    g_type_class_add_private(klass, sizeof(SpiceChannelPrivate));
 
     SSL_library_init();
     SSL_load_error_strings();
@@ -344,23 +344,23 @@ static void spice_channel_class_init(SpiceChannelClass *klass)
 /* private msg api                                                  */
 
 G_GNUC_INTERNAL
-spice_msg_in *spice_msg_in_new(SpiceChannel *channel)
+SpiceMsgIn *spice_msg_in_new(SpiceChannel *channel)
 {
-    spice_msg_in *in;
+    SpiceMsgIn *in;
 
     g_return_val_if_fail(channel != NULL, NULL);
 
-    in = spice_new0(spice_msg_in, 1);
+    in = spice_new0(SpiceMsgIn, 1);
     in->refcount = 1;
     in->channel  = channel;
     return in;
 }
 
 G_GNUC_INTERNAL
-spice_msg_in *spice_msg_in_sub_new(SpiceChannel *channel, spice_msg_in *parent,
+SpiceMsgIn *spice_msg_in_sub_new(SpiceChannel *channel, SpiceMsgIn *parent,
                                    SpiceSubMessage *sub)
 {
-    spice_msg_in *in;
+    SpiceMsgIn *in;
 
     g_return_val_if_fail(channel != NULL, NULL);
 
@@ -375,7 +375,7 @@ spice_msg_in *spice_msg_in_sub_new(SpiceChannel *channel, spice_msg_in *parent,
 }
 
 G_GNUC_INTERNAL
-void spice_msg_in_ref(spice_msg_in *in)
+void spice_msg_in_ref(SpiceMsgIn *in)
 {
     g_return_if_fail(in != NULL);
 
@@ -383,7 +383,7 @@ void spice_msg_in_ref(spice_msg_in *in)
 }
 
 G_GNUC_INTERNAL
-void spice_msg_in_unref(spice_msg_in *in)
+void spice_msg_in_unref(SpiceMsgIn *in)
 {
     g_return_if_fail(in != NULL);
 
@@ -401,7 +401,7 @@ void spice_msg_in_unref(spice_msg_in *in)
 }
 
 G_GNUC_INTERNAL
-int spice_msg_in_type(spice_msg_in *in)
+int spice_msg_in_type(SpiceMsgIn *in)
 {
     g_return_val_if_fail(in != NULL, -1);
 
@@ -409,7 +409,7 @@ int spice_msg_in_type(spice_msg_in *in)
 }
 
 G_GNUC_INTERNAL
-void *spice_msg_in_parsed(spice_msg_in *in)
+void *spice_msg_in_parsed(SpiceMsgIn *in)
 {
     g_return_val_if_fail(in != NULL, NULL);
 
@@ -417,7 +417,7 @@ void *spice_msg_in_parsed(spice_msg_in *in)
 }
 
 G_GNUC_INTERNAL
-void *spice_msg_in_raw(spice_msg_in *in, int *len)
+void *spice_msg_in_raw(SpiceMsgIn *in, int *len)
 {
     g_return_val_if_fail(in != NULL, NULL);
     g_return_val_if_fail(len != NULL, NULL);
@@ -444,9 +444,9 @@ static void hexdump(char *prefix, unsigned char *data, int len)
 }
 
 G_GNUC_INTERNAL
-void spice_msg_in_hexdump(spice_msg_in *in)
+void spice_msg_in_hexdump(SpiceMsgIn *in)
 {
-    spice_channel *c = in->channel->priv;
+    SpiceChannelPrivate *c = in->channel->priv;
 
     fprintf(stderr, "--\n<< hdr: %s serial %" PRIu64 " type %d size %d sub-list %d\n",
             c->name, in->header.serial, in->header.type,
@@ -455,9 +455,9 @@ void spice_msg_in_hexdump(spice_msg_in *in)
 }
 
 G_GNUC_INTERNAL
-void spice_msg_out_hexdump(spice_msg_out *out, unsigned char *data, int len)
+void spice_msg_out_hexdump(SpiceMsgOut *out, unsigned char *data, int len)
 {
-    spice_channel *c = out->channel->priv;
+    SpiceChannelPrivate *c = out->channel->priv;
 
     fprintf(stderr, "--\n>> hdr: %s serial %" PRIu64 " type %d size %d sub-list %d\n",
             c->name, out->header->serial, out->header->type,
@@ -466,14 +466,14 @@ void spice_msg_out_hexdump(spice_msg_out *out, unsigned char *data, int len)
 }
 
 G_GNUC_INTERNAL
-spice_msg_out *spice_msg_out_new(SpiceChannel *channel, int type)
+SpiceMsgOut *spice_msg_out_new(SpiceChannel *channel, int type)
 {
-    spice_channel *c = channel->priv;
-    spice_msg_out *out;
+    SpiceChannelPrivate *c = channel->priv;
+    SpiceMsgOut *out;
 
     g_return_val_if_fail(c != NULL, NULL);
 
-    out = spice_new0(spice_msg_out, 1);
+    out = spice_new0(SpiceMsgOut, 1);
     out->refcount = 1;
     out->channel  = channel;
 
@@ -489,7 +489,7 @@ spice_msg_out *spice_msg_out_new(SpiceChannel *channel, int type)
 }
 
 G_GNUC_INTERNAL
-void spice_msg_out_ref(spice_msg_out *out)
+void spice_msg_out_ref(SpiceMsgOut *out)
 {
     g_return_if_fail(out != NULL);
 
@@ -497,7 +497,7 @@ void spice_msg_out_ref(spice_msg_out *out)
 }
 
 G_GNUC_INTERNAL
-void spice_msg_out_unref(spice_msg_out *out)
+void spice_msg_out_unref(SpiceMsgOut *out)
 {
     g_return_if_fail(out != NULL);
 
@@ -510,7 +510,7 @@ void spice_msg_out_unref(spice_msg_out *out)
 
 /* system context */
 G_GNUC_INTERNAL
-void spice_msg_out_send(spice_msg_out *out)
+void spice_msg_out_send(SpiceMsgOut *out)
 {
     g_return_if_fail(out != NULL);
 
@@ -524,7 +524,7 @@ void spice_msg_out_send(spice_msg_out *out)
 
 /* coroutine context */
 G_GNUC_INTERNAL
-void spice_msg_out_send_internal(spice_msg_out *out)
+void spice_msg_out_send_internal(SpiceMsgOut *out)
 {
     g_return_if_fail(out != NULL);
 
@@ -565,7 +565,7 @@ static void spice_channel_flush_wire(SpiceChannel *channel,
                                      const void *data,
                                      size_t datalen)
 {
-    spice_channel *c = channel->priv;
+    SpiceChannelPrivate *c = channel->priv;
     const char *ptr = data;
     size_t offset = 0;
     GIOCondition cond;
@@ -625,7 +625,7 @@ static void spice_channel_flush_wire(SpiceChannel *channel,
  */
 static void spice_channel_flush_sasl(SpiceChannel *channel, const void *data, size_t len)
 {
-    spice_channel *c = channel->priv;
+    SpiceChannelPrivate *c = channel->priv;
     const char *output;
     unsigned int outputlen;
     int err;
@@ -647,7 +647,7 @@ static void spice_channel_flush_sasl(SpiceChannel *channel, const void *data, si
 static void spice_channel_write(SpiceChannel *channel, const void *data, size_t len)
 {
 #if HAVE_SASL
-    spice_channel *c = channel->priv;
+    SpiceChannelPrivate *c = channel->priv;
 
     if (c->sasl_conn)
         spice_channel_flush_sasl(channel, data, len);
@@ -663,7 +663,7 @@ static void spice_channel_write(SpiceChannel *channel, const void *data, size_t
 /* coroutine context */
 static int spice_channel_read_wire(SpiceChannel *channel, void *data, size_t len)
 {
-    spice_channel *c = channel->priv;
+    SpiceChannelPrivate *c = channel->priv;
     int ret;
     GIOCondition cond;
 
@@ -728,7 +728,7 @@ reread:
  */
 static int spice_channel_read_sasl(SpiceChannel *channel, void *data, size_t len)
 {
-    spice_channel *c = channel->priv;
+    SpiceChannelPrivate *c = channel->priv;
 
     /* SPICE_DEBUG("Read %lu SASL %p size %d offset %d", len, c->sasl_decoded, */
     /*             c->sasl_decoded_length, c->sasl_decoded_offset); */
@@ -776,7 +776,7 @@ static int spice_channel_read_sasl(SpiceChannel *channel, void *data, size_t len
 /* coroutine context */
 static int spice_channel_read(SpiceChannel *channel, void *data, size_t length)
 {
-    spice_channel *c = channel->priv;
+    SpiceChannelPrivate *c = channel->priv;
     gsize len = length;
     int ret;
 
@@ -807,7 +807,7 @@ static int spice_channel_read(SpiceChannel *channel, void *data, size_t length)
 /* coroutine context */
 static void spice_channel_send_spice_ticket(SpiceChannel *channel)
 {
-    spice_channel *c = channel->priv;
+    SpiceChannelPrivate *c = channel->priv;
     EVP_PKEY *pubkey;
     int nRSASize;
     BIO *bioKey;
@@ -848,7 +848,7 @@ static void spice_channel_send_spice_ticket(SpiceChannel *channel)
 /* coroutine context */
 static void spice_channel_recv_auth(SpiceChannel *channel)
 {
-    spice_channel *c = channel->priv;
+    SpiceChannelPrivate *c = channel->priv;
     uint32_t link_res;
     int rc;
 
@@ -877,7 +877,7 @@ static void spice_channel_recv_auth(SpiceChannel *channel)
 G_GNUC_INTERNAL
 void spice_channel_up(SpiceChannel *channel)
 {
-    spice_channel *c = channel->priv;
+    SpiceChannelPrivate *c = channel->priv;
 
     SPICE_DEBUG("%s: channel up, state %d", c->name, c->state);
 
@@ -888,7 +888,7 @@ void spice_channel_up(SpiceChannel *channel)
 /* coroutine context */
 static void spice_channel_send_link(SpiceChannel *channel)
 {
-    spice_channel *c = channel->priv;
+    SpiceChannelPrivate *c = channel->priv;
     uint8_t *buffer, *p;
     int protocol, i;
 
@@ -946,7 +946,7 @@ static void spice_channel_send_link(SpiceChannel *channel)
 /* coroutine context */
 static void spice_channel_recv_link_hdr(SpiceChannel *channel)
 {
-    spice_channel *c = channel->priv;
+    SpiceChannelPrivate *c = channel->priv;
     int rc;
 
     rc = spice_channel_read(channel, &c->peer_hdr, sizeof(c->peer_hdr));
@@ -1008,7 +1008,7 @@ static gboolean
 spice_channel_gather_sasl_credentials(SpiceChannel *channel,
 				       sasl_interact_t *interact)
 {
-    spice_channel *c;
+    SpiceChannelPrivate *c;
     int ninteract;
 
     g_return_val_if_fail(channel != NULL, FALSE);
@@ -1080,7 +1080,7 @@ spice_channel_gather_sasl_credentials(SpiceChannel *channel,
  */
 static gboolean spice_channel_perform_auth_sasl(SpiceChannel *channel)
 {
-    spice_channel *c;
+    SpiceChannelPrivate *c;
     sasl_conn_t *saslconn = NULL;
     sasl_security_properties_t secprops;
     const char *clientout;
@@ -1415,7 +1415,7 @@ error:
 /* coroutine context */
 static void spice_channel_recv_link_msg(SpiceChannel *channel)
 {
-    spice_channel *c;
+    SpiceChannelPrivate *c;
     int rc, num_caps, i;
 
     g_return_if_fail(channel != NULL);
@@ -1504,7 +1504,7 @@ error:
 /* system context */
 static void spice_channel_buffered_write(SpiceChannel *channel, const void *data, size_t size)
 {
-    spice_channel *c = channel->priv;
+    SpiceChannelPrivate *c = channel->priv;
     size_t left;
 
     left = c->xmit_buffer_capacity - c->xmit_buffer_size;
@@ -1525,14 +1525,14 @@ static void spice_channel_buffered_write(SpiceChannel *channel, const void *data
 G_GNUC_INTERNAL
 void spice_channel_wakeup(SpiceChannel *channel)
 {
-    spice_channel *c = channel->priv;
+    SpiceChannelPrivate *c = channel->priv;
 
     g_io_wakeup(&c->wait);
 }
 
 /* coroutine context if @buffered is FALSE,
    system context if @buffered is TRUE */
-static void spice_channel_send_msg(SpiceChannel *channel, spice_msg_out *out, gboolean buffered)
+static void spice_channel_send_msg(SpiceChannel *channel, SpiceMsgOut *out, gboolean buffered)
 {
     uint8_t *data;
     int free_data;
@@ -1558,8 +1558,8 @@ G_GNUC_INTERNAL
 void spice_channel_recv_msg(SpiceChannel *channel,
                             handler_msg_in msg_handler, gpointer data)
 {
-    spice_channel *c = channel->priv;
-    spice_msg_in *in;
+    SpiceChannelPrivate *c = channel->priv;
+    SpiceMsgIn *in;
     int rc;
 
     if (!c->msg_in) {
@@ -1595,7 +1595,7 @@ void spice_channel_recv_msg(SpiceChannel *channel,
     if (in->header.sub_list) {
         SpiceSubMessageList *sub_list;
         SpiceSubMessage *sub;
-        spice_msg_in *sub_in;
+        SpiceMsgIn *sub_in;
         int i;
 
         sub_list = (SpiceSubMessageList *)(in->data + in->header.sub_list);
@@ -1619,7 +1619,7 @@ void spice_channel_recv_msg(SpiceChannel *channel,
     if (c->message_ack_count) {
         c->message_ack_count--;
         if (!c->message_ack_count) {
-            spice_msg_out *out = spice_msg_out_new(channel, SPICE_MSGC_ACK);
+            SpiceMsgOut *out = spice_msg_out_new(channel, SPICE_MSGC_ACK);
             spice_msg_out_send_internal(out);
             spice_msg_out_unref(out);
             c->message_ack_count = c->message_ack_window;
@@ -1671,7 +1671,7 @@ const gchar* spice_channel_type_to_string(gint type)
 /**
  * spice_channel_new:
  * @s: the @SpiceSession the channel is linked to
- * @type: the requested SPICE_CHANNEL type
+ * @type: the requested SPICECHANNELPRIVATE type
  * @id: the channel-id
  *
  * Create a new #SpiceChannel of type @type, and channel ID @id.
@@ -1748,7 +1748,7 @@ void spice_channel_destroy(SpiceChannel *channel)
 /* coroutine context */
 static void spice_channel_iterate_write(SpiceChannel *channel)
 {
-    spice_channel *c = channel->priv;
+    SpiceChannelPrivate *c = channel->priv;
 
     if (c->xmit_buffer_size) {
         spice_channel_write(channel, c->xmit_buffer, c->xmit_buffer_size);
@@ -1759,7 +1759,7 @@ static void spice_channel_iterate_write(SpiceChannel *channel)
 /* coroutine context */
 static void spice_channel_iterate_read(SpiceChannel *channel)
 {
-    spice_channel *c = channel->priv;
+    SpiceChannelPrivate *c = channel->priv;
 
     /* TODO: get rid of state, and use coroutine state */
     switch (c->state) {
@@ -1784,7 +1784,7 @@ static void spice_channel_iterate_read(SpiceChannel *channel)
 /* coroutine context */
 static gboolean spice_channel_iterate(SpiceChannel *channel)
 {
-    spice_channel *c = channel->priv;
+    SpiceChannelPrivate *c = channel->priv;
     GIOCondition ret;
 
     do {
@@ -1832,7 +1832,7 @@ static gboolean spice_channel_iterate(SpiceChannel *channel)
 static gboolean spice_channel_delayed_unref(gpointer data)
 {
     SpiceChannel *channel = SPICE_CHANNEL(data);
-    spice_channel *c = channel->priv;
+    SpiceChannelPrivate *c = channel->priv;
 
     g_return_val_if_fail(channel != NULL, FALSE);
     SPICE_DEBUG("Delayed unref channel %s %p", c->name, channel);
@@ -1848,7 +1848,7 @@ static gboolean spice_channel_delayed_unref(gpointer data)
 static void *spice_channel_coroutine(void *data)
 {
     SpiceChannel *channel = SPICE_CHANNEL(data);
-    spice_channel *c = channel->priv;
+    SpiceChannelPrivate *c = channel->priv;
     guint verify;
 
     SPICE_DEBUG("Started background coroutine %p for %s", &c->coroutine, c->name);
@@ -1992,7 +1992,7 @@ end:
 static gboolean connect_delayed(gpointer data)
 {
     SpiceChannel *channel = data;
-    spice_channel *c = channel->priv;
+    SpiceChannelPrivate *c = channel->priv;
     struct coroutine *co;
 
     SPICE_DEBUG("Open coroutine starting %p", channel);
@@ -2012,7 +2012,7 @@ static gboolean connect_delayed(gpointer data)
 
 static gboolean channel_connect(SpiceChannel *channel)
 {
-    spice_channel *c = channel->priv;
+    SpiceChannelPrivate *c = channel->priv;
 
     g_return_val_if_fail(c != NULL, FALSE);
 
@@ -2054,7 +2054,7 @@ static gboolean channel_connect(SpiceChannel *channel)
 gboolean spice_channel_connect(SpiceChannel *channel)
 {
     g_return_val_if_fail(SPICE_IS_CHANNEL(channel), FALSE);
-    spice_channel *c = channel->priv;
+    SpiceChannelPrivate *c = channel->priv;
 
     if (c->state == SPICE_CHANNEL_STATE_CONNECTING)
         return TRUE;
@@ -2073,7 +2073,7 @@ gboolean spice_channel_connect(SpiceChannel *channel)
  **/
 gboolean spice_channel_open_fd(SpiceChannel *channel, int fd)
 {
-    spice_channel *c = SPICE_CHANNEL_GET_PRIVATE(channel);
+    SpiceChannelPrivate *c = SPICE_CHANNEL_GET_PRIVATE(channel);
 
     g_return_val_if_fail(c != NULL, FALSE);
     g_return_val_if_fail(fd >= 0, FALSE);
@@ -2086,7 +2086,7 @@ gboolean spice_channel_open_fd(SpiceChannel *channel, int fd)
 /* system or coroutine context */
 static void channel_disconnect(SpiceChannel *channel)
 {
-    spice_channel *c = SPICE_CHANNEL_GET_PRIVATE(channel);
+    SpiceChannelPrivate *c = SPICE_CHANNEL_GET_PRIVATE(channel);
 
     g_return_if_fail(c != NULL);
 
@@ -2162,7 +2162,7 @@ static void channel_disconnect(SpiceChannel *channel)
  **/
 void spice_channel_disconnect(SpiceChannel *channel, SpiceChannelEvent reason)
 {
-    spice_channel *c = SPICE_CHANNEL_GET_PRIVATE(channel);
+    SpiceChannelPrivate *c = SPICE_CHANNEL_GET_PRIVATE(channel);
 
     g_return_if_fail(c != NULL);
 
@@ -2214,7 +2214,7 @@ static gboolean test_capability(GArray *caps, guint32 cap)
  **/
 gboolean spice_channel_test_capability(SpiceChannel *self, guint32 cap)
 {
-    spice_channel *c;
+    SpiceChannelPrivate *c;
 
     g_return_val_if_fail(SPICE_IS_CHANNEL(self), FALSE);
 
@@ -2233,7 +2233,7 @@ gboolean spice_channel_test_capability(SpiceChannel *self, guint32 cap)
  **/
 gboolean spice_channel_test_common_capability(SpiceChannel *self, guint32 cap)
 {
-    spice_channel *c;
+    SpiceChannelPrivate *c;
 
     g_return_val_if_fail(SPICE_IS_CHANNEL(self), FALSE);
 
@@ -2264,7 +2264,7 @@ static void set_capability(GArray *caps, guint32 cap)
 /* FIXME: we may want to make caps read only from outside */
 void spice_channel_set_capability(SpiceChannel *channel, guint32 cap)
 {
-    spice_channel *c;
+    SpiceChannelPrivate *c;
 
     g_return_if_fail(SPICE_IS_CHANNEL(channel));
 
@@ -2275,7 +2275,7 @@ void spice_channel_set_capability(SpiceChannel *channel, guint32 cap)
 G_GNUC_INTERNAL
 void spice_channel_set_common_capability(SpiceChannel *channel, guint32 cap)
 {
-    spice_channel *c;
+    SpiceChannelPrivate *c;
 
     g_return_if_fail(SPICE_IS_CHANNEL(channel));
 
@@ -2294,8 +2294,8 @@ SpiceSession* spice_channel_get_session(SpiceChannel *channel)
 G_GNUC_INTERNAL
 void spice_channel_swap(SpiceChannel *channel, SpiceChannel *swap)
 {
-    spice_channel *c = SPICE_CHANNEL_GET_PRIVATE(channel);
-    spice_channel *s = SPICE_CHANNEL_GET_PRIVATE(swap);
+    SpiceChannelPrivate *c = SPICE_CHANNEL_GET_PRIVATE(channel);
+    SpiceChannelPrivate *s = SPICE_CHANNEL_GET_PRIVATE(swap);
 
     g_return_if_fail(c != NULL);
     g_return_if_fail(s != NULL);
@@ -2350,7 +2350,7 @@ static const spice_msg_handler base_handlers[] = {
 };
 
 /* coroutine context */
-static void spice_channel_handle_msg(SpiceChannel *channel, spice_msg_in *msg)
+static void spice_channel_handle_msg(SpiceChannel *channel, SpiceMsgIn *msg)
 {
     int type = spice_msg_in_type(msg);
 
diff --git a/gtk/spice-channel.h b/gtk/spice-channel.h
index f7eac9d..793c5d6 100644
--- a/gtk/spice-channel.h
+++ b/gtk/spice-channel.h
@@ -31,8 +31,8 @@ G_BEGIN_DECLS
 #define SPICE_IS_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SPICE_TYPE_CHANNEL))
 #define SPICE_CHANNEL_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), SPICE_TYPE_CHANNEL, SpiceChannelClass))
 
-typedef struct spice_msg_in  spice_msg_in;
-typedef struct spice_msg_out spice_msg_out;
+typedef struct _SpiceMsgIn  SpiceMsgIn;
+typedef struct _SpiceMsgOut SpiceMsgOut;
 
 /**
  * SpiceChannelEvent:
@@ -64,7 +64,7 @@ typedef enum
 struct _SpiceChannel
 {
     GObject parent;
-    spice_channel *priv;
+    SpiceChannelPrivate *priv;
     /* Do not add fields to this struct */
 };
 
@@ -74,7 +74,7 @@ struct _SpiceChannelClass
 
     /*< private >*/
     /* virtual methods, coroutine context */
-    void (*handle_msg)(SpiceChannel *channel, spice_msg_in *msg);
+    void (*handle_msg)(SpiceChannel *channel, SpiceMsgIn *msg);
     void (*channel_up)(SpiceChannel *channel);
     void (*iterate_write)(SpiceChannel *channel);
     void (*iterate_read)(SpiceChannel *channel);
@@ -96,13 +96,13 @@ struct _SpiceChannelClass
 
 GType spice_channel_get_type(void);
 
-typedef void (*spice_msg_handler)(SpiceChannel *channel, spice_msg_in *in);
+typedef void (*spice_msg_handler)(SpiceChannel *channel, SpiceMsgIn *in);
 
 SpiceChannel *spice_channel_new(SpiceSession *s, int type, int id);
 void spice_channel_destroy(SpiceChannel *channel);
 gboolean spice_channel_connect(SpiceChannel *channel);
 gboolean spice_channel_open_fd(SpiceChannel *channel, int fd);
-void spice_channel_disconnect(SpiceChannel *channel, SpiceChannelEvent event);
+void spice_channel_disconnect(SpiceChannel *channel, SpiceChannelEvent reason);
 gboolean spice_channel_test_capability(SpiceChannel *channel, guint32 cap);
 gboolean spice_channel_test_common_capability(SpiceChannel *channel, guint32 cap);
 void spice_channel_set_capability(SpiceChannel *channel, guint32 cap);
diff --git a/gtk/spice-client.h b/gtk/spice-client.h
index 9141e10..885d81c 100644
--- a/gtk/spice-client.h
+++ b/gtk/spice-client.h
@@ -30,6 +30,7 @@
 #include "spice-types.h"
 #include "spice-session.h"
 #include "spice-channel.h"
+#include "spice-option.h"
 
 #include "channel-main.h"
 #include "channel-display.h"
diff --git a/gtk/spice-grabsequence.c b/gtk/spice-grabsequence.c
index 3eda971..a7ef603 100644
--- a/gtk/spice-grabsequence.c
+++ b/gtk/spice-grabsequence.c
@@ -97,9 +97,9 @@ SpiceGrabSequence *spice_grab_sequence_new_from_string(const gchar *str)
 
 /**
  * spice_grab_sequence_copy:
- * @srcSequence: sequence to copy
+ * @sequence: sequence to copy
  *
- * Returns: a copy of @srcSequence
+ * Returns: (transfer full): a copy of @sequence
  **/
 SpiceGrabSequence *spice_grab_sequence_copy(SpiceGrabSequence *srcSequence)
 {
diff --git a/gtk/spice-option.c b/gtk/spice-option.c
index 8f2088a..6c4e50c 100644
--- a/gtk/spice-option.c
+++ b/gtk/spice-option.c
@@ -47,9 +47,10 @@ static void option_debug(void)
 /**
  * spice_get_option_group:
  *
- * Returns: a #GOptionGroup for the commandline arguments specific to
- * Spice.  You have to call spice_set_session_option() after to set
- * the options on a #SpiceSession.
+ * Returns: (transfer full): a #GOptionGroup for the commandline
+ * arguments specific to Spice.  You have to call
+ * spice_set_session_option() after to set the options on a
+ * #SpiceSession.
  **/
 GOptionGroup* spice_get_option_group(void)
 {
diff --git a/gtk/spice-session.c b/gtk/spice-session.c
index d4ac0a3..d6100f6 100644
--- a/gtk/spice-session.c
+++ b/gtk/spice-session.c
@@ -34,7 +34,7 @@ struct channel {
     RingItem          link;
 };
 
-struct spice_session {
+struct _SpiceSessionPrivate {
     char              *host;
     char              *port;
     char              *tls_port;
@@ -114,7 +114,7 @@ struct spice_session {
 /* gobject glue                                                       */
 
 #define SPICE_SESSION_GET_PRIVATE(obj) \
-    (G_TYPE_INSTANCE_GET_PRIVATE ((obj), SPICE_TYPE_SESSION, spice_session))
+    (G_TYPE_INSTANCE_GET_PRIVATE ((obj), SPICE_TYPE_SESSION, SpiceSessionPrivate))
 
 G_DEFINE_TYPE (SpiceSession, spice_session, G_TYPE_OBJECT);
 
@@ -155,7 +155,7 @@ static guint signals[SPICE_SESSION_LAST_SIGNAL];
 
 static void spice_session_init(SpiceSession *session)
 {
-    spice_session *s;
+    SpiceSessionPrivate *s;
 
     SPICE_DEBUG("New session (compiled from package " PACKAGE_STRING ")");
     s = session->priv = SPICE_SESSION_GET_PRIVATE(session);
@@ -171,7 +171,7 @@ static void
 spice_session_dispose(GObject *gobject)
 {
     SpiceSession *session = SPICE_SESSION(gobject);
-    spice_session *s = session->priv;
+    SpiceSessionPrivate *s = session->priv;
 
     SPICE_DEBUG("session dispose");
 
@@ -196,7 +196,7 @@ spice_session_dispose(GObject *gobject)
 G_GNUC_INTERNAL
 void spice_session_palettes_clear(SpiceSession *session)
 {
-    spice_session *s = SPICE_SESSION_GET_PRIVATE(session);
+    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
     g_return_if_fail(s != NULL);
 
     for (;;) {
@@ -210,7 +210,7 @@ void spice_session_palettes_clear(SpiceSession *session)
 G_GNUC_INTERNAL
 void spice_session_images_clear(SpiceSession *session)
 {
-    spice_session *s = SPICE_SESSION_GET_PRIVATE(session);
+    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
     g_return_if_fail(s != NULL);
 
     for (;;) {
@@ -226,7 +226,7 @@ static void
 spice_session_finalize(GObject *gobject)
 {
     SpiceSession *session = SPICE_SESSION(gobject);
-    spice_session *s = SPICE_SESSION_GET_PRIVATE(session);
+    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
 
     /* release stuff */
     g_free(s->host);
@@ -254,7 +254,7 @@ spice_session_finalize(GObject *gobject)
 
 static int spice_uri_create(SpiceSession *session, char *dest, int len)
 {
-    spice_session *s = SPICE_SESSION_GET_PRIVATE(session);
+    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
     int pos = 0;
 
     if (s->host == NULL || (s->port == NULL && s->tls_port == NULL)) {
@@ -271,7 +271,7 @@ static int spice_uri_create(SpiceSession *session, char *dest, int len)
 
 static int spice_uri_parse(SpiceSession *session, const char *original_uri)
 {
-    spice_session *s = SPICE_SESSION_GET_PRIVATE(session);
+    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
     char host[128], key[32], value[128];
     char *port = NULL, *tls_port = NULL, *uri = NULL, *password = NULL;
     int len, pos = 0;
@@ -339,7 +339,7 @@ static void spice_session_get_property(GObject    *gobject,
                                        GParamSpec *pspec)
 {
     SpiceSession *session = SPICE_SESSION(gobject);
-    spice_session *s = SPICE_SESSION_GET_PRIVATE(session);
+    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
     char buf[256];
     int len;
 
@@ -411,7 +411,7 @@ static void spice_session_set_property(GObject      *gobject,
                                        GParamSpec   *pspec)
 {
     SpiceSession *session = SPICE_SESSION(gobject);
-    spice_session *s = SPICE_SESSION_GET_PRIVATE(session);
+    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
     const char *str;
 
     switch (prop_id) {
@@ -823,7 +823,7 @@ static void spice_session_class_init(SpiceSessionClass *klass)
                      1,
                      SPICE_TYPE_CHANNEL);
 
-    g_type_class_add_private(klass, sizeof(spice_session));
+    g_type_class_add_private(klass, sizeof(SpiceSessionPrivate));
 }
 
 /* ------------------------------------------------------------------ */
@@ -848,7 +848,7 @@ SpiceSession *spice_session_new_from_session(SpiceSession *session)
                                                     "host", NULL,
                                                     "ca-file", NULL,
                                                     NULL));
-    spice_session *c = copy->priv, *s = session->priv;
+    SpiceSessionPrivate *c = copy->priv, *s = session->priv;
 
     g_warn_if_fail (c->host == NULL);
     g_warn_if_fail (c->tls_port == NULL);
@@ -889,7 +889,7 @@ SpiceSession *spice_session_new_from_session(SpiceSession *session)
  **/
 gboolean spice_session_connect(SpiceSession *session)
 {
-    spice_session *s = SPICE_SESSION_GET_PRIVATE(session);
+    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
 
     g_return_val_if_fail(s != NULL, FALSE);
 
@@ -918,7 +918,7 @@ gboolean spice_session_connect(SpiceSession *session)
  **/
 gboolean spice_session_open_fd(SpiceSession *session, int fd)
 {
-    spice_session *s = SPICE_SESSION_GET_PRIVATE(session);
+    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
 
     g_return_val_if_fail(s != NULL, FALSE);
     g_return_val_if_fail(fd >= 0, FALSE);
@@ -935,7 +935,7 @@ gboolean spice_session_open_fd(SpiceSession *session, int fd)
 G_GNUC_INTERNAL
 gboolean spice_session_get_client_provided_socket(SpiceSession *session)
 {
-    spice_session *s = SPICE_SESSION_GET_PRIVATE(session);
+    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
 
     g_return_val_if_fail(s != NULL, FALSE);
     return s->client_provided_sockets;
@@ -944,7 +944,7 @@ gboolean spice_session_get_client_provided_socket(SpiceSession *session)
 G_GNUC_INTERNAL
 void spice_session_switching_disconnect(SpiceSession *session)
 {
-    spice_session *s = SPICE_SESSION_GET_PRIVATE(session);
+    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
     struct channel *item;
     RingItem *ring, *next;
 
@@ -966,8 +966,8 @@ void spice_session_switching_disconnect(SpiceSession *session)
 G_GNUC_INTERNAL
 void spice_session_set_migration(SpiceSession *session, SpiceSession *migration)
 {
-    spice_session *s = SPICE_SESSION_GET_PRIVATE(session);
-    spice_session *m = SPICE_SESSION_GET_PRIVATE(migration);
+    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
+    SpiceSessionPrivate *m = SPICE_SESSION_GET_PRIVATE(migration);
     gchar *tmp;
 
     g_return_if_fail(s != NULL);
@@ -1001,7 +1001,7 @@ SpiceChannel* get_channel_by_id_and_type(SpiceSession *session,
                                          gint id, gint type)
 {
     RingItem *ring, *next;
-    spice_session *s = session->priv;
+    SpiceSessionPrivate *s = session->priv;
     struct channel *c;
 
     g_return_val_if_fail(s != NULL, NULL);
@@ -1027,7 +1027,7 @@ SpiceChannel* get_channel_by_id_and_type(SpiceSession *session,
 G_GNUC_INTERNAL
 void spice_session_abort_migration(SpiceSession *session)
 {
-    spice_session *s = SPICE_SESSION_GET_PRIVATE(session);
+    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
     RingItem *ring, *next;
     struct channel *c;
 
@@ -1060,7 +1060,7 @@ void spice_session_abort_migration(SpiceSession *session)
 G_GNUC_INTERNAL
 void spice_session_channel_migrate(SpiceSession *session, SpiceChannel *channel)
 {
-    spice_session *s = SPICE_SESSION_GET_PRIVATE(session);
+    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
     SpiceChannel *c;
     gint id, type;
 
@@ -1095,7 +1095,7 @@ void spice_session_channel_migrate(SpiceSession *session, SpiceChannel *channel)
  **/
 void spice_session_disconnect(SpiceSession *session)
 {
-    spice_session *s = SPICE_SESSION_GET_PRIVATE(session);
+    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
     struct channel *item;
     RingItem *ring, *next;
 
@@ -1122,15 +1122,16 @@ void spice_session_disconnect(SpiceSession *session)
 
 /**
  * spice_session_get_channels:
- * @session:
+ * @session: a #SpiceSession
  *
  * Get the list of current channels associated with this @session.
  *
- * Returns: a #GList of unowned SpiceChannels.
+ * Returns: (element-type SpiceChannel) (transfer container): a #GList
+ *          of unowned #SpiceChannel channels.
  **/
 GList *spice_session_get_channels(SpiceSession *session)
 {
-    spice_session *s = SPICE_SESSION_GET_PRIVATE(session);
+    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
     struct channel *item;
     GList *list = NULL;
     RingItem *ring;
@@ -1187,7 +1188,7 @@ static GSocket *channel_connect_socket(GSocketAddress *sockaddr,
 G_GNUC_INTERNAL
 GSocket* spice_session_channel_open_host(SpiceSession *session, gboolean use_tls)
 {
-    spice_session *s = SPICE_SESSION_GET_PRIVATE(session);
+    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
     GSocketConnectable *addr;
     GSocketAddressEnumerator *enumerator;
     GSocketAddress *sockaddr;
@@ -1227,7 +1228,7 @@ GSocket* spice_session_channel_open_host(SpiceSession *session, gboolean use_tls
 G_GNUC_INTERNAL
 void spice_session_channel_new(SpiceSession *session, SpiceChannel *channel)
 {
-    spice_session *s = SPICE_SESSION_GET_PRIVATE(session);
+    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
     struct channel *item;
 
     g_return_if_fail(s != NULL);
@@ -1255,7 +1256,7 @@ void spice_session_channel_new(SpiceSession *session, SpiceChannel *channel)
 G_GNUC_INTERNAL
 void spice_session_channel_destroy(SpiceSession *session, SpiceChannel *channel)
 {
-    spice_session *s = SPICE_SESSION_GET_PRIVATE(session);
+    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
     struct channel *item = NULL;
     RingItem *ring, *next;
 
@@ -1287,7 +1288,7 @@ void spice_session_channel_destroy(SpiceSession *session, SpiceChannel *channel)
 G_GNUC_INTERNAL
 void spice_session_set_connection_id(SpiceSession *session, int id)
 {
-    spice_session *s = SPICE_SESSION_GET_PRIVATE(session);
+    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
 
     g_return_if_fail(s != NULL);
 
@@ -1297,7 +1298,7 @@ void spice_session_set_connection_id(SpiceSession *session, int id)
 G_GNUC_INTERNAL
 int spice_session_get_connection_id(SpiceSession *session)
 {
-    spice_session *s = SPICE_SESSION_GET_PRIVATE(session);
+    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
 
     g_return_val_if_fail(s != NULL, -1);
 
@@ -1319,7 +1320,7 @@ static guint64 g_get_monotonic_time(void)
 G_GNUC_INTERNAL
 guint32 spice_session_get_mm_time(SpiceSession *session)
 {
-    spice_session *s = SPICE_SESSION_GET_PRIVATE(session);
+    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
 
     g_return_val_if_fail(s != NULL, 0);
 
@@ -1331,7 +1332,7 @@ guint32 spice_session_get_mm_time(SpiceSession *session)
 G_GNUC_INTERNAL
 void spice_session_set_mm_time(SpiceSession *session, guint32 time)
 {
-    spice_session *s = SPICE_SESSION_GET_PRIVATE(session);
+    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
 
     g_return_if_fail(s != NULL);
 
@@ -1357,7 +1358,7 @@ void spice_session_set_port(SpiceSession *session, int port, gboolean tls)
 G_GNUC_INTERNAL
 void spice_session_get_pubkey(SpiceSession *session, guint8 **pubkey, guint *size)
 {
-    spice_session *s = SPICE_SESSION_GET_PRIVATE(session);
+    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
 
     g_return_if_fail(s != NULL);
     g_return_if_fail(pubkey != NULL);
@@ -1370,7 +1371,7 @@ void spice_session_get_pubkey(SpiceSession *session, guint8 **pubkey, guint *siz
 G_GNUC_INTERNAL
 guint spice_session_get_verify(SpiceSession *session)
 {
-    spice_session *s = SPICE_SESSION_GET_PRIVATE(session);
+    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
 
     g_return_val_if_fail(s != NULL, 0);
     return s->verify;
@@ -1379,7 +1380,7 @@ guint spice_session_get_verify(SpiceSession *session)
 G_GNUC_INTERNAL
 void spice_session_set_migration_state(SpiceSession *session, SpiceSessionMigration state)
 {
-    spice_session *s = SPICE_SESSION_GET_PRIVATE(session);
+    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
 
     g_return_if_fail(s != NULL);
     s->migration_state = state;
@@ -1389,7 +1390,7 @@ void spice_session_set_migration_state(SpiceSession *session, SpiceSessionMigrat
 G_GNUC_INTERNAL
 const gchar* spice_session_get_password(SpiceSession *session)
 {
-    spice_session *s = SPICE_SESSION_GET_PRIVATE(session);
+    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
 
     g_return_val_if_fail(s != NULL, NULL);
     return s->password;
@@ -1398,7 +1399,7 @@ const gchar* spice_session_get_password(SpiceSession *session)
 G_GNUC_INTERNAL
 const gchar* spice_session_get_host(SpiceSession *session)
 {
-    spice_session *s = SPICE_SESSION_GET_PRIVATE(session);
+    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
 
     g_return_val_if_fail(s != NULL, NULL);
     return s->host;
@@ -1407,7 +1408,7 @@ const gchar* spice_session_get_host(SpiceSession *session)
 G_GNUC_INTERNAL
 const gchar* spice_session_get_cert_subject(SpiceSession *session)
 {
-    spice_session *s = SPICE_SESSION_GET_PRIVATE(session);
+    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
 
     g_return_val_if_fail(s != NULL, NULL);
     return s->cert_subject;
@@ -1416,7 +1417,7 @@ const gchar* spice_session_get_cert_subject(SpiceSession *session)
 G_GNUC_INTERNAL
 const gchar* spice_session_get_ciphers(SpiceSession *session)
 {
-    spice_session *s = SPICE_SESSION_GET_PRIVATE(session);
+    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
 
     g_return_val_if_fail(s != NULL, NULL);
     return s->ciphers;
@@ -1425,7 +1426,7 @@ const gchar* spice_session_get_ciphers(SpiceSession *session)
 G_GNUC_INTERNAL
 const gchar* spice_session_get_ca_file(SpiceSession *session)
 {
-    spice_session *s = SPICE_SESSION_GET_PRIVATE(session);
+    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
 
     g_return_val_if_fail(s != NULL, NULL);
     return s->ca_file;
@@ -1437,7 +1438,7 @@ void spice_session_get_caches(SpiceSession *session,
                               display_cache **palettes,
                               SpiceGlzDecoderWindow **glz_window)
 {
-    spice_session *s = SPICE_SESSION_GET_PRIVATE(session);
+    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
 
     g_return_if_fail(s != NULL);
 
diff --git a/gtk/spice-session.h b/gtk/spice-session.h
index 9c68c23..a07d297 100644
--- a/gtk/spice-session.h
+++ b/gtk/spice-session.h
@@ -65,7 +65,7 @@ typedef enum {
 struct _SpiceSession
 {
     GObject parent;
-    spice_session *priv;
+    SpiceSessionPrivate *priv;
     /* Do not add fields to this struct */
 };
 
diff --git a/gtk/spice-types.h b/gtk/spice-types.h
index 1bc8e27..f149094 100644
--- a/gtk/spice-types.h
+++ b/gtk/spice-types.h
@@ -23,12 +23,12 @@ G_BEGIN_DECLS
 /* SpiceSession */
 typedef struct _SpiceSession SpiceSession;
 typedef struct _SpiceSessionClass SpiceSessionClass;
-typedef struct spice_session spice_session;
+typedef struct _SpiceSessionPrivate SpiceSessionPrivate;
 
 /* SpiceChannel */
 typedef struct _SpiceChannel SpiceChannel;
 typedef struct _SpiceChannelClass SpiceChannelClass;
-typedef struct spice_channel spice_channel;
+typedef struct _SpiceChannelPrivate SpiceChannelPrivate;
 
 G_END_DECLS
 
diff --git a/gtk/spice-widget-cairo.c b/gtk/spice-widget-cairo.c
index 8b11fc1..acb91ad 100644
--- a/gtk/spice-widget-cairo.c
+++ b/gtk/spice-widget-cairo.c
@@ -35,7 +35,7 @@ static inline void gdk_drawable_get_size(GdkWindow *w, gint *ww, gint *wh)
 G_GNUC_INTERNAL
 int spicex_image_create(SpiceDisplay *display)
 {
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
 
     if (d->format == SPICE_SURFACE_FMT_16_555 ||
         d->format == SPICE_SURFACE_FMT_16_565) {
@@ -54,7 +54,7 @@ int spicex_image_create(SpiceDisplay *display)
 G_GNUC_INTERNAL
 void spicex_image_destroy(SpiceDisplay *display)
 {
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
 
     if (d->ximage) {
         cairo_surface_finish(d->ximage);
@@ -69,7 +69,7 @@ void spicex_image_destroy(SpiceDisplay *display)
 G_GNUC_INTERNAL
 void spicex_draw_event(SpiceDisplay *display, cairo_t *cr)
 {
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
     int fbw = d->width, fbh = d->height;
     int mx = 0, my = 0;
     int ww, wh;
@@ -137,7 +137,7 @@ G_GNUC_INTERNAL
 void spicex_image_invalidate(SpiceDisplay *display,
                              gint *x, gint *y, gint *w, gint *h)
 {
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
     int ww, wh;
 
     gdk_drawable_get_size(gtk_widget_get_window(GTK_WIDGET(display)), &ww, &wh);
@@ -173,6 +173,6 @@ void spicex_image_invalidate(SpiceDisplay *display,
 G_GNUC_INTERNAL
 gboolean spicex_is_scaled(SpiceDisplay *display)
 {
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
     return d->allow_scaling;
 }
diff --git a/gtk/spice-widget-priv.h b/gtk/spice-widget-priv.h
index 556a99e..3711aaa 100644
--- a/gtk/spice-widget-priv.h
+++ b/gtk/spice-widget-priv.h
@@ -39,11 +39,11 @@ G_BEGIN_DECLS
 #include <spice/vd_agent.h>
 
 #define SPICE_DISPLAY_GET_PRIVATE(obj)                                  \
-    (G_TYPE_INSTANCE_GET_PRIVATE((obj), SPICE_TYPE_DISPLAY, spice_display))
+    (G_TYPE_INSTANCE_GET_PRIVATE((obj), SPICE_TYPE_DISPLAY, SpiceDisplayPrivate))
 
 #define CLIPBOARD_LAST (VD_AGENT_CLIPBOARD_SELECTION_SECONDARY + 1)
 
-struct spice_display {
+struct _SpiceDisplayPrivate {
     gint                    channel_id;
 
     /* options */
diff --git a/gtk/spice-widget-x11.c b/gtk/spice-widget-x11.c
index ba15046..be2b6e7 100644
--- a/gtk/spice-widget-x11.c
+++ b/gtk/spice-widget-x11.c
@@ -121,7 +121,7 @@ static int catch_no_mitshm(Display * dpy, XErrorEvent * event)
 G_GNUC_INTERNAL
 int spicex_image_create(SpiceDisplay *display)
 {
-    spice_display   *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate   *d = SPICE_DISPLAY_GET_PRIVATE(display);
     GdkDrawable     *window = gtk_widget_get_window(GTK_WIDGET(display));
     GdkDisplay      *gtkdpy = gdk_drawable_get_display(window);
     void            *old_handler = NULL;
@@ -187,7 +187,7 @@ int spicex_image_create(SpiceDisplay *display)
 G_GNUC_INTERNAL
 void spicex_image_destroy(SpiceDisplay *display)
 {
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
 
     if (d->ximage) {
         /* avoid XDestroy to free shared memory, owned and freed by
@@ -218,7 +218,7 @@ G_GNUC_INTERNAL
 void spicex_expose_event(SpiceDisplay *display, GdkEventExpose *expose)
 {
     GdkDrawable *window = gtk_widget_get_window(GTK_WIDGET(display));
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
 
     if (expose->area.x >= d->mx &&
         expose->area.y >= d->my &&
@@ -272,7 +272,7 @@ G_GNUC_INTERNAL
 void spicex_image_invalidate (SpiceDisplay *display,
                               gint *x, gint *y, gint *w, gint *h)
 {
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
     /* Offset the Spice region to produce expose region */
     *x += d->mx;
     *y += d->my;
diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c
index 2049321..a6a0a12 100644
--- a/gtk/spice-widget.c
+++ b/gtk/spice-widget.c
@@ -126,7 +126,7 @@ static void spice_display_get_property(GObject    *object,
                                        GParamSpec *pspec)
 {
     SpiceDisplay *display = SPICE_DISPLAY(object);
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
 
     switch (prop_id) {
     case PROP_KEYBOARD_GRAB:
@@ -156,7 +156,7 @@ static void spice_display_set_property(GObject      *object,
                                        GParamSpec   *pspec)
 {
     SpiceDisplay *display = SPICE_DISPLAY(object);
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
 
     switch (prop_id) {
     case PROP_KEYBOARD_GRAB:
@@ -204,7 +204,7 @@ static void spice_display_set_property(GObject      *object,
 static void spice_display_dispose(GObject *obj)
 {
     SpiceDisplay *display = SPICE_DISPLAY(obj);
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
 
     SPICE_DEBUG("spice display dispose");
 
@@ -236,7 +236,7 @@ static void spice_display_dispose(GObject *obj)
 static void spice_display_finalize(GObject *obj)
 {
     SpiceDisplay *display = SPICE_DISPLAY(obj);
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
     int i;
 
     SPICE_DEBUG("Finalize spice display");
@@ -259,7 +259,7 @@ static void spice_display_finalize(GObject *obj)
 static void spice_display_init(SpiceDisplay *display)
 {
     GtkWidget *widget = GTK_WIDGET(display);
-    spice_display *d;
+    SpiceDisplayPrivate *d;
 
     d = display->priv = SPICE_DISPLAY_GET_PRIVATE(display);
     memset(d, 0, sizeof(*d));
@@ -305,7 +305,7 @@ static void spice_display_init(SpiceDisplay *display)
  **/
 void spice_display_set_grab_keys(SpiceDisplay *display, SpiceGrabSequence *seq)
 {
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
     g_return_if_fail(d != NULL);
 
     if (d->grabseq) {
@@ -358,7 +358,7 @@ static LRESULT CALLBACK keyboard_hook_cb(int code, WPARAM wparam, LPARAM lparam)
  **/
 SpiceGrabSequence *spice_display_get_grab_keys(SpiceDisplay *display)
 {
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
     g_return_val_if_fail(d != NULL, NULL);
 
     return d->grabseq;
@@ -367,7 +367,7 @@ SpiceGrabSequence *spice_display_get_grab_keys(SpiceDisplay *display)
 static void try_keyboard_grab(SpiceDisplay *display)
 {
     GtkWidget *widget = GTK_WIDGET(display);
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
     time_t now;
     GdkGrabStatus status;
 
@@ -420,7 +420,7 @@ static void try_keyboard_grab(SpiceDisplay *display)
 
 static void try_keyboard_ungrab(SpiceDisplay *display)
 {
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
     GtkWidget *widget = GTK_WIDGET(display);
 
     if (!d->keyboard_grab_active)
@@ -438,7 +438,7 @@ static void try_keyboard_ungrab(SpiceDisplay *display)
 
 static GdkGrabStatus do_pointer_grab(SpiceDisplay *display)
 {
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
     GdkWindow *window = GDK_WINDOW(gtk_widget_get_window(GTK_WIDGET(display)));
     GdkGrabStatus status;
 
@@ -476,7 +476,7 @@ static GdkGrabStatus do_pointer_grab(SpiceDisplay *display)
 
 static void update_mouse_pointer(SpiceDisplay *display)
 {
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
     GdkWindow *window = GDK_WINDOW(gtk_widget_get_window(GTK_WIDGET(display)));
 
     if (!window)
@@ -503,7 +503,7 @@ static void update_mouse_pointer(SpiceDisplay *display)
 static void try_mouse_grab(GtkWidget *widget)
 {
     SpiceDisplay *display = SPICE_DISPLAY(widget);
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
 
     if (!d->mouse_grab_enable)
         return;
@@ -522,7 +522,7 @@ static void try_mouse_grab(GtkWidget *widget)
 static void mouse_check_edges(GtkWidget *widget, GdkEventMotion *motion)
 {
     SpiceDisplay *display = SPICE_DISPLAY(widget);
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
     GdkScreen *screen = gtk_widget_get_screen(widget);
     int x = (int)motion->x_root;
     int y = (int)motion->y_root;
@@ -555,7 +555,7 @@ static void mouse_check_edges(GtkWidget *widget, GdkEventMotion *motion)
 static void try_mouse_ungrab(GtkWidget *widget)
 {
     SpiceDisplay *display = SPICE_DISPLAY(widget);
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
 
     if (!d->mouse_grab_active)
         return;
@@ -569,7 +569,7 @@ static void try_mouse_ungrab(GtkWidget *widget)
 static void recalc_geometry(GtkWidget *widget, gboolean set_display)
 {
     SpiceDisplay *display = SPICE_DISPLAY(widget);
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
 
     d->mx = 0;
     d->my = 0;
@@ -608,7 +608,7 @@ static void recalc_geometry(GtkWidget *widget, gboolean set_display)
 static gboolean do_color_convert(SpiceDisplay *display,
                                  gint x, gint y, gint w, gint h)
 {
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
     int i, j, maxy, maxx, miny, minx;
     guint32 *dest = d->data;
     guint16 *src = d->data_origin;
@@ -655,7 +655,7 @@ static gboolean do_color_convert(SpiceDisplay *display,
 static gboolean draw_event(GtkWidget *widget, cairo_t *cr)
 {
     SpiceDisplay *display = SPICE_DISPLAY(widget);
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
 
     if (d->mark == 0 || d->data == NULL)
         return false;
@@ -672,7 +672,7 @@ static gboolean draw_event(GtkWidget *widget, cairo_t *cr)
 static gboolean expose_event(GtkWidget *widget, GdkEventExpose *expose)
 {
     SpiceDisplay *display = SPICE_DISPLAY(widget);
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
 
     if (d->mark == 0 || d->data == NULL)
         return false;
@@ -690,7 +690,7 @@ static gboolean expose_event(GtkWidget *widget, GdkEventExpose *expose)
 
 static void send_key(SpiceDisplay *display, int scancode, int down)
 {
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
     uint32_t i, b, m;
 
     if (!d->inputs)
@@ -715,7 +715,7 @@ static void send_key(SpiceDisplay *display, int scancode, int down)
 
 static void release_keys(SpiceDisplay *display)
 {
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
     uint32_t i, b;
 
     SPICE_DEBUG("%s", __FUNCTION__);
@@ -731,7 +731,7 @@ static void release_keys(SpiceDisplay *display)
 
 static gboolean check_for_grab_key(SpiceDisplay *display, int type, int keyval)
 {
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
     int i;
 
     if (!d->grabseq->nkeysyms)
@@ -759,7 +759,7 @@ static gboolean check_for_grab_key(SpiceDisplay *display, int type, int keyval)
 static gboolean key_event(GtkWidget *widget, GdkEventKey *key)
 {
     SpiceDisplay *display = SPICE_DISPLAY(widget);
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
     int scancode;
 
     SPICE_DEBUG("%s %s: keycode: %d  state: %d  group %d",
@@ -798,7 +798,7 @@ static gboolean key_event(GtkWidget *widget, GdkEventKey *key)
 
 static guint get_scancode_from_keyval(SpiceDisplay *display, guint keyval)
 {
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
     guint keycode = 0;
     GdkKeymapKey *keys = NULL;
     gint n_keys = 0;
@@ -837,7 +837,7 @@ void spice_display_send_keys(SpiceDisplay *display, const guint *keyvals,
 static gboolean enter_event(GtkWidget *widget, GdkEventCrossing *crossing G_GNUC_UNUSED)
 {
     SpiceDisplay *display = SPICE_DISPLAY(widget);
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
 
     SPICE_DEBUG("%s", __FUNCTION__);
     d->mouse_have_pointer = true;
@@ -848,7 +848,7 @@ static gboolean enter_event(GtkWidget *widget, GdkEventCrossing *crossing G_GNUC
 static gboolean leave_event(GtkWidget *widget, GdkEventCrossing *crossing G_GNUC_UNUSED)
 {
     SpiceDisplay *display = SPICE_DISPLAY(widget);
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
 
     SPICE_DEBUG("%s", __FUNCTION__);
     d->mouse_have_pointer = false;
@@ -859,7 +859,7 @@ static gboolean leave_event(GtkWidget *widget, GdkEventCrossing *crossing G_GNUC
 static gboolean focus_in_event(GtkWidget *widget, GdkEventFocus *focus G_GNUC_UNUSED)
 {
     SpiceDisplay *display = SPICE_DISPLAY(widget);
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
 
     SPICE_DEBUG("%s", __FUNCTION__);
     release_keys(display);
@@ -876,7 +876,7 @@ static gboolean focus_in_event(GtkWidget *widget, GdkEventFocus *focus G_GNUC_UN
 static gboolean focus_out_event(GtkWidget *widget, GdkEventFocus *focus G_GNUC_UNUSED)
 {
     SpiceDisplay *display = SPICE_DISPLAY(widget);
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
 
     SPICE_DEBUG("%s", __FUNCTION__);
     d->keyboard_have_focus = false;
@@ -915,7 +915,7 @@ static int button_mask_gdk_to_spice(int gdk)
 static gboolean motion_event(GtkWidget *widget, GdkEventMotion *motion)
 {
     SpiceDisplay *display = SPICE_DISPLAY(widget);
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
     int ww, wh;
 
     if (!d->inputs)
@@ -974,7 +974,7 @@ static gboolean scroll_event(GtkWidget *widget, GdkEventScroll *scroll)
 {
     int button;
     SpiceDisplay *display = SPICE_DISPLAY(widget);
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
 
     SPICE_DEBUG("%s", __FUNCTION__);
 
@@ -1000,7 +1000,7 @@ static gboolean scroll_event(GtkWidget *widget, GdkEventScroll *scroll)
 static gboolean button_event(GtkWidget *widget, GdkEventButton *button)
 {
     SpiceDisplay *display = SPICE_DISPLAY(widget);
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
 
     SPICE_DEBUG("%s %s: button %d, state 0x%x", __FUNCTION__,
             button->type == GDK_BUTTON_PRESS ? "press" : "release",
@@ -1049,7 +1049,7 @@ static gboolean button_event(GtkWidget *widget, GdkEventButton *button)
 static gboolean configure_event(GtkWidget *widget, GdkEventConfigure *conf)
 {
     SpiceDisplay *display = SPICE_DISPLAY(widget);
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
 
     if (conf->width != d->ww  || conf->height != d->wh) {
         d->ww = conf->width;
@@ -1061,7 +1061,7 @@ static gboolean configure_event(GtkWidget *widget, GdkEventConfigure *conf)
 
 /* ---------------------------------------------------------------- */
 
-static GtkClipboard* get_clipboard_from_selection(spice_display *d, guint selection)
+static GtkClipboard* get_clipboard_from_selection(SpiceDisplayPrivate *d, guint selection)
 {
     if (selection == VD_AGENT_CLIPBOARD_SELECTION_CLIPBOARD) {
         return d->clipboard;
@@ -1073,7 +1073,7 @@ static GtkClipboard* get_clipboard_from_selection(spice_display *d, guint select
     }
 }
 
-static gint get_selection_from_clipboard(spice_display *d, GtkClipboard* cb)
+static gint get_selection_from_clipboard(SpiceDisplayPrivate *d, GtkClipboard* cb)
 {
     if (cb == d->clipboard) {
         return VD_AGENT_CLIPBOARD_SELECTION_CLIPBOARD;
@@ -1135,7 +1135,7 @@ static void clipboard_get_targets(GtkClipboard *clipboard,
                                   gpointer data)
 {
     SpiceDisplay *display = data;
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
     guint32 types[SPICE_N_ELEMENTS(atom2agent)];
     char *name;
     int a, m, t;
@@ -1195,7 +1195,7 @@ static void clipboard_owner_change(GtkClipboard        *clipboard,
                                    gpointer            data)
 {
     SpiceDisplay *display = data;
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
     int selection;
 
     selection = get_selection_from_clipboard(d, clipboard);
@@ -1358,7 +1358,7 @@ static void spice_display_class_init(SpiceDisplayClass *klass)
                      G_TYPE_NONE,
                      0);
 
-    g_type_class_add_private(klass, sizeof(spice_display));
+    g_type_class_add_private(klass, sizeof(SpiceDisplayPrivate));
 }
 
 /* ---------------------------------------------------------------- */
@@ -1366,7 +1366,7 @@ static void spice_display_class_init(SpiceDisplayClass *klass)
 static void mouse_update(SpiceChannel *channel, gpointer data)
 {
     SpiceDisplay *display = data;
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
 
     g_object_get(channel, "mouse-mode", &d->mouse_mode, NULL);
     SPICE_DEBUG("mouse mode %d", d->mouse_mode);
@@ -1384,7 +1384,7 @@ static void primary_create(SpiceChannel *channel, gint format,
                            gint shmid, gpointer imgdata, gpointer data)
 {
     SpiceDisplay *display = data;
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
     gboolean set_display = FALSE;
 
     d->format = format;
@@ -1407,7 +1407,7 @@ static void primary_create(SpiceChannel *channel, gint format,
 static void primary_destroy(SpiceChannel *channel, gpointer data)
 {
     SpiceDisplay *display = SPICE_DISPLAY(data);
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
 
     spicex_image_destroy(display);
     d->format = 0;
@@ -1438,7 +1438,7 @@ static void invalidate(SpiceChannel *channel,
 static void mark(SpiceChannel *channel, gint mark, gpointer data)
 {
     SpiceDisplay *display = data;
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
 
     SPICE_DEBUG("widget mark: %d, channel %d", mark, d->channel_id);
     d->mark = mark;
@@ -1453,7 +1453,7 @@ static void cursor_set(SpiceCursorChannel *channel,
                        gpointer rgba, gpointer data)
 {
     SpiceDisplay *display = data;
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
 
     if (d->mouse_cursor) {
         gdk_cursor_unref(d->mouse_cursor);
@@ -1488,7 +1488,7 @@ static void cursor_set(SpiceCursorChannel *channel,
 static void cursor_hide(SpiceCursorChannel *channel, gpointer data)
 {
     SpiceDisplay *display = data;
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
 
     if (d->show_cursor != NULL) /* then we are already hidden */
         return;
@@ -1501,7 +1501,7 @@ static void cursor_hide(SpiceCursorChannel *channel, gpointer data)
 static void cursor_move(SpiceCursorChannel *channel, gint x, gint y, gpointer data)
 {
     SpiceDisplay *display = data;
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
     GdkScreen *screen = gtk_widget_get_screen(GTK_WIDGET(display));
     int wx, wy;
 
@@ -1554,7 +1554,7 @@ static void cursor_reset(SpiceCursorChannel *channel, gpointer data)
 
 static void disconnect_main(SpiceDisplay *display)
 {
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
     gint i;
 
     if (d->main == NULL)
@@ -1571,7 +1571,7 @@ static void disconnect_main(SpiceDisplay *display)
 
 static void disconnect_display(SpiceDisplay *display)
 {
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
 
     if (d->display == NULL)
         return;
@@ -1586,7 +1586,7 @@ static void disconnect_display(SpiceDisplay *display)
 
 static void disconnect_cursor(SpiceDisplay *display)
 {
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
 
     if (d->cursor == NULL)
         return;
@@ -1645,7 +1645,7 @@ static void clipboard_get(GtkClipboard *clipboard, GtkSelectionData *selection_d
                           guint info, gpointer display)
 {
     RunInfo ri = { NULL, };
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
     gulong clipboard_handler;
 
     SPICE_DEBUG("clipboard get");
@@ -1688,7 +1688,7 @@ static gboolean clipboard_grab(SpiceMainChannel *main, guint selection,
                                guint32* types, guint32 ntypes, gpointer display)
 {
     int m, n, i;
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
     GtkTargetEntry targets[SPICE_N_ELEMENTS(atom2agent)];
     gboolean target_selected[SPICE_N_ELEMENTS(atom2agent)] = { FALSE, };
     gboolean found;
@@ -1742,7 +1742,7 @@ static void clipboard_received_cb(GtkClipboard *clipboard,
                                   GtkSelectionData *selection_data,
                                   gpointer display)
 {
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
     gint len = 0, m;
     guint32 type = VD_AGENT_CLIPBOARD_NONE;
     gchar* name;
@@ -1781,7 +1781,7 @@ static void clipboard_received_cb(GtkClipboard *clipboard,
 static gboolean clipboard_request(SpiceMainChannel *main, guint selection,
                                   guint type, gpointer display)
 {
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
     int m;
     GdkAtom atom;
 
@@ -1801,7 +1801,7 @@ static gboolean clipboard_request(SpiceMainChannel *main, guint selection,
 
 static void clipboard_release(SpiceMainChannel *main, guint selection, gpointer data)
 {
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(data);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(data);
     GtkClipboard* clipboard = get_clipboard_from_selection(d, selection);
     if (!clipboard)
         return;
@@ -1817,7 +1817,7 @@ static void clipboard_release(SpiceMainChannel *main, guint selection, gpointer
 static void channel_new(SpiceSession *s, SpiceChannel *channel, gpointer data)
 {
     SpiceDisplay *display = data;
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
     int id;
 
     g_object_get(channel, "channel-id", &id, NULL);
@@ -1890,7 +1890,7 @@ static void channel_new(SpiceSession *s, SpiceChannel *channel, gpointer data)
 static void channel_destroy(SpiceSession *s, SpiceChannel *channel, gpointer data)
 {
     SpiceDisplay *display = data;
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
     int id;
 
     g_object_get(channel, "channel-id", &id, NULL);
@@ -1940,7 +1940,7 @@ static void channel_destroy(SpiceSession *s, SpiceChannel *channel, gpointer dat
 SpiceDisplay *spice_display_new(SpiceSession *session, int id)
 {
     SpiceDisplay *display;
-    spice_display *d;
+    SpiceDisplayPrivate *d;
     GList *list;
     GList *it;
 
@@ -1981,7 +1981,7 @@ void spice_display_mouse_ungrab(SpiceDisplay *display)
  **/
 void spice_display_copy_to_guest(SpiceDisplay *display)
 {
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
     int selection = VD_AGENT_CLIPBOARD_SELECTION_CLIPBOARD;
 
     if (d->clip_hasdata[selection] && !d->clip_grabbed[selection]) {
@@ -1991,7 +1991,7 @@ void spice_display_copy_to_guest(SpiceDisplay *display)
 
 void spice_display_paste_from_guest(SpiceDisplay *display)
 {
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
     int selection = VD_AGENT_CLIPBOARD_SELECTION_CLIPBOARD;
 
     if (d->nclip_targets[selection] == 0) {
@@ -2016,11 +2016,11 @@ void spice_display_paste_from_guest(SpiceDisplay *display)
  *
  * Take a screenshot of the display.
  *
- * Returns: a #GdkPixbuf with the screenshot image buffer
+ * Returns: (transfer full): a #GdkPixbuf with the screenshot image buffer
  **/
 GdkPixbuf *spice_display_get_pixbuf(SpiceDisplay *display)
 {
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
     GdkPixbuf *pixbuf;
     int x, y;
     guchar *src, *data, *dest;
@@ -2070,7 +2070,7 @@ static guint32 get_keyboard_lock_modifiers(Display *x_display)
 static void sync_keyboard_lock_modifiers(SpiceDisplay *display)
 {
     Display *x_display;
-    spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
     guint32 modifiers;
     GdkWindow *w;
 
diff --git a/gtk/spice-widget.h b/gtk/spice-widget.h
index cf48f43..ccfbc9a 100644
--- a/gtk/spice-widget.h
+++ b/gtk/spice-widget.h
@@ -37,11 +37,11 @@ G_BEGIN_DECLS
 
 typedef struct _SpiceDisplay SpiceDisplay;
 typedef struct _SpiceDisplayClass SpiceDisplayClass;
-typedef struct spice_display spice_display;
+typedef struct _SpiceDisplayPrivate SpiceDisplayPrivate;
 
 struct _SpiceDisplay {
     GtkDrawingArea parent;
-    spice_display *priv;
+    SpiceDisplayPrivate *priv;
     /* Do not add fields to this struct */
 };
 


More information about the Spice-commits mailing list