summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2020-10-12 16:40:19 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2020-10-12 16:40:19 +0100
commitda6c0f3ecbfda6223001212fc27cff2e617135f6 (patch)
tree3871a7b819e8eedc96d66e2c03f3da67201d1cc8
parent77d4729483e2ecbe373aa2697cb9b409caf418b9 (diff)
downloadgtk+-da6c0f3ecbfda6223001212fc27cff2e617135f6.tar.gz
Move private GdkSurface Wayland API into its own header
This allows us to hide private API from installed headers, documentation, and introspection.
-rw-r--r--gdk/wayland/gdksurface-wayland.c10
-rw-r--r--gdk/wayland/gdksurface-wayland.h40
-rw-r--r--gdk/wayland/gdkwaylandsurface.h14
-rw-r--r--gtk/gtkapplication-wayland.c1
-rw-r--r--gtk/gtkwindow.c1
5 files changed, 46 insertions, 20 deletions
diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c
index 0d8fe2fe74..bb78d49730 100644
--- a/gdk/wayland/gdksurface-wayland.c
+++ b/gdk/wayland/gdksurface-wayland.c
@@ -17,12 +17,7 @@
#include "config.h"
-#include <netinet/in.h>
-#include <unistd.h>
-
-#include "gdk.h"
-#include "gdkwayland.h"
-#include "gdkwaylandsurface.h"
+#include "gdksurface-wayland.h"
#include "gdkdeviceprivate.h"
#include "gdkdisplay-wayland.h"
@@ -45,6 +40,9 @@
#include <string.h>
#include <errno.h>
+#include <netinet/in.h>
+#include <unistd.h>
+
#define SURFACE_IS_TOPLEVEL(surface) TRUE
#define MAX_WL_BUFFER_SIZE (4083) /* 4096 minus header, string argument length and NUL byte */
diff --git a/gdk/wayland/gdksurface-wayland.h b/gdk/wayland/gdksurface-wayland.h
new file mode 100644
index 0000000000..1ca3877a46
--- /dev/null
+++ b/gdk/wayland/gdksurface-wayland.h
@@ -0,0 +1,40 @@
+/* gdksurface-wayland.h: Private header for GdkWaylandSurface
+ *
+ * Copyright 2020 GNOME Foundation
+ *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
+ *
+ * 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/>.
+ */
+
+#pragma once
+
+#include "gdkwaylandsurface.h"
+
+G_BEGIN_DECLS
+
+void gdk_wayland_toplevel_set_dbus_properties_libgtk_only (GdkToplevel *toplevel,
+ const char *application_id,
+ const char *app_menu_path,
+ const char *menubar_path,
+ const char *window_object_path,
+ const char *application_object_path,
+ const char *unique_bus_name);
+
+void gdk_wayland_toplevel_announce_csd (GdkToplevel *toplevel);
+
+gboolean gdk_wayland_toplevel_inhibit_idle (GdkToplevel *toplevel);
+void gdk_wayland_toplevel_uninhibit_idle (GdkToplevel *toplevel);
+
+G_END_DECLS
diff --git a/gdk/wayland/gdkwaylandsurface.h b/gdk/wayland/gdkwaylandsurface.h
index 7fd45c519d..851a4d5607 100644
--- a/gdk/wayland/gdkwaylandsurface.h
+++ b/gdk/wayland/gdkwaylandsurface.h
@@ -62,15 +62,6 @@ GType gdk_wayland_popup_get_type (void);
GDK_AVAILABLE_IN_ALL
struct wl_surface *gdk_wayland_surface_get_wl_surface (GdkSurface *surface);
-GDK_AVAILABLE_IN_ALL
-void gdk_wayland_toplevel_set_dbus_properties_libgtk_only (GdkToplevel *toplevel,
- const char *application_id,
- const char *app_menu_path,
- const char *menubar_path,
- const char *window_object_path,
- const char *application_object_path,
- const char *unique_bus_name);
-
typedef void (*GdkWaylandToplevelExported) (GdkToplevel *toplevel,
const char *handle,
gpointer user_data);
@@ -92,11 +83,6 @@ GDK_AVAILABLE_IN_ALL
void gdk_wayland_toplevel_set_application_id (GdkToplevel *toplevel,
const char *application_id);
-void gdk_wayland_toplevel_announce_csd (GdkToplevel *toplevel);
-
-gboolean gdk_wayland_toplevel_inhibit_idle (GdkToplevel *toplevel);
-void gdk_wayland_toplevel_uninhibit_idle (GdkToplevel *toplevel);
-
G_END_DECLS
#endif /* __GDK_WAYLAND_SURFACE_H__ */
diff --git a/gtk/gtkapplication-wayland.c b/gtk/gtkapplication-wayland.c
index 5b175a8ba2..a892f4be4b 100644
--- a/gtk/gtkapplication-wayland.c
+++ b/gtk/gtkapplication-wayland.c
@@ -26,6 +26,7 @@
#include <gdk/wayland/gdkwayland.h>
#include <gdk/wayland/gdkdisplay-wayland.h>
+#include <gdk/wayland/gdksurface-wayland.h>
#include <gdk/wayland/idle-inhibit-unstable-v1-client-protocol.h>
typedef struct
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index a6f7f37912..1edcd5760b 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -88,6 +88,7 @@
#ifdef GDK_WINDOWING_WAYLAND
#include "wayland/gdkwayland.h"
+#include "wayland/gdksurface-wayland.h"
#endif
#ifdef GDK_WINDOWING_BROADWAY