summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2015-12-16 16:47:00 +0100
committerMarc-André Lureau <marcandre.lureau@gmail.com>2016-03-14 12:02:50 +0100
commit693cef4eaa3d761c7d719dcbeae0df572fb26966 (patch)
tree08a430ef298e819d6599bef3fa1ec8c7e6d80689
parentbc3d12efb20423d5b1ebd490658f687c4bd323fd (diff)
downloadspice-gtk-693cef4eaa3d761c7d719dcbeae0df572fb26966.tar.gz
spice-gtk-693cef4eaa3d761c7d719dcbeae0df572fb26966.tar.xz
spice-gtk-693cef4eaa3d761c7d719dcbeae0df572fb26966.zip
gtk: make SpiceGrabSequence private
Do not leak internals of SpiceGrabSequence in public headers. This makes also the class final, which let us extend more easily without fear of breaking ABI. Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com> Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
-rw-r--r--src/Makefile.am1
-rw-r--r--src/spice-grabsequence-priv.h28
-rw-r--r--src/spice-grabsequence.c1
-rw-r--r--src/spice-grabsequence.h13
-rw-r--r--src/spice-widget.c1
5 files changed, 31 insertions, 13 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index e35c046..d6935cf 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -140,6 +140,7 @@ SPICE_GTK_SOURCES_COMMON = \
vncdisplaykeymap.h \
spice-grabsequence.c \
spice-grabsequence.h \
+ spice-grabsequence-priv.h \
desktop-integration.c \
desktop-integration.h \
usb-device-widget.c \
diff --git a/src/spice-grabsequence-priv.h b/src/spice-grabsequence-priv.h
new file mode 100644
index 0000000..5475730
--- /dev/null
+++ b/src/spice-grabsequence-priv.h
@@ -0,0 +1,28 @@
+/* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
+/*
+ Copyright (C) 2016 Red Hat, Inc.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, see <http://www.gnu.org/licenses/>.
+*/
+#ifndef __SPICE_GRABSEQUENCE_PRIV_H__
+#define __SPICE_GRABSEQUENCE_PRIV_H__
+
+#include <glib.h>
+
+struct _SpiceGrabSequence {
+ guint nkeysyms;
+ guint *keysyms;
+};
+
+#endif
diff --git a/src/spice-grabsequence.c b/src/spice-grabsequence.c
index a51d9e6..50e774d 100644
--- a/src/spice-grabsequence.c
+++ b/src/spice-grabsequence.c
@@ -24,6 +24,7 @@
#include <gdk/gdk.h>
#include "spice-grabsequence.h"
+#include "spice-grabsequence-priv.h"
GType spice_grab_sequence_get_type(void)
{
diff --git a/src/spice-grabsequence.h b/src/spice-grabsequence.h
index 28979ec..6e68e29 100644
--- a/src/spice-grabsequence.h
+++ b/src/spice-grabsequence.h
@@ -35,19 +35,6 @@ G_BEGIN_DECLS
typedef struct _SpiceGrabSequence SpiceGrabSequence;
-/**
- * SpiceGrabSequence:
- *
- * The #SpiceGrabSequence struct is opaque and should not be accessed directly.
- */
-struct _SpiceGrabSequence {
- /*< private >*/
- guint nkeysyms;
- guint *keysyms;
-
- /* Do not add fields to this struct */
-};
-
GType spice_grab_sequence_get_type(void);
SpiceGrabSequence *spice_grab_sequence_new(guint nkeysyms, guint *keysyms);
diff --git a/src/spice-widget.c b/src/spice-widget.c
index c3577a1..ef166cb 100644
--- a/src/spice-widget.c
+++ b/src/spice-widget.c
@@ -40,6 +40,7 @@
#include "spice-widget-priv.h"
#include "spice-gtk-session-priv.h"
#include "vncdisplaykeymap.h"
+#include "spice-grabsequence-priv.h"
#include "glib-compat.h"
#include "gtk-compat.h"