1 header = """/* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */"""
4 autogen_warning = """/* DO NOT MODIFY THIS MANUALLY! This file was generated using cbindgen.
6 * This file is generated based on the configuration in
7 * `gfx/wgpu_bindings/moz.build`, which directs the build system module
8 * `build/RunCbindgen.py` to run the following command at the top of
9 * the object file directory:
11 * $CBINDGEN $TOPSRCDIR --lockfile $TOPSRCDIR/Cargo.lock --crate wgpu_bindings --metadata config/cbindgen-metadata.json --cpp-compat > gfx/wgpu_bindings/wgpu_ffi_generated.h
14 * - $TOPSRCDIR is the top of the Firefox source tree, and
15 * - $CBINDGEN is the path to the cbindgen executable provided by mozbuild (the exact version often matters)
21 typedef uint64_t WGPUNonZeroU64;
22 typedef uint64_t WGPUOption_BufferSize;
23 typedef uint32_t WGPUOption_NonZeroU32;
24 typedef uint8_t WGPUOption_NonZeroU8;
25 typedef uint64_t WGPUOption_AdapterId;
26 typedef uint64_t WGPUOption_BufferId;
27 typedef uint64_t WGPUOption_PipelineLayoutId;
28 typedef uint64_t WGPUOption_BindGroupLayoutId;
29 typedef uint64_t WGPUOption_SamplerId;
30 typedef uint64_t WGPUOption_SurfaceId;
31 typedef uint64_t WGPUOption_TextureViewId;
32 typedef uint64_t WGPUOption_QuerySetId;
34 include_version = true
43 renaming_overrides_prefixing = true
45 "Option_AdapterId", "Option_BufferId", "Option_PipelineLayoutId", "Option_BindGroupLayoutId",
46 "Option_SamplerId", "Option_SurfaceId", "Option_TextureViewId",
47 "Option_BufferSize", "Option_NonZeroU32", "Option_NonZeroU8",
48 "ANativeWindow_setBuffersGeometry", "Option_QuerySetId",
50 include = ["BufferUsages"]
53 "nsString" = "nsString"
54 "nsCString" = "nsCString"
55 "nsAString" = "nsAString"
56 "nsACString" = "nsACString"
57 "nsStringRepr" = "nsString"
58 "BufferDescriptor______nsACString" = "WGPUBufferDescriptor"
59 "CommandBufferDescriptor______nsACString" = "WGPUCommandBufferDescriptor"
60 "CommandEncoderDescriptor______nsACString" = "WGPUCommandEncoderDescriptor"
61 "RenderBundleDescriptor______nsACString" = "WGPURenderBundleDescriptor"
62 "DeviceDescriptor______nsACString" = "WGPUDeviceDescriptor"
63 "TextureDescriptor______nsACString__FfiSlice_TextureFormat" = "WGPUTextureDescriptor"
64 "SamplerDescriptor______nsACString" = "WGPUSamplerDescriptor"
65 "AdapterInformation_nsString" = "WGPUAdapterInformation"
69 include = ["wgpu-core", "wgpu-types", "wgpu-hal"]
71 extra_bindings = ["wgpu-core", "wgpu-types", "wgpu-hal"]
74 prefix = "WGPU_INLINE"
77 rename_args = "GeckoCase"
83 prefix_with_name = true
84 derive_helper_methods = true
91 "target_os = windows" = "XP_WIN"
92 "target_os = macos" = "XP_MACOSX"
93 "target_os = android" = "ANDROID"
94 "feature = id32" = "WGPU_FEATURE_ID32"