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 | |
29 | G_BEGIN_DECLS |
30 | |
31 | #ifdef GTK_COMPILATION |
32 | typedef struct _GdkWaylandSurface GdkWaylandSurface; |
33 | typedef struct _GdkWaylandToplevel GdkWaylandToplevel; |
34 | typedef struct _GdkWaylandPopup GdkWaylandPopup; |
35 | #else |
36 | typedef GdkSurface GdkWaylandSurface; |
37 | typedef GdkToplevel GdkWaylandToplevel; |
38 | typedef 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 | |
53 | GDK_AVAILABLE_IN_ALL |
54 | GType gdk_wayland_surface_get_type (void); |
55 | |
56 | GDK_AVAILABLE_IN_ALL |
57 | GType gdk_wayland_toplevel_get_type (void); |
58 | |
59 | GDK_AVAILABLE_IN_ALL |
60 | GType gdk_wayland_popup_get_type (void); |
61 | |
62 | GDK_AVAILABLE_IN_ALL |
63 | struct wl_surface *gdk_wayland_surface_get_wl_surface (GdkSurface *surface); |
64 | |
65 | typedef void (*GdkWaylandToplevelExported) (GdkToplevel *toplevel, |
66 | const char *handle, |
67 | gpointer user_data); |
68 | |
69 | GDK_AVAILABLE_IN_ALL |
70 | gboolean gdk_wayland_toplevel_export_handle (GdkToplevel *toplevel, |
71 | GdkWaylandToplevelExported callback, |
72 | gpointer user_data, |
73 | GDestroyNotify destroy_func); |
74 | |
75 | GDK_AVAILABLE_IN_ALL |
76 | void gdk_wayland_toplevel_unexport_handle (GdkToplevel *toplevel); |
77 | |
78 | GDK_AVAILABLE_IN_ALL |
79 | gboolean gdk_wayland_toplevel_set_transient_for_exported (GdkToplevel *toplevel, |
80 | const char *parent_handle_str); |
81 | |
82 | GDK_AVAILABLE_IN_ALL |
83 | void gdk_wayland_toplevel_set_application_id (GdkToplevel *toplevel, |
84 | const char *application_id); |
85 | |
86 | G_END_DECLS |
87 | |
88 | #endif /* __GDK_WAYLAND_SURFACE_H__ */ |
89 | |