1/* GDK - The GIMP Drawing Kit
2 *
3 * gdkvulkancontext.h: specific Vulkan wrappers
4 *
5 * Copyright © 2016 Benjamin Otte
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
16 *
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef __GDK_VULKAN_CONTEXT__
22#define __GDK_VULKAN_CONTEXT__
23
24#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
25#error "Only <gdk/gdk.h> can be included directly."
26#endif
27
28#include <gdk/gdkversionmacros.h>
29#include <gdk/gdktypes.h>
30
31#ifdef GDK_RENDERING_VULKAN
32#include <vulkan/vulkan.h>
33#endif
34
35G_BEGIN_DECLS
36
37#define GDK_TYPE_VULKAN_CONTEXT (gdk_vulkan_context_get_type ())
38#define GDK_VULKAN_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_VULKAN_CONTEXT, GdkVulkanContext))
39#define GDK_IS_VULKAN_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_VULKAN_CONTEXT))
40
41#define GDK_VULKAN_ERROR (gdk_vulkan_error_quark ())
42
43GDK_AVAILABLE_IN_ALL
44GQuark gdk_vulkan_error_quark (void);
45
46GDK_AVAILABLE_IN_ALL
47GType gdk_vulkan_context_get_type (void) G_GNUC_CONST;
48
49#ifndef __GI_SCANNER__
50#ifdef GDK_RENDERING_VULKAN
51
52GDK_AVAILABLE_IN_ALL
53const char * gdk_vulkan_strerror (VkResult result);
54
55GDK_AVAILABLE_IN_ALL
56VkInstance gdk_vulkan_context_get_instance (GdkVulkanContext *context);
57GDK_AVAILABLE_IN_ALL
58VkPhysicalDevice gdk_vulkan_context_get_physical_device (GdkVulkanContext *context);
59GDK_AVAILABLE_IN_ALL
60VkDevice gdk_vulkan_context_get_device (GdkVulkanContext *context);
61GDK_AVAILABLE_IN_ALL
62VkQueue gdk_vulkan_context_get_queue (GdkVulkanContext *context);
63GDK_AVAILABLE_IN_ALL
64uint32_t gdk_vulkan_context_get_queue_family_index (GdkVulkanContext *context);
65GDK_AVAILABLE_IN_ALL
66VkFormat gdk_vulkan_context_get_image_format (GdkVulkanContext *context);
67GDK_AVAILABLE_IN_ALL
68uint32_t gdk_vulkan_context_get_n_images (GdkVulkanContext *context);
69GDK_AVAILABLE_IN_ALL
70VkImage gdk_vulkan_context_get_image (GdkVulkanContext *context,
71 guint id);
72GDK_AVAILABLE_IN_ALL
73uint32_t gdk_vulkan_context_get_draw_index (GdkVulkanContext *context);
74GDK_AVAILABLE_IN_ALL
75VkSemaphore gdk_vulkan_context_get_draw_semaphore (GdkVulkanContext *context);
76
77#endif /* GDK_RENDERING_VULKAN */
78#endif /* __GI_SCANNER__ */
79
80G_END_DECLS
81
82#endif /* __GDK_VULKAN_CONTEXT__ */
83

source code of gtk/gdk/gdkvulkancontext.h