1 /* 2 * GStreamer 3 * Copyright (C) 2012 Matthew Waters <ystreet00@gmail.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_VULKAN_WINDOW_XCB_H__ 22 #define __GST_VULKAN_WINDOW_XCB_H__ 23 24 #include <xcb/xcb.h> 25 26 #include <gst/vulkan/vulkan.h> 27 28 #include <vulkan/vulkan_xcb.h> 29 30 G_BEGIN_DECLS 31 32 #define GST_TYPE_VULKAN_WINDOW_XCB (gst_vulkan_window_xcb_get_type()) 33 #define GST_VULKAN_WINDOW_XCB(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_VULKAN_WINDOW_XCB, GstVulkanWindowXCB)) 34 #define GST_VULKAN_WINDOW_XCB_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_TYPE_VULKAN_WINDOW_XCB, GstVulkanWindowXCBClass)) 35 #define GST_IS_VULKAN_WINDOW_XCB(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_VULKAN_WINDOW_XCB)) 36 #define GST_IS_VULKAN_WINDOW_XCB_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_VULKAN_WINDOW_XCB)) 37 #define GST_VULKAN_WINDOW_XCB_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_VULKAN_WINDOW_XCB, GstVulkanWindowXCBClass)) 38 39 typedef struct _GstVulkanWindowXCB GstVulkanWindowXCB; 40 typedef struct _GstVulkanWindowXCBPrivate GstVulkanWindowXCBPrivate; 41 typedef struct _GstVulkanWindowXCBClass GstVulkanWindowXCBClass; 42 43 /** 44 * GstVulkanWindowXCB: 45 * 46 * Opaque #GstVulkanWindowXCB object 47 */ 48 struct _GstVulkanWindowXCB 49 { 50 /*< private >*/ 51 GstVulkanWindow parent; 52 53 /* X window */ 54 xcb_window_t win_id; 55 56 gint visible :1; 57 58 PFN_vkCreateXcbSurfaceKHR CreateXcbSurface; 59 PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR GetPhysicalDeviceXcbPresentationSupport; 60 61 /*< private >*/ 62 gpointer _reserved[GST_PADDING]; 63 }; 64 65 /** 66 * GstVulkanWindowXCBClass: 67 * 68 * Opaque #GstVulkanWindowXCBClass object 69 */ 70 struct _GstVulkanWindowXCBClass { 71 /*< private >*/ 72 GstVulkanWindowClass parent_class; 73 74 /*< private >*/ 75 gpointer _reserved[GST_PADDING_LARGE]; 76 }; 77 78 GType gst_vulkan_window_xcb_get_type (void); 79 80 GstVulkanWindowXCB * gst_vulkan_window_xcb_new (GstVulkanDisplay * display); 81 82 gboolean gst_vulkan_window_xcb_create_window (GstVulkanWindowXCB * window_xcb); 83 84 G_END_DECLS 85 86 #endif /* __GST_VULKAN_WINDOW_XCB_H__ */ 87