tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

cbindgen.toml (4851B)


      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.
      5 *
      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:
     10 *
     11 *     $CBINDGEN $TOPSRCDIR --lockfile $TOPSRCDIR/Cargo.lock --crate wgpu_bindings --metadata config/cbindgen-metadata.json --cpp-compat > gfx/wgpu_bindings/wgpu_ffi_generated.h
     12 *
     13 * where:
     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)
     16 */
     17 
     18 #include "nsString.h"
     19 
     20 struct WGPUByteBuf;
     21 using WGPUNonZeroU64 = uint64_t;
     22 using WGPUOption_BufferSize = uint64_t;
     23 using WGPUOption_NonZeroU32 = uint32_t;
     24 using WGPUOption_NonZeroU8 = uint8_t;
     25 using WGPUOption_AdapterId = uint64_t;
     26 using WGPUOption_BufferId = uint64_t;
     27 using WGPUOption_PipelineLayoutId = uint64_t;
     28 using WGPUOption_BindGroupId = uint64_t;
     29 using WGPUOption_BindGroupLayoutId = uint64_t;
     30 using WGPUOption_SamplerId = uint64_t;
     31 using WGPUOption_SurfaceId = uint64_t;
     32 using WGPUOption_TextureViewId = uint64_t;
     33 using WGPUOption_ExternalTextureSourceId = uint64_t;
     34 using WGPUOption_ExternalTextureId = uint64_t;
     35 using WGPUOption_QuerySetId = uint64_t;
     36 using WGPUOption_DeviceId = uint64_t;
     37 
     38 using WGPUAdapterId = uint64_t;
     39 using WGPUBindGroupId = uint64_t;
     40 using WGPUBindGroupLayoutId = uint64_t;
     41 using WGPUBufferId = uint64_t;
     42 using WGPUCommandBufferId = uint64_t;
     43 using WGPUCommandEncoderId = uint64_t;
     44 using WGPURenderPassEncoderId = uint64_t;
     45 using WGPUComputePassEncoderId = uint64_t;
     46 using WGPURenderBundleEncoderId = uint64_t;
     47 using WGPUComputePipelineId = uint64_t;
     48 using WGPUDeviceId = uint64_t;
     49 using WGPUFeaturesWebGPU = uint64_t;
     50 using WGPUPipelineLayoutId = uint64_t;
     51 using WGPUQuerySetId = uint64_t;
     52 using WGPUQueueId = uint64_t;
     53 using WGPURenderBundleId = uint64_t;
     54 using WGPURenderPipelineId = uint64_t;
     55 using WGPUSamplerId = uint64_t;
     56 using WGPUShaderModuleId = uint64_t;
     57 using WGPUStagingBufferId = uint64_t;
     58 using WGPUSurfaceId = uint64_t;
     59 using WGPUTextureId = uint64_t;
     60 using WGPUTextureViewId = uint64_t;
     61 using WGPUExternalTextureId = uint64_t;
     62 using WGPUExternalTextureSourceId = uint64_t;
     63 
     64 // This is a zero-sized type in wgpu's API, but cbindgen generates C++
     65 // that leaves it as an incomplete type. Since WebGPU's GPULoadOp
     66 // doesn't even have this variant (and probably never will, as its
     67 // purpose is to allow behavior to vary freely per implementation), we
     68 // can just give it a dummy definition that at least compiles.
     69 struct WGPULoadOpDontCare {
     70    char dummy;
     71 };
     72 """
     73 include_version = true
     74 braces = "SameLine"
     75 line_length = 100
     76 tab_width = 2
     77 language = "C"
     78 style = "tag"
     79 
     80 [export]
     81 prefix = "WGPU"
     82 renaming_overrides_prefixing = true
     83 exclude = [
     84 "LoadOpDontCare",
     85 "Option_AdapterId",
     86 "Option_BufferId",
     87 "Option_BindGroupId",
     88 "Option_PipelineLayoutId",
     89 "Option_BindGroupLayoutId",
     90 "Option_SamplerId",
     91 "Option_SurfaceId",
     92 "Option_TextureViewId",
     93 "Option_ExternalTextureSourceId",
     94 "Option_ExternalTextureId",
     95 "Option_BufferSize",
     96 "Option_NonZeroU32",
     97 "Option_NonZeroU8",
     98 "ANativeWindow_setBuffersGeometry",
     99 "Option_QuerySetId",
    100 "Option_DeviceId",
    101 ]
    102 include = ["BufferUsages"]
    103 
    104 [export.rename]
    105 "nsString" = "nsString"
    106 "nsCString" = "nsCString"
    107 "nsAString" = "nsAString"
    108 "nsACString" = "nsACString"
    109 "nsStringRepr" = "nsString"
    110 "BufferDescriptor______nsACString" = "WGPUBufferDescriptor"
    111 "CommandBufferDescriptor______nsACString" = "WGPUCommandBufferDescriptor"
    112 "CommandEncoderDescriptor______nsACString" = "WGPUCommandEncoderDescriptor"
    113 "RenderBundleDescriptor______nsACString" = "WGPURenderBundleDescriptor"
    114 "TextureDescriptor______nsACString__FfiSlice_TextureFormat" = "WGPUTextureDescriptor"
    115 "ExternalTextureDescriptor______nsACString" = "WGPUExternalTextureDescriptor"
    116 "SamplerDescriptor______nsACString" = "WGPUSamplerDescriptor"
    117 "AdapterInformation_nsString" = "WGPUAdapterInformation"
    118 "QuerySetDescriptor______nsACString" = "WGPUQuerySetDescriptor"
    119 
    120 [parse]
    121 parse_deps = true
    122 include = ["wgpu-core", "wgpu-types", "wgpu-hal"]
    123 
    124 extra_bindings = ["wgpu-core", "wgpu-types", "wgpu-hal"]
    125 
    126 [fn]
    127 prefix = "WGPU_INLINE"
    128 postfix = "WGPU_FUNC"
    129 args = "Vertical"
    130 rename_args = "GeckoCase"
    131 
    132 [struct]
    133 derive_eq = true
    134 
    135 [enum]
    136 prefix_with_name = true
    137 derive_helper_methods = true
    138 add_sentinel = true
    139 
    140 [macro_expansion]
    141 bitflags = true
    142 
    143 [defines]
    144 "target_os = windows" = "XP_WIN"
    145 "target_os = macos" = "XP_MACOSX"
    146 "target_os = android" = "ANDROID"
    147 "feature = id32" = "WGPU_FEATURE_ID32"