use utils::c_bindings::*;
use utils::vk_traits::*;
use utils::vk_ptr::*;
use utils::vk_convert::*;
use std::os::raw::c_char;
use std::ops::Drop;
use std::ptr;
use std::mem;
use std::cmp;
use std::slice;
use vulkan::*;
use vulkan::vk::*;
#[doc(hidden)]
pub type RawVkDebugReportCallback = u64;
#[derive(Debug, Clone, Copy)]
pub struct VkDebugReportCallback {
_handle: RawVkDebugReportCallback,
_fn_table: *mut VkFunctionTable
}
impl VkRawType<VkDebugReportCallback> for RawVkDebugReportCallback {
fn vk_to_wrapped(src: &RawVkDebugReportCallback) -> VkDebugReportCallback {
VkDebugReportCallback {
_handle: *src,
_fn_table: ptr::null_mut()
}
}
}
impl VkWrappedType<RawVkDebugReportCallback> for VkDebugReportCallback {
fn vk_to_raw(src: &VkDebugReportCallback, dst: &mut RawVkDebugReportCallback) {
*dst = src._handle
}
}
impl Default for VkDebugReportCallback {
fn default() -> VkDebugReportCallback {
VkDebugReportCallback {
_handle: 0,
_fn_table: ptr::null_mut()
}
}
}
impl PartialEq for VkDebugReportCallback {
fn eq(&self, other: &VkDebugReportCallback) -> bool {
self._handle == other._handle
}
}
impl VkSetup for VkDebugReportCallback {
fn vk_setup(&mut self, fn_table: *mut VkFunctionTable) {
self._fn_table = fn_table;
}
}
impl VkDebugReportCallback {
pub fn vk_handle(&self) -> u64 {
self._handle
}
pub fn is_null(&self) -> bool {
self._handle == 0
}
pub fn null() -> Self {
Self {
_handle: 0,
_fn_table: ptr::null_mut()
}
}
pub fn destroy(&self) {
unsafe {
((&*self._fn_table).vkDestroyDebugReportCallbackEXT)((*self._fn_table).instance, self._handle, ptr::null());
}
}
}