summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-06-24 16:25:37 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-06-25 13:15:14 +0200
commitd4efb4ed4ee54bd4cd132d3f70526e9af5041f27 (patch)
treeb1f7aa820ae22478ddcea43530341d69544506c9
parent9430eef53b89bce2e43258d5c4533d655fa80453 (diff)
gtk4: split out clipboard_content header
Change-Id: I1b820c1cef2cc76a5fc748574c36ebdd4b28eef1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117797 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/unx/gtk3/gtkinst.cxx5
-rw-r--r--vcl/unx/gtk4/contentprovider.hxx20
-rw-r--r--vcl/unx/gtk4/gtkinst.cxx1
3 files changed, 21 insertions, 5 deletions
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 31c9528af0be..88e099fe93ec 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -1429,9 +1429,6 @@ G_BEGIN_DECLS
#define CLIPBOARD_CONTENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), clipboard_content_get_type(), ClipboardContent))
-typedef struct _ClipboardContent ClipboardContent;
-typedef struct _ClipboardContentClass ClipboardContentClass;
-
struct _ClipboardContent
{
GdkContentProvider parent;
@@ -1443,8 +1440,6 @@ struct _ClipboardContentClass
GdkContentProviderClass parent_class;
};
-GType clipboard_content_get_type();
-
G_DEFINE_TYPE(ClipboardContent, clipboard_content, GDK_TYPE_CONTENT_PROVIDER)
static void clipboard_content_write_mime_type_async(GdkContentProvider* provider,
diff --git a/vcl/unx/gtk4/contentprovider.hxx b/vcl/unx/gtk4/contentprovider.hxx
new file mode 100644
index 000000000000..ffb7b99f0ffb
--- /dev/null
+++ b/vcl/unx/gtk4/contentprovider.hxx
@@ -0,0 +1,20 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+G_DECLARE_FINAL_TYPE(ClipboardContent, clipboard_content, CLIPBOARD, CONTENT, GdkContentProvider)
+
+G_END_DECLS
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/gtk4/gtkinst.cxx b/vcl/unx/gtk4/gtkinst.cxx
index 2bc0bc1c5e0a..c1f3e310b8e3 100644
--- a/vcl/unx/gtk4/gtkinst.cxx
+++ b/vcl/unx/gtk4/gtkinst.cxx
@@ -10,6 +10,7 @@
// make gtk4 plug advertise correctly as gtk4
#define GTK_TOOLKIT_NAME "gtk4"
+#include "contentprovider.hxx"
#include "convert3to4.hxx"
#include "notifyinglayout.hxx"
#include "surfacepaintable.hxx"