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 <vk.h> 28 29 G_BEGIN_DECLS 30 31 #define GST_TYPE_VULKAN_WINDOW_WAYLAND (gst_vulkan_window_wayland_get_type()) 32 #define GST_VULKAN_WINDOW_WAYLAND(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_VULKAN_WINDOW_WAYLAND, GstVulkanWindowWayland)) 33 #define GST_VULKAN_WINDOW_WAYLAND_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_TYPE_VULKAN_WINDOW_WAYLAND, GstVulkanWindowWaylandClass)) 34 #define GST_IS_VULKAN_WINDOW_WAYLAND(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_VULKAN_WINDOW_WAYLAND)) 35 #define GST_IS_VULKAN_WINDOW_WAYLAND_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_VULKAN_WINDOW_WAYLAND)) 36 #define GST_VULKAN_WINDOW_WAYLAND_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_VULKAN_WINDOW_WAYLAND, GstVulkanWindowWaylandClass)) 37 38 typedef struct _GstVulkanWindowWayland GstVulkanWindowWayland; 39 typedef struct _GstVulkanWindowWaylandClass GstVulkanWindowWaylandClass; 40 41 struct _GstVulkanWindowWayland { 42 /*< private >*/ 43 GstVulkanWindow parent; 44 45 PFN_vkCreateWaylandSurfaceKHR CreateWaylandSurface; 46 PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR GetPhysicalDeviceWaylandPresentationSupport; 47 48 struct wl_event_queue *queue; 49 struct wl_surface *surface; 50 struct wl_shell_surface *shell_surface; 51 struct wl_callback *callback; 52 53 int window_width, window_height; 54 55 GSource *wl_source; 56 57 gpointer _reserved[GST_PADDING]; 58 }; 59 60 struct _GstVulkanWindowWaylandClass { 61 /*< private >*/ 62 GstVulkanWindowClass parent_class; 63 64 /*< private >*/ 65 gpointer _reserved[GST_PADDING]; 66 }; 67 68 GType gst_vulkan_window_wayland_get_type (void); 69 70 GstVulkanWindowWayland * gst_vulkan_window_wayland_new (GstVulkanDisplay * display); 71 72 G_END_DECLS 73 74 #endif /* __GST_GL_WINDOW_X11_H__ */ 75