wayland.d 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /*
  2. Boost Software License - Version 1.0 - August 17th, 2003
  3. Permission is hereby granted, free of charge, to any person or organization
  4. obtaining a copy of the software and accompanying documentation covered by
  5. this license (the "Software") to use, reproduce, display, distribute,
  6. execute, and transmit the Software, and to prepare derivative works of the
  7. Software, and to permit third-parties to whom the Software is furnished to
  8. do so, all subject to the following:
  9. The copyright notices in the Software and this entire statement, including
  10. the above license grant, this restriction and the following disclaimer,
  11. must be included in all copies of the Software, in whole or in part, and
  12. all derivative works of the Software, unless such copies or derivative
  13. works are solely in the form of machine-executable object code generated by
  14. a source language processor.
  15. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
  18. SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
  19. FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
  20. ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  21. DEALINGS IN THE SOFTWARE.
  22. */
  23. module derelict.vulkan.system.posix.wayland;
  24. version (VK_USE_PLATFORM_WAYLAND_KHR):
  25. extern(System):
  26. public {
  27. import derelict.vulkan.base;
  28. import derelict.vulkan.types;
  29. }
  30. mixin VK_DEFINE_NON_DISPATCHABLE_HANDLE!"WlDisplayHandle";
  31. mixin VK_DEFINE_NON_DISPATCHABLE_HANDLE!"WlSurfaceHandle";
  32. enum VK_KHR_wayland_surface = 1;
  33. enum VK_KHR_WAYLAND_SURFACE_SPEC_VERSION = 5;
  34. enum VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME = "VK_KHR_wayland_surface";
  35. alias VkWaylandSurfaceCreateFlagsKHR = VkFlags;
  36. struct VkWaylandSurfaceCreateInfoKHR {
  37. VkStructureType sType ;
  38. const(void)* pNext ;
  39. VkWaylandSurfaceCreateFlagsKHR flags ;
  40. WlDisplayHandle display;
  41. WlSurfaceHandle surface;
  42. }
  43. alias PFN_vkCreateWaylandSurfaceKHR = nothrow
  44. VkResult function( VkInstance instance
  45. , const(VkWaylandSurfaceCreateInfoKHR)* pCreateInfo
  46. , const(VkAllocationCallbacks)* pAllocator
  47. , VkSurfaceKHR* pSurface );
  48. alias PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR = nothrow
  49. VkBool32 function( VkPhysicalDevice physicalDevice
  50. , uint queueFamilyIndex
  51. , WlDisplayHandle display );
  52. mixin template WaylandFunctions() {
  53. PFN_vkCreateWaylandSurfaceKHR vkCreateWaylandSurfaceKHR;
  54. PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR vkGetPhysicalDeviceWaylandPresentationSupportKHR;
  55. pragma(inline, true)
  56. void bindFunctionsWayland(alias bind)() {
  57. bind(cast(void**)&vkCreateWaylandSurfaceKHR, "vkCreateWaylandSurfaceKHR");
  58. bind( cast(void**)&vkGetPhysicalDeviceWaylandPresentationSupportKHR
  59. , "vkGetPhysicalDeviceWaylandPresentationSupportKHR" );
  60. }
  61. }
  62. version (none) {
  63. VkResult vkCreateWaylandSurfaceKHR( VkInstance instance
  64. , const(VkWaylandSurfaceCreateInfoKHR)* pCreateInfo
  65. , const(VkAllocationCallbacks)* pAllocator
  66. , VkSurfaceKHR* pSurface );
  67. VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR( VkPhysicalDevice physicalDevice
  68. , uint queueFamilyIndex
  69. , WlDisplayHandle display );
  70. }