vulkan: Add iOS window implementation
[platform/upstream/gst-plugins-bad.git] / ext / vulkan / ios / vkwindow_ios.h
1 /*
2  * GStreamer
3  * Copyright (C) 2019 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_IOS_H__
22 #define __GST_VULKAN_WINDOW_IOS_H__
23
24 #include <vk.h>
25
26 G_BEGIN_DECLS
27
28 #define GST_TYPE_VULKAN_WINDOW_IOS         (gst_vulkan_window_ios_get_type())
29 #define GST_VULKAN_WINDOW_IOS(o)           (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_VULKAN_WINDOW_IOS, GstVulkanWindowIos))
30 #define GST_VULKAN_WINDOW_IOS_CLASS(k)     (G_TYPE_CHECK_CLASS((k), GST_TYPE_VULKAN_WINDOW_IOS, GstVulkanWindowIosClass))
31 #define GST_IS_VULKAN_WINDOW_IOS(o)        (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_VULKAN_WINDOW_IOS))
32 #define GST_IS_VULKAN_WINDOW_IOS_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_VULKAN_WINDOW_IOS))
33 #define GST_VULKAN_WINDOW_IOS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_VULKAN_WINDOW_IOS, GstVulkanWindowIosClass))
34
35 typedef struct _GstVulkanWindowIos        GstVulkanWindowIos;
36 typedef struct _GstVulkanWindowIosPrivate GstVulkanWindowIosPrivate;
37 typedef struct _GstVulkanWindowIosClass   GstVulkanWindowIosClass;
38
39 /**
40  * GstVulkanWindowIos:
41  *
42  * Opaque #GstVulkanWindowIos object
43  */
44 struct _GstVulkanWindowIos
45 {
46   /*< private >*/
47   GstVulkanWindow parent;
48
49   gpointer view;
50
51   gint          visible :1;
52
53   PFN_vkCreateIOSSurfaceMVK CreateIOSSurface;
54
55   /*< private >*/
56   GstVulkanWindowIosPrivate *priv;
57   
58   gpointer _reserved[GST_PADDING];
59 };
60
61 /**
62  * GstVulkanWindowIosClass:
63  *
64  * Opaque #GstVulkanWindowIosClass object
65  */
66 struct _GstVulkanWindowIosClass {
67   /*< private >*/
68   GstVulkanWindowClass parent_class;
69
70   /*< private >*/
71   gpointer _reserved[GST_PADDING_LARGE];
72 };
73
74 GType gst_vulkan_window_ios_get_type     (void);
75
76 GstVulkanWindowIos * gst_vulkan_window_ios_new (GstVulkanDisplay * display);
77
78 gboolean gst_vulkan_window_ios_create_window (GstVulkanWindowIos * window_ios);
79
80 G_END_DECLS
81
82 #endif /* __GST_VULKAN_WINDOW_IOS_H__ */