3 * Copyright (C) 2016 Matthew Waters <matthew@centricular.com>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
21 #ifndef __GST_VK_DISPLAY_WAYLAND_H__
22 #define __GST_VK_DISPLAY_WAYLAND_H__
26 #include <wayland-client.h>
28 #include <gst/vulkan/vulkan.h>
29 #include <vulkan/vulkan_wayland.h>
33 #define GST_TYPE_VULKAN_DISPLAY_WAYLAND (gst_vulkan_display_wayland_get_type())
35 GType gst_vulkan_display_wayland_get_type (void);
37 #define GST_VULKAN_DISPLAY_WAYLAND(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VULKAN_DISPLAY_WAYLAND,GstVulkanDisplayWayland))
38 #define GST_VULKAN_DISPLAY_WAYLAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_VULKAN_DISPLAY_WAYLAND,GstVulkanDisplayWaylandClass))
39 #define GST_IS_VULKAN_DISPLAY_WAYLAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VULKAN_DISPLAY_WAYLAND))
40 #define GST_IS_VULKAN_DISPLAY_WAYLAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_VULKAN_DISPLAY_WAYLAND))
42 * GST_VULKAN_DISPLAY_WAYLAND_CAST:
46 #define GST_VULKAN_DISPLAY_WAYLAND_CAST(obj) ((GstVulkanDisplayWayland*)(obj))
48 typedef struct _GstVulkanDisplayWayland GstVulkanDisplayWayland;
49 typedef struct _GstVulkanDisplayWaylandClass GstVulkanDisplayWaylandClass;
52 * GstVulkanDisplayWayland:
54 * the contents of a #GstVulkanDisplayWayland are private and should only be accessed
55 * through the provided API
59 struct _GstVulkanDisplayWayland
61 GstVulkanDisplay parent;
63 struct wl_display *display;
64 struct wl_registry *registry;
65 struct wl_compositor *compositor;
66 struct wl_subcompositor *subcompositor;
67 struct wl_shell *shell;
70 gboolean foreign_display;
74 * GstVulkanDisplayWaylandClass:s
78 struct _GstVulkanDisplayWaylandClass
80 GstVulkanDisplayClass object_class;
84 * GST_VULKAN_DISPLAY_WAYLAND_DISPLAY
88 #define GST_VULKAN_DISPLAY_WAYLAND_DISPLAY(display_) (GST_VULKAN_DISPLAY_WAYLAND (display_)->display)
91 GstVulkanDisplayWayland *gst_vulkan_display_wayland_new (const gchar * name);
93 GstVulkanDisplayWayland *gst_vulkan_display_wayland_new_with_display (struct wl_display *display);
97 #endif /* __GST_VULKAN_DISPLAY_WAYLAND_H__ */