[gtk/present-toplevel: 33/54] surface: Implement more toplevel interface
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/present-toplevel: 33/54] surface: Implement more toplevel interface
- Date: Sun, 1 Mar 2020 19:36:28 +0000 (UTC)
commit 8aba6f43e3aa3c532790b36f4ad644ccf79c6938
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Mar 1 12:13:13 2020 -0500
surface: Implement more toplevel interface
gdk/gdksurface.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
---
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c
index 98d520e028..5ef58dbfdb 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -2053,11 +2053,59 @@ gdk_toplevel_surface_get_state (GdkToplevel *toplevel)
return surface->state;
}
+static void
+gdk_toplevel_surface_set_title (GdkToplevel *toplevel,
+ const char *title)
+{
+ GdkSurface *surface = GDK_SURFACE (toplevel);
+
+ g_return_if_fail (surface->surface_type == GDK_SURFACE_TOPLEVEL);
+
+ GDK_SURFACE_GET_CLASS (surface)->set_title (surface, title);
+}
+
+static void
+gdk_toplevel_surface_set_startup_id (GdkToplevel *toplevel,
+ const char *startup_id)
+{
+ GdkSurface *surface = GDK_SURFACE (toplevel);
+
+ g_return_if_fail (surface->surface_type == GDK_SURFACE_TOPLEVEL);
+
+ GDK_SURFACE_GET_CLASS (surface)->set_startup_id (surface, startup_id);
+}
+
+static void
+gdk_toplevel_surface_set_transient_for (GdkToplevel *toplevel,
+ GdkSurface *parent)
+{
+ GdkSurface *surface = GDK_SURFACE (toplevel);
+
+ g_return_if_fail (surface->surface_type == GDK_SURFACE_TOPLEVEL);
+
+ GDK_SURFACE_GET_CLASS (surface)->set_transient_for (surface, parent);
+}
+
+static void
+gdk_toplevel_surface_set_icon_list (GdkToplevel *toplevel,
+ GList *surfaces)
+{
+ GdkSurface *surface = GDK_SURFACE (toplevel);
+
+ g_return_if_fail (surface->surface_type == GDK_SURFACE_TOPLEVEL);
+
+ GDK_SURFACE_GET_CLASS (surface)->set_icon_list (surface, surfaces);
+}
+
static void
gdk_surface_toplevel_init (GdkToplevelInterface *iface)
{
iface->present = gdk_toplevel_surface_present;
iface->get_state = gdk_toplevel_surface_get_state;
+ iface->set_title = gdk_toplevel_surface_set_title;
+ iface->set_startup_id = gdk_toplevel_surface_set_startup_id;
+ iface->set_transient_for = gdk_toplevel_surface_set_transient_for;
+ iface->set_icon_list = gdk_toplevel_surface_set_icon_list;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]