1/* GDK - The GIMP Drawing Kit
2 * Copyright (C) 2013 Jan Arne Petersen
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef __GDK_WAYLAND_SURFACE_H__
19#define __GDK_WAYLAND_SURFACE_H__
20
21#if !defined (__GDKWAYLAND_H_INSIDE__) && !defined (GTK_COMPILATION)
22#error "Only <gdk/wayland/gdkwayland.h> can be included directly."
23#endif
24
25#include <gdk/gdk.h>
26
27#include <wayland-client.h>
28
29G_BEGIN_DECLS
30
31#ifdef GTK_COMPILATION
32typedef struct _GdkWaylandSurface GdkWaylandSurface;
33typedef struct _GdkWaylandToplevel GdkWaylandToplevel;
34typedef struct _GdkWaylandPopup GdkWaylandPopup;
35#else
36typedef GdkSurface GdkWaylandSurface;
37typedef GdkToplevel GdkWaylandToplevel;
38typedef GdkPopup GdkWaylandPopup;
39#endif
40
41#define GDK_TYPE_WAYLAND_SURFACE (gdk_wayland_surface_get_type())
42#define GDK_WAYLAND_SURFACE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_WAYLAND_SURFACE, GdkWaylandSurface))
43#define GDK_IS_WAYLAND_SURFACE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WAYLAND_SURFACE))
44
45#define GDK_TYPE_WAYLAND_TOPLEVEL (gdk_wayland_toplevel_get_type())
46#define GDK_WAYLAND_TOPLEVEL(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_WAYLAND_TOPLEVEL, GdkWaylandToplevel))
47#define GDK_IS_WAYLAND_TOPLEVEL(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WAYLAND_TOPLEVEL))
48
49#define GDK_TYPE_WAYLAND_POPUP (gdk_wayland_popup_get_type())
50#define GDK_WAYLAND_POPUP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_WAYLAND_POPUP, GdkWaylandPopup))
51#define GDK_IS_WAYLAND_POPUP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WAYLAND_POPUP))
52
53GDK_AVAILABLE_IN_ALL
54GType gdk_wayland_surface_get_type (void);
55
56GDK_AVAILABLE_IN_ALL
57GType gdk_wayland_toplevel_get_type (void);
58
59GDK_AVAILABLE_IN_ALL
60GType gdk_wayland_popup_get_type (void);
61
62GDK_AVAILABLE_IN_ALL
63struct wl_surface *gdk_wayland_surface_get_wl_surface (GdkSurface *surface);
64
65typedef void (*GdkWaylandToplevelExported) (GdkToplevel *toplevel,
66 const char *handle,
67 gpointer user_data);
68
69GDK_AVAILABLE_IN_ALL
70gboolean gdk_wayland_toplevel_export_handle (GdkToplevel *toplevel,
71 GdkWaylandToplevelExported callback,
72 gpointer user_data,
73 GDestroyNotify destroy_func);
74
75GDK_AVAILABLE_IN_ALL
76void gdk_wayland_toplevel_unexport_handle (GdkToplevel *toplevel);
77
78GDK_AVAILABLE_IN_ALL
79gboolean gdk_wayland_toplevel_set_transient_for_exported (GdkToplevel *toplevel,
80 const char *parent_handle_str);
81
82GDK_AVAILABLE_IN_ALL
83void gdk_wayland_toplevel_set_application_id (GdkToplevel *toplevel,
84 const char *application_id);
85
86G_END_DECLS
87
88#endif /* __GDK_WAYLAND_SURFACE_H__ */
89

source code of gtk/gdk/wayland/gdkwaylandsurface.h