1 /* 2 * GStreamer 3 * Copyright (C) 2016 Matthew Waters <matthew@centricular.com> 4 * 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. 9 * 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. 14 * 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. 19 */ 20 21 #ifndef __GST_VK_WINDOW_WAYLAND_H__ 22 #define __GST_VK_WINDOW_WAYLAND_H__ 23 24 #include <wayland-client.h> 25 #include <wayland-cursor.h> 26 27 #include <gst/vulkan/vulkan.h> 28 29 #include <vulkan/vulkan_wayland.h> 30 31 G_BEGIN_DECLS 32 33 #define GST_TYPE_VULKAN_WINDOW_WAYLAND (gst_vulkan_window_wayland_get_type()) 34 GType gst_vulkan_window_wayland_get_type (void); 35 36 #define GST_VULKAN_WINDOW_WAYLAND(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_VULKAN_WINDOW_WAYLAND, GstVulkanWindowWayland)) 37 #define GST_VULKAN_WINDOW_WAYLAND_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_TYPE_VULKAN_WINDOW_WAYLAND, GstVulkanWindowWaylandClass)) 38 #define GST_IS_VULKAN_WINDOW_WAYLAND(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_VULKAN_WINDOW_WAYLAND)) 39 #define GST_IS_VULKAN_WINDOW_WAYLAND_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_VULKAN_WINDOW_WAYLAND)) 40 #define GST_VULKAN_WINDOW_WAYLAND_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_VULKAN_WINDOW_WAYLAND, GstVulkanWindowWaylandClass)) 41 42 typedef struct _GstVulkanWindowWayland GstVulkanWindowWayland; 43 typedef struct _GstVulkanWindowWaylandClass GstVulkanWindowWaylandClass; 44 45 struct _GstVulkanWindowWayland { 46 /*< private >*/ 47 GstVulkanWindow parent; 48 49 PFN_vkCreateWaylandSurfaceKHR CreateWaylandSurface; 50 PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR GetPhysicalDeviceWaylandPresentationSupport; 51 52 struct wl_event_queue *queue; 53 struct wl_surface *surface; 54 struct wl_shell_surface *shell_surface; 55 struct wl_callback *callback; 56 57 int window_width, window_height; 58 59 GSource *wl_source; 60 61 gpointer _reserved[GST_PADDING]; 62 }; 63 64 struct _GstVulkanWindowWaylandClass { 65 /*< private >*/ 66 GstVulkanWindowClass parent_class; 67 68 /*< private >*/ 69 gpointer _reserved[GST_PADDING]; 70 }; 71 72 GstVulkanWindowWayland * gst_vulkan_window_wayland_new (GstVulkanDisplay * display); 73 74 G_END_DECLS 75 76 #endif /* __GST_GL_WINDOW_X11_H__ */ 77