From eef0d67b36e1f82d71ba7901e9debc40b74e994d Mon Sep 17 00:00:00 2001 From: Christian Treffs Date: Wed, 26 Apr 2023 08:54:51 +0200 Subject: [PATCH] Add Mint (#13) * Add Mint * Run lint-fix * Fix fallthrough keyword --- Makefile | 11 +- Mintfile | 2 + Package.swift | 10 +- Sources/AutoWrapper/ArgT.swift | 37 +- Sources/AutoWrapper/Converter.swift | 8 +- Sources/AutoWrapper/DataType.swift | 71 +- Sources/AutoWrapper/Definitions.swift | 29 +- Sources/AutoWrapper/Exceptions.swift | 10 +- .../AutoWrapper/FunctionBodyRenderer.swift | 20 +- Sources/AutoWrapper/SwiftKeywords.swift | 54 +- Sources/AutoWrapper/main.swift | 6 +- Sources/Demos/Metal/AppDelegate.swift | 8 +- Sources/Demos/Metal/Renderer.swift | 23 +- Sources/Demos/Metal/ViewController.swift | 55 +- Sources/Demos/Metal/imgui_impl_metal.swift | 93 +- Sources/Demos/Metal/imgui_impl_osx.swift | 328 +- Sources/Demos/Metal/main.swift | 8 +- Sources/Demos/Minimal/main.swift | 14 +- Sources/ImGui/Helper.swift | 17 +- Sources/ImGui/ImGui+Definitions.swift | 4532 ++++++++--------- Tests/ImGuiTests/XCTestManifests.swift | 32 +- 21 files changed, 2680 insertions(+), 2688 deletions(-) create mode 100644 Mintfile diff --git a/Makefile b/Makefile index d05154c..4fc2c4d 100644 --- a/Makefile +++ b/Makefile @@ -4,10 +4,13 @@ swift_imgui_src := Sources/ImGui release_dir := .build/release autowrapper_assets := Sources/AutoWrapper/Assets -.PHONY: lint -lint: - swiftlint autocorrect --format - swiftlint lint --quiet +SWIFT_PACKAGE_VERSION := $(shell swift package tools-version) + +# Lint fix and format code. +.PHONY: lint-fix +lint-fix: + mint run swiftlint --fix --quiet + mint run swiftformat --quiet --swiftversion ${SWIFT_PACKAGE_VERSION} . .PHONY: setupEnv setupEnv: diff --git a/Mintfile b/Mintfile new file mode 100644 index 0000000..4b20408 --- /dev/null +++ b/Mintfile @@ -0,0 +1,2 @@ +realm/SwiftLint@0.51.0 +nicklockwood/SwiftFormat@0.51.7 diff --git a/Package.swift b/Package.swift index f5dcf6b..fe8ab9c 100644 --- a/Package.swift +++ b/Package.swift @@ -4,7 +4,7 @@ import PackageDescription var package = Package( name: "ImGui", products: [ - .library(name: "ImGui", targets: ["ImGui"]) + .library(name: "ImGui", targets: ["ImGui"]), ], targets: [ .target(name: "ImGui", dependencies: ["CImGui"]), @@ -15,9 +15,9 @@ var package = Package( linkerSettings: [.linkedLibrary("m", .when(platforms: [.linux]))]), .target(name: "AutoWrapper", resources: [ - .copy("Assets/definitions.json") + .copy("Assets/definitions.json"), ]), - .testTarget(name: "ImGuiTests", dependencies: ["ImGui"]) + .testTarget(name: "ImGuiTests", dependencies: ["ImGui"]), ], cLanguageStandard: .c11, cxxLanguageStandard: .cxx11 @@ -27,6 +27,6 @@ package.products.append(.executable(name: "DemoMinimal", targets: ["DemoMinimal" package.targets.append(.target(name: "DemoMinimal", dependencies: ["ImGui"], path: "Sources/Demos/Minimal")) #if canImport(Metal) && os(macOS) -package.products.append(.executable(name: "DemoMetal-macOS", targets: ["DemoMetal"])) -package.targets.append(.target(name: "DemoMetal", dependencies: ["ImGui"], path: "Sources/Demos/Metal")) + package.products.append(.executable(name: "DemoMetal-macOS", targets: ["DemoMetal"])) + package.targets.append(.target(name: "DemoMetal", dependencies: ["ImGui"], path: "Sources/Demos/Metal")) #endif diff --git a/Sources/AutoWrapper/ArgT.swift b/Sources/AutoWrapper/ArgT.swift index e959b2c..a23c5c4 100644 --- a/Sources/AutoWrapper/ArgT.swift +++ b/Sources/AutoWrapper/ArgT.swift @@ -20,30 +20,31 @@ public struct ArgType: Decodable { // const if let range = raw.range(of: "const") { - self.isConst = true + isConst = true raw.removeSubrange(range) raw = raw.replacingOccurrences(of: "const", with: "") raw = raw.trimmingCharacters(in: .whitespaces) } else { - self.isConst = false + isConst = false } // unsigned if let unsigned = raw.range(of: "unsigned") { - self.isUnsigned = true + isUnsigned = true raw.removeSubrange(unsigned) raw = raw.trimmingCharacters(in: .whitespaces) } else { - self.isUnsigned = false + isUnsigned = false } precondition(!raw.contains("const")) precondition(!raw.contains("unsigned")) - self.type = DataType(string: raw) + type = DataType(string: raw) } } -extension ArgType: Equatable { } -extension ArgType: Hashable { } + +extension ArgType: Equatable {} +extension ArgType: Hashable {} public struct ArgsT: Decodable { public let escapedName: String @@ -53,7 +54,7 @@ public struct ArgsT: Decodable { public let signature: String? private let escapingCallbackExceptions: Set = [ - "ImGuiErrorLogCallback" + "ImGuiErrorLogCallback", ] public enum Keys: String, CodingKey { @@ -66,9 +67,9 @@ public struct ArgsT: Decodable { public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: Keys.self) let rawName = try container.decode(String.self, forKey: .name) - self.type = try container.decode(DataType.self, forKey: .type) + type = try container.decode(DataType.self, forKey: .type) - self.name = rawName + name = rawName let escapedName = rawName.swiftEscaped switch escapedName { case "...": @@ -77,8 +78,8 @@ public struct ArgsT: Decodable { self.escapedName = escapedName } - self.ret = try container.decodeIfPresent(String.self, forKey: .ret) - self.signature = try container.decodeIfPresent(String.self, forKey: .signature) + ret = try container.decodeIfPresent(String.self, forKey: .ret) + signature = try container.decodeIfPresent(String.self, forKey: .signature) } @inlinable public var isValid: Bool { @@ -86,15 +87,15 @@ public struct ArgsT: Decodable { } public var toSwift: String { - switch self.type.type { + switch type.type { case let .custom(name) where name.hasSuffix("Callback") && escapedName.contains("callback") - && !escapingCallbackExceptions.contains(name): - return "_ \(escapedName): @escaping \(self.type.toString(self, .argSwift))" + && !escapingCallbackExceptions.contains(name): + return "_ \(escapedName): @escaping \(type.toString(self, .argSwift))" default: - return "_ \(escapedName): \(self.type.toString(self, .argSwift, defaultArg: true))" + return "_ \(escapedName): \(type.toString(self, .argSwift, defaultArg: true))" } } } -extension ArgsT: Equatable { } -extension ArgsT: Hashable { } +extension ArgsT: Equatable {} +extension ArgsT: Hashable {} diff --git a/Sources/AutoWrapper/Converter.swift b/Sources/AutoWrapper/Converter.swift index 4d682f9..6dbf034 100644 --- a/Sources/AutoWrapper/Converter.swift +++ b/Sources/AutoWrapper/Converter.swift @@ -5,9 +5,9 @@ // Created by Christian Treffs on 25.10.19. // -import struct Foundation.URL import struct Foundation.Data import class Foundation.JSONDecoder +import struct Foundation.URL public func convert(filePath: String, validOnly: Bool, to convertedOutput: (String) throws -> Void = { print($0) }) throws { let file = URL(fileURLWithPath: filePath) @@ -15,8 +15,8 @@ public func convert(filePath: String, validOnly: Bool, to convertedOutput: (Stri let decoder = JSONDecoder() let defs = try decoder.decode(Definitions.self, from: data) - var invalidFuncsCount: Int = 0 - var validFuncsCount: Int = 0 + var invalidFuncsCount = 0 + var validFuncsCount = 0 let getValidFunctionDefs: (Definition) -> Set = { defs in let valid = defs.validFunctions @@ -32,7 +32,7 @@ public func convert(filePath: String, validOnly: Bool, to convertedOutput: (Stri .flatMap { $0 } .flatMap { getFunctionDefs($0) } .sorted() - .map { $0.toSwift } + .map(\.toSwift) .joined(separator: "\n\n") defer { diff --git a/Sources/AutoWrapper/DataType.swift b/Sources/AutoWrapper/DataType.swift index 8ec29a2..43ffcdb 100644 --- a/Sources/AutoWrapper/DataType.swift +++ b/Sources/AutoWrapper/DataType.swift @@ -54,72 +54,71 @@ public struct DataType: Decodable { if let primitive = ValueType(rawValue: string) { // primitive types int, char, float .... - self.type = primitive - self.meta = .primitive + type = primitive + meta = .primitive return } if let startFixArr = string.firstIndex(of: "["), let endFixArr = string.firstIndex(of: "]") { // i.e. float[4] - let numRange = string.index(after: startFixArr).. simple pointer - let dataType = DataType(string: String(string[string.startIndex..!" case let .arrayFixedSize(size) where isConst == false: - if type.isNumber && size < 5 { + if type.isNumber, size < 5 { // SIMD type return "inout SIMD\(size)<\(toWrap)>" } else { // tuple - return "inout (\((0.. String return toWrap @@ -187,7 +186,7 @@ public struct DataType: Decodable { } } - public func toString(_ argsT: ArgsT?, _ context: Context, wrapped: Bool = true, defaultArg: Bool = false) -> String { + public func toString(_: ArgsT?, _ context: Context, wrapped: Bool = true, defaultArg: Bool = false) -> String { let out: String switch type { @@ -232,12 +231,13 @@ public struct DataType: Decodable { } } -extension DataType: Equatable { } -extension DataType: Hashable { } +extension DataType: Equatable {} +extension DataType: Hashable {} // MARK: - MetaType -extension DataType { - public enum MetaType: Equatable, Hashable { + +public extension DataType { + enum MetaType: Equatable, Hashable { case primitive case arrayFixedSize(Int) case array @@ -250,8 +250,9 @@ extension DataType { } // MARK: - Value Type -extension DataType { - public enum ValueType: Equatable, Hashable { + +public extension DataType { + enum ValueType: Equatable, Hashable { case void case bool case int diff --git a/Sources/AutoWrapper/Definitions.swift b/Sources/AutoWrapper/Definitions.swift index 7da4777..7edbb99 100644 --- a/Sources/AutoWrapper/Definitions.swift +++ b/Sources/AutoWrapper/Definitions.swift @@ -39,11 +39,11 @@ public struct FunctionDef: Decodable { public let namespace: String? @inlinable public var isValid: Bool { - argsT.allSatisfy { $0.isValid } && returnType.isValid && !Exceptions.unresolvedIdentifier.contains(ov_cimguiname) + argsT.allSatisfy(\.isValid) && returnType.isValid && !Exceptions.unresolvedIdentifier.contains(ov_cimguiname) } public func encode(swift def: [ArgsT]) -> String { - def.map { $0.toSwift }.joined(separator: ", ") + def.map(\.toSwift).joined(separator: ", ") } public var encodedFuncname: String { @@ -55,10 +55,10 @@ public struct FunctionDef: Decodable { let name: String = funcname var prefix: String - if let namespace = self.namespace, !namespace.isEmpty { + if let namespace = namespace, !namespace.isEmpty { prefix = namespace } else { - prefix = String(ov_cimguiname[ov_cimguiname.startIndex.. \(returnType.toString(nil, .ret)) { + """ + \(funcDefs) \(encodedFuncname)(\(encode(swift: argsT))) -> \(returnType.toString(nil, .ret)) { \(FunctionBodyRenderer.render(ov_cimguiname, argsT, returnType)) } """ } } -extension FunctionDef: Equatable { } -extension FunctionDef: Hashable { } + +extension FunctionDef: Equatable {} +extension FunctionDef: Hashable {} extension FunctionDef: Comparable { public static func < (lhs: FunctionDef, rhs: FunctionDef) -> Bool { lhs.encodedFuncname < rhs.encodedFuncname @@ -134,7 +135,7 @@ public struct Definition: Decodable { public let constructors: [ConstructorDef] public var validFunctions: Set { - functions.filter { $0.isValid } + functions.filter(\.isValid) } public init(from decoder: Decoder) throws { @@ -144,21 +145,21 @@ public struct Definition: Decodable { var destructors: [DestructorDef] = [] var constructors: [ConstructorDef] = [] - if container.contains(.funcname) && !container.contains(.destructor) && !container.contains(.constructor) { + if container.contains(.funcname), !container.contains(.destructor), !container.contains(.constructor) { do { - functions.insert(try FunctionDef(from: decoder)) + try functions.insert(FunctionDef(from: decoder)) } catch { print("DECODING ERROR FunctionDef", decoder.codingPath, error.localizedDescription) } } else if container.contains(.destructor) { do { - destructors.append(try DestructorDef(from: decoder)) + try destructors.append(DestructorDef(from: decoder)) } catch { print("DECODING ERROR DestructorDef", decoder.codingPath, error.localizedDescription) } } else if container.contains(.constructor) { do { - constructors.append(try ConstructorDef(from: decoder)) + try constructors.append(ConstructorDef(from: decoder)) } catch { print("DECODING ERROR ConstructorDef", decoder.codingPath, error.localizedDescription) } diff --git a/Sources/AutoWrapper/Exceptions.swift b/Sources/AutoWrapper/Exceptions.swift index 3c5fd75..adab721 100644 --- a/Sources/AutoWrapper/Exceptions.swift +++ b/Sources/AutoWrapper/Exceptions.swift @@ -57,7 +57,7 @@ public enum Exceptions { "ImVector_shrink", "ImVector_size", "ImVector_size_in_bytes", - "ImVector_swap" + "ImVector_swap", ] /// causes "Use of undeclared type '...'" compiler error. @@ -65,11 +65,11 @@ public enum Exceptions { "ImBitArray": Declaration(name: "ImBitArray", typealiasType: "OpaquePointer"), "ImChunkStream": Declaration(name: "ImChunkStream", typealiasType: "OpaquePointer"), "ImPool": Declaration(name: "ImPool", typealiasType: "OpaquePointer"), - "ImSpanAllocator": Declaration(name: "ImSpanAllocator", typealiasType: "OpaquePointer") + "ImSpanAllocator": Declaration(name: "ImSpanAllocator", typealiasType: "OpaquePointer"), ] public static let stripPrefix: Set = [ - "ig" + "ig", ] } @@ -81,5 +81,5 @@ public struct Declaration { } } -extension Declaration: Equatable { } -extension Declaration: Hashable { } +extension Declaration: Equatable {} +extension Declaration: Hashable {} diff --git a/Sources/AutoWrapper/FunctionBodyRenderer.swift b/Sources/AutoWrapper/FunctionBodyRenderer.swift index e04d91f..dee89ea 100644 --- a/Sources/AutoWrapper/FunctionBodyRenderer.swift +++ b/Sources/AutoWrapper/FunctionBodyRenderer.swift @@ -5,7 +5,7 @@ // Created by Christian Treffs on 23.01.20. // -struct FunctionBodyRenderer { +enum FunctionBodyRenderer { static func render(_ callName: String, _ args: [ArgsT], _ returnType: DataType) -> String { // determine if somethings needs to be pre- or appended depending on return type let prependCall: String @@ -58,8 +58,8 @@ struct FunctionBodyRenderer { if preCallLines.isEmpty { functionBody = "\t" + callSignature } else { - var begin: String = "" - var end: String = "" + var begin = "" + var end = "" let maxIndentation: Int = preCallLines.count for (index, (pre, post)) in zip(preCallLines, postCallLines.reversed()).enumerated() { @@ -84,7 +84,7 @@ struct FunctionBodyRenderer { return [ .preLine("withVaList(\(arg.escapedName)) { varArgsPtr in"), .line("varArgsPtr"), - .postLine("}") + .postLine("}"), ] case .primitive: @@ -94,7 +94,7 @@ struct FunctionBodyRenderer { return [ .preLine("withArrayOfCStringsBasePointer(\(arg.escapedName)) { \(arg.name)Ptr in"), .line("\(arg.name)Ptr"), - .postLine("}") + .postLine("}"), ] case .array, .reference: @@ -108,13 +108,13 @@ struct FunctionBodyRenderer { .preLine("\(arg.name)MutPtr.withMemoryRebound(to: \(arg.type.toString(arg, .argSwift, wrapped: false)).self, capacity: \(count)) { \(arg.name)Ptr in"), .line("\(arg.name)Ptr"), .postLine("}"), - .postLine("}") + .postLine("}"), ] } else { return [ .preLine("withUnsafeMutablePointer(to: &\(arg.escapedName).0) {"), .line("UnsafeMutableBufferPointer<\(arg.type.toString(arg, .argSwift, wrapped: false))>(start: $0, count: \(count)).baseAddress!"), - .postLine("}") + .postLine("}"), ] } @@ -122,7 +122,7 @@ struct FunctionBodyRenderer { return [ .preLine("withUnsafeMutablePointer(to: &\(arg.escapedName).0) {"), .line("UnsafeMutableBufferPointer<\(arg.type.toString(arg, .argSwift, wrapped: false))>(start: $0, count: \(count)).baseAddress!"), - .postLine("}") + .postLine("}"), ] case .pointer where arg.type.isConst == false && arg.type.type == .void: @@ -136,7 +136,7 @@ struct FunctionBodyRenderer { return [ .preLine("\(arg.escapedName).withOptionalCString { \(arg.name)Ptr in"), .line("\(arg.name)Ptr"), - .postLine("}") + .postLine("}"), ] case .pointer where arg.type.type == .char && arg.type.isConst == false: @@ -144,7 +144,7 @@ struct FunctionBodyRenderer { return [ .preLine("\(arg.escapedName).withOptionalCString { \(arg.name)Ptr in"), .line("UnsafeMutablePointer(mutating: \(arg.name)Ptr)"), - .postLine("}") + .postLine("}"), ] case .pointer: diff --git a/Sources/AutoWrapper/SwiftKeywords.swift b/Sources/AutoWrapper/SwiftKeywords.swift index 8bcb6c4..3e93e27 100644 --- a/Sources/AutoWrapper/SwiftKeywords.swift +++ b/Sources/AutoWrapper/SwiftKeywords.swift @@ -11,63 +11,63 @@ public enum SwiftKeyword: String { case `Type` case `as` case `associatedtype` - case `associativity` + case associativity case `break` case `case` case `catch` case `class` case `continue` - case `convenience` + case convenience case `default` case `defer` case `deinit` - case `didSet` + case didSet case `do` - case `dynamic` + case dynamic case `else` case `enum` case `extension` case `fallthrough` case `false` case `fileprivate` - case `final` + case final case `for` case `func` - case `get` + case get case `guard` case `if` case `import` case `in` - case `indirect` - case `infix` + case indirect + case infix case `init` case `inout` case `internal` case `is` - case `lazy` - case `left` + case lazy + case left case `let` - case `mutating` + case mutating case `nil` - case `none` - case `nonmutating` - case `open` + case none + case nonmutating + case open case `operator` - case `optional` - case `override` - case `postfix` - case `precedence` - case `prefix` + case optional + case override + case postfix + case precedence + case prefix case `private` case `protocol` case `public` case `repeat` - case `required` + case required case `rethrows` case `return` - case `right` + case right case `self` - case `set` + case set case `static` case `struct` case `subscript` @@ -78,16 +78,16 @@ public enum SwiftKeyword: String { case `true` case `try` case `typealias` - case `unowned` + case unowned case `var` - case `weak` + case weak case `where` case `while` - case `willSet` + case willSet } -extension String { - public var swiftEscaped: String { +public extension String { + var swiftEscaped: String { guard let swiftKeyword = SwiftKeyword(rawValue: self) else { return self } diff --git a/Sources/AutoWrapper/main.swift b/Sources/AutoWrapper/main.swift index cb75faf..7c910af 100644 --- a/Sources/AutoWrapper/main.swift +++ b/Sources/AutoWrapper/main.swift @@ -5,9 +5,9 @@ // Created by Christian Treffs on 24.10.19. // -import struct Foundation.URL -import struct Foundation.Data import class Foundation.Bundle +import struct Foundation.Data +import struct Foundation.URL public struct ConversionError: Swift.Error { public let localizedDescription: String @@ -18,7 +18,7 @@ public func getDirectory(ofFile filePath: String = #file) -> String { return filePath } var dirPath = filePath - dirPath.removeSubrange(lastSlashIdx.. Bool { - return true + func applicationShouldTerminateAfterLastWindowClosed(_: NSApplication) -> Bool { + true } } diff --git a/Sources/Demos/Metal/Renderer.swift b/Sources/Demos/Metal/Renderer.swift index 07b3bfa..a58626e 100644 --- a/Sources/Demos/Metal/Renderer.swift +++ b/Sources/Demos/Metal/Renderer.swift @@ -21,12 +21,11 @@ final class Renderer: NSObject { let commandQueue: MTLCommandQueue init(_ view: MTKView) { - self.device = view.device! + device = view.device! commandQueue = device.makeCommandQueue()! // precondition(!ImGuiDebugCheckVersionAndDataLayout()) - _ = ImGuiCreateContext(nil) ImGuiStyleColorsDark(nil) @@ -37,7 +36,7 @@ final class Renderer: NSObject { @available(OSX 10.11, *) extension Renderer: MTKViewDelegate { func draw(in view: MTKView) { - guard view.bounds.size.width > 0 && view.bounds.size.height > 0 else { + guard view.bounds.size.width > 0, view.bounds.size.height > 0 else { return } autoreleasepool { @@ -51,8 +50,6 @@ extension Renderer: MTKViewDelegate { io.pointee.DisplayFramebufferScale = ImVec2(x: frameBufferScale, y: frameBufferScale) io.pointee.DeltaTime = 1.0 / Float(view.preferredFramesPerSecond) - - let commandBuffer = commandQueue.makeCommandBuffer()! guard let renderPassDescriptor = view.currentRenderPassDescriptor else { @@ -96,28 +93,26 @@ extension Renderer: MTKViewDelegate { ImGuiColorEdit3("clear color", &clear_color, 0) // Edit 3 floats representing a color - if ImGuiButton("Button", ImVec2(x: 100,y: 20)) { // Buttons return true when clicked (most widgets return true when edited/activated) + if ImGuiButton("Button", ImVec2(x: 100, y: 20)) { // Buttons return true when clicked (most widgets return true when edited/activated) counter += 1 } - //SameLine(offset_from_start_x: 0, spacing: 0) + // SameLine(offset_from_start_x: 0, spacing: 0) ImGuiSameLine(0, 2) ImGuiTextV(String(format: "counter = %d", counter)) let avg: Float = (1000.0 / io.pointee.Framerate) let fps = io.pointee.Framerate - + ImGuiTextV(String(format: "Application average %.3f ms/frame (%.1f FPS)", avg, fps)) - ImGuiEnd() - //End() + // End() // 3. Show another simple window. if show_another_window { - - ImGuiBegin("Another Window", &show_another_window, 0) // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked) + ImGuiBegin("Another Window", &show_another_window, 0) // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked) ImGuiTextV("Hello from another window!") if ImGuiButton("Close Me", ImVec2(x: 100, y: 20)) { @@ -136,12 +131,10 @@ extension Renderer: MTKViewDelegate { commandBuffer.present(view.currentDrawable!) commandBuffer.commit() - } } - func mtkView(_ view: MTKView, drawableSizeWillChange size: CGSize) { + func mtkView(_: MTKView, drawableSizeWillChange size: CGSize) { print(#function, size) } - } diff --git a/Sources/Demos/Metal/ViewController.swift b/Sources/Demos/Metal/ViewController.swift index 2b86d0f..d1eb4bc 100644 --- a/Sources/Demos/Metal/ViewController.swift +++ b/Sources/Demos/Metal/ViewController.swift @@ -11,66 +11,65 @@ import MetalKit @available(OSX 10.11, *) final class ViewController: NSViewController { - let mtkView = MTKView() lazy var renderer = Renderer(mtkView) - + override func loadView() { mtkView.wantsLayer = true mtkView.layer!.backgroundColor = .black - self.view = mtkView + view = mtkView } - + override func viewDidLoad() { super.viewDidLoad() - + mtkView.device = MTLCreateSystemDefaultDevice() - mtkView.delegate = self.renderer - + mtkView.delegate = renderer + renderer.mtkView(mtkView, drawableSizeWillChange: mtkView.bounds.size) - + // Add a tracking area in order to receive mouse events whenever the mouse is within the bounds of our view - let trackingArea: NSTrackingArea = NSTrackingArea(rect: .zero, - options: [.mouseMoved, .inVisibleRect, .activeAlways], - owner: self, - userInfo: nil) + let trackingArea = NSTrackingArea(rect: .zero, + options: [.mouseMoved, .inVisibleRect, .activeAlways], + owner: self, + userInfo: nil) view.addTrackingArea(trackingArea) - + // If we want to receive key events, we either need to be in the responder chain of the key view, // or else we can install a local monitor. The consequence of this heavy-handed approach is that // we receive events for all controls, not just Dear ImGui widgets. If we had native controls in our // window, we'd want to be much more careful than just ingesting the complete event stream, though we // do make an effort to be good citizens by passing along events when Dear ImGui doesn't want to capture. let eventMask: NSEvent.EventTypeMask = [.keyDown, .keyUp, .flagsChanged] - NSEvent.addLocalMonitorForEvents(matching: eventMask) { [unowned self](event) -> NSEvent? in - ImGui_ImplOSX_HandleEvent(event, self.view) + NSEvent.addLocalMonitorForEvents(matching: eventMask) { [unowned self] event -> NSEvent? in + ImGui_ImplOSX_HandleEvent(event, view) return event } - - ImGui_ImplOSX_Init(self.view) + + ImGui_ImplOSX_Init(view) } - + deinit { ImGui_ImplOSX_Shutdown() } - + override func mouseMoved(with event: NSEvent) { - ImGui_ImplOSX_HandleEvent(event, self.view) + ImGui_ImplOSX_HandleEvent(event, view) } - + override func mouseDown(with event: NSEvent) { - ImGui_ImplOSX_HandleEvent(event, self.view) + ImGui_ImplOSX_HandleEvent(event, view) } - + override func mouseUp(with event: NSEvent) { - ImGui_ImplOSX_HandleEvent(event, self.view) + ImGui_ImplOSX_HandleEvent(event, view) } - + override func mouseDragged(with event: NSEvent) { - ImGui_ImplOSX_HandleEvent(event, self.view) + ImGui_ImplOSX_HandleEvent(event, view) } - + override func scrollWheel(with event: NSEvent) { - ImGui_ImplOSX_HandleEvent(event, self.view) + ImGui_ImplOSX_HandleEvent(event, view) } } diff --git a/Sources/Demos/Metal/imgui_impl_metal.swift b/Sources/Demos/Metal/imgui_impl_metal.swift index 1c7992d..7f8ac67 100644 --- a/Sources/Demos/Metal/imgui_impl_metal.swift +++ b/Sources/Demos/Metal/imgui_impl_metal.swift @@ -5,21 +5,19 @@ // Created by Christian Treffs on 31.08.19. // +import AppKit import CImGui import ImGui -import AppKit import Metal import MetalKit @available(OSX 10.11, *) -var g_sharedMetalContext: MetalContext = MetalContext() +var g_sharedMetalContext: MetalContext = .init() @available(OSX 10.11, *) @discardableResult func ImGui_ImplMetal_Init(_ device: MTLDevice) -> Bool { - let io = ImGuiGetIO()! - "imgui_impl_metal".withCString { io.pointee.BackendRendererName = $0 @@ -46,7 +44,8 @@ func ImGui_ImplMetal_NewFrame(_ renderPassDescriptor: MTLRenderPassDescriptor) { @available(OSX 10.11, *) func ImGui_ImplMetal_RenderDrawData(_ draw_data: ImDrawData, _ commandBuffer: MTLCommandBuffer, - _ commandEncoder: MTLRenderCommandEncoder) { + _ commandEncoder: MTLRenderCommandEncoder) +{ g_sharedMetalContext.renderDrawData(drawData: draw_data, commandBuffer: commandBuffer, commandEncoder: commandEncoder) @@ -68,7 +67,7 @@ func ImGui_ImplMetal_CreateFontsTexture(_ device: MTLDevice) -> Bool { let io = ImGuiGetIO()! let texId: ImTextureID = withUnsafePointer(to: &g_sharedMetalContext.fontTexture!) { ptr in - return UnsafeMutableRawPointer(mutating: ptr) + UnsafeMutableRawPointer(mutating: ptr) } io.pointee.Fonts.pointee.TexID = texId // ImTextureID == void* @@ -104,12 +103,10 @@ class MetalBuffer { @available(OSX 10.11, *) extension MetalBuffer: Equatable { static func == (lhs: MetalBuffer, rhs: MetalBuffer) -> Bool { - return lhs.buffer.length == rhs.buffer.length && + lhs.buffer.length == rhs.buffer.length && lhs.buffer.contents() == rhs.buffer.contents() && lhs.lastReuseTime == rhs.lastReuseTime - } - } // An object that encapsulates the data necessary to uniquely identify a @@ -128,16 +125,17 @@ struct FramebufferDescriptor { stencilPixelFormat = renderPassDescriptor.stencilAttachment.texture?.pixelFormat ?? .invalid } } + @available(OSX 10.11, *) extension FramebufferDescriptor: Equatable { static func == (lhs: FramebufferDescriptor, rhs: FramebufferDescriptor) -> Bool { - return lhs.sampleCount == rhs.sampleCount && + lhs.sampleCount == rhs.sampleCount && lhs.colorPixelFormat == rhs.colorPixelFormat && lhs.depthPixelFormat == rhs.depthPixelFormat && lhs.stencilPixelFormat == rhs.stencilPixelFormat } - } + @available(OSX 10.11, *) extension FramebufferDescriptor: Hashable { func hash(into hasher: inout Hasher) { @@ -169,10 +167,10 @@ class MetalContext { } func makeDeviceObjects(with device: MTLDevice) { - let depthStencilDescriptor: MTLDepthStencilDescriptor = MTLDepthStencilDescriptor() + let depthStencilDescriptor = MTLDepthStencilDescriptor() depthStencilDescriptor.isDepthWriteEnabled = false depthStencilDescriptor.depthCompareFunction = .always - self.depthStencilState = device.makeDepthStencilState(descriptor: depthStencilDescriptor) + depthStencilState = device.makeDepthStencilState(descriptor: depthStencilDescriptor) } /// We are retrieving and uploading the font atlas as a 4-channels RGBA texture here. @@ -189,7 +187,6 @@ class MetalContext { var bytesPerPixel: Int32 = 0 ImFontAtlas_GetTexDataAsRGBA32(io.pointee.Fonts, &pixels, &width, &height, &bytesPerPixel) - let textureDescriptor = MTLTextureDescriptor.texture2DDescriptor(pixelFormat: .rgba8Unorm, width: Int(width), height: Int(height), @@ -205,7 +202,7 @@ class MetalContext { withBytes: UnsafeRawPointer(pixels!), bytesPerRow: Int(width) * Int(bytesPerPixel)) - self.fontTexture = texture + fontTexture = texture } func dequeueReusableBuffer(ofLength length: Int, device: MTLDevice) -> MetalBuffer { @@ -227,7 +224,7 @@ class MetalContext { var bestCandidate: MetalBuffer? for candidate in bufferCache { - if candidate.buffer.length >= length && (bestCandidate == nil || bestCandidate!.lastReuseTime > candidate.lastReuseTime) { + if candidate.buffer.length >= length, bestCandidate == nil || bestCandidate!.lastReuseTime > candidate.lastReuseTime { bestCandidate = candidate } } @@ -269,11 +266,12 @@ class MetalContext { } func setupRenderState(drawData: ImDrawData, - commandBuffer: MTLCommandBuffer, + commandBuffer _: MTLCommandBuffer, commandEncoder: MTLRenderCommandEncoder, renderPipelineState: MTLRenderPipelineState, vertexBuffer: MetalBuffer, - vertexBufferOffset: Int) { + vertexBufferOffset: Int) + { commandEncoder.setCullMode(.none) commandEncoder.setDepthStencilState(g_sharedMetalContext.depthStencilState) @@ -281,7 +279,7 @@ class MetalContext { // Our visible imgui space lies from draw_data->DisplayPos (top left) to // draw_data->DisplayPos+data_data->DisplaySize (bottom right). DisplayMin is typically (0,0) for single viewport apps. - let viewport: MTLViewport = MTLViewport( + let viewport = MTLViewport( originX: 0.0, originY: 0.0, width: Double(drawData.DisplaySize.x * drawData.FramebufferScale.x), @@ -295,18 +293,18 @@ class MetalContext { let R: Float = drawData.DisplayPos.x + drawData.DisplaySize.x let T: Float = drawData.DisplayPos.y let B: Float = drawData.DisplayPos.y + drawData.DisplaySize.y - let N: Float = Float(viewport.znear) - let F: Float = Float(viewport.zfar) + let N = Float(viewport.znear) + let F = Float(viewport.zfar) - var ortho_projection = simd_float4x4([2.0/(R-L), 0.0, 0.0, 0.0], - [0.0, 2.0/(T-B), 0.0, 0.0], - [0.0, 0.0, 1/(F-N), 0.0], - [(R+L)/(L-R), (T+B)/(B-T), N/(F-N), 1.0]) + var ortho_projection = simd_float4x4([2.0 / (R - L), 0.0, 0.0, 0.0], + [0.0, 2.0 / (T - B), 0.0, 0.0], + [0.0, 0.0, 1 / (F - N), 0.0], + [(R + L) / (L - R), (T + B) / (B - T), N / (F - N), 1.0]) withUnsafeMutablePointer(to: &ortho_projection) { commandEncoder.setVertexBytes($0, length: MemoryLayout.size, index: 1) } - + commandEncoder.setRenderPipelineState(renderPipelineState) commandEncoder.setVertexBuffer(vertexBuffer.buffer, offset: 0, index: 0) @@ -315,13 +313,13 @@ class MetalContext { func renderDrawData(drawData: ImDrawData, commandBuffer: MTLCommandBuffer, - commandEncoder: MTLRenderCommandEncoder) { - + commandEncoder: MTLRenderCommandEncoder) + { // Avoid rendering when minimized, // scale coordinates for retina displays (screen coordinates != framebuffer coordinates) - let fb_width: Int = Int(drawData.DisplaySize.x * drawData.FramebufferScale.x) - let fb_height: Int = Int(drawData.DisplaySize.y * drawData.FramebufferScale.y) + let fb_width = Int(drawData.DisplaySize.x * drawData.FramebufferScale.x) + let fb_height = Int(drawData.DisplaySize.y * drawData.FramebufferScale.y) if fb_width <= 0 || fb_height <= 0 || drawData.CmdListsCount == 0 { return @@ -329,8 +327,8 @@ class MetalContext { let renderPipelineState: MTLRenderPipelineState = renderPipelineStateForFrameAndDevice(commandBuffer.device) - let vertexBufferLength: Int = Int(drawData.TotalVtxCount) * MemoryLayout.size - let indexBufferLength: Int = Int(drawData.TotalIdxCount) * MemoryLayout.size + let vertexBufferLength = Int(drawData.TotalVtxCount) * MemoryLayout.size + let indexBufferLength = Int(drawData.TotalIdxCount) * MemoryLayout.size let vertexBuffer: MetalBuffer = dequeueReusableBuffer(ofLength: vertexBufferLength, device: commandBuffer.device) @@ -347,14 +345,14 @@ class MetalContext { // Will project scissor/clipping rectangles into framebuffer space let clipOff: ImVec2 = drawData.DisplayPos // (0,0) unless using multi-viewports - let clipScale: ImVec2 = drawData.FramebufferScale // (1,1) unless using retina display which are often (2,2) + let clipScale: ImVec2 = drawData.FramebufferScale // (1,1) unless using retina display which are often (2,2) // // Render command lists - var vertexBufferOffset: Int = 0 - var indexBufferOffset: Int = 0 + var vertexBufferOffset = 0 + var indexBufferOffset = 0 - for n in 0...size) - for cmd_i in 0..= 0.0 && clipRect.w >= 0.0 { + if clipRect.x < Float(fb_width), clipRect.y < Float(fb_height), clipRect.z >= 0.0, clipRect.w >= 0.0 { // Apply scissor/clipping rectangle let scissorsRect = MTLScissorRect(x: Int(clipRect.x), y: Int(clipRect.y), @@ -414,7 +412,6 @@ class MetalContext { indexType: indexType, indexBuffer: indexBuffer.buffer, indexBufferOffset: ibOffset) - } } } @@ -423,18 +420,16 @@ class MetalContext { indexBufferOffset += Int(cmd_list.IdxBuffer.Size) * MemoryLayout.size } - commandBuffer.addCompletedHandler { [weak self]_ in + commandBuffer.addCompletedHandler { [weak self] _ in DispatchQueue.main.async { [weak self] in self?.enqueueReusableBuffer(vertexBuffer) self?.enqueueReusableBuffer(indexBuffer) } } - } - func renderPipelineStateForFramebufferDescriptor(_ descriptor: FramebufferDescriptor, _ device: MTLDevice) -> MTLRenderPipelineState { - + func renderPipelineStateForFramebufferDescriptor(_: FramebufferDescriptor, _ device: MTLDevice) -> MTLRenderPipelineState { let shaderSource: String = Shaders.default let library: MTLLibrary = try! device.makeLibrary(source: shaderSource, options: nil) @@ -442,8 +437,8 @@ class MetalContext { let vertexFunction: MTLFunction = library.makeFunction(name: "vertex_main")! let fragmentFunction: MTLFunction = library.makeFunction(name: "fragment_main")! - let vertexDescriptor: MTLVertexDescriptor = MTLVertexDescriptor() - + let vertexDescriptor = MTLVertexDescriptor() + // position vertexDescriptor.attributes[0].offset = IM_OFFSETOF(\ImDrawVert.pos) vertexDescriptor.attributes[0].format = .float2 diff --git a/Sources/Demos/Metal/imgui_impl_osx.swift b/Sources/Demos/Metal/imgui_impl_osx.swift index 5174de6..f627ec3 100644 --- a/Sources/Demos/Metal/imgui_impl_osx.swift +++ b/Sources/Demos/Metal/imgui_impl_osx.swift @@ -6,10 +6,10 @@ // Updated by Junhao Wang on 30.12.21. // -import ImGui import AppKit import Carbon import GameController +import ImGui // CHANGELOG // 2021-12-30: Update functions as defined in v1.86. Add NSView parameter to ImGui_ImplOSX_Init(). @@ -18,99 +18,100 @@ import GameController // Earlier: Check the original backend file written in Objective-C in ocornut/imgui. // Data -fileprivate var g_HostClockPeriod: Double = 0.0 -fileprivate var g_Time: CFAbsoluteTime = 0.0 // Original approach uses: Double -fileprivate var g_MouseCursorHidden: Bool = false +private var g_HostClockPeriod: Double = 0.0 +private var g_Time: CFAbsoluteTime = 0.0 // Original approach uses: Double +private var g_MouseCursorHidden: Bool = false -fileprivate var g_MouseCursors: [NSCursor?] = [NSCursor?](repeating: nil, count: Int(ImGuiMouseCursor_COUNT.rawValue)) -fileprivate var g_MouseJustPressed: [Bool] = [Bool](repeating: false, count: Int(ImGuiMouseButton_COUNT.rawValue)) -fileprivate var g_MouseDown: [Bool] = [Bool](repeating: false, count: Int(ImGuiMouseButton_COUNT.rawValue)) +private var g_MouseCursors: [NSCursor?] = .init(repeating: nil, count: Int(ImGuiMouseCursor_COUNT.rawValue)) +private var g_MouseJustPressed: [Bool] = .init(repeating: false, count: Int(ImGuiMouseButton_COUNT.rawValue)) +private var g_MouseDown: [Bool] = .init(repeating: false, count: Int(ImGuiMouseButton_COUNT.rawValue)) -fileprivate var g_FocusObserver: ImFocusObserver? = nil -fileprivate var g_KeyEventResponder: KeyEventResponder? = nil +private var g_FocusObserver: ImFocusObserver? +private var g_KeyEventResponder: KeyEventResponder? -fileprivate var s_clipboard: UnsafeMutablePointer? = nil +private var s_clipboard: UnsafeMutablePointer? // MARK: - Functions + @discardableResult func ImGui_ImplOSX_Init(_ view: NSView) -> Bool { let io = ImGuiGetIO()! - - //io.pointee.ConfigFlags |= Int32(ImGuiConfigFlags_DockingEnable.rawValue) - //io.pointee.ConfigFlags |= Int32(ImGuiConfigFlags_DpiEnableScaleViewports.rawValue) - //io.pointee.ConfigFlags |= Int32(ImGuiConfigFlags_DpiEnableScaleFonts.rawValue) - + + // io.pointee.ConfigFlags |= Int32(ImGuiConfigFlags_DockingEnable.rawValue) + // io.pointee.ConfigFlags |= Int32(ImGuiConfigFlags_DpiEnableScaleViewports.rawValue) + // io.pointee.ConfigFlags |= Int32(ImGuiConfigFlags_DpiEnableScaleFonts.rawValue) + // Setup back-end capabilities flags - io.pointee.BackendFlags |= Int32(ImGuiBackendFlags_HasMouseCursors.rawValue) // We can honor GetMouseCursor() values (optional) - //io.BackendFlags |= ImGuiBackendFlags_HasSetMousePos; // We can honor io.WantSetMousePos requests (optional, rarely used) - //io.BackendFlags |= ImGuiBackendFlags_PlatformHasViewports; // We can create multi-viewports on the Platform side (optional) - //io.BackendFlags |= ImGuiBackendFlags_HasMouseHoveredViewport; // We can set io.MouseHoveredViewport correctly (optional, not easy) + io.pointee.BackendFlags |= Int32(ImGuiBackendFlags_HasMouseCursors.rawValue) // We can honor GetMouseCursor() values (optional) + // io.BackendFlags |= ImGuiBackendFlags_HasSetMousePos; // We can honor io.WantSetMousePos requests (optional, rarely used) + // io.BackendFlags |= ImGuiBackendFlags_PlatformHasViewports; // We can create multi-viewports on the Platform side (optional) + // io.BackendFlags |= ImGuiBackendFlags_HasMouseHoveredViewport; // We can set io.MouseHoveredViewport correctly (optional, not easy) "imgui_metal_osx".withCString { io.pointee.BackendPlatformName = $0 } - + // Keyboard mapping. ImGui will use those indices to peek into the io.KeyDown[] array. CArray.write(&io.pointee.KeyMap) { keyMap in - keyMap[Int(ImGuiKey_Tab.rawValue)] = ImGuiKey(kVK_Tab) - keyMap[Int(ImGuiKey_LeftArrow.rawValue)] = ImGuiKey(kVK_LeftArrow) - keyMap[Int(ImGuiKey_RightArrow.rawValue)] = ImGuiKey(kVK_RightArrow) - keyMap[Int(ImGuiKey_UpArrow.rawValue)] = ImGuiKey(kVK_UpArrow) - keyMap[Int(ImGuiKey_DownArrow.rawValue)] = ImGuiKey(kVK_DownArrow) - keyMap[Int(ImGuiKey_PageUp.rawValue)] = ImGuiKey(kVK_PageUp) - keyMap[Int(ImGuiKey_PageDown.rawValue)] = ImGuiKey(kVK_PageDown) - keyMap[Int(ImGuiKey_Home.rawValue)] = ImGuiKey(kVK_Home) - keyMap[Int(ImGuiKey_End.rawValue)] = ImGuiKey(kVK_End) - keyMap[Int(ImGuiKey_Insert.rawValue)] = ImGuiKey(kVK_F13) - keyMap[Int(ImGuiKey_Delete.rawValue)] = ImGuiKey(kVK_ForwardDelete) - keyMap[Int(ImGuiKey_Backspace.rawValue)] = ImGuiKey(kVK_Delete) - keyMap[Int(ImGuiKey_Space.rawValue)] = ImGuiKey(kVK_Space) - keyMap[Int(ImGuiKey_Enter.rawValue)] = ImGuiKey(kVK_Return) - keyMap[Int(ImGuiKey_Escape.rawValue)] = ImGuiKey(kVK_Escape) - keyMap[Int(ImGuiKey_KeyPadEnter.rawValue)] = ImGuiKey(kVK_ANSI_KeypadEnter) - keyMap[Int(ImGuiKey_A.rawValue)] = ImGuiKey(kVK_ANSI_A) - keyMap[Int(ImGuiKey_C.rawValue)] = ImGuiKey(kVK_ANSI_C) - keyMap[Int(ImGuiKey_V.rawValue)] = ImGuiKey(kVK_ANSI_V) - keyMap[Int(ImGuiKey_X.rawValue)] = ImGuiKey(kVK_ANSI_X) - keyMap[Int(ImGuiKey_Y.rawValue)] = ImGuiKey(kVK_ANSI_Y) - keyMap[Int(ImGuiKey_Z.rawValue)] = ImGuiKey(kVK_ANSI_Z) - } - + keyMap[Int(ImGuiKey_Tab.rawValue)] = ImGuiKey(kVK_Tab) + keyMap[Int(ImGuiKey_LeftArrow.rawValue)] = ImGuiKey(kVK_LeftArrow) + keyMap[Int(ImGuiKey_RightArrow.rawValue)] = ImGuiKey(kVK_RightArrow) + keyMap[Int(ImGuiKey_UpArrow.rawValue)] = ImGuiKey(kVK_UpArrow) + keyMap[Int(ImGuiKey_DownArrow.rawValue)] = ImGuiKey(kVK_DownArrow) + keyMap[Int(ImGuiKey_PageUp.rawValue)] = ImGuiKey(kVK_PageUp) + keyMap[Int(ImGuiKey_PageDown.rawValue)] = ImGuiKey(kVK_PageDown) + keyMap[Int(ImGuiKey_Home.rawValue)] = ImGuiKey(kVK_Home) + keyMap[Int(ImGuiKey_End.rawValue)] = ImGuiKey(kVK_End) + keyMap[Int(ImGuiKey_Insert.rawValue)] = ImGuiKey(kVK_F13) + keyMap[Int(ImGuiKey_Delete.rawValue)] = ImGuiKey(kVK_ForwardDelete) + keyMap[Int(ImGuiKey_Backspace.rawValue)] = ImGuiKey(kVK_Delete) + keyMap[Int(ImGuiKey_Space.rawValue)] = ImGuiKey(kVK_Space) + keyMap[Int(ImGuiKey_Enter.rawValue)] = ImGuiKey(kVK_Return) + keyMap[Int(ImGuiKey_Escape.rawValue)] = ImGuiKey(kVK_Escape) + keyMap[Int(ImGuiKey_KeyPadEnter.rawValue)] = ImGuiKey(kVK_ANSI_KeypadEnter) + keyMap[Int(ImGuiKey_A.rawValue)] = ImGuiKey(kVK_ANSI_A) + keyMap[Int(ImGuiKey_C.rawValue)] = ImGuiKey(kVK_ANSI_C) + keyMap[Int(ImGuiKey_V.rawValue)] = ImGuiKey(kVK_ANSI_V) + keyMap[Int(ImGuiKey_X.rawValue)] = ImGuiKey(kVK_ANSI_X) + keyMap[Int(ImGuiKey_Y.rawValue)] = ImGuiKey(kVK_ANSI_Y) + keyMap[Int(ImGuiKey_Z.rawValue)] = ImGuiKey(kVK_ANSI_Z) + } + // Load cursors. Some of them are undocumented. g_MouseCursorHidden = false - - g_MouseCursors[ImGuiMouseCursor_Arrow] = NSCursor.arrow - g_MouseCursors[ImGuiMouseCursor_TextInput] = NSCursor.iBeam - g_MouseCursors[ImGuiMouseCursor_ResizeAll] = NSCursor.closedHand - g_MouseCursors[ImGuiMouseCursor_Hand] = NSCursor.pointingHand + + g_MouseCursors[ImGuiMouseCursor_Arrow] = NSCursor.arrow + g_MouseCursors[ImGuiMouseCursor_TextInput] = NSCursor.iBeam + g_MouseCursors[ImGuiMouseCursor_ResizeAll] = NSCursor.closedHand + g_MouseCursors[ImGuiMouseCursor_Hand] = NSCursor.pointingHand g_MouseCursors[ImGuiMouseCursor_NotAllowed] = NSCursor.operationNotAllowed - g_MouseCursors[ImGuiMouseCursor_ResizeNS] = NSCursor.resizeUpDown - g_MouseCursors[ImGuiMouseCursor_ResizeEW] = NSCursor.resizeLeftRight + g_MouseCursors[ImGuiMouseCursor_ResizeNS] = NSCursor.resizeUpDown + g_MouseCursors[ImGuiMouseCursor_ResizeEW] = NSCursor.resizeLeftRight g_MouseCursors[ImGuiMouseCursor_ResizeNESW] = NSCursor.closedHand g_MouseCursors[ImGuiMouseCursor_ResizeNWSE] = NSCursor.closedHand - + // Note that ImGuicpp also include default OSX clipboard handlers which can be enabled // by adding '#define IMGUI_ENABLE_OSX_DEFAULT_CLIPBOARD_FUNCTIONS' in imconfig.h and adding '-framework ApplicationServices' to your linker command-line. // Since we are already in ObjC land here, it is easy for us to add a clipboard handler using the NSPasteboard api. - io.pointee.SetClipboardTextFn = { (_, cStr) -> Void in + io.pointee.SetClipboardTextFn = { _, cStr in if let s = cStr { let pasteboard = NSPasteboard.general pasteboard.declareTypes([.string], owner: nil) pasteboard.setString(String(cString: s), forType: .string) } } - - io.pointee.GetClipboardTextFn = { (_) -> UnsafePointer? in + + io.pointee.GetClipboardTextFn = { _ -> UnsafePointer? in let pasteboard = NSPasteboard.general let available = pasteboard.availableType(from: [.string]) - - guard available != nil && available! == .string else { + + guard available != nil, available! == .string else { return nil } - + guard let string = pasteboard.string(forType: .string) else { return nil } - + /* Original code const char* string_c = (const char*)[string UTF8String]; size_t string_len = strlen(string_c); @@ -126,7 +127,7 @@ func ImGui_ImplOSX_Init(_ view: NSView) -> Bool { s_clipboard = strdup(string) return UnsafePointer(s_clipboard) } - + g_FocusObserver = ImFocusObserver() NotificationCenter.default.addObserver(g_FocusObserver!, selector: #selector(g_FocusObserver!.onApplicationBecomeActive), @@ -136,19 +137,19 @@ func ImGui_ImplOSX_Init(_ view: NSView) -> Bool { selector: #selector(g_FocusObserver!.onApplicationBecomeInactive), name: NSApplication.didResignActiveNotification, object: nil) - + // Add the NSTextInputClient to the view hierarchy, // to receive keyboard events and translate them to input text. - + g_KeyEventResponder = KeyEventResponder(frame: NSZeroRect) view.addSubview(g_KeyEventResponder!) - + return true } func ImGui_ImplOSX_Shutdown() { g_FocusObserver = nil - + if let clipboard = s_clipboard { free(clipboard) } @@ -158,17 +159,17 @@ func ImGui_ImplOSX_NewFrame(_ view: NSView) { // Setup display size let ioRef = igGetIO()! var io: ImGuiIO = ioRef.pointee - - let dpi: Float = Float(view.window?.backingScaleFactor ?? NSScreen.main!.backingScaleFactor) + + let dpi = Float(view.window?.backingScaleFactor ?? NSScreen.main!.backingScaleFactor) io.DisplaySize = ImVec2(x: Float(view.bounds.size.width), y: Float(view.bounds.size.height)) io.DisplayFramebufferScale = ImVec2(x: dpi, y: dpi) - + // Setup time step if g_Time == 0.0 { g_Time = CFAbsoluteTimeGetCurrent() } let current_time: CFAbsoluteTime = CFAbsoluteTimeGetCurrent() - + /* Original approach if g_Time == 0.0 { InitHostClockPerioid() @@ -176,10 +177,10 @@ func ImGui_ImplOSX_NewFrame(_ view: NSView) { } let current_time: Double = GetMachAbsoluteTimeInSeconds() */ - + io.DeltaTime = Float(current_time - g_Time) g_Time = current_time - + ImGui_ImplOSX_UpdateMouseCursorAndButtons() ImGui_ImplOSX_UpdateGamepads() } @@ -187,31 +188,31 @@ func ImGui_ImplOSX_NewFrame(_ view: NSView) { @discardableResult func ImGui_ImplOSX_HandleEvent(_ event: NSEvent, _ view: NSView) -> Bool { let io = ImGuiGetIO()! - + if event.type == .leftMouseDown || event.type == .rightMouseDown || event.type == .otherMouseDown { let button = event.buttonNumber - if button >= 0 && button < g_MouseDown.count { + if button >= 0, button < g_MouseDown.count { g_MouseDown[Int(button)] = true g_MouseJustPressed[Int(button)] = true } return io.pointee.WantCaptureMouse } - + if event.type == .leftMouseUp || event.type == .rightMouseUp || event.type == .otherMouseUp { let button = event.buttonNumber - if button >= 0 && button < g_MouseDown.count { + if button >= 0, button < g_MouseDown.count { g_MouseDown[button] = false } return io.pointee.WantCaptureMouse } - + if event.type == .mouseMoved || event.type == .leftMouseDragged || event.type == .rightMouseDragged || event.type == .otherMouseDragged { var mousePoint = event.locationInWindow mousePoint = view.convert(mousePoint, from: nil) mousePoint = NSPoint(x: mousePoint.x, y: view.bounds.size.height - mousePoint.y) io.pointee.MousePos = ImVec2(x: Float(mousePoint.x), y: Float(mousePoint.y)) } - + if event.type == .scrollWheel { /// Ignore canceled events. /// @@ -228,48 +229,48 @@ func ImGui_ImplOSX_HandleEvent(_ event: NSEvent, _ view: NSView) -> Bool { if event.phase == .cancelled { return false } - + var wheel_dx: Float = 0.0 var wheel_dy: Float = 0.0 - + wheel_dx = Float(event.scrollingDeltaX) wheel_dy = Float(event.scrollingDeltaY) - + if event.hasPreciseScrollingDeltas { wheel_dx *= 0.1 wheel_dy *= 0.1 } - + if abs(wheel_dx) > 0.0 { io.pointee.MouseWheelH += wheel_dx * 0.1 } - + if abs(wheel_dy) > 0.0 { io.pointee.MouseWheel += wheel_dy * 0.1 } return io.pointee.WantCaptureMouse } - + if event.type == .keyDown || event.type == .keyUp { let code: UInt16 = event.keyCode CArray.write(&io.pointee.KeysDown) { keyCodes in - if code >= 0 && code < keyCodes.count { + if code >= 0, code < keyCodes.count { keyCodes[Int(code)] = event.type == .keyDown } } let flags: NSEvent.ModifierFlags = event.modifierFlags - io.pointee.KeyCtrl = flags.contains(.control) + io.pointee.KeyCtrl = flags.contains(.control) io.pointee.KeyShift = flags.contains(.shift) - io.pointee.KeyAlt = flags.contains(.option) + io.pointee.KeyAlt = flags.contains(.option) io.pointee.KeySuper = flags.contains(.command) return io.pointee.WantCaptureKeyboard } - + if event.type == .flagsChanged { let flags: NSEvent.ModifierFlags = event.modifierFlags.union(.deviceIndependentFlagsMask) - + let keyCode = Int(event.keyCode) - + switch keyCode { case kVK_Control: io.pointee.KeyCtrl = flags.contains(.control) @@ -282,32 +283,32 @@ func ImGui_ImplOSX_HandleEvent(_ event: NSEvent, _ view: NSView) -> Bool { default: return false } - + return io.pointee.WantCaptureKeyboard } - + return false } // MARK: - Fileprivate(static) functions -fileprivate func ImGui_ImplOSX_UpdateMouseCursorAndButtons() { +private func ImGui_ImplOSX_UpdateMouseCursorAndButtons() { // Update buttons let io = ImGuiGetIO()! - + CArray.write(&io.pointee.MouseDown) { mouseButtons in // If a mouse press event came, always pass it as "mouse held this frame", // so we don't miss click-release events that are shorter than 1 frame. - for n in 0...write(&io.pointee.NavInputs) { navInputs in - for n in 0...write(&io.pointee.NavInputs) { navInput in - navInput[Int(ImGuiNavInput_Activate.rawValue)] = gp.buttonA.isPressed ? 1.0 : 0.0 - navInput[Int(ImGuiNavInput_Cancel.rawValue)] = gp.buttonB.isPressed ? 1.0 : 0.0 - navInput[Int(ImGuiNavInput_Menu.rawValue)] = gp.buttonX.isPressed ? 1.0 : 0.0 - navInput[Int(ImGuiNavInput_Input.rawValue)] = gp.buttonY.isPressed ? 1.0 : 0.0 - navInput[Int(ImGuiNavInput_DpadLeft.rawValue)] = gp.dpad.left.isPressed ? 1.0 : 0.0 - navInput[Int(ImGuiNavInput_DpadRight.rawValue)] = gp.dpad.right.isPressed ? 1.0 : 0.0 - navInput[Int(ImGuiNavInput_DpadUp.rawValue)] = gp.dpad.up.isPressed ? 1.0 : 0.0 - navInput[Int(ImGuiNavInput_DpadDown.rawValue)] = gp.dpad.down.isPressed ? 1.0 : 0.0 - - navInput[Int(ImGuiNavInput_LStickLeft.rawValue)] = gp.leftThumbstick.left.value + navInput[Int(ImGuiNavInput_Activate.rawValue)] = gp.buttonA.isPressed ? 1.0 : 0.0 + navInput[Int(ImGuiNavInput_Cancel.rawValue)] = gp.buttonB.isPressed ? 1.0 : 0.0 + navInput[Int(ImGuiNavInput_Menu.rawValue)] = gp.buttonX.isPressed ? 1.0 : 0.0 + navInput[Int(ImGuiNavInput_Input.rawValue)] = gp.buttonY.isPressed ? 1.0 : 0.0 + navInput[Int(ImGuiNavInput_DpadLeft.rawValue)] = gp.dpad.left.isPressed ? 1.0 : 0.0 + navInput[Int(ImGuiNavInput_DpadRight.rawValue)] = gp.dpad.right.isPressed ? 1.0 : 0.0 + navInput[Int(ImGuiNavInput_DpadUp.rawValue)] = gp.dpad.up.isPressed ? 1.0 : 0.0 + navInput[Int(ImGuiNavInput_DpadDown.rawValue)] = gp.dpad.down.isPressed ? 1.0 : 0.0 + + navInput[Int(ImGuiNavInput_LStickLeft.rawValue)] = gp.leftThumbstick.left.value navInput[Int(ImGuiNavInput_LStickRight.rawValue)] = gp.leftThumbstick.right.value - navInput[Int(ImGuiNavInput_LStickUp.rawValue)] = gp.leftThumbstick.up.value - navInput[Int(ImGuiNavInput_LStickDown.rawValue)] = gp.leftThumbstick.down.value + navInput[Int(ImGuiNavInput_LStickUp.rawValue)] = gp.leftThumbstick.up.value + navInput[Int(ImGuiNavInput_LStickDown.rawValue)] = gp.leftThumbstick.down.value } - + io.pointee.BackendFlags |= Int32(ImGuiBackendFlags_HasGamepad.rawValue) } -fileprivate func resetKeys() { +private func resetKeys() { let io = ImGuiGetIO()! - + CArray.write(&io.pointee.KeysDown) { keysDown in - for n in 0.. Double { - return Double(mach_absolute_time()) * g_HostClockPeriod +private func GetMachAbsoluteTimeInSeconds() -> Double { + Double(mach_absolute_time()) * g_HostClockPeriod } // MARK: - Extensions and Classes + /** KeyEventResponder implements the NSTextInputClient protocol as is required by the macOS text input manager. The macOS text input manager is invoked by calling the interpretKeyEvents method from the keyDown method. @@ -406,87 +408,81 @@ fileprivate func GetMachAbsoluteTimeInSeconds() -> Double { and GLFW: https://github.com/glfw/glfw/blob/b55a517ae0c7b5127dffa79a64f5406021bf9076/src/cocoa_window.m#L722-L723 */ -class KeyEventResponder: NSView { } +class KeyEventResponder: NSView {} extension KeyEventResponder: NSTextInputClient { override func viewDidMoveToWindow() { // Ensure self is a first responder to receive the input events. window?.makeFirstResponder(self) } - + override func keyDown(with event: NSEvent) { // Call to the macOS input manager system. interpretKeyEvents([event]) } - - func insertText(_ string: Any, replacementRange: NSRange) { + + func insertText(_ string: Any, replacementRange _: NSRange) { var characters: String? - + if let str = string as? NSAttributedString { characters = str.string } else { characters = string as? String } - + ImGuiIO_AddInputCharactersUTF8(ImGuiGetIO()!, characters) } - + override var acceptsFirstResponder: Bool { - return true + true } - - override func doCommand(by selector: Selector) { - - } - - func attributedSubstring(forProposedRange range: NSRange, actualRange: NSRangePointer?) -> NSAttributedString? { - return nil + + override func doCommand(by _: Selector) {} + + func attributedSubstring(forProposedRange _: NSRange, actualRange _: NSRangePointer?) -> NSAttributedString? { + nil } - - func characterIndex(for point: NSPoint) -> Int { - return 0 + + func characterIndex(for _: NSPoint) -> Int { + 0 } - - func firstRect(forCharacterRange range: NSRange, actualRange: NSRangePointer?) -> NSRect { - return NSZeroRect + + func firstRect(forCharacterRange _: NSRange, actualRange _: NSRangePointer?) -> NSRect { + NSZeroRect } - + func hasMarkedText() -> Bool { - return false + false } - + func markedRange() -> NSRange { - return NSMakeRange(NSNotFound, 0) + NSMakeRange(NSNotFound, 0) } - + func selectedRange() -> NSRange { - return NSMakeRange(NSNotFound, 0) - } - - func setMarkedText(_ string: Any, selectedRange: NSRange, replacementRange: NSRange) { - + NSMakeRange(NSNotFound, 0) } - - func unmarkText() { - - } - + + func setMarkedText(_: Any, selectedRange _: NSRange, replacementRange _: NSRange) {} + + func unmarkText() {} + func validAttributesForMarkedText() -> [NSAttributedString.Key] { - return [] + [] } } class ImFocusObserver: NSObject { - @objc func onApplicationBecomeActive(_ notifiaction: Notification) { + @objc func onApplicationBecomeActive(_: Notification) { ImGuiIO_AddFocusEvent(ImGuiGetIO()!, true) } - - @objc func onApplicationBecomeInactive(_ notification: Notification) { + + @objc func onApplicationBecomeInactive(_: Notification) { ImGuiIO_AddFocusEvent(ImGuiGetIO()!, false) - + // Unfocused applications do not receive input events, therefore we must manually // release any pressed keys when application loses focus, otherwise they would remain // stuck in a pressed state. https://github.com/ocornut/imgui/issues/3832 - resetKeys(); + resetKeys() } } diff --git a/Sources/Demos/Metal/main.swift b/Sources/Demos/Metal/main.swift index 6ef32e7..c7875ae 100644 --- a/Sources/Demos/Metal/main.swift +++ b/Sources/Demos/Metal/main.swift @@ -34,10 +34,10 @@ let quitMenuItem = NSMenuItem(title: quitTitle, appMenu.addItem(quitMenuItem) appMenuItem.submenu = appMenu -let window: NSWindow = NSWindow(contentRect: NSRect(x: 0, y: 0, width: 1280, height: 720), - styleMask: [.titled, .closable, .miniaturizable, .resizable], - backing: .buffered, - defer: false) +let window: NSWindow = .init(contentRect: NSRect(x: 0, y: 0, width: 1280, height: 720), + styleMask: [.titled, .closable, .miniaturizable, .resizable], + backing: .buffered, + defer: false) window.center() window.title = appName diff --git a/Sources/Demos/Minimal/main.swift b/Sources/Demos/Minimal/main.swift index c7169eb..b5425f0 100644 --- a/Sources/Demos/Minimal/main.swift +++ b/Sources/Demos/Minimal/main.swift @@ -1,12 +1,12 @@ import ImGui -//IMGUI_CHECKVERSION(); +// IMGUI_CHECKVERSION(); IMGUI_CHECKVERSION() -//ImGui::CreateContext(); +// ImGui::CreateContext(); let ctx = ImGuiCreateContext(nil) -//ImGuiIO& io = ImGui::GetIO(); +// ImGuiIO& io = ImGui::GetIO(); let io = ImGuiGetIO()! /// Build font atlas @@ -17,7 +17,7 @@ var bytesPerPixel: Int32 = 0 // io.Fonts->GetTexDataAsRGBA32(&tex_pixels, &tex_w, &tex_h); ImFontAtlas_GetTexDataAsRGBA32(io.pointee.Fonts, &pixels, &width, &height, &bytesPerPixel) -for n in 0..<20 { +for n in 0 ..< 20 { print("NewFrame() \(n)") // io.DisplaySize = ImVec2(1920, 1080); io.pointee.DisplaySize = ImVec2(x: 1920, y: 1080) @@ -25,7 +25,7 @@ for n in 0..<20 { io.pointee.DeltaTime = 1.0 / 60.0 // ImGui::NewFrame(); ImGuiNewFrame() - + var f: Float = 0.0 // ImGui::Text("Hello, world!"); ImGuiTextV("Hello, world!") @@ -33,10 +33,10 @@ for n in 0..<20 { ImGuiSliderFloat("float", &f, 0.0, 1.0, nil, 1) // ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); ImGuiTextV("Application average %.3f ms/frame (%.1f FPS)", 1000.0 / io.pointee.Framerate, io.pointee.Framerate) - + // ImGui::ShowDemoWindow(NULL); ImGuiShowDemoWindow(nil) - + // ImGui::Render(); ImGuiRender() } diff --git a/Sources/ImGui/Helper.swift b/Sources/ImGui/Helper.swift index 198714d..676abf3 100644 --- a/Sources/ImGui/Helper.swift +++ b/Sources/ImGui/Helper.swift @@ -5,12 +5,13 @@ // Created by Christian Treffs on 31.08.19. // -extension Array { - public subscript(representable: R) -> Element where R: RawRepresentable, R.RawValue: FixedWidthInteger { +public extension Array { + subscript(representable: R) -> Element where R: RawRepresentable, R.RawValue: FixedWidthInteger { get { self[Int(representable.rawValue)] } set { self[Int(representable.rawValue)] = newValue } } } + /// Compute the prefix sum of `seq`. public func scan(_ seq: S, _ initial: U, _ combine: (U, S.Iterator.Element) -> U) -> [U] { var result: [U] = [] @@ -22,11 +23,13 @@ public func scan(_ seq: S, _ initial: U, _ combine: (U, S.Iterat } return result } + /// https://oleb.net/blog/2016/10/swift-array-of-c-strings/ // from: https://forums.swift.org/t/bridging-string-to-const-char-const/3804/4 public func withArrayOfCStrings( _ args: [String], - _ body: ([UnsafePointer?]) -> R) -> R { + _ body: ([UnsafePointer?]) -> R +) -> R { let argsCounts = Array(args.map { $0.utf8.count + 1 }) @@ -60,8 +63,8 @@ public func withArrayOfCStringsBasePointer(_ strings: [String], _ body: } } -extension Optional where Wrapped == String { - @inlinable public func withOptionalCString(_ body: (UnsafePointer?) throws -> Result) rethrows -> Result { +public extension Optional where Wrapped == String { + @inlinable func withOptionalCString(_ body: (UnsafePointer?) throws -> Result) rethrows -> Result { guard let string = self else { return try body(nil) } @@ -78,7 +81,7 @@ public enum CArray { public static func write(_ cArray: inout C, _ body: (UnsafeMutableBufferPointer) throws -> O) rethrows -> O { try withUnsafeMutablePointer(to: &cArray) { try body(UnsafeMutableBufferPointer(start: UnsafeMutableRawPointer($0).assumingMemoryBound(to: T.self), - count: (MemoryLayout.stride / MemoryLayout.stride))) + count: MemoryLayout.stride / MemoryLayout.stride)) } } @@ -87,7 +90,7 @@ public enum CArray { public static func read(_ cArray: C, _ body: (UnsafeBufferPointer) throws -> O) rethrows -> O { try withUnsafePointer(to: cArray) { try body(UnsafeBufferPointer(start: UnsafeRawPointer($0).assumingMemoryBound(to: T.self), - count: (MemoryLayout.stride / MemoryLayout.stride))) + count: MemoryLayout.stride / MemoryLayout.stride)) } } } diff --git a/Sources/ImGui/ImGui+Definitions.swift b/Sources/ImGui/ImGui+Definitions.swift index 0f5f061..6e92a5e 100644 --- a/Sources/ImGui/ImGui+Definitions.swift +++ b/Sources/ImGui/ImGui+Definitions.swift @@ -10,4646 +10,4644 @@ public typealias ImChunkStream = OpaquePointer public typealias ImPool = OpaquePointer public typealias ImSpanAllocator = OpaquePointer - @inlinable public func ImAbs(_ x: Int32) -> Int32 { - return igImAbs_Int(x) + igImAbs_Int(x) } @inlinable public func ImAbs(_ x: Float) -> Float { - return igImAbs_Float(x) + igImAbs_Float(x) } @inlinable public func ImAbs(_ x: Double) -> Double { - return igImAbs_double(x) + igImAbs_double(x) } @inlinable public func ImAlphaBlendColors(_ col_a: ImU32, _ col_b: ImU32) -> ImU32 { - return igImAlphaBlendColors(col_a,col_b) + igImAlphaBlendColors(col_a, col_b) } -@inlinable public func ImBezierCubicCalc(_ pOut: UnsafeMutablePointer!, _ p1: ImVec2, _ p2: ImVec2, _ p3: ImVec2, _ p4: ImVec2, _ t: Float) -> Void { - return igImBezierCubicCalc(pOut,p1,p2,p3,p4,t) +@inlinable public func ImBezierCubicCalc(_ pOut: UnsafeMutablePointer!, _ p1: ImVec2, _ p2: ImVec2, _ p3: ImVec2, _ p4: ImVec2, _ t: Float) { + igImBezierCubicCalc(pOut, p1, p2, p3, p4, t) } -@inlinable public func ImBezierCubicClosestPoint(_ pOut: UnsafeMutablePointer!, _ p1: ImVec2, _ p2: ImVec2, _ p3: ImVec2, _ p4: ImVec2, _ p: ImVec2, _ num_segments: Int32) -> Void { - return igImBezierCubicClosestPoint(pOut,p1,p2,p3,p4,p,num_segments) +@inlinable public func ImBezierCubicClosestPoint(_ pOut: UnsafeMutablePointer!, _ p1: ImVec2, _ p2: ImVec2, _ p3: ImVec2, _ p4: ImVec2, _ p: ImVec2, _ num_segments: Int32) { + igImBezierCubicClosestPoint(pOut, p1, p2, p3, p4, p, num_segments) } -@inlinable public func ImBezierCubicClosestPointCasteljau(_ pOut: UnsafeMutablePointer!, _ p1: ImVec2, _ p2: ImVec2, _ p3: ImVec2, _ p4: ImVec2, _ p: ImVec2, _ tess_tol: Float) -> Void { - return igImBezierCubicClosestPointCasteljau(pOut,p1,p2,p3,p4,p,tess_tol) +@inlinable public func ImBezierCubicClosestPointCasteljau(_ pOut: UnsafeMutablePointer!, _ p1: ImVec2, _ p2: ImVec2, _ p3: ImVec2, _ p4: ImVec2, _ p: ImVec2, _ tess_tol: Float) { + igImBezierCubicClosestPointCasteljau(pOut, p1, p2, p3, p4, p, tess_tol) } -@inlinable public func ImBezierQuadraticCalc(_ pOut: UnsafeMutablePointer!, _ p1: ImVec2, _ p2: ImVec2, _ p3: ImVec2, _ t: Float) -> Void { - return igImBezierQuadraticCalc(pOut,p1,p2,p3,t) +@inlinable public func ImBezierQuadraticCalc(_ pOut: UnsafeMutablePointer!, _ p1: ImVec2, _ p2: ImVec2, _ p3: ImVec2, _ t: Float) { + igImBezierQuadraticCalc(pOut, p1, p2, p3, t) } -@inlinable public func ImBitArrayClearBit(_ arr: UnsafeMutablePointer!, _ n: Int32) -> Void { - return igImBitArrayClearBit(arr,n) +@inlinable public func ImBitArrayClearBit(_ arr: UnsafeMutablePointer!, _ n: Int32) { + igImBitArrayClearBit(arr, n) } -@inlinable public func ImBitArraySetBit(_ arr: UnsafeMutablePointer!, _ n: Int32) -> Void { - return igImBitArraySetBit(arr,n) +@inlinable public func ImBitArraySetBit(_ arr: UnsafeMutablePointer!, _ n: Int32) { + igImBitArraySetBit(arr, n) } -@inlinable public func ImBitArraySetBitRange(_ arr: UnsafeMutablePointer!, _ n: Int32, _ n2: Int32) -> Void { - return igImBitArraySetBitRange(arr,n,n2) +@inlinable public func ImBitArraySetBitRange(_ arr: UnsafeMutablePointer!, _ n: Int32, _ n2: Int32) { + igImBitArraySetBitRange(arr, n, n2) } @inlinable @discardableResult public func ImBitArrayTestBit(_ arr: UnsafePointer!, _ n: Int32) -> Bool { - return igImBitArrayTestBit(arr,n) + igImBitArrayTestBit(arr, n) } -@inlinable public func ImBitVectorClear(_ this: UnsafeMutablePointer!) -> Void { - return ImBitVector_Clear(this) +@inlinable public func ImBitVectorClear(_ this: UnsafeMutablePointer!) { + ImBitVector_Clear(this) } -@inlinable public func ImBitVectorClearBit(_ this: UnsafeMutablePointer!, _ n: Int32) -> Void { - return ImBitVector_ClearBit(this,n) +@inlinable public func ImBitVectorClearBit(_ this: UnsafeMutablePointer!, _ n: Int32) { + ImBitVector_ClearBit(this, n) } -@inlinable public func ImBitVectorCreate(_ this: UnsafeMutablePointer!, _ sz: Int32) -> Void { - return ImBitVector_Create(this,sz) +@inlinable public func ImBitVectorCreate(_ this: UnsafeMutablePointer!, _ sz: Int32) { + ImBitVector_Create(this, sz) } -@inlinable public func ImBitVectorSetBit(_ this: UnsafeMutablePointer!, _ n: Int32) -> Void { - return ImBitVector_SetBit(this,n) +@inlinable public func ImBitVectorSetBit(_ this: UnsafeMutablePointer!, _ n: Int32) { + ImBitVector_SetBit(this, n) } @inlinable @discardableResult public func ImBitVectorTestBit(_ this: UnsafeMutablePointer!, _ n: Int32) -> Bool { - return ImBitVector_TestBit(this,n) + ImBitVector_TestBit(this, n) } @inlinable @discardableResult public func ImCharIsBlankA(_ c: CChar) -> Bool { - return igImCharIsBlankA(c) + igImCharIsBlankA(c) } @inlinable @discardableResult public func ImCharIsBlankW(_ c: UInt32) -> Bool { - return igImCharIsBlankW(c) + igImCharIsBlankW(c) } -@inlinable public func ImClamp(_ pOut: UnsafeMutablePointer!, _ v: ImVec2, _ mn: ImVec2, _ mx: ImVec2) -> Void { - return igImClamp(pOut,v,mn,mx) +@inlinable public func ImClamp(_ pOut: UnsafeMutablePointer!, _ v: ImVec2, _ mn: ImVec2, _ mx: ImVec2) { + igImClamp(pOut, v, mn, mx) } -@inlinable public func ImColorHSV(_ pOut: UnsafeMutablePointer!, _ h: Float, _ s: Float, _ v: Float, _ a: Float) -> Void { - return ImColor_HSV(pOut,h,s,v,a) +@inlinable public func ImColorHSV(_ pOut: UnsafeMutablePointer!, _ h: Float, _ s: Float, _ v: Float, _ a: Float) { + ImColor_HSV(pOut, h, s, v, a) } -@inlinable public func ImColorSetHSV(_ this: UnsafeMutablePointer!, _ h: Float, _ s: Float, _ v: Float, _ a: Float) -> Void { - return ImColor_SetHSV(this,h,s,v,a) +@inlinable public func ImColorSetHSV(_ this: UnsafeMutablePointer!, _ h: Float, _ s: Float, _ v: Float, _ a: Float) { + ImColor_SetHSV(this, h, s, v, a) } @inlinable public func ImDot(_ a: ImVec2, _ b: ImVec2) -> Float { - return igImDot(a,b) + igImDot(a, b) } @inlinable public func ImDrawCmdGetTexID(_ this: UnsafeMutablePointer!) -> ImTextureID { - return ImDrawCmd_GetTexID(this) + ImDrawCmd_GetTexID(this) } -@inlinable public func ImDrawDataBuilderClear(_ this: UnsafeMutablePointer!) -> Void { - return ImDrawDataBuilder_Clear(this) +@inlinable public func ImDrawDataBuilderClear(_ this: UnsafeMutablePointer!) { + ImDrawDataBuilder_Clear(this) } -@inlinable public func ImDrawDataBuilderClearFreeMemory(_ this: UnsafeMutablePointer!) -> Void { - return ImDrawDataBuilder_ClearFreeMemory(this) +@inlinable public func ImDrawDataBuilderClearFreeMemory(_ this: UnsafeMutablePointer!) { + ImDrawDataBuilder_ClearFreeMemory(this) } -@inlinable public func ImDrawDataBuilderFlattenIntoSingleLayer(_ this: UnsafeMutablePointer!) -> Void { - return ImDrawDataBuilder_FlattenIntoSingleLayer(this) +@inlinable public func ImDrawDataBuilderFlattenIntoSingleLayer(_ this: UnsafeMutablePointer!) { + ImDrawDataBuilder_FlattenIntoSingleLayer(this) } @inlinable public func ImDrawDataBuilderGetDrawListCount(_ this: UnsafeMutablePointer!) -> Int32 { - return ImDrawDataBuilder_GetDrawListCount(this) + ImDrawDataBuilder_GetDrawListCount(this) } -@inlinable public func ImDrawDataClear(_ this: UnsafeMutablePointer!) -> Void { - return ImDrawData_Clear(this) +@inlinable public func ImDrawDataClear(_ this: UnsafeMutablePointer!) { + ImDrawData_Clear(this) } -@inlinable public func ImDrawDataDeIndexAllBuffers(_ this: UnsafeMutablePointer!) -> Void { - return ImDrawData_DeIndexAllBuffers(this) +@inlinable public func ImDrawDataDeIndexAllBuffers(_ this: UnsafeMutablePointer!) { + ImDrawData_DeIndexAllBuffers(this) } -@inlinable public func ImDrawDataScaleClipRects(_ this: UnsafeMutablePointer!, _ fb_scale: ImVec2) -> Void { - return ImDrawData_ScaleClipRects(this,fb_scale) +@inlinable public func ImDrawDataScaleClipRects(_ this: UnsafeMutablePointer!, _ fb_scale: ImVec2) { + ImDrawData_ScaleClipRects(this, fb_scale) } -@inlinable public func ImDrawListAddBezierCubic(_ this: UnsafeMutablePointer!, _ p1: ImVec2, _ p2: ImVec2, _ p3: ImVec2, _ p4: ImVec2, _ col: ImU32, _ thickness: Float, _ num_segments: Int32) -> Void { - return ImDrawList_AddBezierCubic(this,p1,p2,p3,p4,col,thickness,num_segments) +@inlinable public func ImDrawListAddBezierCubic(_ this: UnsafeMutablePointer!, _ p1: ImVec2, _ p2: ImVec2, _ p3: ImVec2, _ p4: ImVec2, _ col: ImU32, _ thickness: Float, _ num_segments: Int32) { + ImDrawList_AddBezierCubic(this, p1, p2, p3, p4, col, thickness, num_segments) } -@inlinable public func ImDrawListAddBezierQuadratic(_ this: UnsafeMutablePointer!, _ p1: ImVec2, _ p2: ImVec2, _ p3: ImVec2, _ col: ImU32, _ thickness: Float, _ num_segments: Int32) -> Void { - return ImDrawList_AddBezierQuadratic(this,p1,p2,p3,col,thickness,num_segments) +@inlinable public func ImDrawListAddBezierQuadratic(_ this: UnsafeMutablePointer!, _ p1: ImVec2, _ p2: ImVec2, _ p3: ImVec2, _ col: ImU32, _ thickness: Float, _ num_segments: Int32) { + ImDrawList_AddBezierQuadratic(this, p1, p2, p3, col, thickness, num_segments) } -@inlinable public func ImDrawListAddCallback(_ this: UnsafeMutablePointer!, _ callback: @escaping ImDrawCallback, _ callback_data: UnsafeMutableRawPointer!) -> Void { - return ImDrawList_AddCallback(this,callback,callback_data) +@inlinable public func ImDrawListAddCallback(_ this: UnsafeMutablePointer!, _ callback: @escaping ImDrawCallback, _ callback_data: UnsafeMutableRawPointer!) { + ImDrawList_AddCallback(this, callback, callback_data) } -@inlinable public func ImDrawListAddCircle(_ this: UnsafeMutablePointer!, _ center: ImVec2, _ radius: Float, _ col: ImU32, _ num_segments: Int32, _ thickness: Float) -> Void { - return ImDrawList_AddCircle(this,center,radius,col,num_segments,thickness) +@inlinable public func ImDrawListAddCircle(_ this: UnsafeMutablePointer!, _ center: ImVec2, _ radius: Float, _ col: ImU32, _ num_segments: Int32, _ thickness: Float) { + ImDrawList_AddCircle(this, center, radius, col, num_segments, thickness) } -@inlinable public func ImDrawListAddCircleFilled(_ this: UnsafeMutablePointer!, _ center: ImVec2, _ radius: Float, _ col: ImU32, _ num_segments: Int32) -> Void { - return ImDrawList_AddCircleFilled(this,center,radius,col,num_segments) +@inlinable public func ImDrawListAddCircleFilled(_ this: UnsafeMutablePointer!, _ center: ImVec2, _ radius: Float, _ col: ImU32, _ num_segments: Int32) { + ImDrawList_AddCircleFilled(this, center, radius, col, num_segments) } -@inlinable public func ImDrawListAddConvexPolyFilled(_ this: UnsafeMutablePointer!, _ points: UnsafePointer!, _ num_points: Int32, _ col: ImU32) -> Void { - return ImDrawList_AddConvexPolyFilled(this,points,num_points,col) +@inlinable public func ImDrawListAddConvexPolyFilled(_ this: UnsafeMutablePointer!, _ points: UnsafePointer!, _ num_points: Int32, _ col: ImU32) { + ImDrawList_AddConvexPolyFilled(this, points, num_points, col) } -@inlinable public func ImDrawListAddDrawCmd(_ this: UnsafeMutablePointer!) -> Void { - return ImDrawList_AddDrawCmd(this) +@inlinable public func ImDrawListAddDrawCmd(_ this: UnsafeMutablePointer!) { + ImDrawList_AddDrawCmd(this) } -@inlinable public func ImDrawListAddImage(_ this: UnsafeMutablePointer!, _ user_texture_id: ImTextureID, _ p_min: ImVec2, _ p_max: ImVec2, _ uv_min: ImVec2, _ uv_max: ImVec2, _ col: ImU32) -> Void { - return ImDrawList_AddImage(this,user_texture_id,p_min,p_max,uv_min,uv_max,col) +@inlinable public func ImDrawListAddImage(_ this: UnsafeMutablePointer!, _ user_texture_id: ImTextureID, _ p_min: ImVec2, _ p_max: ImVec2, _ uv_min: ImVec2, _ uv_max: ImVec2, _ col: ImU32) { + ImDrawList_AddImage(this, user_texture_id, p_min, p_max, uv_min, uv_max, col) } -@inlinable public func ImDrawListAddImageQuad(_ this: UnsafeMutablePointer!, _ user_texture_id: ImTextureID, _ p1: ImVec2, _ p2: ImVec2, _ p3: ImVec2, _ p4: ImVec2, _ uv1: ImVec2, _ uv2: ImVec2, _ uv3: ImVec2, _ uv4: ImVec2, _ col: ImU32) -> Void { - return ImDrawList_AddImageQuad(this,user_texture_id,p1,p2,p3,p4,uv1,uv2,uv3,uv4,col) +@inlinable public func ImDrawListAddImageQuad(_ this: UnsafeMutablePointer!, _ user_texture_id: ImTextureID, _ p1: ImVec2, _ p2: ImVec2, _ p3: ImVec2, _ p4: ImVec2, _ uv1: ImVec2, _ uv2: ImVec2, _ uv3: ImVec2, _ uv4: ImVec2, _ col: ImU32) { + ImDrawList_AddImageQuad(this, user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col) } -@inlinable public func ImDrawListAddImageRounded(_ this: UnsafeMutablePointer!, _ user_texture_id: ImTextureID, _ p_min: ImVec2, _ p_max: ImVec2, _ uv_min: ImVec2, _ uv_max: ImVec2, _ col: ImU32, _ rounding: Float, _ flags: ImDrawFlags) -> Void { - return ImDrawList_AddImageRounded(this,user_texture_id,p_min,p_max,uv_min,uv_max,col,rounding,flags) +@inlinable public func ImDrawListAddImageRounded(_ this: UnsafeMutablePointer!, _ user_texture_id: ImTextureID, _ p_min: ImVec2, _ p_max: ImVec2, _ uv_min: ImVec2, _ uv_max: ImVec2, _ col: ImU32, _ rounding: Float, _ flags: ImDrawFlags) { + ImDrawList_AddImageRounded(this, user_texture_id, p_min, p_max, uv_min, uv_max, col, rounding, flags) } -@inlinable public func ImDrawListAddLine(_ this: UnsafeMutablePointer!, _ p1: ImVec2, _ p2: ImVec2, _ col: ImU32, _ thickness: Float) -> Void { - return ImDrawList_AddLine(this,p1,p2,col,thickness) +@inlinable public func ImDrawListAddLine(_ this: UnsafeMutablePointer!, _ p1: ImVec2, _ p2: ImVec2, _ col: ImU32, _ thickness: Float) { + ImDrawList_AddLine(this, p1, p2, col, thickness) } -@inlinable public func ImDrawListAddNgon(_ this: UnsafeMutablePointer!, _ center: ImVec2, _ radius: Float, _ col: ImU32, _ num_segments: Int32, _ thickness: Float) -> Void { - return ImDrawList_AddNgon(this,center,radius,col,num_segments,thickness) +@inlinable public func ImDrawListAddNgon(_ this: UnsafeMutablePointer!, _ center: ImVec2, _ radius: Float, _ col: ImU32, _ num_segments: Int32, _ thickness: Float) { + ImDrawList_AddNgon(this, center, radius, col, num_segments, thickness) } -@inlinable public func ImDrawListAddNgonFilled(_ this: UnsafeMutablePointer!, _ center: ImVec2, _ radius: Float, _ col: ImU32, _ num_segments: Int32) -> Void { - return ImDrawList_AddNgonFilled(this,center,radius,col,num_segments) +@inlinable public func ImDrawListAddNgonFilled(_ this: UnsafeMutablePointer!, _ center: ImVec2, _ radius: Float, _ col: ImU32, _ num_segments: Int32) { + ImDrawList_AddNgonFilled(this, center, radius, col, num_segments) } -@inlinable public func ImDrawListAddPolyline(_ this: UnsafeMutablePointer!, _ points: UnsafePointer!, _ num_points: Int32, _ col: ImU32, _ flags: ImDrawFlags, _ thickness: Float) -> Void { - return ImDrawList_AddPolyline(this,points,num_points,col,flags,thickness) +@inlinable public func ImDrawListAddPolyline(_ this: UnsafeMutablePointer!, _ points: UnsafePointer!, _ num_points: Int32, _ col: ImU32, _ flags: ImDrawFlags, _ thickness: Float) { + ImDrawList_AddPolyline(this, points, num_points, col, flags, thickness) } -@inlinable public func ImDrawListAddQuad(_ this: UnsafeMutablePointer!, _ p1: ImVec2, _ p2: ImVec2, _ p3: ImVec2, _ p4: ImVec2, _ col: ImU32, _ thickness: Float) -> Void { - return ImDrawList_AddQuad(this,p1,p2,p3,p4,col,thickness) +@inlinable public func ImDrawListAddQuad(_ this: UnsafeMutablePointer!, _ p1: ImVec2, _ p2: ImVec2, _ p3: ImVec2, _ p4: ImVec2, _ col: ImU32, _ thickness: Float) { + ImDrawList_AddQuad(this, p1, p2, p3, p4, col, thickness) } -@inlinable public func ImDrawListAddQuadFilled(_ this: UnsafeMutablePointer!, _ p1: ImVec2, _ p2: ImVec2, _ p3: ImVec2, _ p4: ImVec2, _ col: ImU32) -> Void { - return ImDrawList_AddQuadFilled(this,p1,p2,p3,p4,col) +@inlinable public func ImDrawListAddQuadFilled(_ this: UnsafeMutablePointer!, _ p1: ImVec2, _ p2: ImVec2, _ p3: ImVec2, _ p4: ImVec2, _ col: ImU32) { + ImDrawList_AddQuadFilled(this, p1, p2, p3, p4, col) } -@inlinable public func ImDrawListAddRect(_ this: UnsafeMutablePointer!, _ p_min: ImVec2, _ p_max: ImVec2, _ col: ImU32, _ rounding: Float, _ flags: ImDrawFlags, _ thickness: Float) -> Void { - return ImDrawList_AddRect(this,p_min,p_max,col,rounding,flags,thickness) +@inlinable public func ImDrawListAddRect(_ this: UnsafeMutablePointer!, _ p_min: ImVec2, _ p_max: ImVec2, _ col: ImU32, _ rounding: Float, _ flags: ImDrawFlags, _ thickness: Float) { + ImDrawList_AddRect(this, p_min, p_max, col, rounding, flags, thickness) } -@inlinable public func ImDrawListAddRectFilled(_ this: UnsafeMutablePointer!, _ p_min: ImVec2, _ p_max: ImVec2, _ col: ImU32, _ rounding: Float, _ flags: ImDrawFlags) -> Void { - return ImDrawList_AddRectFilled(this,p_min,p_max,col,rounding,flags) +@inlinable public func ImDrawListAddRectFilled(_ this: UnsafeMutablePointer!, _ p_min: ImVec2, _ p_max: ImVec2, _ col: ImU32, _ rounding: Float, _ flags: ImDrawFlags) { + ImDrawList_AddRectFilled(this, p_min, p_max, col, rounding, flags) } -@inlinable public func ImDrawListAddRectFilledMultiColor(_ this: UnsafeMutablePointer!, _ p_min: ImVec2, _ p_max: ImVec2, _ col_upr_left: ImU32, _ col_upr_right: ImU32, _ col_bot_right: ImU32, _ col_bot_left: ImU32) -> Void { - return ImDrawList_AddRectFilledMultiColor(this,p_min,p_max,col_upr_left,col_upr_right,col_bot_right,col_bot_left) +@inlinable public func ImDrawListAddRectFilledMultiColor(_ this: UnsafeMutablePointer!, _ p_min: ImVec2, _ p_max: ImVec2, _ col_upr_left: ImU32, _ col_upr_right: ImU32, _ col_bot_right: ImU32, _ col_bot_left: ImU32) { + ImDrawList_AddRectFilledMultiColor(this, p_min, p_max, col_upr_left, col_upr_right, col_bot_right, col_bot_left) } -@inlinable public func ImDrawListAddText(_ this: UnsafeMutablePointer!, _ pos: ImVec2, _ col: ImU32, _ text_begin: String? = nil, _ text_end: String? = nil) -> Void { - text_begin.withOptionalCString { text_beginPtr in - text_end.withOptionalCString { text_endPtr in - return ImDrawList_AddText_Vec2(this,pos,col,text_beginPtr,text_endPtr) - } - } +@inlinable public func ImDrawListAddText(_ this: UnsafeMutablePointer!, _ pos: ImVec2, _ col: ImU32, _ text_begin: String? = nil, _ text_end: String? = nil) { + text_begin.withOptionalCString { text_beginPtr in + text_end.withOptionalCString { text_endPtr in + ImDrawList_AddText_Vec2(this, pos, col, text_beginPtr, text_endPtr) + } + } } -@inlinable public func ImDrawListAddText(_ this: UnsafeMutablePointer!, _ font: UnsafePointer!, _ font_size: Float, _ pos: ImVec2, _ col: ImU32, _ text_begin: String? = nil, _ text_end: String? = nil, _ wrap_width: Float, _ cpu_fine_clip_rect: UnsafePointer!) -> Void { - text_begin.withOptionalCString { text_beginPtr in - text_end.withOptionalCString { text_endPtr in - return ImDrawList_AddText_FontPtr(this,font,font_size,pos,col,text_beginPtr,text_endPtr,wrap_width,cpu_fine_clip_rect) - } - } +@inlinable public func ImDrawListAddText(_ this: UnsafeMutablePointer!, _ font: UnsafePointer!, _ font_size: Float, _ pos: ImVec2, _ col: ImU32, _ text_begin: String? = nil, _ text_end: String? = nil, _ wrap_width: Float, _ cpu_fine_clip_rect: UnsafePointer!) { + text_begin.withOptionalCString { text_beginPtr in + text_end.withOptionalCString { text_endPtr in + ImDrawList_AddText_FontPtr(this, font, font_size, pos, col, text_beginPtr, text_endPtr, wrap_width, cpu_fine_clip_rect) + } + } } -@inlinable public func ImDrawListAddTriangle(_ this: UnsafeMutablePointer!, _ p1: ImVec2, _ p2: ImVec2, _ p3: ImVec2, _ col: ImU32, _ thickness: Float) -> Void { - return ImDrawList_AddTriangle(this,p1,p2,p3,col,thickness) +@inlinable public func ImDrawListAddTriangle(_ this: UnsafeMutablePointer!, _ p1: ImVec2, _ p2: ImVec2, _ p3: ImVec2, _ col: ImU32, _ thickness: Float) { + ImDrawList_AddTriangle(this, p1, p2, p3, col, thickness) } -@inlinable public func ImDrawListAddTriangleFilled(_ this: UnsafeMutablePointer!, _ p1: ImVec2, _ p2: ImVec2, _ p3: ImVec2, _ col: ImU32) -> Void { - return ImDrawList_AddTriangleFilled(this,p1,p2,p3,col) +@inlinable public func ImDrawListAddTriangleFilled(_ this: UnsafeMutablePointer!, _ p1: ImVec2, _ p2: ImVec2, _ p3: ImVec2, _ col: ImU32) { + ImDrawList_AddTriangleFilled(this, p1, p2, p3, col) } @inlinable public func ImDrawListCalcCircleAutoSegmentCount(_ this: UnsafeMutablePointer!, _ radius: Float) -> Int32 { - return ImDrawList__CalcCircleAutoSegmentCount(this,radius) + ImDrawList__CalcCircleAutoSegmentCount(this, radius) } -@inlinable public func ImDrawListChannelsMerge(_ this: UnsafeMutablePointer!) -> Void { - return ImDrawList_ChannelsMerge(this) +@inlinable public func ImDrawListChannelsMerge(_ this: UnsafeMutablePointer!) { + ImDrawList_ChannelsMerge(this) } -@inlinable public func ImDrawListChannelsSetCurrent(_ this: UnsafeMutablePointer!, _ n: Int32) -> Void { - return ImDrawList_ChannelsSetCurrent(this,n) +@inlinable public func ImDrawListChannelsSetCurrent(_ this: UnsafeMutablePointer!, _ n: Int32) { + ImDrawList_ChannelsSetCurrent(this, n) } -@inlinable public func ImDrawListChannelsSplit(_ this: UnsafeMutablePointer!, _ count: Int32) -> Void { - return ImDrawList_ChannelsSplit(this,count) +@inlinable public func ImDrawListChannelsSplit(_ this: UnsafeMutablePointer!, _ count: Int32) { + ImDrawList_ChannelsSplit(this, count) } -@inlinable public func ImDrawListClearFreeMemory(_ this: UnsafeMutablePointer!) -> Void { - return ImDrawList__ClearFreeMemory(this) +@inlinable public func ImDrawListClearFreeMemory(_ this: UnsafeMutablePointer!) { + ImDrawList__ClearFreeMemory(this) } @inlinable public func ImDrawListCloneOutput(_ this: UnsafeMutablePointer!) -> UnsafeMutablePointer! { - return ImDrawList_CloneOutput(this) + ImDrawList_CloneOutput(this) } -@inlinable public func ImDrawListGetClipRectMax(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!) -> Void { - return ImDrawList_GetClipRectMax(pOut,this) +@inlinable public func ImDrawListGetClipRectMax(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!) { + ImDrawList_GetClipRectMax(pOut, this) } -@inlinable public func ImDrawListGetClipRectMin(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!) -> Void { - return ImDrawList_GetClipRectMin(pOut,this) +@inlinable public func ImDrawListGetClipRectMin(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!) { + ImDrawList_GetClipRectMin(pOut, this) } -@inlinable public func ImDrawListOnChangedClipRect(_ this: UnsafeMutablePointer!) -> Void { - return ImDrawList__OnChangedClipRect(this) +@inlinable public func ImDrawListOnChangedClipRect(_ this: UnsafeMutablePointer!) { + ImDrawList__OnChangedClipRect(this) } -@inlinable public func ImDrawListOnChangedTextureID(_ this: UnsafeMutablePointer!) -> Void { - return ImDrawList__OnChangedTextureID(this) +@inlinable public func ImDrawListOnChangedTextureID(_ this: UnsafeMutablePointer!) { + ImDrawList__OnChangedTextureID(this) } -@inlinable public func ImDrawListOnChangedVtxOffset(_ this: UnsafeMutablePointer!) -> Void { - return ImDrawList__OnChangedVtxOffset(this) +@inlinable public func ImDrawListOnChangedVtxOffset(_ this: UnsafeMutablePointer!) { + ImDrawList__OnChangedVtxOffset(this) } -@inlinable public func ImDrawListPathArcTo(_ this: UnsafeMutablePointer!, _ center: ImVec2, _ radius: Float, _ a_min: Float, _ a_max: Float, _ num_segments: Int32) -> Void { - return ImDrawList_PathArcTo(this,center,radius,a_min,a_max,num_segments) +@inlinable public func ImDrawListPathArcTo(_ this: UnsafeMutablePointer!, _ center: ImVec2, _ radius: Float, _ a_min: Float, _ a_max: Float, _ num_segments: Int32) { + ImDrawList_PathArcTo(this, center, radius, a_min, a_max, num_segments) } -@inlinable public func ImDrawListPathArcToFast(_ this: UnsafeMutablePointer!, _ center: ImVec2, _ radius: Float, _ a_min_of_12: Int32, _ a_max_of_12: Int32) -> Void { - return ImDrawList_PathArcToFast(this,center,radius,a_min_of_12,a_max_of_12) +@inlinable public func ImDrawListPathArcToFast(_ this: UnsafeMutablePointer!, _ center: ImVec2, _ radius: Float, _ a_min_of_12: Int32, _ a_max_of_12: Int32) { + ImDrawList_PathArcToFast(this, center, radius, a_min_of_12, a_max_of_12) } -@inlinable public func ImDrawListPathArcToFastEx(_ this: UnsafeMutablePointer!, _ center: ImVec2, _ radius: Float, _ a_min_sample: Int32, _ a_max_sample: Int32, _ a_step: Int32) -> Void { - return ImDrawList__PathArcToFastEx(this,center,radius,a_min_sample,a_max_sample,a_step) +@inlinable public func ImDrawListPathArcToFastEx(_ this: UnsafeMutablePointer!, _ center: ImVec2, _ radius: Float, _ a_min_sample: Int32, _ a_max_sample: Int32, _ a_step: Int32) { + ImDrawList__PathArcToFastEx(this, center, radius, a_min_sample, a_max_sample, a_step) } -@inlinable public func ImDrawListPathArcToN(_ this: UnsafeMutablePointer!, _ center: ImVec2, _ radius: Float, _ a_min: Float, _ a_max: Float, _ num_segments: Int32) -> Void { - return ImDrawList__PathArcToN(this,center,radius,a_min,a_max,num_segments) +@inlinable public func ImDrawListPathArcToN(_ this: UnsafeMutablePointer!, _ center: ImVec2, _ radius: Float, _ a_min: Float, _ a_max: Float, _ num_segments: Int32) { + ImDrawList__PathArcToN(this, center, radius, a_min, a_max, num_segments) } -@inlinable public func ImDrawListPathBezierCubicCurveTo(_ this: UnsafeMutablePointer!, _ p2: ImVec2, _ p3: ImVec2, _ p4: ImVec2, _ num_segments: Int32) -> Void { - return ImDrawList_PathBezierCubicCurveTo(this,p2,p3,p4,num_segments) +@inlinable public func ImDrawListPathBezierCubicCurveTo(_ this: UnsafeMutablePointer!, _ p2: ImVec2, _ p3: ImVec2, _ p4: ImVec2, _ num_segments: Int32) { + ImDrawList_PathBezierCubicCurveTo(this, p2, p3, p4, num_segments) } -@inlinable public func ImDrawListPathBezierQuadraticCurveTo(_ this: UnsafeMutablePointer!, _ p2: ImVec2, _ p3: ImVec2, _ num_segments: Int32) -> Void { - return ImDrawList_PathBezierQuadraticCurveTo(this,p2,p3,num_segments) +@inlinable public func ImDrawListPathBezierQuadraticCurveTo(_ this: UnsafeMutablePointer!, _ p2: ImVec2, _ p3: ImVec2, _ num_segments: Int32) { + ImDrawList_PathBezierQuadraticCurveTo(this, p2, p3, num_segments) } -@inlinable public func ImDrawListPathClear(_ this: UnsafeMutablePointer!) -> Void { - return ImDrawList_PathClear(this) +@inlinable public func ImDrawListPathClear(_ this: UnsafeMutablePointer!) { + ImDrawList_PathClear(this) } -@inlinable public func ImDrawListPathFillConvex(_ this: UnsafeMutablePointer!, _ col: ImU32) -> Void { - return ImDrawList_PathFillConvex(this,col) +@inlinable public func ImDrawListPathFillConvex(_ this: UnsafeMutablePointer!, _ col: ImU32) { + ImDrawList_PathFillConvex(this, col) } -@inlinable public func ImDrawListPathLineTo(_ this: UnsafeMutablePointer!, _ pos: ImVec2) -> Void { - return ImDrawList_PathLineTo(this,pos) +@inlinable public func ImDrawListPathLineTo(_ this: UnsafeMutablePointer!, _ pos: ImVec2) { + ImDrawList_PathLineTo(this, pos) } -@inlinable public func ImDrawListPathLineToMergeDuplicate(_ this: UnsafeMutablePointer!, _ pos: ImVec2) -> Void { - return ImDrawList_PathLineToMergeDuplicate(this,pos) +@inlinable public func ImDrawListPathLineToMergeDuplicate(_ this: UnsafeMutablePointer!, _ pos: ImVec2) { + ImDrawList_PathLineToMergeDuplicate(this, pos) } -@inlinable public func ImDrawListPathRect(_ this: UnsafeMutablePointer!, _ rect_min: ImVec2, _ rect_max: ImVec2, _ rounding: Float, _ flags: ImDrawFlags) -> Void { - return ImDrawList_PathRect(this,rect_min,rect_max,rounding,flags) +@inlinable public func ImDrawListPathRect(_ this: UnsafeMutablePointer!, _ rect_min: ImVec2, _ rect_max: ImVec2, _ rounding: Float, _ flags: ImDrawFlags) { + ImDrawList_PathRect(this, rect_min, rect_max, rounding, flags) } -@inlinable public func ImDrawListPathStroke(_ this: UnsafeMutablePointer!, _ col: ImU32, _ flags: ImDrawFlags, _ thickness: Float) -> Void { - return ImDrawList_PathStroke(this,col,flags,thickness) +@inlinable public func ImDrawListPathStroke(_ this: UnsafeMutablePointer!, _ col: ImU32, _ flags: ImDrawFlags, _ thickness: Float) { + ImDrawList_PathStroke(this, col, flags, thickness) } -@inlinable public func ImDrawListPopClipRect(_ this: UnsafeMutablePointer!) -> Void { - return ImDrawList_PopClipRect(this) +@inlinable public func ImDrawListPopClipRect(_ this: UnsafeMutablePointer!) { + ImDrawList_PopClipRect(this) } -@inlinable public func ImDrawListPopTextureID(_ this: UnsafeMutablePointer!) -> Void { - return ImDrawList_PopTextureID(this) +@inlinable public func ImDrawListPopTextureID(_ this: UnsafeMutablePointer!) { + ImDrawList_PopTextureID(this) } -@inlinable public func ImDrawListPopUnusedDrawCmd(_ this: UnsafeMutablePointer!) -> Void { - return ImDrawList__PopUnusedDrawCmd(this) +@inlinable public func ImDrawListPopUnusedDrawCmd(_ this: UnsafeMutablePointer!) { + ImDrawList__PopUnusedDrawCmd(this) } -@inlinable public func ImDrawListPrimQuadUV(_ this: UnsafeMutablePointer!, _ a: ImVec2, _ b: ImVec2, _ c: ImVec2, _ d: ImVec2, _ uv_a: ImVec2, _ uv_b: ImVec2, _ uv_c: ImVec2, _ uv_d: ImVec2, _ col: ImU32) -> Void { - return ImDrawList_PrimQuadUV(this,a,b,c,d,uv_a,uv_b,uv_c,uv_d,col) +@inlinable public func ImDrawListPrimQuadUV(_ this: UnsafeMutablePointer!, _ a: ImVec2, _ b: ImVec2, _ c: ImVec2, _ d: ImVec2, _ uv_a: ImVec2, _ uv_b: ImVec2, _ uv_c: ImVec2, _ uv_d: ImVec2, _ col: ImU32) { + ImDrawList_PrimQuadUV(this, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col) } -@inlinable public func ImDrawListPrimRect(_ this: UnsafeMutablePointer!, _ a: ImVec2, _ b: ImVec2, _ col: ImU32) -> Void { - return ImDrawList_PrimRect(this,a,b,col) +@inlinable public func ImDrawListPrimRect(_ this: UnsafeMutablePointer!, _ a: ImVec2, _ b: ImVec2, _ col: ImU32) { + ImDrawList_PrimRect(this, a, b, col) } -@inlinable public func ImDrawListPrimRectUV(_ this: UnsafeMutablePointer!, _ a: ImVec2, _ b: ImVec2, _ uv_a: ImVec2, _ uv_b: ImVec2, _ col: ImU32) -> Void { - return ImDrawList_PrimRectUV(this,a,b,uv_a,uv_b,col) +@inlinable public func ImDrawListPrimRectUV(_ this: UnsafeMutablePointer!, _ a: ImVec2, _ b: ImVec2, _ uv_a: ImVec2, _ uv_b: ImVec2, _ col: ImU32) { + ImDrawList_PrimRectUV(this, a, b, uv_a, uv_b, col) } -@inlinable public func ImDrawListPrimReserve(_ this: UnsafeMutablePointer!, _ idx_count: Int32, _ vtx_count: Int32) -> Void { - return ImDrawList_PrimReserve(this,idx_count,vtx_count) +@inlinable public func ImDrawListPrimReserve(_ this: UnsafeMutablePointer!, _ idx_count: Int32, _ vtx_count: Int32) { + ImDrawList_PrimReserve(this, idx_count, vtx_count) } -@inlinable public func ImDrawListPrimUnreserve(_ this: UnsafeMutablePointer!, _ idx_count: Int32, _ vtx_count: Int32) -> Void { - return ImDrawList_PrimUnreserve(this,idx_count,vtx_count) +@inlinable public func ImDrawListPrimUnreserve(_ this: UnsafeMutablePointer!, _ idx_count: Int32, _ vtx_count: Int32) { + ImDrawList_PrimUnreserve(this, idx_count, vtx_count) } -@inlinable public func ImDrawListPrimVtx(_ this: UnsafeMutablePointer!, _ pos: ImVec2, _ uv: ImVec2, _ col: ImU32) -> Void { - return ImDrawList_PrimVtx(this,pos,uv,col) +@inlinable public func ImDrawListPrimVtx(_ this: UnsafeMutablePointer!, _ pos: ImVec2, _ uv: ImVec2, _ col: ImU32) { + ImDrawList_PrimVtx(this, pos, uv, col) } -@inlinable public func ImDrawListPrimWriteIdx(_ this: UnsafeMutablePointer!, _ idx: ImDrawIdx) -> Void { - return ImDrawList_PrimWriteIdx(this,idx) +@inlinable public func ImDrawListPrimWriteIdx(_ this: UnsafeMutablePointer!, _ idx: ImDrawIdx) { + ImDrawList_PrimWriteIdx(this, idx) } -@inlinable public func ImDrawListPrimWriteVtx(_ this: UnsafeMutablePointer!, _ pos: ImVec2, _ uv: ImVec2, _ col: ImU32) -> Void { - return ImDrawList_PrimWriteVtx(this,pos,uv,col) +@inlinable public func ImDrawListPrimWriteVtx(_ this: UnsafeMutablePointer!, _ pos: ImVec2, _ uv: ImVec2, _ col: ImU32) { + ImDrawList_PrimWriteVtx(this, pos, uv, col) } -@inlinable public func ImDrawListPushClipRect(_ this: UnsafeMutablePointer!, _ clip_rect_min: ImVec2, _ clip_rect_max: ImVec2, _ intersect_with_current_clip_rect: Bool) -> Void { - return ImDrawList_PushClipRect(this,clip_rect_min,clip_rect_max,intersect_with_current_clip_rect) +@inlinable public func ImDrawListPushClipRect(_ this: UnsafeMutablePointer!, _ clip_rect_min: ImVec2, _ clip_rect_max: ImVec2, _ intersect_with_current_clip_rect: Bool) { + ImDrawList_PushClipRect(this, clip_rect_min, clip_rect_max, intersect_with_current_clip_rect) } -@inlinable public func ImDrawListPushClipRectFullScreen(_ this: UnsafeMutablePointer!) -> Void { - return ImDrawList_PushClipRectFullScreen(this) +@inlinable public func ImDrawListPushClipRectFullScreen(_ this: UnsafeMutablePointer!) { + ImDrawList_PushClipRectFullScreen(this) } -@inlinable public func ImDrawListPushTextureID(_ this: UnsafeMutablePointer!, _ texture_id: ImTextureID) -> Void { - return ImDrawList_PushTextureID(this,texture_id) +@inlinable public func ImDrawListPushTextureID(_ this: UnsafeMutablePointer!, _ texture_id: ImTextureID) { + ImDrawList_PushTextureID(this, texture_id) } -@inlinable public func ImDrawListResetForNewFrame(_ this: UnsafeMutablePointer!) -> Void { - return ImDrawList__ResetForNewFrame(this) +@inlinable public func ImDrawListResetForNewFrame(_ this: UnsafeMutablePointer!) { + ImDrawList__ResetForNewFrame(this) } -@inlinable public func ImDrawListSharedDataSetCircleTessellationMaxError(_ this: UnsafeMutablePointer!, _ max_error: Float) -> Void { - return ImDrawListSharedData_SetCircleTessellationMaxError(this,max_error) +@inlinable public func ImDrawListSharedDataSetCircleTessellationMaxError(_ this: UnsafeMutablePointer!, _ max_error: Float) { + ImDrawListSharedData_SetCircleTessellationMaxError(this, max_error) } -@inlinable public func ImDrawListSplit(_ this: UnsafeMutablePointer!, _ draw_list: UnsafeMutablePointer!, _ count: Int32) -> Void { - return ImDrawListSplitter_Split(this,draw_list,count) +@inlinable public func ImDrawListSplit(_ this: UnsafeMutablePointer!, _ draw_list: UnsafeMutablePointer!, _ count: Int32) { + ImDrawListSplitter_Split(this, draw_list, count) } -@inlinable public func ImDrawListSplitterClear(_ this: UnsafeMutablePointer!) -> Void { - return ImDrawListSplitter_Clear(this) +@inlinable public func ImDrawListSplitterClear(_ this: UnsafeMutablePointer!) { + ImDrawListSplitter_Clear(this) } -@inlinable public func ImDrawListSplitterClearFreeMemory(_ this: UnsafeMutablePointer!) -> Void { - return ImDrawListSplitter_ClearFreeMemory(this) +@inlinable public func ImDrawListSplitterClearFreeMemory(_ this: UnsafeMutablePointer!) { + ImDrawListSplitter_ClearFreeMemory(this) } -@inlinable public func ImDrawListSplitterMerge(_ this: UnsafeMutablePointer!, _ draw_list: UnsafeMutablePointer!) -> Void { - return ImDrawListSplitter_Merge(this,draw_list) +@inlinable public func ImDrawListSplitterMerge(_ this: UnsafeMutablePointer!, _ draw_list: UnsafeMutablePointer!) { + ImDrawListSplitter_Merge(this, draw_list) } -@inlinable public func ImDrawListSplitterSetCurrentChannel(_ this: UnsafeMutablePointer!, _ draw_list: UnsafeMutablePointer!, _ channel_idx: Int32) -> Void { - return ImDrawListSplitter_SetCurrentChannel(this,draw_list,channel_idx) +@inlinable public func ImDrawListSplitterSetCurrentChannel(_ this: UnsafeMutablePointer!, _ draw_list: UnsafeMutablePointer!, _ channel_idx: Int32) { + ImDrawListSplitter_SetCurrentChannel(this, draw_list, channel_idx) } -@inlinable public func ImDrawListTryMergeDrawCmds(_ this: UnsafeMutablePointer!) -> Void { - return ImDrawList__TryMergeDrawCmds(this) +@inlinable public func ImDrawListTryMergeDrawCmds(_ this: UnsafeMutablePointer!) { + ImDrawList__TryMergeDrawCmds(this) } @inlinable @discardableResult public func ImFileClose(_ file: ImFileHandle) -> Bool { - return igImFileClose(file) + igImFileClose(file) } @inlinable public func ImFileGetSize(_ file: ImFileHandle) -> ImU64 { - return igImFileGetSize(file) + igImFileGetSize(file) } @inlinable public func ImFileLoadToMemory(_ filename: String? = nil, _ mode: String? = nil, _ out_file_size: UnsafeMutablePointer!, _ padding_bytes: Int32) -> UnsafeMutableRawPointer! { - filename.withOptionalCString { filenamePtr in - mode.withOptionalCString { modePtr in - return igImFileLoadToMemory(filenamePtr,modePtr,out_file_size,padding_bytes) - } - } + filename.withOptionalCString { filenamePtr in + mode.withOptionalCString { modePtr in + igImFileLoadToMemory(filenamePtr, modePtr, out_file_size, padding_bytes) + } + } } @inlinable public func ImFileOpen(_ filename: String? = nil, _ mode: String? = nil) -> ImFileHandle { - filename.withOptionalCString { filenamePtr in - mode.withOptionalCString { modePtr in - return igImFileOpen(filenamePtr,modePtr) - } - } + filename.withOptionalCString { filenamePtr in + mode.withOptionalCString { modePtr in + igImFileOpen(filenamePtr, modePtr) + } + } } @inlinable public func ImFileRead(_ data: UnsafeMutableRawPointer!, _ size: ImU64, _ count: ImU64, _ file: ImFileHandle) -> ImU64 { - return igImFileRead(data,size,count,file) + igImFileRead(data, size, count, file) } @inlinable public func ImFileWrite(_ data: UnsafeRawPointer!, _ size: ImU64, _ count: ImU64, _ file: ImFileHandle) -> ImU64 { - return igImFileWrite(data,size,count,file) + igImFileWrite(data, size, count, file) } @inlinable public func ImFloor(_ f: Float) -> Float { - return igImFloor_Float(f) + igImFloor_Float(f) } -@inlinable public func ImFloor(_ pOut: UnsafeMutablePointer!, _ v: ImVec2) -> Void { - return igImFloor_Vec2(pOut,v) +@inlinable public func ImFloor(_ pOut: UnsafeMutablePointer!, _ v: ImVec2) { + igImFloor_Vec2(pOut, v) } @inlinable public func ImFloorSigned(_ f: Float) -> Float { - return igImFloorSigned(f) + igImFloorSigned(f) } -@inlinable public func ImFontAddGlyph(_ this: UnsafeMutablePointer!, _ src_cfg: UnsafePointer!, _ c: ImWchar, _ x0: Float, _ y0: Float, _ x1: Float, _ y1: Float, _ u0: Float, _ v0: Float, _ u1: Float, _ v1: Float, _ advance_x: Float) -> Void { - return ImFont_AddGlyph(this,src_cfg,c,x0,y0,x1,y1,u0,v0,u1,v1,advance_x) +@inlinable public func ImFontAddGlyph(_ this: UnsafeMutablePointer!, _ src_cfg: UnsafePointer!, _ c: ImWchar, _ x0: Float, _ y0: Float, _ x1: Float, _ y1: Float, _ u0: Float, _ v0: Float, _ u1: Float, _ v1: Float, _ advance_x: Float) { + ImFont_AddGlyph(this, src_cfg, c, x0, y0, x1, y1, u0, v0, u1, v1, advance_x) } -@inlinable public func ImFontAddRemapChar(_ this: UnsafeMutablePointer!, _ dst: ImWchar, _ src: ImWchar, _ overwrite_dst: Bool) -> Void { - return ImFont_AddRemapChar(this,dst,src,overwrite_dst) +@inlinable public func ImFontAddRemapChar(_ this: UnsafeMutablePointer!, _ dst: ImWchar, _ src: ImWchar, _ overwrite_dst: Bool) { + ImFont_AddRemapChar(this, dst, src, overwrite_dst) } @inlinable public func ImFontAtlasAddCustomRectFontGlyph(_ this: UnsafeMutablePointer!, _ font: UnsafeMutablePointer!, _ id: ImWchar, _ width: Int32, _ height: Int32, _ advance_x: Float, _ offset: ImVec2) -> Int32 { - return ImFontAtlas_AddCustomRectFontGlyph(this,font,id,width,height,advance_x,offset) + ImFontAtlas_AddCustomRectFontGlyph(this, font, id, width, height, advance_x, offset) } @inlinable public func ImFontAtlasAddCustomRectRegular(_ this: UnsafeMutablePointer!, _ width: Int32, _ height: Int32) -> Int32 { - return ImFontAtlas_AddCustomRectRegular(this,width,height) + ImFontAtlas_AddCustomRectRegular(this, width, height) } @inlinable public func ImFontAtlasAddFont(_ this: UnsafeMutablePointer!, _ font_cfg: UnsafePointer!) -> UnsafeMutablePointer! { - return ImFontAtlas_AddFont(this,font_cfg) + ImFontAtlas_AddFont(this, font_cfg) } @inlinable public func ImFontAtlasAddFontDefault(_ this: UnsafeMutablePointer!, _ font_cfg: UnsafePointer!) -> UnsafeMutablePointer! { - return ImFontAtlas_AddFontDefault(this,font_cfg) + ImFontAtlas_AddFontDefault(this, font_cfg) } @inlinable public func ImFontAtlasAddFontFromFileTTF(_ this: UnsafeMutablePointer!, _ filename: String? = nil, _ size_pixels: Float, _ font_cfg: UnsafePointer!, _ glyph_ranges: UnsafePointer!) -> UnsafeMutablePointer! { - filename.withOptionalCString { filenamePtr in - return ImFontAtlas_AddFontFromFileTTF(this,filenamePtr,size_pixels,font_cfg,glyph_ranges) - } + filename.withOptionalCString { filenamePtr in + ImFontAtlas_AddFontFromFileTTF(this, filenamePtr, size_pixels, font_cfg, glyph_ranges) + } } @inlinable public func ImFontAtlasAddFontFromMemoryCompressedBase85TTF(_ this: UnsafeMutablePointer!, _ compressed_font_data_base85: String? = nil, _ size_pixels: Float, _ font_cfg: UnsafePointer!, _ glyph_ranges: UnsafePointer!) -> UnsafeMutablePointer! { - compressed_font_data_base85.withOptionalCString { compressed_font_data_base85Ptr in - return ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(this,compressed_font_data_base85Ptr,size_pixels,font_cfg,glyph_ranges) - } + compressed_font_data_base85.withOptionalCString { compressed_font_data_base85Ptr in + ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(this, compressed_font_data_base85Ptr, size_pixels, font_cfg, glyph_ranges) + } } @inlinable public func ImFontAtlasAddFontFromMemoryCompressedTTF(_ this: UnsafeMutablePointer!, _ compressed_font_data: UnsafeRawPointer!, _ compressed_font_size: Int32, _ size_pixels: Float, _ font_cfg: UnsafePointer!, _ glyph_ranges: UnsafePointer!) -> UnsafeMutablePointer! { - return ImFontAtlas_AddFontFromMemoryCompressedTTF(this,compressed_font_data,compressed_font_size,size_pixels,font_cfg,glyph_ranges) + ImFontAtlas_AddFontFromMemoryCompressedTTF(this, compressed_font_data, compressed_font_size, size_pixels, font_cfg, glyph_ranges) } @inlinable public func ImFontAtlasAddFontFromMemoryTTF(_ this: UnsafeMutablePointer!, _ font_data: UnsafeMutableRawPointer!, _ font_size: Int32, _ size_pixels: Float, _ font_cfg: UnsafePointer!, _ glyph_ranges: UnsafePointer!) -> UnsafeMutablePointer! { - return ImFontAtlas_AddFontFromMemoryTTF(this,font_data,font_size,size_pixels,font_cfg,glyph_ranges) + ImFontAtlas_AddFontFromMemoryTTF(this, font_data, font_size, size_pixels, font_cfg, glyph_ranges) } @inlinable @discardableResult public func ImFontAtlasBuild(_ this: UnsafeMutablePointer!) -> Bool { - return ImFontAtlas_Build(this) + ImFontAtlas_Build(this) } -@inlinable public func ImFontAtlasBuildFinish(_ atlas: UnsafeMutablePointer!) -> Void { - return igImFontAtlasBuildFinish(atlas) +@inlinable public func ImFontAtlasBuildFinish(_ atlas: UnsafeMutablePointer!) { + igImFontAtlasBuildFinish(atlas) } -@inlinable public func ImFontAtlasBuildInit(_ atlas: UnsafeMutablePointer!) -> Void { - return igImFontAtlasBuildInit(atlas) +@inlinable public func ImFontAtlasBuildInit(_ atlas: UnsafeMutablePointer!) { + igImFontAtlasBuildInit(atlas) } -@inlinable public func ImFontAtlasBuildPackCustomRects(_ atlas: UnsafeMutablePointer!, _ stbrp_context_opaque: UnsafeMutableRawPointer!) -> Void { - return igImFontAtlasBuildPackCustomRects(atlas,stbrp_context_opaque) +@inlinable public func ImFontAtlasBuildPackCustomRects(_ atlas: UnsafeMutablePointer!, _ stbrp_context_opaque: UnsafeMutableRawPointer!) { + igImFontAtlasBuildPackCustomRects(atlas, stbrp_context_opaque) } -@inlinable public func ImFontAtlasBuildRender32bppRectFromString(_ atlas: UnsafeMutablePointer!, _ x: Int32, _ y: Int32, _ w: Int32, _ h: Int32, _ in_str: String? = nil, _ in_marker_char: CChar, _ in_marker_pixel_value: UInt32) -> Void { - in_str.withOptionalCString { in_strPtr in - return igImFontAtlasBuildRender32bppRectFromString(atlas,x,y,w,h,in_strPtr,in_marker_char,in_marker_pixel_value) - } +@inlinable public func ImFontAtlasBuildRender32bppRectFromString(_ atlas: UnsafeMutablePointer!, _ x: Int32, _ y: Int32, _ w: Int32, _ h: Int32, _ in_str: String? = nil, _ in_marker_char: CChar, _ in_marker_pixel_value: UInt32) { + in_str.withOptionalCString { in_strPtr in + igImFontAtlasBuildRender32bppRectFromString(atlas, x, y, w, h, in_strPtr, in_marker_char, in_marker_pixel_value) + } } -@inlinable public func ImFontAtlasBuildRender8bppRectFromString(_ atlas: UnsafeMutablePointer!, _ x: Int32, _ y: Int32, _ w: Int32, _ h: Int32, _ in_str: String? = nil, _ in_marker_char: CChar, _ in_marker_pixel_value: UInt8) -> Void { - in_str.withOptionalCString { in_strPtr in - return igImFontAtlasBuildRender8bppRectFromString(atlas,x,y,w,h,in_strPtr,in_marker_char,in_marker_pixel_value) - } +@inlinable public func ImFontAtlasBuildRender8bppRectFromString(_ atlas: UnsafeMutablePointer!, _ x: Int32, _ y: Int32, _ w: Int32, _ h: Int32, _ in_str: String? = nil, _ in_marker_char: CChar, _ in_marker_pixel_value: UInt8) { + in_str.withOptionalCString { in_strPtr in + igImFontAtlasBuildRender8bppRectFromString(atlas, x, y, w, h, in_strPtr, in_marker_char, in_marker_pixel_value) + } } -@inlinable public func ImFontAtlasBuildSetupFont(_ atlas: UnsafeMutablePointer!, _ font: UnsafeMutablePointer!, _ font_config: UnsafeMutablePointer!, _ ascent: Float, _ descent: Float) -> Void { - return igImFontAtlasBuildSetupFont(atlas,font,font_config,ascent,descent) +@inlinable public func ImFontAtlasBuildSetupFont(_ atlas: UnsafeMutablePointer!, _ font: UnsafeMutablePointer!, _ font_config: UnsafeMutablePointer!, _ ascent: Float, _ descent: Float) { + igImFontAtlasBuildSetupFont(atlas, font, font_config, ascent, descent) } -@inlinable public func ImFontAtlasCalcCustomRectUV(_ this: UnsafeMutablePointer!, _ rect: UnsafePointer!, _ out_uv_min: UnsafeMutablePointer!, _ out_uv_max: UnsafeMutablePointer!) -> Void { - return ImFontAtlas_CalcCustomRectUV(this,rect,out_uv_min,out_uv_max) +@inlinable public func ImFontAtlasCalcCustomRectUV(_ this: UnsafeMutablePointer!, _ rect: UnsafePointer!, _ out_uv_min: UnsafeMutablePointer!, _ out_uv_max: UnsafeMutablePointer!) { + ImFontAtlas_CalcCustomRectUV(this, rect, out_uv_min, out_uv_max) } -@inlinable public func ImFontAtlasClear(_ this: UnsafeMutablePointer!) -> Void { - return ImFontAtlas_Clear(this) +@inlinable public func ImFontAtlasClear(_ this: UnsafeMutablePointer!) { + ImFontAtlas_Clear(this) } -@inlinable public func ImFontAtlasClearFonts(_ this: UnsafeMutablePointer!) -> Void { - return ImFontAtlas_ClearFonts(this) +@inlinable public func ImFontAtlasClearFonts(_ this: UnsafeMutablePointer!) { + ImFontAtlas_ClearFonts(this) } -@inlinable public func ImFontAtlasClearInputData(_ this: UnsafeMutablePointer!) -> Void { - return ImFontAtlas_ClearInputData(this) +@inlinable public func ImFontAtlasClearInputData(_ this: UnsafeMutablePointer!) { + ImFontAtlas_ClearInputData(this) } -@inlinable public func ImFontAtlasClearTexData(_ this: UnsafeMutablePointer!) -> Void { - return ImFontAtlas_ClearTexData(this) +@inlinable public func ImFontAtlasClearTexData(_ this: UnsafeMutablePointer!) { + ImFontAtlas_ClearTexData(this) } @inlinable @discardableResult public func ImFontAtlasCustomRectIsPacked(_ this: UnsafeMutablePointer!) -> Bool { - return ImFontAtlasCustomRect_IsPacked(this) + ImFontAtlasCustomRect_IsPacked(this) } @inlinable public func ImFontAtlasGetBuilderForStbTruetype() -> UnsafePointer! { - return igImFontAtlasGetBuilderForStbTruetype() + igImFontAtlasGetBuilderForStbTruetype() } @inlinable public func ImFontAtlasGetCustomRectByIndex(_ this: UnsafeMutablePointer!, _ index: Int32) -> UnsafeMutablePointer! { - return ImFontAtlas_GetCustomRectByIndex(this,index) + ImFontAtlas_GetCustomRectByIndex(this, index) } @inlinable public func ImFontAtlasGetGlyphRangesChineseFull(_ this: UnsafeMutablePointer!) -> UnsafePointer! { - return ImFontAtlas_GetGlyphRangesChineseFull(this) + ImFontAtlas_GetGlyphRangesChineseFull(this) } @inlinable public func ImFontAtlasGetGlyphRangesChineseSimplifiedCommon(_ this: UnsafeMutablePointer!) -> UnsafePointer! { - return ImFontAtlas_GetGlyphRangesChineseSimplifiedCommon(this) + ImFontAtlas_GetGlyphRangesChineseSimplifiedCommon(this) } @inlinable public func ImFontAtlasGetGlyphRangesCyrillic(_ this: UnsafeMutablePointer!) -> UnsafePointer! { - return ImFontAtlas_GetGlyphRangesCyrillic(this) + ImFontAtlas_GetGlyphRangesCyrillic(this) } @inlinable public func ImFontAtlasGetGlyphRangesDefault(_ this: UnsafeMutablePointer!) -> UnsafePointer! { - return ImFontAtlas_GetGlyphRangesDefault(this) + ImFontAtlas_GetGlyphRangesDefault(this) } @inlinable public func ImFontAtlasGetGlyphRangesJapanese(_ this: UnsafeMutablePointer!) -> UnsafePointer! { - return ImFontAtlas_GetGlyphRangesJapanese(this) + ImFontAtlas_GetGlyphRangesJapanese(this) } @inlinable public func ImFontAtlasGetGlyphRangesKorean(_ this: UnsafeMutablePointer!) -> UnsafePointer! { - return ImFontAtlas_GetGlyphRangesKorean(this) + ImFontAtlas_GetGlyphRangesKorean(this) } @inlinable public func ImFontAtlasGetGlyphRangesThai(_ this: UnsafeMutablePointer!) -> UnsafePointer! { - return ImFontAtlas_GetGlyphRangesThai(this) + ImFontAtlas_GetGlyphRangesThai(this) } @inlinable public func ImFontAtlasGetGlyphRangesVietnamese(_ this: UnsafeMutablePointer!) -> UnsafePointer! { - return ImFontAtlas_GetGlyphRangesVietnamese(this) + ImFontAtlas_GetGlyphRangesVietnamese(this) } -@inlinable @discardableResult public func ImFontAtlasGetMouseCursorTexData(_ this: UnsafeMutablePointer!, _ cursor: ImGuiMouseCursor, _ out_offset: UnsafeMutablePointer!, _ out_size: UnsafeMutablePointer!, _ out_uv_border: inout (ImVec2,ImVec2), _ out_uv_fill: inout (ImVec2,ImVec2)) -> Bool { - withUnsafeMutablePointer(to: &out_uv_border) { out_uv_borderMutPtr in - out_uv_borderMutPtr.withMemoryRebound(to: ImVec2.self, capacity: 2) { out_uv_borderPtr in - withUnsafeMutablePointer(to: &out_uv_fill) { out_uv_fillMutPtr in - out_uv_fillMutPtr.withMemoryRebound(to: ImVec2.self, capacity: 2) { out_uv_fillPtr in - return ImFontAtlas_GetMouseCursorTexData(this,cursor,out_offset,out_size,out_uv_borderPtr,out_uv_fillPtr) - } - } - } - } +@inlinable @discardableResult public func ImFontAtlasGetMouseCursorTexData(_ this: UnsafeMutablePointer!, _ cursor: ImGuiMouseCursor, _ out_offset: UnsafeMutablePointer!, _ out_size: UnsafeMutablePointer!, _ out_uv_border: inout (ImVec2, ImVec2), _ out_uv_fill: inout (ImVec2, ImVec2)) -> Bool { + withUnsafeMutablePointer(to: &out_uv_border) { out_uv_borderMutPtr in + out_uv_borderMutPtr.withMemoryRebound(to: ImVec2.self, capacity: 2) { out_uv_borderPtr in + withUnsafeMutablePointer(to: &out_uv_fill) { out_uv_fillMutPtr in + out_uv_fillMutPtr.withMemoryRebound(to: ImVec2.self, capacity: 2) { out_uv_fillPtr in + ImFontAtlas_GetMouseCursorTexData(this, cursor, out_offset, out_size, out_uv_borderPtr, out_uv_fillPtr) + } + } + } + } } @inlinable @discardableResult public func ImFontAtlasIsBuilt(_ this: UnsafeMutablePointer!) -> Bool { - return ImFontAtlas_IsBuilt(this) + ImFontAtlas_IsBuilt(this) } -@inlinable public func ImFontAtlasSetTexID(_ this: UnsafeMutablePointer!, _ id: ImTextureID) -> Void { - return ImFontAtlas_SetTexID(this,id) +@inlinable public func ImFontAtlasSetTexID(_ this: UnsafeMutablePointer!, _ id: ImTextureID) { + ImFontAtlas_SetTexID(this, id) } -@inlinable public func ImFontBuildLookupTable(_ this: UnsafeMutablePointer!) -> Void { - return ImFont_BuildLookupTable(this) +@inlinable public func ImFontBuildLookupTable(_ this: UnsafeMutablePointer!) { + ImFont_BuildLookupTable(this) } @inlinable public func ImFontCalcWordWrapPositionA(_ this: UnsafeMutablePointer!, _ scale: Float, _ text: String? = nil, _ text_end: String? = nil, _ wrap_width: Float) -> String? { - text.withOptionalCString { textPtr in - text_end.withOptionalCString { text_endPtr in - return String(cString: ImFont_CalcWordWrapPositionA(this,scale,textPtr,text_endPtr,wrap_width)) - } - } + text.withOptionalCString { textPtr in + text_end.withOptionalCString { text_endPtr in + String(cString: ImFont_CalcWordWrapPositionA(this, scale, textPtr, text_endPtr, wrap_width)) + } + } } -@inlinable public func ImFontClearOutputData(_ this: UnsafeMutablePointer!) -> Void { - return ImFont_ClearOutputData(this) +@inlinable public func ImFontClearOutputData(_ this: UnsafeMutablePointer!) { + ImFont_ClearOutputData(this) } @inlinable public func ImFontFindGlyph(_ this: UnsafeMutablePointer!, _ c: ImWchar) -> UnsafePointer! { - return ImFont_FindGlyph(this,c) + ImFont_FindGlyph(this, c) } @inlinable public func ImFontFindGlyphNoFallback(_ this: UnsafeMutablePointer!, _ c: ImWchar) -> UnsafePointer! { - return ImFont_FindGlyphNoFallback(this,c) + ImFont_FindGlyphNoFallback(this, c) } @inlinable public func ImFontGetCharAdvance(_ this: UnsafeMutablePointer!, _ c: ImWchar) -> Float { - return ImFont_GetCharAdvance(this,c) + ImFont_GetCharAdvance(this, c) } @inlinable public func ImFontGetDebugName(_ this: UnsafeMutablePointer!) -> String? { - return String(cString: ImFont_GetDebugName(this)) + String(cString: ImFont_GetDebugName(this)) } -@inlinable public func ImFontGlyphRangesBuilderAddChar(_ this: UnsafeMutablePointer!, _ c: ImWchar) -> Void { - return ImFontGlyphRangesBuilder_AddChar(this,c) +@inlinable public func ImFontGlyphRangesBuilderAddChar(_ this: UnsafeMutablePointer!, _ c: ImWchar) { + ImFontGlyphRangesBuilder_AddChar(this, c) } -@inlinable public func ImFontGlyphRangesBuilderAddRanges(_ this: UnsafeMutablePointer!, _ ranges: UnsafePointer!) -> Void { - return ImFontGlyphRangesBuilder_AddRanges(this,ranges) +@inlinable public func ImFontGlyphRangesBuilderAddRanges(_ this: UnsafeMutablePointer!, _ ranges: UnsafePointer!) { + ImFontGlyphRangesBuilder_AddRanges(this, ranges) } -@inlinable public func ImFontGlyphRangesBuilderAddText(_ this: UnsafeMutablePointer!, _ text: String? = nil, _ text_end: String? = nil) -> Void { - text.withOptionalCString { textPtr in - text_end.withOptionalCString { text_endPtr in - return ImFontGlyphRangesBuilder_AddText(this,textPtr,text_endPtr) - } - } +@inlinable public func ImFontGlyphRangesBuilderAddText(_ this: UnsafeMutablePointer!, _ text: String? = nil, _ text_end: String? = nil) { + text.withOptionalCString { textPtr in + text_end.withOptionalCString { text_endPtr in + ImFontGlyphRangesBuilder_AddText(this, textPtr, text_endPtr) + } + } } -@inlinable public func ImFontGlyphRangesBuilderBuildRanges(_ this: UnsafeMutablePointer!, _ out_ranges: UnsafeMutablePointer!) -> Void { - return ImFontGlyphRangesBuilder_BuildRanges(this,out_ranges) +@inlinable public func ImFontGlyphRangesBuilderBuildRanges(_ this: UnsafeMutablePointer!, _ out_ranges: UnsafeMutablePointer!) { + ImFontGlyphRangesBuilder_BuildRanges(this, out_ranges) } -@inlinable public func ImFontGlyphRangesBuilderClear(_ this: UnsafeMutablePointer!) -> Void { - return ImFontGlyphRangesBuilder_Clear(this) +@inlinable public func ImFontGlyphRangesBuilderClear(_ this: UnsafeMutablePointer!) { + ImFontGlyphRangesBuilder_Clear(this) } @inlinable @discardableResult public func ImFontGlyphRangesBuilderGetBit(_ this: UnsafeMutablePointer!, _ n: Int) -> Bool { - return ImFontGlyphRangesBuilder_GetBit(this,n) + ImFontGlyphRangesBuilder_GetBit(this, n) } -@inlinable public func ImFontGlyphRangesBuilderSetBit(_ this: UnsafeMutablePointer!, _ n: Int) -> Void { - return ImFontGlyphRangesBuilder_SetBit(this,n) +@inlinable public func ImFontGlyphRangesBuilderSetBit(_ this: UnsafeMutablePointer!, _ n: Int) { + ImFontGlyphRangesBuilder_SetBit(this, n) } -@inlinable public func ImFontGrowIndex(_ this: UnsafeMutablePointer!, _ new_size: Int32) -> Void { - return ImFont_GrowIndex(this,new_size) +@inlinable public func ImFontGrowIndex(_ this: UnsafeMutablePointer!, _ new_size: Int32) { + ImFont_GrowIndex(this, new_size) } @inlinable @discardableResult public func ImFontIsGlyphRangeUnused(_ this: UnsafeMutablePointer!, _ c_begin: UInt32, _ c_last: UInt32) -> Bool { - return ImFont_IsGlyphRangeUnused(this,c_begin,c_last) + ImFont_IsGlyphRangeUnused(this, c_begin, c_last) } @inlinable @discardableResult public func ImFontIsLoaded(_ this: UnsafeMutablePointer!) -> Bool { - return ImFont_IsLoaded(this) + ImFont_IsLoaded(this) } -@inlinable public func ImFontRenderChar(_ this: UnsafeMutablePointer!, _ draw_list: UnsafeMutablePointer!, _ size: Float, _ pos: ImVec2, _ col: ImU32, _ c: ImWchar) -> Void { - return ImFont_RenderChar(this,draw_list,size,pos,col,c) +@inlinable public func ImFontRenderChar(_ this: UnsafeMutablePointer!, _ draw_list: UnsafeMutablePointer!, _ size: Float, _ pos: ImVec2, _ col: ImU32, _ c: ImWchar) { + ImFont_RenderChar(this, draw_list, size, pos, col, c) } -@inlinable public func ImFontRenderText(_ this: UnsafeMutablePointer!, _ draw_list: UnsafeMutablePointer!, _ size: Float, _ pos: ImVec2, _ col: ImU32, _ clip_rect: ImVec4, _ text_begin: String? = nil, _ text_end: String? = nil, _ wrap_width: Float, _ cpu_fine_clip: Bool) -> Void { - text_begin.withOptionalCString { text_beginPtr in - text_end.withOptionalCString { text_endPtr in - return ImFont_RenderText(this,draw_list,size,pos,col,clip_rect,text_beginPtr,text_endPtr,wrap_width,cpu_fine_clip) - } - } +@inlinable public func ImFontRenderText(_ this: UnsafeMutablePointer!, _ draw_list: UnsafeMutablePointer!, _ size: Float, _ pos: ImVec2, _ col: ImU32, _ clip_rect: ImVec4, _ text_begin: String? = nil, _ text_end: String? = nil, _ wrap_width: Float, _ cpu_fine_clip: Bool) { + text_begin.withOptionalCString { text_beginPtr in + text_end.withOptionalCString { text_endPtr in + ImFont_RenderText(this, draw_list, size, pos, col, clip_rect, text_beginPtr, text_endPtr, wrap_width, cpu_fine_clip) + } + } } -@inlinable public func ImFontSetGlyphVisible(_ this: UnsafeMutablePointer!, _ c: ImWchar, _ visible: Bool) -> Void { - return ImFont_SetGlyphVisible(this,c,visible) +@inlinable public func ImFontSetGlyphVisible(_ this: UnsafeMutablePointer!, _ c: ImWchar, _ visible: Bool) { + ImFont_SetGlyphVisible(this, c, visible) } @inlinable public func ImFormatStringV(_ buf: inout String?, _ buf_size: Int, _ fmt: String? = nil, _ args: CVarArg...) -> Int32 { - buf.withOptionalCString { bufPtr in - fmt.withOptionalCString { fmtPtr in - withVaList(args) { varArgsPtr in - return igImFormatStringV(UnsafeMutablePointer(mutating: bufPtr),buf_size,fmtPtr,varArgsPtr) - } - } - } + buf.withOptionalCString { bufPtr in + fmt.withOptionalCString { fmtPtr in + withVaList(args) { varArgsPtr in + igImFormatStringV(UnsafeMutablePointer(mutating: bufPtr), buf_size, fmtPtr, varArgsPtr) + } + } + } } @inlinable public func ImGetDirQuadrantFromDelta(_ dx: Float, _ dy: Float) -> ImGuiDir { - return igImGetDirQuadrantFromDelta(dx,dy) + igImGetDirQuadrantFromDelta(dx, dy) } @inlinable public func ImGuiAcceptDragDropPayload(_ type: String? = nil, _ flags: ImGuiDragDropFlags) -> UnsafePointer! { - type.withOptionalCString { typePtr in - return igAcceptDragDropPayload(typePtr,flags) - } + type.withOptionalCString { typePtr in + igAcceptDragDropPayload(typePtr, flags) + } } -@inlinable public func ImGuiActivateItem(_ id: ImGuiID) -> Void { - return igActivateItem(id) +@inlinable public func ImGuiActivateItem(_ id: ImGuiID) { + igActivateItem(id) } @inlinable public func ImGuiAddContextHook(_ context: UnsafeMutablePointer!, _ hook: UnsafePointer!) -> ImGuiID { - return igAddContextHook(context,hook) + igAddContextHook(context, hook) } -@inlinable public func ImGuiAlignTextToFramePadding() -> Void { - return igAlignTextToFramePadding() +@inlinable public func ImGuiAlignTextToFramePadding() { + igAlignTextToFramePadding() } @inlinable @discardableResult public func ImGuiArrowButton(_ str_id: String? = nil, _ dir: ImGuiDir) -> Bool { - str_id.withOptionalCString { str_idPtr in - return igArrowButton(str_idPtr,dir) - } + str_id.withOptionalCString { str_idPtr in + igArrowButton(str_idPtr, dir) + } } @inlinable @discardableResult public func ImGuiArrowButtonEx(_ str_id: String? = nil, _ dir: ImGuiDir, _ size_arg: ImVec2, _ flags: ImGuiButtonFlags) -> Bool { - str_id.withOptionalCString { str_idPtr in - return igArrowButtonEx(str_idPtr,dir,size_arg,flags) - } + str_id.withOptionalCString { str_idPtr in + igArrowButtonEx(str_idPtr, dir, size_arg, flags) + } } @inlinable @discardableResult public func ImGuiBegin(_ name: String? = nil, _ p_open: UnsafeMutablePointer!, _ flags: ImGuiWindowFlags) -> Bool { - name.withOptionalCString { namePtr in - return igBegin(namePtr,p_open,flags) - } + name.withOptionalCString { namePtr in + igBegin(namePtr, p_open, flags) + } } @inlinable @discardableResult public func ImGuiBeginChild(_ str_id: String? = nil, _ size: ImVec2, _ border: Bool, _ flags: ImGuiWindowFlags) -> Bool { - str_id.withOptionalCString { str_idPtr in - return igBeginChild_Str(str_idPtr,size,border,flags) - } + str_id.withOptionalCString { str_idPtr in + igBeginChild_Str(str_idPtr, size, border, flags) + } } @inlinable @discardableResult public func ImGuiBeginChild(_ id: ImGuiID, _ size: ImVec2, _ border: Bool, _ flags: ImGuiWindowFlags) -> Bool { - return igBeginChild_ID(id,size,border,flags) + igBeginChild_ID(id, size, border, flags) } @inlinable @discardableResult public func ImGuiBeginChildEx(_ name: String? = nil, _ id: ImGuiID, _ size_arg: ImVec2, _ border: Bool, _ flags: ImGuiWindowFlags) -> Bool { - name.withOptionalCString { namePtr in - return igBeginChildEx(namePtr,id,size_arg,border,flags) - } + name.withOptionalCString { namePtr in + igBeginChildEx(namePtr, id, size_arg, border, flags) + } } @inlinable @discardableResult public func ImGuiBeginChildFrame(_ id: ImGuiID, _ size: ImVec2, _ flags: ImGuiWindowFlags) -> Bool { - return igBeginChildFrame(id,size,flags) + igBeginChildFrame(id, size, flags) } -@inlinable public func ImGuiBeginColumns(_ str_id: String? = nil, _ count: Int32, _ flags: ImGuiOldColumnFlags) -> Void { - str_id.withOptionalCString { str_idPtr in - return igBeginColumns(str_idPtr,count,flags) - } +@inlinable public func ImGuiBeginColumns(_ str_id: String? = nil, _ count: Int32, _ flags: ImGuiOldColumnFlags) { + str_id.withOptionalCString { str_idPtr in + igBeginColumns(str_idPtr, count, flags) + } } @inlinable @discardableResult public func ImGuiBeginCombo(_ label: String? = nil, _ preview_value: String? = nil, _ flags: ImGuiComboFlags) -> Bool { - label.withOptionalCString { labelPtr in - preview_value.withOptionalCString { preview_valuePtr in - return igBeginCombo(labelPtr,preview_valuePtr,flags) - } - } + label.withOptionalCString { labelPtr in + preview_value.withOptionalCString { preview_valuePtr in + igBeginCombo(labelPtr, preview_valuePtr, flags) + } + } } @inlinable @discardableResult public func ImGuiBeginComboPopup(_ popup_id: ImGuiID, _ bb: ImRect, _ flags: ImGuiComboFlags) -> Bool { - return igBeginComboPopup(popup_id,bb,flags) + igBeginComboPopup(popup_id, bb, flags) } @inlinable @discardableResult public func ImGuiBeginComboPreview() -> Bool { - return igBeginComboPreview() + igBeginComboPreview() } -@inlinable public func ImGuiBeginDisabled(_ disabled: Bool) -> Void { - return igBeginDisabled(disabled) +@inlinable public func ImGuiBeginDisabled(_ disabled: Bool) { + igBeginDisabled(disabled) } @inlinable @discardableResult public func ImGuiBeginDragDropSource(_ flags: ImGuiDragDropFlags) -> Bool { - return igBeginDragDropSource(flags) + igBeginDragDropSource(flags) } @inlinable @discardableResult public func ImGuiBeginDragDropTarget() -> Bool { - return igBeginDragDropTarget() + igBeginDragDropTarget() } @inlinable @discardableResult public func ImGuiBeginDragDropTargetCustom(_ bb: ImRect, _ id: ImGuiID) -> Bool { - return igBeginDragDropTargetCustom(bb,id) + igBeginDragDropTargetCustom(bb, id) } -@inlinable public func ImGuiBeginGroup() -> Void { - return igBeginGroup() +@inlinable public func ImGuiBeginGroup() { + igBeginGroup() } @inlinable @discardableResult public func ImGuiBeginListBox(_ label: String? = nil, _ size: ImVec2) -> Bool { - label.withOptionalCString { labelPtr in - return igBeginListBox(labelPtr,size) - } + label.withOptionalCString { labelPtr in + igBeginListBox(labelPtr, size) + } } @inlinable @discardableResult public func ImGuiBeginMainMenuBar() -> Bool { - return igBeginMainMenuBar() + igBeginMainMenuBar() } @inlinable @discardableResult public func ImGuiBeginMenu(_ label: String? = nil, _ enabled: Bool) -> Bool { - label.withOptionalCString { labelPtr in - return igBeginMenu(labelPtr,enabled) - } + label.withOptionalCString { labelPtr in + igBeginMenu(labelPtr, enabled) + } } @inlinable @discardableResult public func ImGuiBeginMenuBar() -> Bool { - return igBeginMenuBar() + igBeginMenuBar() } @inlinable @discardableResult public func ImGuiBeginMenuEx(_ label: String? = nil, _ icon: String? = nil, _ enabled: Bool) -> Bool { - label.withOptionalCString { labelPtr in - icon.withOptionalCString { iconPtr in - return igBeginMenuEx(labelPtr,iconPtr,enabled) - } - } + label.withOptionalCString { labelPtr in + icon.withOptionalCString { iconPtr in + igBeginMenuEx(labelPtr, iconPtr, enabled) + } + } } @inlinable @discardableResult public func ImGuiBeginPopup(_ str_id: String? = nil, _ flags: ImGuiWindowFlags) -> Bool { - str_id.withOptionalCString { str_idPtr in - return igBeginPopup(str_idPtr,flags) - } + str_id.withOptionalCString { str_idPtr in + igBeginPopup(str_idPtr, flags) + } } @inlinable @discardableResult public func ImGuiBeginPopupContextItem(_ str_id: String? = nil, _ popup_flags: ImGuiPopupFlags) -> Bool { - str_id.withOptionalCString { str_idPtr in - return igBeginPopupContextItem(str_idPtr,popup_flags) - } + str_id.withOptionalCString { str_idPtr in + igBeginPopupContextItem(str_idPtr, popup_flags) + } } @inlinable @discardableResult public func ImGuiBeginPopupContextVoid(_ str_id: String? = nil, _ popup_flags: ImGuiPopupFlags) -> Bool { - str_id.withOptionalCString { str_idPtr in - return igBeginPopupContextVoid(str_idPtr,popup_flags) - } + str_id.withOptionalCString { str_idPtr in + igBeginPopupContextVoid(str_idPtr, popup_flags) + } } @inlinable @discardableResult public func ImGuiBeginPopupContextWindow(_ str_id: String? = nil, _ popup_flags: ImGuiPopupFlags) -> Bool { - str_id.withOptionalCString { str_idPtr in - return igBeginPopupContextWindow(str_idPtr,popup_flags) - } + str_id.withOptionalCString { str_idPtr in + igBeginPopupContextWindow(str_idPtr, popup_flags) + } } @inlinable @discardableResult public func ImGuiBeginPopupEx(_ id: ImGuiID, _ extra_flags: ImGuiWindowFlags) -> Bool { - return igBeginPopupEx(id,extra_flags) + igBeginPopupEx(id, extra_flags) } @inlinable @discardableResult public func ImGuiBeginPopupModal(_ name: String? = nil, _ p_open: UnsafeMutablePointer!, _ flags: ImGuiWindowFlags) -> Bool { - name.withOptionalCString { namePtr in - return igBeginPopupModal(namePtr,p_open,flags) - } + name.withOptionalCString { namePtr in + igBeginPopupModal(namePtr, p_open, flags) + } } @inlinable @discardableResult public func ImGuiBeginTabBar(_ str_id: String? = nil, _ flags: ImGuiTabBarFlags) -> Bool { - str_id.withOptionalCString { str_idPtr in - return igBeginTabBar(str_idPtr,flags) - } + str_id.withOptionalCString { str_idPtr in + igBeginTabBar(str_idPtr, flags) + } } @inlinable @discardableResult public func ImGuiBeginTabBarEx(_ tab_bar: UnsafeMutablePointer!, _ bb: ImRect, _ flags: ImGuiTabBarFlags) -> Bool { - return igBeginTabBarEx(tab_bar,bb,flags) + igBeginTabBarEx(tab_bar, bb, flags) } @inlinable @discardableResult public func ImGuiBeginTabItem(_ label: String? = nil, _ p_open: UnsafeMutablePointer!, _ flags: ImGuiTabItemFlags) -> Bool { - label.withOptionalCString { labelPtr in - return igBeginTabItem(labelPtr,p_open,flags) - } + label.withOptionalCString { labelPtr in + igBeginTabItem(labelPtr, p_open, flags) + } } @inlinable @discardableResult public func ImGuiBeginTable(_ str_id: String? = nil, _ column: Int32, _ flags: ImGuiTableFlags, _ outer_size: ImVec2, _ inner_width: Float) -> Bool { - str_id.withOptionalCString { str_idPtr in - return igBeginTable(str_idPtr,column,flags,outer_size,inner_width) - } + str_id.withOptionalCString { str_idPtr in + igBeginTable(str_idPtr, column, flags, outer_size, inner_width) + } } @inlinable @discardableResult public func ImGuiBeginTableEx(_ name: String? = nil, _ id: ImGuiID, _ columns_count: Int32, _ flags: ImGuiTableFlags, _ outer_size: ImVec2, _ inner_width: Float) -> Bool { - name.withOptionalCString { namePtr in - return igBeginTableEx(namePtr,id,columns_count,flags,outer_size,inner_width) - } + name.withOptionalCString { namePtr in + igBeginTableEx(namePtr, id, columns_count, flags, outer_size, inner_width) + } } -@inlinable public func ImGuiBeginTooltip() -> Void { - return igBeginTooltip() +@inlinable public func ImGuiBeginTooltip() { + igBeginTooltip() } -@inlinable public func ImGuiBeginTooltipEx(_ tooltip_flags: ImGuiTooltipFlags, _ extra_window_flags: ImGuiWindowFlags) -> Void { - return igBeginTooltipEx(tooltip_flags,extra_window_flags) +@inlinable public func ImGuiBeginTooltipEx(_ tooltip_flags: ImGuiTooltipFlags, _ extra_window_flags: ImGuiWindowFlags) { + igBeginTooltipEx(tooltip_flags, extra_window_flags) } @inlinable @discardableResult public func ImGuiBeginViewportSideBar(_ name: String? = nil, _ viewport: UnsafeMutablePointer!, _ dir: ImGuiDir, _ size: Float, _ window_flags: ImGuiWindowFlags) -> Bool { - name.withOptionalCString { namePtr in - return igBeginViewportSideBar(namePtr,viewport,dir,size,window_flags) - } + name.withOptionalCString { namePtr in + igBeginViewportSideBar(namePtr, viewport, dir, size, window_flags) + } } -@inlinable public func ImGuiBringWindowToDisplayBack(_ window: UnsafeMutablePointer!) -> Void { - return igBringWindowToDisplayBack(window) +@inlinable public func ImGuiBringWindowToDisplayBack(_ window: UnsafeMutablePointer!) { + igBringWindowToDisplayBack(window) } -@inlinable public func ImGuiBringWindowToDisplayBehind(_ window: UnsafeMutablePointer!, _ above_window: UnsafeMutablePointer!) -> Void { - return igBringWindowToDisplayBehind(window,above_window) +@inlinable public func ImGuiBringWindowToDisplayBehind(_ window: UnsafeMutablePointer!, _ above_window: UnsafeMutablePointer!) { + igBringWindowToDisplayBehind(window, above_window) } -@inlinable public func ImGuiBringWindowToDisplayFront(_ window: UnsafeMutablePointer!) -> Void { - return igBringWindowToDisplayFront(window) +@inlinable public func ImGuiBringWindowToDisplayFront(_ window: UnsafeMutablePointer!) { + igBringWindowToDisplayFront(window) } -@inlinable public func ImGuiBringWindowToFocusFront(_ window: UnsafeMutablePointer!) -> Void { - return igBringWindowToFocusFront(window) +@inlinable public func ImGuiBringWindowToFocusFront(_ window: UnsafeMutablePointer!) { + igBringWindowToFocusFront(window) } -@inlinable public func ImGuiBullet() -> Void { - return igBullet() +@inlinable public func ImGuiBullet() { + igBullet() } -@inlinable public func ImGuiBulletTextV(_ fmt: String? = nil, _ args: CVarArg...) -> Void { - fmt.withOptionalCString { fmtPtr in - withVaList(args) { varArgsPtr in - return igBulletTextV(fmtPtr,varArgsPtr) - } - } +@inlinable public func ImGuiBulletTextV(_ fmt: String? = nil, _ args: CVarArg...) { + fmt.withOptionalCString { fmtPtr in + withVaList(args) { varArgsPtr in + igBulletTextV(fmtPtr, varArgsPtr) + } + } } @inlinable @discardableResult public func ImGuiButton(_ label: String? = nil, _ size: ImVec2) -> Bool { - label.withOptionalCString { labelPtr in - return igButton(labelPtr,size) - } + label.withOptionalCString { labelPtr in + igButton(labelPtr, size) + } } @inlinable @discardableResult public func ImGuiButtonBehavior(_ bb: ImRect, _ id: ImGuiID, _ out_hovered: UnsafeMutablePointer!, _ out_held: UnsafeMutablePointer!, _ flags: ImGuiButtonFlags) -> Bool { - return igButtonBehavior(bb,id,out_hovered,out_held,flags) + igButtonBehavior(bb, id, out_hovered, out_held, flags) } @inlinable @discardableResult public func ImGuiButtonEx(_ label: String? = nil, _ size_arg: ImVec2, _ flags: ImGuiButtonFlags) -> Bool { - label.withOptionalCString { labelPtr in - return igButtonEx(labelPtr,size_arg,flags) - } + label.withOptionalCString { labelPtr in + igButtonEx(labelPtr, size_arg, flags) + } } -@inlinable public func ImGuiCalcItemSize(_ pOut: UnsafeMutablePointer!, _ size: ImVec2, _ default_w: Float, _ default_h: Float) -> Void { - return igCalcItemSize(pOut,size,default_w,default_h) +@inlinable public func ImGuiCalcItemSize(_ pOut: UnsafeMutablePointer!, _ size: ImVec2, _ default_w: Float, _ default_h: Float) { + igCalcItemSize(pOut, size, default_w, default_h) } @inlinable public func ImGuiCalcItemWidth() -> Float { - return igCalcItemWidth() + igCalcItemWidth() } -@inlinable public func ImGuiCalcTextSize(_ pOut: UnsafeMutablePointer!, _ text: String? = nil, _ text_end: String? = nil, _ hide_text_after_double_hash: Bool, _ wrap_width: Float) -> Void { - text.withOptionalCString { textPtr in - text_end.withOptionalCString { text_endPtr in - return igCalcTextSize(pOut,textPtr,text_endPtr,hide_text_after_double_hash,wrap_width) - } - } +@inlinable public func ImGuiCalcTextSize(_ pOut: UnsafeMutablePointer!, _ text: String? = nil, _ text_end: String? = nil, _ hide_text_after_double_hash: Bool, _ wrap_width: Float) { + text.withOptionalCString { textPtr in + text_end.withOptionalCString { text_endPtr in + igCalcTextSize(pOut, textPtr, text_endPtr, hide_text_after_double_hash, wrap_width) + } + } } @inlinable public func ImGuiCalcTypematicRepeatAmount(_ t0: Float, _ t1: Float, _ repeat_delay: Float, _ repeat_rate: Float) -> Int32 { - return igCalcTypematicRepeatAmount(t0,t1,repeat_delay,repeat_rate) + igCalcTypematicRepeatAmount(t0, t1, repeat_delay, repeat_rate) } -@inlinable public func ImGuiCalcWindowNextAutoFitSize(_ pOut: UnsafeMutablePointer!, _ window: UnsafeMutablePointer!) -> Void { - return igCalcWindowNextAutoFitSize(pOut,window) +@inlinable public func ImGuiCalcWindowNextAutoFitSize(_ pOut: UnsafeMutablePointer!, _ window: UnsafeMutablePointer!) { + igCalcWindowNextAutoFitSize(pOut, window) } @inlinable public func ImGuiCalcWrapWidthForPos(_ pos: ImVec2, _ wrap_pos_x: Float) -> Float { - return igCalcWrapWidthForPos(pos,wrap_pos_x) + igCalcWrapWidthForPos(pos, wrap_pos_x) } -@inlinable public func ImGuiCallContextHooks(_ context: UnsafeMutablePointer!, _ type: ImGuiContextHookType) -> Void { - return igCallContextHooks(context,type) +@inlinable public func ImGuiCallContextHooks(_ context: UnsafeMutablePointer!, _ type: ImGuiContextHookType) { + igCallContextHooks(context, type) } -@inlinable public func ImGuiCaptureKeyboardFromApp(_ want_capture_keyboard_value: Bool) -> Void { - return igCaptureKeyboardFromApp(want_capture_keyboard_value) +@inlinable public func ImGuiCaptureKeyboardFromApp(_ want_capture_keyboard_value: Bool) { + igCaptureKeyboardFromApp(want_capture_keyboard_value) } -@inlinable public func ImGuiCaptureMouseFromApp(_ want_capture_mouse_value: Bool) -> Void { - return igCaptureMouseFromApp(want_capture_mouse_value) +@inlinable public func ImGuiCaptureMouseFromApp(_ want_capture_mouse_value: Bool) { + igCaptureMouseFromApp(want_capture_mouse_value) } @inlinable @discardableResult public func ImGuiCheckbox(_ label: String? = nil, _ v: UnsafeMutablePointer!) -> Bool { - label.withOptionalCString { labelPtr in - return igCheckbox(labelPtr,v) - } + label.withOptionalCString { labelPtr in + igCheckbox(labelPtr, v) + } } @inlinable @discardableResult public func ImGuiCheckboxFlags(_ label: String? = nil, _ flags: UnsafeMutablePointer!, _ flags_value: Int32) -> Bool { - label.withOptionalCString { labelPtr in - return igCheckboxFlags_IntPtr(labelPtr,flags,flags_value) - } + label.withOptionalCString { labelPtr in + igCheckboxFlags_IntPtr(labelPtr, flags, flags_value) + } } @inlinable @discardableResult public func ImGuiCheckboxFlags(_ label: String? = nil, _ flags: UnsafeMutablePointer!, _ flags_value: UInt32) -> Bool { - label.withOptionalCString { labelPtr in - return igCheckboxFlags_UintPtr(labelPtr,flags,flags_value) - } + label.withOptionalCString { labelPtr in + igCheckboxFlags_UintPtr(labelPtr, flags, flags_value) + } } @inlinable @discardableResult public func ImGuiCheckboxFlags(_ label: String? = nil, _ flags: UnsafeMutablePointer!, _ flags_value: ImS64) -> Bool { - label.withOptionalCString { labelPtr in - return igCheckboxFlags_S64Ptr(labelPtr,flags,flags_value) - } + label.withOptionalCString { labelPtr in + igCheckboxFlags_S64Ptr(labelPtr, flags, flags_value) + } } @inlinable @discardableResult public func ImGuiCheckboxFlags(_ label: String? = nil, _ flags: UnsafeMutablePointer!, _ flags_value: ImU64) -> Bool { - label.withOptionalCString { labelPtr in - return igCheckboxFlags_U64Ptr(labelPtr,flags,flags_value) - } + label.withOptionalCString { labelPtr in + igCheckboxFlags_U64Ptr(labelPtr, flags, flags_value) + } } -@inlinable public func ImGuiClearActiveID() -> Void { - return igClearActiveID() +@inlinable public func ImGuiClearActiveID() { + igClearActiveID() } -@inlinable public func ImGuiClearDragDrop() -> Void { - return igClearDragDrop() +@inlinable public func ImGuiClearDragDrop() { + igClearDragDrop() } -@inlinable public func ImGuiClearIniSettings() -> Void { - return igClearIniSettings() +@inlinable public func ImGuiClearIniSettings() { + igClearIniSettings() } @inlinable @discardableResult public func ImGuiCloseButton(_ id: ImGuiID, _ pos: ImVec2) -> Bool { - return igCloseButton(id,pos) + igCloseButton(id, pos) } -@inlinable public func ImGuiCloseCurrentPopup() -> Void { - return igCloseCurrentPopup() +@inlinable public func ImGuiCloseCurrentPopup() { + igCloseCurrentPopup() } -@inlinable public func ImGuiClosePopupToLevel(_ remaining: Int32, _ restore_focus_to_window_under_popup: Bool) -> Void { - return igClosePopupToLevel(remaining,restore_focus_to_window_under_popup) +@inlinable public func ImGuiClosePopupToLevel(_ remaining: Int32, _ restore_focus_to_window_under_popup: Bool) { + igClosePopupToLevel(remaining, restore_focus_to_window_under_popup) } -@inlinable public func ImGuiClosePopupsExceptModals() -> Void { - return igClosePopupsExceptModals() +@inlinable public func ImGuiClosePopupsExceptModals() { + igClosePopupsExceptModals() } -@inlinable public func ImGuiClosePopupsOverWindow(_ ref_window: UnsafeMutablePointer!, _ restore_focus_to_window_under_popup: Bool) -> Void { - return igClosePopupsOverWindow(ref_window,restore_focus_to_window_under_popup) +@inlinable public func ImGuiClosePopupsOverWindow(_ ref_window: UnsafeMutablePointer!, _ restore_focus_to_window_under_popup: Bool) { + igClosePopupsOverWindow(ref_window, restore_focus_to_window_under_popup) } @inlinable @discardableResult public func ImGuiCollapseButton(_ id: ImGuiID, _ pos: ImVec2) -> Bool { - return igCollapseButton(id,pos) + igCollapseButton(id, pos) } @inlinable @discardableResult public func ImGuiCollapsingHeader(_ label: String? = nil, _ flags: ImGuiTreeNodeFlags) -> Bool { - label.withOptionalCString { labelPtr in - return igCollapsingHeader_TreeNodeFlags(labelPtr,flags) - } + label.withOptionalCString { labelPtr in + igCollapsingHeader_TreeNodeFlags(labelPtr, flags) + } } @inlinable @discardableResult public func ImGuiCollapsingHeader(_ label: String? = nil, _ p_visible: UnsafeMutablePointer!, _ flags: ImGuiTreeNodeFlags) -> Bool { - label.withOptionalCString { labelPtr in - return igCollapsingHeader_BoolPtr(labelPtr,p_visible,flags) - } + label.withOptionalCString { labelPtr in + igCollapsingHeader_BoolPtr(labelPtr, p_visible, flags) + } } @inlinable @discardableResult public func ImGuiColorButton(_ desc_id: String? = nil, _ col: ImVec4, _ flags: ImGuiColorEditFlags, _ size: ImVec2) -> Bool { - desc_id.withOptionalCString { desc_idPtr in - return igColorButton(desc_idPtr,col,flags,size) - } + desc_id.withOptionalCString { desc_idPtr in + igColorButton(desc_idPtr, col, flags, size) + } } -@inlinable public func ImGuiColorConvertFloat4ToU32(_ `in`: ImVec4) -> ImU32 { - return igColorConvertFloat4ToU32(`in`) +@inlinable public func ImGuiColorConvertFloat4ToU32(_ in: ImVec4) -> ImU32 { + igColorConvertFloat4ToU32(`in`) } -@inlinable public func ImGuiColorConvertHSVtoRGB(_ h: Float, _ s: Float, _ v: Float, _ out_r: UnsafeMutablePointer!, _ out_g: UnsafeMutablePointer!, _ out_b: UnsafeMutablePointer!) -> Void { - return igColorConvertHSVtoRGB(h,s,v,out_r,out_g,out_b) +@inlinable public func ImGuiColorConvertHSVtoRGB(_ h: Float, _ s: Float, _ v: Float, _ out_r: UnsafeMutablePointer!, _ out_g: UnsafeMutablePointer!, _ out_b: UnsafeMutablePointer!) { + igColorConvertHSVtoRGB(h, s, v, out_r, out_g, out_b) } -@inlinable public func ImGuiColorConvertRGBtoHSV(_ r: Float, _ g: Float, _ b: Float, _ out_h: UnsafeMutablePointer!, _ out_s: UnsafeMutablePointer!, _ out_v: UnsafeMutablePointer!) -> Void { - return igColorConvertRGBtoHSV(r,g,b,out_h,out_s,out_v) +@inlinable public func ImGuiColorConvertRGBtoHSV(_ r: Float, _ g: Float, _ b: Float, _ out_h: UnsafeMutablePointer!, _ out_s: UnsafeMutablePointer!, _ out_v: UnsafeMutablePointer!) { + igColorConvertRGBtoHSV(r, g, b, out_h, out_s, out_v) } -@inlinable public func ImGuiColorConvertU32ToFloat4(_ pOut: UnsafeMutablePointer!, _ `in`: ImU32) -> Void { - return igColorConvertU32ToFloat4(pOut,`in`) +@inlinable public func ImGuiColorConvertU32ToFloat4(_ pOut: UnsafeMutablePointer!, _ in: ImU32) { + igColorConvertU32ToFloat4(pOut, `in`) } @inlinable @discardableResult public func ImGuiColorEdit3(_ label: String? = nil, _ col: inout SIMD3, _ flags: ImGuiColorEditFlags) -> Bool { - label.withOptionalCString { labelPtr in - withUnsafeMutablePointer(to: &col) { colMutPtr in - colMutPtr.withMemoryRebound(to: Float.self, capacity: 3) { colPtr in - return igColorEdit3(labelPtr,colPtr,flags) - } - } - } + label.withOptionalCString { labelPtr in + withUnsafeMutablePointer(to: &col) { colMutPtr in + colMutPtr.withMemoryRebound(to: Float.self, capacity: 3) { colPtr in + igColorEdit3(labelPtr, colPtr, flags) + } + } + } } @inlinable @discardableResult public func ImGuiColorEdit4(_ label: String? = nil, _ col: inout SIMD4, _ flags: ImGuiColorEditFlags) -> Bool { - label.withOptionalCString { labelPtr in - withUnsafeMutablePointer(to: &col) { colMutPtr in - colMutPtr.withMemoryRebound(to: Float.self, capacity: 4) { colPtr in - return igColorEdit4(labelPtr,colPtr,flags) - } - } - } + label.withOptionalCString { labelPtr in + withUnsafeMutablePointer(to: &col) { colMutPtr in + colMutPtr.withMemoryRebound(to: Float.self, capacity: 4) { colPtr in + igColorEdit4(labelPtr, colPtr, flags) + } + } + } } -@inlinable public func ImGuiColorEditOptionsPopup(_ col: UnsafePointer!, _ flags: ImGuiColorEditFlags) -> Void { - return igColorEditOptionsPopup(col,flags) +@inlinable public func ImGuiColorEditOptionsPopup(_ col: UnsafePointer!, _ flags: ImGuiColorEditFlags) { + igColorEditOptionsPopup(col, flags) } @inlinable @discardableResult public func ImGuiColorPicker3(_ label: String? = nil, _ col: inout SIMD3, _ flags: ImGuiColorEditFlags) -> Bool { - label.withOptionalCString { labelPtr in - withUnsafeMutablePointer(to: &col) { colMutPtr in - colMutPtr.withMemoryRebound(to: Float.self, capacity: 3) { colPtr in - return igColorPicker3(labelPtr,colPtr,flags) - } - } - } + label.withOptionalCString { labelPtr in + withUnsafeMutablePointer(to: &col) { colMutPtr in + colMutPtr.withMemoryRebound(to: Float.self, capacity: 3) { colPtr in + igColorPicker3(labelPtr, colPtr, flags) + } + } + } } @inlinable @discardableResult public func ImGuiColorPicker4(_ label: String? = nil, _ col: inout SIMD4, _ flags: ImGuiColorEditFlags, _ ref_col: UnsafePointer!) -> Bool { - label.withOptionalCString { labelPtr in - withUnsafeMutablePointer(to: &col) { colMutPtr in - colMutPtr.withMemoryRebound(to: Float.self, capacity: 4) { colPtr in - return igColorPicker4(labelPtr,colPtr,flags,ref_col) - } - } - } + label.withOptionalCString { labelPtr in + withUnsafeMutablePointer(to: &col) { colMutPtr in + colMutPtr.withMemoryRebound(to: Float.self, capacity: 4) { colPtr in + igColorPicker4(labelPtr, colPtr, flags, ref_col) + } + } + } } -@inlinable public func ImGuiColorPickerOptionsPopup(_ ref_col: UnsafePointer!, _ flags: ImGuiColorEditFlags) -> Void { - return igColorPickerOptionsPopup(ref_col,flags) +@inlinable public func ImGuiColorPickerOptionsPopup(_ ref_col: UnsafePointer!, _ flags: ImGuiColorEditFlags) { + igColorPickerOptionsPopup(ref_col, flags) } -@inlinable public func ImGuiColorTooltip(_ text: String? = nil, _ col: UnsafePointer!, _ flags: ImGuiColorEditFlags) -> Void { - text.withOptionalCString { textPtr in - return igColorTooltip(textPtr,col,flags) - } +@inlinable public func ImGuiColorTooltip(_ text: String? = nil, _ col: UnsafePointer!, _ flags: ImGuiColorEditFlags) { + text.withOptionalCString { textPtr in + igColorTooltip(textPtr, col, flags) + } } -@inlinable public func ImGuiColumns(_ count: Int32, _ id: String? = nil, _ border: Bool) -> Void { - id.withOptionalCString { idPtr in - return igColumns(count,idPtr,border) - } +@inlinable public func ImGuiColumns(_ count: Int32, _ id: String? = nil, _ border: Bool) { + id.withOptionalCString { idPtr in + igColumns(count, idPtr, border) + } } @inlinable @discardableResult public func ImGuiCombo(_ label: String? = nil, _ current_item: UnsafeMutablePointer!, _ items: [String], _ items_count: Int32, _ popup_max_height_in_items: Int32) -> Bool { - label.withOptionalCString { labelPtr in - withArrayOfCStringsBasePointer(items) { itemsPtr in - return igCombo_Str_arr(labelPtr,current_item,itemsPtr,items_count,popup_max_height_in_items) - } - } + label.withOptionalCString { labelPtr in + withArrayOfCStringsBasePointer(items) { itemsPtr in + igCombo_Str_arr(labelPtr, current_item, itemsPtr, items_count, popup_max_height_in_items) + } + } } @inlinable @discardableResult public func ImGuiCombo(_ label: String? = nil, _ current_item: UnsafeMutablePointer!, _ items_separated_by_zeros: String? = nil, _ popup_max_height_in_items: Int32) -> Bool { - label.withOptionalCString { labelPtr in - items_separated_by_zeros.withOptionalCString { items_separated_by_zerosPtr in - return igCombo_Str(labelPtr,current_item,items_separated_by_zerosPtr,popup_max_height_in_items) - } - } + label.withOptionalCString { labelPtr in + items_separated_by_zeros.withOptionalCString { items_separated_by_zerosPtr in + igCombo_Str(labelPtr, current_item, items_separated_by_zerosPtr, popup_max_height_in_items) + } + } } @inlinable public func ImGuiCreateContext(_ shared_font_atlas: UnsafeMutablePointer!) -> UnsafeMutablePointer! { - return igCreateContext(shared_font_atlas) + igCreateContext(shared_font_atlas) } @inlinable public func ImGuiCreateNewWindowSettings(_ name: String? = nil) -> UnsafeMutablePointer! { - name.withOptionalCString { namePtr in - return igCreateNewWindowSettings(namePtr) - } + name.withOptionalCString { namePtr in + igCreateNewWindowSettings(namePtr) + } } -@inlinable public func ImGuiDataTypeApplyOp(_ data_type: ImGuiDataType, _ op: Int32, _ output: UnsafeMutableRawPointer!, _ arg_1: UnsafeRawPointer!, _ arg_2: UnsafeRawPointer!) -> Void { - return igDataTypeApplyOp(data_type,op,output,arg_1,arg_2) +@inlinable public func ImGuiDataTypeApplyOp(_ data_type: ImGuiDataType, _ op: Int32, _ output: UnsafeMutableRawPointer!, _ arg_1: UnsafeRawPointer!, _ arg_2: UnsafeRawPointer!) { + igDataTypeApplyOp(data_type, op, output, arg_1, arg_2) } @inlinable @discardableResult public func ImGuiDataTypeApplyOpFromText(_ buf: String? = nil, _ initial_value_buf: String? = nil, _ data_type: ImGuiDataType, _ p_data: UnsafeMutableRawPointer!, _ format: String? = nil) -> Bool { - buf.withOptionalCString { bufPtr in - initial_value_buf.withOptionalCString { initial_value_bufPtr in - format.withOptionalCString { formatPtr in - return igDataTypeApplyOpFromText(bufPtr,initial_value_bufPtr,data_type,p_data,formatPtr) - } - } - } + buf.withOptionalCString { bufPtr in + initial_value_buf.withOptionalCString { initial_value_bufPtr in + format.withOptionalCString { formatPtr in + igDataTypeApplyOpFromText(bufPtr, initial_value_bufPtr, data_type, p_data, formatPtr) + } + } + } } @inlinable @discardableResult public func ImGuiDataTypeClamp(_ data_type: ImGuiDataType, _ p_data: UnsafeMutableRawPointer!, _ p_min: UnsafeRawPointer!, _ p_max: UnsafeRawPointer!) -> Bool { - return igDataTypeClamp(data_type,p_data,p_min,p_max) + igDataTypeClamp(data_type, p_data, p_min, p_max) } @inlinable public func ImGuiDataTypeCompare(_ data_type: ImGuiDataType, _ arg_1: UnsafeRawPointer!, _ arg_2: UnsafeRawPointer!) -> Int32 { - return igDataTypeCompare(data_type,arg_1,arg_2) + igDataTypeCompare(data_type, arg_1, arg_2) } @inlinable public func ImGuiDataTypeFormatString(_ buf: inout String?, _ buf_size: Int32, _ data_type: ImGuiDataType, _ p_data: UnsafeRawPointer!, _ format: String? = nil) -> Int32 { - buf.withOptionalCString { bufPtr in - format.withOptionalCString { formatPtr in - return igDataTypeFormatString(UnsafeMutablePointer(mutating: bufPtr),buf_size,data_type,p_data,formatPtr) - } - } + buf.withOptionalCString { bufPtr in + format.withOptionalCString { formatPtr in + igDataTypeFormatString(UnsafeMutablePointer(mutating: bufPtr), buf_size, data_type, p_data, formatPtr) + } + } } @inlinable public func ImGuiDataTypeGetInfo(_ data_type: ImGuiDataType) -> UnsafePointer! { - return igDataTypeGetInfo(data_type) + igDataTypeGetInfo(data_type) } @inlinable @discardableResult public func ImGuiDebugCheckVersionAndDataLayout(_ version_str: String? = nil, _ sz_io: Int, _ sz_style: Int, _ sz_vec2: Int, _ sz_vec4: Int, _ sz_drawvert: Int, _ sz_drawidx: Int) -> Bool { - version_str.withOptionalCString { version_strPtr in - return igDebugCheckVersionAndDataLayout(version_strPtr,sz_io,sz_style,sz_vec2,sz_vec4,sz_drawvert,sz_drawidx) - } + version_str.withOptionalCString { version_strPtr in + igDebugCheckVersionAndDataLayout(version_strPtr, sz_io, sz_style, sz_vec2, sz_vec4, sz_drawvert, sz_drawidx) + } } -@inlinable public func ImGuiDebugDrawItemRect(_ col: ImU32) -> Void { - return igDebugDrawItemRect(col) +@inlinable public func ImGuiDebugDrawItemRect(_ col: ImU32) { + igDebugDrawItemRect(col) } -@inlinable public func ImGuiDebugHookIdInfo(_ id: ImGuiID, _ data_type: ImGuiDataType, _ data_id: UnsafeRawPointer!, _ data_id_end: UnsafeRawPointer!) -> Void { - return igDebugHookIdInfo(id,data_type,data_id,data_id_end) +@inlinable public func ImGuiDebugHookIdInfo(_ id: ImGuiID, _ data_type: ImGuiDataType, _ data_id: UnsafeRawPointer!, _ data_id_end: UnsafeRawPointer!) { + igDebugHookIdInfo(id, data_type, data_id, data_id_end) } -@inlinable public func ImGuiDebugNodeColumns(_ columns: UnsafeMutablePointer!) -> Void { - return igDebugNodeColumns(columns) +@inlinable public func ImGuiDebugNodeColumns(_ columns: UnsafeMutablePointer!) { + igDebugNodeColumns(columns) } -@inlinable public func ImGuiDebugNodeDrawCmdShowMeshAndBoundingBox(_ out_draw_list: UnsafeMutablePointer!, _ draw_list: UnsafePointer!, _ draw_cmd: UnsafePointer!, _ show_mesh: Bool, _ show_aabb: Bool) -> Void { - return igDebugNodeDrawCmdShowMeshAndBoundingBox(out_draw_list,draw_list,draw_cmd,show_mesh,show_aabb) +@inlinable public func ImGuiDebugNodeDrawCmdShowMeshAndBoundingBox(_ out_draw_list: UnsafeMutablePointer!, _ draw_list: UnsafePointer!, _ draw_cmd: UnsafePointer!, _ show_mesh: Bool, _ show_aabb: Bool) { + igDebugNodeDrawCmdShowMeshAndBoundingBox(out_draw_list, draw_list, draw_cmd, show_mesh, show_aabb) } -@inlinable public func ImGuiDebugNodeDrawList(_ window: UnsafeMutablePointer!, _ draw_list: UnsafePointer!, _ label: String? = nil) -> Void { - label.withOptionalCString { labelPtr in - return igDebugNodeDrawList(window,draw_list,labelPtr) - } +@inlinable public func ImGuiDebugNodeDrawList(_ window: UnsafeMutablePointer!, _ draw_list: UnsafePointer!, _ label: String? = nil) { + label.withOptionalCString { labelPtr in + igDebugNodeDrawList(window, draw_list, labelPtr) + } } -@inlinable public func ImGuiDebugNodeFont(_ font: UnsafeMutablePointer!) -> Void { - return igDebugNodeFont(font) +@inlinable public func ImGuiDebugNodeFont(_ font: UnsafeMutablePointer!) { + igDebugNodeFont(font) } -@inlinable public func ImGuiDebugNodeStorage(_ storage: UnsafeMutablePointer!, _ label: String? = nil) -> Void { - label.withOptionalCString { labelPtr in - return igDebugNodeStorage(storage,labelPtr) - } +@inlinable public func ImGuiDebugNodeStorage(_ storage: UnsafeMutablePointer!, _ label: String? = nil) { + label.withOptionalCString { labelPtr in + igDebugNodeStorage(storage, labelPtr) + } } -@inlinable public func ImGuiDebugNodeTabBar(_ tab_bar: UnsafeMutablePointer!, _ label: String? = nil) -> Void { - label.withOptionalCString { labelPtr in - return igDebugNodeTabBar(tab_bar,labelPtr) - } +@inlinable public func ImGuiDebugNodeTabBar(_ tab_bar: UnsafeMutablePointer!, _ label: String? = nil) { + label.withOptionalCString { labelPtr in + igDebugNodeTabBar(tab_bar, labelPtr) + } } -@inlinable public func ImGuiDebugNodeTable(_ table: UnsafeMutablePointer!) -> Void { - return igDebugNodeTable(table) +@inlinable public func ImGuiDebugNodeTable(_ table: UnsafeMutablePointer!) { + igDebugNodeTable(table) } -@inlinable public func ImGuiDebugNodeTableSettings(_ settings: UnsafeMutablePointer!) -> Void { - return igDebugNodeTableSettings(settings) +@inlinable public func ImGuiDebugNodeTableSettings(_ settings: UnsafeMutablePointer!) { + igDebugNodeTableSettings(settings) } -@inlinable public func ImGuiDebugNodeViewport(_ viewport: UnsafeMutablePointer!) -> Void { - return igDebugNodeViewport(viewport) +@inlinable public func ImGuiDebugNodeViewport(_ viewport: UnsafeMutablePointer!) { + igDebugNodeViewport(viewport) } -@inlinable public func ImGuiDebugNodeWindow(_ window: UnsafeMutablePointer!, _ label: String? = nil) -> Void { - label.withOptionalCString { labelPtr in - return igDebugNodeWindow(window,labelPtr) - } +@inlinable public func ImGuiDebugNodeWindow(_ window: UnsafeMutablePointer!, _ label: String? = nil) { + label.withOptionalCString { labelPtr in + igDebugNodeWindow(window, labelPtr) + } } -@inlinable public func ImGuiDebugNodeWindowSettings(_ settings: UnsafeMutablePointer!) -> Void { - return igDebugNodeWindowSettings(settings) +@inlinable public func ImGuiDebugNodeWindowSettings(_ settings: UnsafeMutablePointer!) { + igDebugNodeWindowSettings(settings) } -@inlinable public func ImGuiDebugNodeWindowsList(_ windows: UnsafeMutablePointer!, _ label: String? = nil) -> Void { - label.withOptionalCString { labelPtr in - return igDebugNodeWindowsList(windows,labelPtr) - } +@inlinable public func ImGuiDebugNodeWindowsList(_ windows: UnsafeMutablePointer!, _ label: String? = nil) { + label.withOptionalCString { labelPtr in + igDebugNodeWindowsList(windows, labelPtr) + } } -@inlinable public func ImGuiDebugRenderViewportThumbnail(_ draw_list: UnsafeMutablePointer!, _ viewport: UnsafeMutablePointer!, _ bb: ImRect) -> Void { - return igDebugRenderViewportThumbnail(draw_list,viewport,bb) +@inlinable public func ImGuiDebugRenderViewportThumbnail(_ draw_list: UnsafeMutablePointer!, _ viewport: UnsafeMutablePointer!, _ bb: ImRect) { + igDebugRenderViewportThumbnail(draw_list, viewport, bb) } -@inlinable public func ImGuiDebugStartItemPicker() -> Void { - return igDebugStartItemPicker() +@inlinable public func ImGuiDebugStartItemPicker() { + igDebugStartItemPicker() } -@inlinable public func ImGuiDestroyContext(_ ctx: UnsafeMutablePointer!) -> Void { - return igDestroyContext(ctx) +@inlinable public func ImGuiDestroyContext(_ ctx: UnsafeMutablePointer!) { + igDestroyContext(ctx) } @inlinable @discardableResult public func ImGuiDragBehavior(_ id: ImGuiID, _ data_type: ImGuiDataType, _ p_v: UnsafeMutableRawPointer!, _ v_speed: Float, _ p_min: UnsafeRawPointer!, _ p_max: UnsafeRawPointer!, _ format: String? = nil, _ flags: ImGuiSliderFlags) -> Bool { - format.withOptionalCString { formatPtr in - return igDragBehavior(id,data_type,p_v,v_speed,p_min,p_max,formatPtr,flags) - } + format.withOptionalCString { formatPtr in + igDragBehavior(id, data_type, p_v, v_speed, p_min, p_max, formatPtr, flags) + } } @inlinable @discardableResult public func ImGuiDragFloat(_ label: String? = nil, _ v: UnsafeMutablePointer!, _ v_speed: Float, _ v_min: Float, _ v_max: Float, _ format: String? = nil, _ flags: ImGuiSliderFlags) -> Bool { - label.withOptionalCString { labelPtr in - format.withOptionalCString { formatPtr in - return igDragFloat(labelPtr,v,v_speed,v_min,v_max,formatPtr,flags) - } - } + label.withOptionalCString { labelPtr in + format.withOptionalCString { formatPtr in + igDragFloat(labelPtr, v, v_speed, v_min, v_max, formatPtr, flags) + } + } } @inlinable @discardableResult public func ImGuiDragFloat2(_ label: String? = nil, _ v: inout SIMD2, _ v_speed: Float, _ v_min: Float, _ v_max: Float, _ format: String? = nil, _ flags: ImGuiSliderFlags) -> Bool { - label.withOptionalCString { labelPtr in - withUnsafeMutablePointer(to: &v) { vMutPtr in - vMutPtr.withMemoryRebound(to: Float.self, capacity: 2) { vPtr in - format.withOptionalCString { formatPtr in - return igDragFloat2(labelPtr,vPtr,v_speed,v_min,v_max,formatPtr,flags) - } - } - } - } + label.withOptionalCString { labelPtr in + withUnsafeMutablePointer(to: &v) { vMutPtr in + vMutPtr.withMemoryRebound(to: Float.self, capacity: 2) { vPtr in + format.withOptionalCString { formatPtr in + igDragFloat2(labelPtr, vPtr, v_speed, v_min, v_max, formatPtr, flags) + } + } + } + } } @inlinable @discardableResult public func ImGuiDragFloat3(_ label: String? = nil, _ v: inout SIMD3, _ v_speed: Float, _ v_min: Float, _ v_max: Float, _ format: String? = nil, _ flags: ImGuiSliderFlags) -> Bool { - label.withOptionalCString { labelPtr in - withUnsafeMutablePointer(to: &v) { vMutPtr in - vMutPtr.withMemoryRebound(to: Float.self, capacity: 3) { vPtr in - format.withOptionalCString { formatPtr in - return igDragFloat3(labelPtr,vPtr,v_speed,v_min,v_max,formatPtr,flags) - } - } - } - } + label.withOptionalCString { labelPtr in + withUnsafeMutablePointer(to: &v) { vMutPtr in + vMutPtr.withMemoryRebound(to: Float.self, capacity: 3) { vPtr in + format.withOptionalCString { formatPtr in + igDragFloat3(labelPtr, vPtr, v_speed, v_min, v_max, formatPtr, flags) + } + } + } + } } @inlinable @discardableResult public func ImGuiDragFloat4(_ label: String? = nil, _ v: inout SIMD4, _ v_speed: Float, _ v_min: Float, _ v_max: Float, _ format: String? = nil, _ flags: ImGuiSliderFlags) -> Bool { - label.withOptionalCString { labelPtr in - withUnsafeMutablePointer(to: &v) { vMutPtr in - vMutPtr.withMemoryRebound(to: Float.self, capacity: 4) { vPtr in - format.withOptionalCString { formatPtr in - return igDragFloat4(labelPtr,vPtr,v_speed,v_min,v_max,formatPtr,flags) - } - } - } - } + label.withOptionalCString { labelPtr in + withUnsafeMutablePointer(to: &v) { vMutPtr in + vMutPtr.withMemoryRebound(to: Float.self, capacity: 4) { vPtr in + format.withOptionalCString { formatPtr in + igDragFloat4(labelPtr, vPtr, v_speed, v_min, v_max, formatPtr, flags) + } + } + } + } } @inlinable @discardableResult public func ImGuiDragFloatRange2(_ label: String? = nil, _ v_current_min: UnsafeMutablePointer!, _ v_current_max: UnsafeMutablePointer!, _ v_speed: Float, _ v_min: Float, _ v_max: Float, _ format: String? = nil, _ format_max: String? = nil, _ flags: ImGuiSliderFlags) -> Bool { - label.withOptionalCString { labelPtr in - format.withOptionalCString { formatPtr in - format_max.withOptionalCString { format_maxPtr in - return igDragFloatRange2(labelPtr,v_current_min,v_current_max,v_speed,v_min,v_max,formatPtr,format_maxPtr,flags) - } - } - } + label.withOptionalCString { labelPtr in + format.withOptionalCString { formatPtr in + format_max.withOptionalCString { format_maxPtr in + igDragFloatRange2(labelPtr, v_current_min, v_current_max, v_speed, v_min, v_max, formatPtr, format_maxPtr, flags) + } + } + } } @inlinable @discardableResult public func ImGuiDragInt(_ label: String? = nil, _ v: UnsafeMutablePointer!, _ v_speed: Float, _ v_min: Int32, _ v_max: Int32, _ format: String? = nil, _ flags: ImGuiSliderFlags) -> Bool { - label.withOptionalCString { labelPtr in - format.withOptionalCString { formatPtr in - return igDragInt(labelPtr,v,v_speed,v_min,v_max,formatPtr,flags) - } - } + label.withOptionalCString { labelPtr in + format.withOptionalCString { formatPtr in + igDragInt(labelPtr, v, v_speed, v_min, v_max, formatPtr, flags) + } + } } @inlinable @discardableResult public func ImGuiDragInt2(_ label: String? = nil, _ v: inout SIMD2, _ v_speed: Float, _ v_min: Int32, _ v_max: Int32, _ format: String? = nil, _ flags: ImGuiSliderFlags) -> Bool { - label.withOptionalCString { labelPtr in - withUnsafeMutablePointer(to: &v) { vMutPtr in - vMutPtr.withMemoryRebound(to: Int32.self, capacity: 2) { vPtr in - format.withOptionalCString { formatPtr in - return igDragInt2(labelPtr,vPtr,v_speed,v_min,v_max,formatPtr,flags) - } - } - } - } + label.withOptionalCString { labelPtr in + withUnsafeMutablePointer(to: &v) { vMutPtr in + vMutPtr.withMemoryRebound(to: Int32.self, capacity: 2) { vPtr in + format.withOptionalCString { formatPtr in + igDragInt2(labelPtr, vPtr, v_speed, v_min, v_max, formatPtr, flags) + } + } + } + } } @inlinable @discardableResult public func ImGuiDragInt3(_ label: String? = nil, _ v: inout SIMD3, _ v_speed: Float, _ v_min: Int32, _ v_max: Int32, _ format: String? = nil, _ flags: ImGuiSliderFlags) -> Bool { - label.withOptionalCString { labelPtr in - withUnsafeMutablePointer(to: &v) { vMutPtr in - vMutPtr.withMemoryRebound(to: Int32.self, capacity: 3) { vPtr in - format.withOptionalCString { formatPtr in - return igDragInt3(labelPtr,vPtr,v_speed,v_min,v_max,formatPtr,flags) - } - } - } - } + label.withOptionalCString { labelPtr in + withUnsafeMutablePointer(to: &v) { vMutPtr in + vMutPtr.withMemoryRebound(to: Int32.self, capacity: 3) { vPtr in + format.withOptionalCString { formatPtr in + igDragInt3(labelPtr, vPtr, v_speed, v_min, v_max, formatPtr, flags) + } + } + } + } } @inlinable @discardableResult public func ImGuiDragInt4(_ label: String? = nil, _ v: inout SIMD4, _ v_speed: Float, _ v_min: Int32, _ v_max: Int32, _ format: String? = nil, _ flags: ImGuiSliderFlags) -> Bool { - label.withOptionalCString { labelPtr in - withUnsafeMutablePointer(to: &v) { vMutPtr in - vMutPtr.withMemoryRebound(to: Int32.self, capacity: 4) { vPtr in - format.withOptionalCString { formatPtr in - return igDragInt4(labelPtr,vPtr,v_speed,v_min,v_max,formatPtr,flags) - } - } - } - } + label.withOptionalCString { labelPtr in + withUnsafeMutablePointer(to: &v) { vMutPtr in + vMutPtr.withMemoryRebound(to: Int32.self, capacity: 4) { vPtr in + format.withOptionalCString { formatPtr in + igDragInt4(labelPtr, vPtr, v_speed, v_min, v_max, formatPtr, flags) + } + } + } + } } @inlinable @discardableResult public func ImGuiDragIntRange2(_ label: String? = nil, _ v_current_min: UnsafeMutablePointer!, _ v_current_max: UnsafeMutablePointer!, _ v_speed: Float, _ v_min: Int32, _ v_max: Int32, _ format: String? = nil, _ format_max: String? = nil, _ flags: ImGuiSliderFlags) -> Bool { - label.withOptionalCString { labelPtr in - format.withOptionalCString { formatPtr in - format_max.withOptionalCString { format_maxPtr in - return igDragIntRange2(labelPtr,v_current_min,v_current_max,v_speed,v_min,v_max,formatPtr,format_maxPtr,flags) - } - } - } + label.withOptionalCString { labelPtr in + format.withOptionalCString { formatPtr in + format_max.withOptionalCString { format_maxPtr in + igDragIntRange2(labelPtr, v_current_min, v_current_max, v_speed, v_min, v_max, formatPtr, format_maxPtr, flags) + } + } + } } @inlinable @discardableResult public func ImGuiDragScalar(_ label: String? = nil, _ data_type: ImGuiDataType, _ p_data: UnsafeMutableRawPointer!, _ v_speed: Float, _ p_min: UnsafeRawPointer!, _ p_max: UnsafeRawPointer!, _ format: String? = nil, _ flags: ImGuiSliderFlags) -> Bool { - label.withOptionalCString { labelPtr in - format.withOptionalCString { formatPtr in - return igDragScalar(labelPtr,data_type,p_data,v_speed,p_min,p_max,formatPtr,flags) - } - } + label.withOptionalCString { labelPtr in + format.withOptionalCString { formatPtr in + igDragScalar(labelPtr, data_type, p_data, v_speed, p_min, p_max, formatPtr, flags) + } + } } @inlinable @discardableResult public func ImGuiDragScalarN(_ label: String? = nil, _ data_type: ImGuiDataType, _ p_data: UnsafeMutableRawPointer!, _ components: Int32, _ v_speed: Float, _ p_min: UnsafeRawPointer!, _ p_max: UnsafeRawPointer!, _ format: String? = nil, _ flags: ImGuiSliderFlags) -> Bool { - label.withOptionalCString { labelPtr in - format.withOptionalCString { formatPtr in - return igDragScalarN(labelPtr,data_type,p_data,components,v_speed,p_min,p_max,formatPtr,flags) - } - } + label.withOptionalCString { labelPtr in + format.withOptionalCString { formatPtr in + igDragScalarN(labelPtr, data_type, p_data, components, v_speed, p_min, p_max, formatPtr, flags) + } + } } -@inlinable public func ImGuiDummy(_ size: ImVec2) -> Void { - return igDummy(size) +@inlinable public func ImGuiDummy(_ size: ImVec2) { + igDummy(size) } -@inlinable public func ImGuiEnd() -> Void { - return igEnd() +@inlinable public func ImGuiEnd() { + igEnd() } -@inlinable public func ImGuiEndChild() -> Void { - return igEndChild() +@inlinable public func ImGuiEndChild() { + igEndChild() } -@inlinable public func ImGuiEndChildFrame() -> Void { - return igEndChildFrame() +@inlinable public func ImGuiEndChildFrame() { + igEndChildFrame() } -@inlinable public func ImGuiEndColumns() -> Void { - return igEndColumns() +@inlinable public func ImGuiEndColumns() { + igEndColumns() } -@inlinable public func ImGuiEndCombo() -> Void { - return igEndCombo() +@inlinable public func ImGuiEndCombo() { + igEndCombo() } -@inlinable public func ImGuiEndComboPreview() -> Void { - return igEndComboPreview() +@inlinable public func ImGuiEndComboPreview() { + igEndComboPreview() } -@inlinable public func ImGuiEndDisabled() -> Void { - return igEndDisabled() +@inlinable public func ImGuiEndDisabled() { + igEndDisabled() } -@inlinable public func ImGuiEndDragDropSource() -> Void { - return igEndDragDropSource() +@inlinable public func ImGuiEndDragDropSource() { + igEndDragDropSource() } -@inlinable public func ImGuiEndDragDropTarget() -> Void { - return igEndDragDropTarget() +@inlinable public func ImGuiEndDragDropTarget() { + igEndDragDropTarget() } -@inlinable public func ImGuiEndFrame() -> Void { - return igEndFrame() +@inlinable public func ImGuiEndFrame() { + igEndFrame() } -@inlinable public func ImGuiEndGroup() -> Void { - return igEndGroup() +@inlinable public func ImGuiEndGroup() { + igEndGroup() } -@inlinable public func ImGuiEndListBox() -> Void { - return igEndListBox() +@inlinable public func ImGuiEndListBox() { + igEndListBox() } -@inlinable public func ImGuiEndMainMenuBar() -> Void { - return igEndMainMenuBar() +@inlinable public func ImGuiEndMainMenuBar() { + igEndMainMenuBar() } -@inlinable public func ImGuiEndMenu() -> Void { - return igEndMenu() +@inlinable public func ImGuiEndMenu() { + igEndMenu() } -@inlinable public func ImGuiEndMenuBar() -> Void { - return igEndMenuBar() +@inlinable public func ImGuiEndMenuBar() { + igEndMenuBar() } -@inlinable public func ImGuiEndPopup() -> Void { - return igEndPopup() +@inlinable public func ImGuiEndPopup() { + igEndPopup() } -@inlinable public func ImGuiEndTabBar() -> Void { - return igEndTabBar() +@inlinable public func ImGuiEndTabBar() { + igEndTabBar() } -@inlinable public func ImGuiEndTabItem() -> Void { - return igEndTabItem() +@inlinable public func ImGuiEndTabItem() { + igEndTabItem() } -@inlinable public func ImGuiEndTable() -> Void { - return igEndTable() +@inlinable public func ImGuiEndTable() { + igEndTable() } -@inlinable public func ImGuiEndTooltip() -> Void { - return igEndTooltip() +@inlinable public func ImGuiEndTooltip() { + igEndTooltip() } -@inlinable public func ImGuiErrorCheckEndWindowRecover(_ log_callback: ImGuiErrorLogCallback, _ user_data: UnsafeMutableRawPointer!) -> Void { - return igErrorCheckEndWindowRecover(log_callback,user_data) +@inlinable public func ImGuiErrorCheckEndWindowRecover(_ log_callback: ImGuiErrorLogCallback, _ user_data: UnsafeMutableRawPointer!) { + igErrorCheckEndWindowRecover(log_callback, user_data) } -@inlinable public func ImGuiFindBestWindowPosForPopup(_ pOut: UnsafeMutablePointer!, _ window: UnsafeMutablePointer!) -> Void { - return igFindBestWindowPosForPopup(pOut,window) +@inlinable public func ImGuiFindBestWindowPosForPopup(_ pOut: UnsafeMutablePointer!, _ window: UnsafeMutablePointer!) { + igFindBestWindowPosForPopup(pOut, window) } -@inlinable public func ImGuiFindBestWindowPosForPopupEx(_ pOut: UnsafeMutablePointer!, _ ref_pos: ImVec2, _ size: ImVec2, _ last_dir: UnsafeMutablePointer!, _ r_outer: ImRect, _ r_avoid: ImRect, _ policy: ImGuiPopupPositionPolicy) -> Void { - return igFindBestWindowPosForPopupEx(pOut,ref_pos,size,last_dir,r_outer,r_avoid,policy) +@inlinable public func ImGuiFindBestWindowPosForPopupEx(_ pOut: UnsafeMutablePointer!, _ ref_pos: ImVec2, _ size: ImVec2, _ last_dir: UnsafeMutablePointer!, _ r_outer: ImRect, _ r_avoid: ImRect, _ policy: ImGuiPopupPositionPolicy) { + igFindBestWindowPosForPopupEx(pOut, ref_pos, size, last_dir, r_outer, r_avoid, policy) } @inlinable public func ImGuiFindBottomMostVisibleWindowWithinBeginStack(_ window: UnsafeMutablePointer!) -> UnsafeMutablePointer! { - return igFindBottomMostVisibleWindowWithinBeginStack(window) + igFindBottomMostVisibleWindowWithinBeginStack(window) } @inlinable public func ImGuiFindOrCreateColumns(_ window: UnsafeMutablePointer!, _ id: ImGuiID) -> UnsafeMutablePointer! { - return igFindOrCreateColumns(window,id) + igFindOrCreateColumns(window, id) } @inlinable public func ImGuiFindOrCreateWindowSettings(_ name: String? = nil) -> UnsafeMutablePointer! { - name.withOptionalCString { namePtr in - return igFindOrCreateWindowSettings(namePtr) - } + name.withOptionalCString { namePtr in + igFindOrCreateWindowSettings(namePtr) + } } @inlinable public func ImGuiFindRenderedTextEnd(_ text: String? = nil, _ text_end: String? = nil) -> String? { - text.withOptionalCString { textPtr in - text_end.withOptionalCString { text_endPtr in - return String(cString: igFindRenderedTextEnd(textPtr,text_endPtr)) - } - } + text.withOptionalCString { textPtr in + text_end.withOptionalCString { text_endPtr in + String(cString: igFindRenderedTextEnd(textPtr, text_endPtr)) + } + } } @inlinable public func ImGuiFindSettingsHandler(_ type_name: String? = nil) -> UnsafeMutablePointer! { - type_name.withOptionalCString { type_namePtr in - return igFindSettingsHandler(type_namePtr) - } + type_name.withOptionalCString { type_namePtr in + igFindSettingsHandler(type_namePtr) + } } @inlinable public func ImGuiFindWindowByID(_ id: ImGuiID) -> UnsafeMutablePointer! { - return igFindWindowByID(id) + igFindWindowByID(id) } @inlinable public func ImGuiFindWindowByName(_ name: String? = nil) -> UnsafeMutablePointer! { - name.withOptionalCString { namePtr in - return igFindWindowByName(namePtr) - } + name.withOptionalCString { namePtr in + igFindWindowByName(namePtr) + } } @inlinable public func ImGuiFindWindowDisplayIndex(_ window: UnsafeMutablePointer!) -> Int32 { - return igFindWindowDisplayIndex(window) + igFindWindowDisplayIndex(window) } @inlinable public func ImGuiFindWindowSettings(_ id: ImGuiID) -> UnsafeMutablePointer! { - return igFindWindowSettings(id) + igFindWindowSettings(id) } -@inlinable public func ImGuiFocusTopMostWindowUnderOne(_ under_this_window: UnsafeMutablePointer!, _ ignore_window: UnsafeMutablePointer!) -> Void { - return igFocusTopMostWindowUnderOne(under_this_window,ignore_window) +@inlinable public func ImGuiFocusTopMostWindowUnderOne(_ under_this_window: UnsafeMutablePointer!, _ ignore_window: UnsafeMutablePointer!) { + igFocusTopMostWindowUnderOne(under_this_window, ignore_window) } -@inlinable public func ImGuiFocusWindow(_ window: UnsafeMutablePointer!) -> Void { - return igFocusWindow(window) +@inlinable public func ImGuiFocusWindow(_ window: UnsafeMutablePointer!) { + igFocusWindow(window) } -@inlinable public func ImGuiGcAwakeTransientWindowBuffers(_ window: UnsafeMutablePointer!) -> Void { - return igGcAwakeTransientWindowBuffers(window) +@inlinable public func ImGuiGcAwakeTransientWindowBuffers(_ window: UnsafeMutablePointer!) { + igGcAwakeTransientWindowBuffers(window) } -@inlinable public func ImGuiGcCompactTransientMiscBuffers() -> Void { - return igGcCompactTransientMiscBuffers() +@inlinable public func ImGuiGcCompactTransientMiscBuffers() { + igGcCompactTransientMiscBuffers() } -@inlinable public func ImGuiGcCompactTransientWindowBuffers(_ window: UnsafeMutablePointer!) -> Void { - return igGcCompactTransientWindowBuffers(window) +@inlinable public func ImGuiGcCompactTransientWindowBuffers(_ window: UnsafeMutablePointer!) { + igGcCompactTransientWindowBuffers(window) } @inlinable public func ImGuiGetActiveID() -> ImGuiID { - return igGetActiveID() + igGetActiveID() } @inlinable public func ImGuiGetBackgroundDrawList() -> UnsafeMutablePointer! { - return igGetBackgroundDrawList_Nil() + igGetBackgroundDrawList_Nil() } @inlinable public func ImGuiGetBackgroundDrawList(_ viewport: UnsafeMutablePointer!) -> UnsafeMutablePointer! { - return igGetBackgroundDrawList_ViewportPtr(viewport) + igGetBackgroundDrawList_ViewportPtr(viewport) } @inlinable public func ImGuiGetClipboardText() -> String? { - return String(cString: igGetClipboardText()) + String(cString: igGetClipboardText()) } @inlinable public func ImGuiGetColorU32(_ idx: ImGuiCol, _ alpha_mul: Float) -> ImU32 { - return igGetColorU32_Col(idx,alpha_mul) + igGetColorU32_Col(idx, alpha_mul) } @inlinable public func ImGuiGetColorU32(_ col: ImVec4) -> ImU32 { - return igGetColorU32_Vec4(col) + igGetColorU32_Vec4(col) } @inlinable public func ImGuiGetColorU32(_ col: ImU32) -> ImU32 { - return igGetColorU32_U32(col) + igGetColorU32_U32(col) } @inlinable public func ImGuiGetColumnIndex() -> Int32 { - return igGetColumnIndex() + igGetColumnIndex() } @inlinable public func ImGuiGetColumnNormFromOffset(_ columns: UnsafePointer!, _ offset: Float) -> Float { - return igGetColumnNormFromOffset(columns,offset) + igGetColumnNormFromOffset(columns, offset) } @inlinable public func ImGuiGetColumnOffset(_ column_index: Int32) -> Float { - return igGetColumnOffset(column_index) + igGetColumnOffset(column_index) } @inlinable public func ImGuiGetColumnOffsetFromNorm(_ columns: UnsafePointer!, _ offset_norm: Float) -> Float { - return igGetColumnOffsetFromNorm(columns,offset_norm) + igGetColumnOffsetFromNorm(columns, offset_norm) } @inlinable public func ImGuiGetColumnWidth(_ column_index: Int32) -> Float { - return igGetColumnWidth(column_index) + igGetColumnWidth(column_index) } @inlinable public func ImGuiGetColumnsCount() -> Int32 { - return igGetColumnsCount() + igGetColumnsCount() } @inlinable public func ImGuiGetColumnsID(_ str_id: String? = nil, _ count: Int32) -> ImGuiID { - str_id.withOptionalCString { str_idPtr in - return igGetColumnsID(str_idPtr,count) - } + str_id.withOptionalCString { str_idPtr in + igGetColumnsID(str_idPtr, count) + } } -@inlinable public func ImGuiGetContentRegionAvail(_ pOut: UnsafeMutablePointer!) -> Void { - return igGetContentRegionAvail(pOut) +@inlinable public func ImGuiGetContentRegionAvail(_ pOut: UnsafeMutablePointer!) { + igGetContentRegionAvail(pOut) } -@inlinable public func ImGuiGetContentRegionMax(_ pOut: UnsafeMutablePointer!) -> Void { - return igGetContentRegionMax(pOut) +@inlinable public func ImGuiGetContentRegionMax(_ pOut: UnsafeMutablePointer!) { + igGetContentRegionMax(pOut) } -@inlinable public func ImGuiGetContentRegionMaxAbs(_ pOut: UnsafeMutablePointer!) -> Void { - return igGetContentRegionMaxAbs(pOut) +@inlinable public func ImGuiGetContentRegionMaxAbs(_ pOut: UnsafeMutablePointer!) { + igGetContentRegionMaxAbs(pOut) } @inlinable public func ImGuiGetCurrentContext() -> UnsafeMutablePointer! { - return igGetCurrentContext() + igGetCurrentContext() } @inlinable public func ImGuiGetCurrentTable() -> UnsafeMutablePointer! { - return igGetCurrentTable() + igGetCurrentTable() } @inlinable public func ImGuiGetCurrentWindow() -> UnsafeMutablePointer! { - return igGetCurrentWindow() + igGetCurrentWindow() } @inlinable public func ImGuiGetCurrentWindowRead() -> UnsafeMutablePointer! { - return igGetCurrentWindowRead() + igGetCurrentWindowRead() } -@inlinable public func ImGuiGetCursorPos(_ pOut: UnsafeMutablePointer!) -> Void { - return igGetCursorPos(pOut) +@inlinable public func ImGuiGetCursorPos(_ pOut: UnsafeMutablePointer!) { + igGetCursorPos(pOut) } @inlinable public func ImGuiGetCursorPosX() -> Float { - return igGetCursorPosX() + igGetCursorPosX() } @inlinable public func ImGuiGetCursorPosY() -> Float { - return igGetCursorPosY() + igGetCursorPosY() } -@inlinable public func ImGuiGetCursorScreenPos(_ pOut: UnsafeMutablePointer!) -> Void { - return igGetCursorScreenPos(pOut) +@inlinable public func ImGuiGetCursorScreenPos(_ pOut: UnsafeMutablePointer!) { + igGetCursorScreenPos(pOut) } -@inlinable public func ImGuiGetCursorStartPos(_ pOut: UnsafeMutablePointer!) -> Void { - return igGetCursorStartPos(pOut) +@inlinable public func ImGuiGetCursorStartPos(_ pOut: UnsafeMutablePointer!) { + igGetCursorStartPos(pOut) } @inlinable public func ImGuiGetDefaultFont() -> UnsafeMutablePointer! { - return igGetDefaultFont() + igGetDefaultFont() } @inlinable public func ImGuiGetDragDropPayload() -> UnsafePointer! { - return igGetDragDropPayload() + igGetDragDropPayload() } @inlinable public func ImGuiGetDrawData() -> UnsafeMutablePointer! { - return igGetDrawData() + igGetDrawData() } @inlinable public func ImGuiGetDrawListSharedData() -> UnsafeMutablePointer! { - return igGetDrawListSharedData() + igGetDrawListSharedData() } @inlinable public func ImGuiGetFocusID() -> ImGuiID { - return igGetFocusID() + igGetFocusID() } @inlinable public func ImGuiGetFocusScope() -> ImGuiID { - return igGetFocusScope() + igGetFocusScope() } @inlinable public func ImGuiGetFocusedFocusScope() -> ImGuiID { - return igGetFocusedFocusScope() + igGetFocusedFocusScope() } @inlinable public func ImGuiGetFont() -> UnsafeMutablePointer! { - return igGetFont() + igGetFont() } @inlinable public func ImGuiGetFontSize() -> Float { - return igGetFontSize() + igGetFontSize() } -@inlinable public func ImGuiGetFontTexUvWhitePixel(_ pOut: UnsafeMutablePointer!) -> Void { - return igGetFontTexUvWhitePixel(pOut) +@inlinable public func ImGuiGetFontTexUvWhitePixel(_ pOut: UnsafeMutablePointer!) { + igGetFontTexUvWhitePixel(pOut) } @inlinable public func ImGuiGetForegroundDrawList() -> UnsafeMutablePointer! { - return igGetForegroundDrawList_Nil() + igGetForegroundDrawList_Nil() } @inlinable public func ImGuiGetForegroundDrawList(_ window: UnsafeMutablePointer!) -> UnsafeMutablePointer! { - return igGetForegroundDrawList_WindowPtr(window) + igGetForegroundDrawList_WindowPtr(window) } @inlinable public func ImGuiGetForegroundDrawList(_ viewport: UnsafeMutablePointer!) -> UnsafeMutablePointer! { - return igGetForegroundDrawList_ViewportPtr(viewport) + igGetForegroundDrawList_ViewportPtr(viewport) } @inlinable public func ImGuiGetFrameCount() -> Int32 { - return igGetFrameCount() + igGetFrameCount() } @inlinable public func ImGuiGetFrameHeight() -> Float { - return igGetFrameHeight() + igGetFrameHeight() } @inlinable public func ImGuiGetFrameHeightWithSpacing() -> Float { - return igGetFrameHeightWithSpacing() + igGetFrameHeightWithSpacing() } @inlinable public func ImGuiGetHoveredID() -> ImGuiID { - return igGetHoveredID() + igGetHoveredID() } @inlinable public func ImGuiGetID(_ str_id: String? = nil) -> ImGuiID { - str_id.withOptionalCString { str_idPtr in - return igGetID_Str(str_idPtr) - } + str_id.withOptionalCString { str_idPtr in + igGetID_Str(str_idPtr) + } } @inlinable public func ImGuiGetID(_ str_id_begin: String? = nil, _ str_id_end: String? = nil) -> ImGuiID { - str_id_begin.withOptionalCString { str_id_beginPtr in - str_id_end.withOptionalCString { str_id_endPtr in - return igGetID_StrStr(str_id_beginPtr,str_id_endPtr) - } - } + str_id_begin.withOptionalCString { str_id_beginPtr in + str_id_end.withOptionalCString { str_id_endPtr in + igGetID_StrStr(str_id_beginPtr, str_id_endPtr) + } + } } @inlinable public func ImGuiGetID(_ ptr_id: UnsafeRawPointer!) -> ImGuiID { - return igGetID_Ptr(ptr_id) + igGetID_Ptr(ptr_id) } @inlinable public func ImGuiGetIDWithSeed(_ str_id_begin: String? = nil, _ str_id_end: String? = nil, _ seed: ImGuiID) -> ImGuiID { - str_id_begin.withOptionalCString { str_id_beginPtr in - str_id_end.withOptionalCString { str_id_endPtr in - return igGetIDWithSeed(str_id_beginPtr,str_id_endPtr,seed) - } - } + str_id_begin.withOptionalCString { str_id_beginPtr in + str_id_end.withOptionalCString { str_id_endPtr in + igGetIDWithSeed(str_id_beginPtr, str_id_endPtr, seed) + } + } } @inlinable public func ImGuiGetIO() -> UnsafeMutablePointer! { - return igGetIO() + igGetIO() } @inlinable public func ImGuiGetInputTextState(_ id: ImGuiID) -> UnsafeMutablePointer! { - return igGetInputTextState(id) + igGetInputTextState(id) } @inlinable public func ImGuiGetItemFlags() -> ImGuiItemFlags { - return igGetItemFlags() + igGetItemFlags() } @inlinable public func ImGuiGetItemID() -> ImGuiID { - return igGetItemID() + igGetItemID() } -@inlinable public func ImGuiGetItemRectMax(_ pOut: UnsafeMutablePointer!) -> Void { - return igGetItemRectMax(pOut) +@inlinable public func ImGuiGetItemRectMax(_ pOut: UnsafeMutablePointer!) { + igGetItemRectMax(pOut) } -@inlinable public func ImGuiGetItemRectMin(_ pOut: UnsafeMutablePointer!) -> Void { - return igGetItemRectMin(pOut) +@inlinable public func ImGuiGetItemRectMin(_ pOut: UnsafeMutablePointer!) { + igGetItemRectMin(pOut) } -@inlinable public func ImGuiGetItemRectSize(_ pOut: UnsafeMutablePointer!) -> Void { - return igGetItemRectSize(pOut) +@inlinable public func ImGuiGetItemRectSize(_ pOut: UnsafeMutablePointer!) { + igGetItemRectSize(pOut) } @inlinable public func ImGuiGetItemStatusFlags() -> ImGuiItemStatusFlags { - return igGetItemStatusFlags() + igGetItemStatusFlags() } @inlinable public func ImGuiGetKeyIndex(_ imgui_key: ImGuiKey) -> Int32 { - return igGetKeyIndex(imgui_key) + igGetKeyIndex(imgui_key) } @inlinable public func ImGuiGetKeyPressedAmount(_ key_index: Int32, _ repeat_delay: Float, _ rate: Float) -> Int32 { - return igGetKeyPressedAmount(key_index,repeat_delay,rate) + igGetKeyPressedAmount(key_index, repeat_delay, rate) } @inlinable public func ImGuiGetMainViewport() -> UnsafeMutablePointer! { - return igGetMainViewport() + igGetMainViewport() } @inlinable public func ImGuiGetMergedKeyModFlags() -> ImGuiKeyModFlags { - return igGetMergedKeyModFlags() + igGetMergedKeyModFlags() } @inlinable public func ImGuiGetMouseClickedCount(_ button: ImGuiMouseButton) -> Int32 { - return igGetMouseClickedCount(button) + igGetMouseClickedCount(button) } @inlinable public func ImGuiGetMouseCursor() -> ImGuiMouseCursor { - return igGetMouseCursor() + igGetMouseCursor() } -@inlinable public func ImGuiGetMouseDragDelta(_ pOut: UnsafeMutablePointer!, _ button: ImGuiMouseButton, _ lock_threshold: Float) -> Void { - return igGetMouseDragDelta(pOut,button,lock_threshold) +@inlinable public func ImGuiGetMouseDragDelta(_ pOut: UnsafeMutablePointer!, _ button: ImGuiMouseButton, _ lock_threshold: Float) { + igGetMouseDragDelta(pOut, button, lock_threshold) } -@inlinable public func ImGuiGetMousePos(_ pOut: UnsafeMutablePointer!) -> Void { - return igGetMousePos(pOut) +@inlinable public func ImGuiGetMousePos(_ pOut: UnsafeMutablePointer!) { + igGetMousePos(pOut) } -@inlinable public func ImGuiGetMousePosOnOpeningCurrentPopup(_ pOut: UnsafeMutablePointer!) -> Void { - return igGetMousePosOnOpeningCurrentPopup(pOut) +@inlinable public func ImGuiGetMousePosOnOpeningCurrentPopup(_ pOut: UnsafeMutablePointer!) { + igGetMousePosOnOpeningCurrentPopup(pOut) } @inlinable public func ImGuiGetNavInputAmount(_ n: ImGuiNavInput, _ mode: ImGuiInputReadMode) -> Float { - return igGetNavInputAmount(n,mode) + igGetNavInputAmount(n, mode) } -@inlinable public func ImGuiGetNavInputAmount2d(_ pOut: UnsafeMutablePointer!, _ dir_sources: ImGuiNavDirSourceFlags, _ mode: ImGuiInputReadMode, _ slow_factor: Float, _ fast_factor: Float) -> Void { - return igGetNavInputAmount2d(pOut,dir_sources,mode,slow_factor,fast_factor) +@inlinable public func ImGuiGetNavInputAmount2d(_ pOut: UnsafeMutablePointer!, _ dir_sources: ImGuiNavDirSourceFlags, _ mode: ImGuiInputReadMode, _ slow_factor: Float, _ fast_factor: Float) { + igGetNavInputAmount2d(pOut, dir_sources, mode, slow_factor, fast_factor) } -@inlinable public func ImGuiGetPopupAllowedExtentRect(_ pOut: UnsafeMutablePointer!, _ window: UnsafeMutablePointer!) -> Void { - return igGetPopupAllowedExtentRect(pOut,window) +@inlinable public func ImGuiGetPopupAllowedExtentRect(_ pOut: UnsafeMutablePointer!, _ window: UnsafeMutablePointer!) { + igGetPopupAllowedExtentRect(pOut, window) } @inlinable public func ImGuiGetScrollMaxX() -> Float { - return igGetScrollMaxX() + igGetScrollMaxX() } @inlinable public func ImGuiGetScrollMaxY() -> Float { - return igGetScrollMaxY() + igGetScrollMaxY() } @inlinable public func ImGuiGetScrollX() -> Float { - return igGetScrollX() + igGetScrollX() } @inlinable public func ImGuiGetScrollY() -> Float { - return igGetScrollY() + igGetScrollY() } @inlinable public func ImGuiGetStateStorage() -> UnsafeMutablePointer! { - return igGetStateStorage() + igGetStateStorage() } @inlinable public func ImGuiGetStyle() -> UnsafeMutablePointer! { - return igGetStyle() + igGetStyle() } @inlinable public func ImGuiGetStyleColorName(_ idx: ImGuiCol) -> String? { - return String(cString: igGetStyleColorName(idx)) + String(cString: igGetStyleColorName(idx)) } @inlinable public func ImGuiGetStyleColorVec4(_ idx: ImGuiCol) -> UnsafePointer! { - return igGetStyleColorVec4(idx) + igGetStyleColorVec4(idx) } @inlinable public func ImGuiGetTextLineHeight() -> Float { - return igGetTextLineHeight() + igGetTextLineHeight() } @inlinable public func ImGuiGetTextLineHeightWithSpacing() -> Float { - return igGetTextLineHeightWithSpacing() + igGetTextLineHeightWithSpacing() } @inlinable public func ImGuiGetTime() -> Double { - return igGetTime() + igGetTime() } @inlinable public func ImGuiGetTopMostAndVisiblePopupModal() -> UnsafeMutablePointer! { - return igGetTopMostAndVisiblePopupModal() + igGetTopMostAndVisiblePopupModal() } @inlinable public func ImGuiGetTopMostPopupModal() -> UnsafeMutablePointer! { - return igGetTopMostPopupModal() + igGetTopMostPopupModal() } @inlinable public func ImGuiGetTreeNodeToLabelSpacing() -> Float { - return igGetTreeNodeToLabelSpacing() + igGetTreeNodeToLabelSpacing() } @inlinable public func ImGuiGetVersion() -> String? { - return String(cString: igGetVersion()) + String(cString: igGetVersion()) } -@inlinable public func ImGuiGetWindowContentRegionMax(_ pOut: UnsafeMutablePointer!) -> Void { - return igGetWindowContentRegionMax(pOut) +@inlinable public func ImGuiGetWindowContentRegionMax(_ pOut: UnsafeMutablePointer!) { + igGetWindowContentRegionMax(pOut) } -@inlinable public func ImGuiGetWindowContentRegionMin(_ pOut: UnsafeMutablePointer!) -> Void { - return igGetWindowContentRegionMin(pOut) +@inlinable public func ImGuiGetWindowContentRegionMin(_ pOut: UnsafeMutablePointer!) { + igGetWindowContentRegionMin(pOut) } @inlinable public func ImGuiGetWindowDrawList() -> UnsafeMutablePointer! { - return igGetWindowDrawList() + igGetWindowDrawList() } @inlinable public func ImGuiGetWindowHeight() -> Float { - return igGetWindowHeight() + igGetWindowHeight() } -@inlinable public func ImGuiGetWindowPos(_ pOut: UnsafeMutablePointer!) -> Void { - return igGetWindowPos(pOut) +@inlinable public func ImGuiGetWindowPos(_ pOut: UnsafeMutablePointer!) { + igGetWindowPos(pOut) } @inlinable public func ImGuiGetWindowResizeBorderID(_ window: UnsafeMutablePointer!, _ dir: ImGuiDir) -> ImGuiID { - return igGetWindowResizeBorderID(window,dir) + igGetWindowResizeBorderID(window, dir) } @inlinable public func ImGuiGetWindowResizeCornerID(_ window: UnsafeMutablePointer!, _ n: Int32) -> ImGuiID { - return igGetWindowResizeCornerID(window,n) + igGetWindowResizeCornerID(window, n) } @inlinable public func ImGuiGetWindowScrollbarID(_ window: UnsafeMutablePointer!, _ axis: ImGuiAxis) -> ImGuiID { - return igGetWindowScrollbarID(window,axis) + igGetWindowScrollbarID(window, axis) } -@inlinable public func ImGuiGetWindowScrollbarRect(_ pOut: UnsafeMutablePointer!, _ window: UnsafeMutablePointer!, _ axis: ImGuiAxis) -> Void { - return igGetWindowScrollbarRect(pOut,window,axis) +@inlinable public func ImGuiGetWindowScrollbarRect(_ pOut: UnsafeMutablePointer!, _ window: UnsafeMutablePointer!, _ axis: ImGuiAxis) { + igGetWindowScrollbarRect(pOut, window, axis) } -@inlinable public func ImGuiGetWindowSize(_ pOut: UnsafeMutablePointer!) -> Void { - return igGetWindowSize(pOut) +@inlinable public func ImGuiGetWindowSize(_ pOut: UnsafeMutablePointer!) { + igGetWindowSize(pOut) } @inlinable public func ImGuiGetWindowWidth() -> Float { - return igGetWindowWidth() + igGetWindowWidth() } -@inlinable public func ImGuiIOAddFocusEvent(_ this: UnsafeMutablePointer!, _ focused: Bool) -> Void { - return ImGuiIO_AddFocusEvent(this,focused) +@inlinable public func ImGuiIOAddFocusEvent(_ this: UnsafeMutablePointer!, _ focused: Bool) { + ImGuiIO_AddFocusEvent(this, focused) } -@inlinable public func ImGuiIOAddInputCharacter(_ this: UnsafeMutablePointer!, _ c: UInt32) -> Void { - return ImGuiIO_AddInputCharacter(this,c) +@inlinable public func ImGuiIOAddInputCharacter(_ this: UnsafeMutablePointer!, _ c: UInt32) { + ImGuiIO_AddInputCharacter(this, c) } -@inlinable public func ImGuiIOAddInputCharacterUTF16(_ this: UnsafeMutablePointer!, _ c: ImWchar16) -> Void { - return ImGuiIO_AddInputCharacterUTF16(this,c) +@inlinable public func ImGuiIOAddInputCharacterUTF16(_ this: UnsafeMutablePointer!, _ c: ImWchar16) { + ImGuiIO_AddInputCharacterUTF16(this, c) } -@inlinable public func ImGuiIOAddInputCharactersUTF8(_ this: UnsafeMutablePointer!, _ str: String? = nil) -> Void { - str.withOptionalCString { strPtr in - return ImGuiIO_AddInputCharactersUTF8(this,strPtr) - } +@inlinable public func ImGuiIOAddInputCharactersUTF8(_ this: UnsafeMutablePointer!, _ str: String? = nil) { + str.withOptionalCString { strPtr in + ImGuiIO_AddInputCharactersUTF8(this, strPtr) + } } -@inlinable public func ImGuiIOClearInputCharacters(_ this: UnsafeMutablePointer!) -> Void { - return ImGuiIO_ClearInputCharacters(this) +@inlinable public func ImGuiIOClearInputCharacters(_ this: UnsafeMutablePointer!) { + ImGuiIO_ClearInputCharacters(this) } -@inlinable public func ImGuiIOClearInputKeys(_ this: UnsafeMutablePointer!) -> Void { - return ImGuiIO_ClearInputKeys(this) +@inlinable public func ImGuiIOClearInputKeys(_ this: UnsafeMutablePointer!) { + ImGuiIO_ClearInputKeys(this) } -@inlinable public func ImGuiImage(_ user_texture_id: ImTextureID, _ size: ImVec2, _ uv0: ImVec2, _ uv1: ImVec2, _ tint_col: ImVec4, _ border_col: ImVec4) -> Void { - return igImage(user_texture_id,size,uv0,uv1,tint_col,border_col) +@inlinable public func ImGuiImage(_ user_texture_id: ImTextureID, _ size: ImVec2, _ uv0: ImVec2, _ uv1: ImVec2, _ tint_col: ImVec4, _ border_col: ImVec4) { + igImage(user_texture_id, size, uv0, uv1, tint_col, border_col) } @inlinable @discardableResult public func ImGuiImageButton(_ user_texture_id: ImTextureID, _ size: ImVec2, _ uv0: ImVec2, _ uv1: ImVec2, _ frame_padding: Int32, _ bg_col: ImVec4, _ tint_col: ImVec4) -> Bool { - return igImageButton(user_texture_id,size,uv0,uv1,frame_padding,bg_col,tint_col) + igImageButton(user_texture_id, size, uv0, uv1, frame_padding, bg_col, tint_col) } @inlinable @discardableResult public func ImGuiImageButtonEx(_ id: ImGuiID, _ texture_id: ImTextureID, _ size: ImVec2, _ uv0: ImVec2, _ uv1: ImVec2, _ padding: ImVec2, _ bg_col: ImVec4, _ tint_col: ImVec4) -> Bool { - return igImageButtonEx(id,texture_id,size,uv0,uv1,padding,bg_col,tint_col) + igImageButtonEx(id, texture_id, size, uv0, uv1, padding, bg_col, tint_col) } -@inlinable public func ImGuiIndent(_ indent_w: Float) -> Void { - return igIndent(indent_w) +@inlinable public func ImGuiIndent(_ indent_w: Float) { + igIndent(indent_w) } -@inlinable public func ImGuiInitialize(_ context: UnsafeMutablePointer!) -> Void { - return igInitialize(context) +@inlinable public func ImGuiInitialize(_ context: UnsafeMutablePointer!) { + igInitialize(context) } @inlinable @discardableResult public func ImGuiInputDouble(_ label: String? = nil, _ v: UnsafeMutablePointer!, _ step: Double, _ step_fast: Double, _ format: String? = nil, _ flags: ImGuiInputTextFlags) -> Bool { - label.withOptionalCString { labelPtr in - format.withOptionalCString { formatPtr in - return igInputDouble(labelPtr,v,step,step_fast,formatPtr,flags) - } - } + label.withOptionalCString { labelPtr in + format.withOptionalCString { formatPtr in + igInputDouble(labelPtr, v, step, step_fast, formatPtr, flags) + } + } } @inlinable @discardableResult public func ImGuiInputFloat(_ label: String? = nil, _ v: UnsafeMutablePointer!, _ step: Float, _ step_fast: Float, _ format: String? = nil, _ flags: ImGuiInputTextFlags) -> Bool { - label.withOptionalCString { labelPtr in - format.withOptionalCString { formatPtr in - return igInputFloat(labelPtr,v,step,step_fast,formatPtr,flags) - } - } + label.withOptionalCString { labelPtr in + format.withOptionalCString { formatPtr in + igInputFloat(labelPtr, v, step, step_fast, formatPtr, flags) + } + } } @inlinable @discardableResult public func ImGuiInputFloat2(_ label: String? = nil, _ v: inout SIMD2, _ format: String? = nil, _ flags: ImGuiInputTextFlags) -> Bool { - label.withOptionalCString { labelPtr in - withUnsafeMutablePointer(to: &v) { vMutPtr in - vMutPtr.withMemoryRebound(to: Float.self, capacity: 2) { vPtr in - format.withOptionalCString { formatPtr in - return igInputFloat2(labelPtr,vPtr,formatPtr,flags) - } - } - } - } + label.withOptionalCString { labelPtr in + withUnsafeMutablePointer(to: &v) { vMutPtr in + vMutPtr.withMemoryRebound(to: Float.self, capacity: 2) { vPtr in + format.withOptionalCString { formatPtr in + igInputFloat2(labelPtr, vPtr, formatPtr, flags) + } + } + } + } } @inlinable @discardableResult public func ImGuiInputFloat3(_ label: String? = nil, _ v: inout SIMD3, _ format: String? = nil, _ flags: ImGuiInputTextFlags) -> Bool { - label.withOptionalCString { labelPtr in - withUnsafeMutablePointer(to: &v) { vMutPtr in - vMutPtr.withMemoryRebound(to: Float.self, capacity: 3) { vPtr in - format.withOptionalCString { formatPtr in - return igInputFloat3(labelPtr,vPtr,formatPtr,flags) - } - } - } - } + label.withOptionalCString { labelPtr in + withUnsafeMutablePointer(to: &v) { vMutPtr in + vMutPtr.withMemoryRebound(to: Float.self, capacity: 3) { vPtr in + format.withOptionalCString { formatPtr in + igInputFloat3(labelPtr, vPtr, formatPtr, flags) + } + } + } + } } @inlinable @discardableResult public func ImGuiInputFloat4(_ label: String? = nil, _ v: inout SIMD4, _ format: String? = nil, _ flags: ImGuiInputTextFlags) -> Bool { - label.withOptionalCString { labelPtr in - withUnsafeMutablePointer(to: &v) { vMutPtr in - vMutPtr.withMemoryRebound(to: Float.self, capacity: 4) { vPtr in - format.withOptionalCString { formatPtr in - return igInputFloat4(labelPtr,vPtr,formatPtr,flags) - } - } - } - } + label.withOptionalCString { labelPtr in + withUnsafeMutablePointer(to: &v) { vMutPtr in + vMutPtr.withMemoryRebound(to: Float.self, capacity: 4) { vPtr in + format.withOptionalCString { formatPtr in + igInputFloat4(labelPtr, vPtr, formatPtr, flags) + } + } + } + } } @inlinable @discardableResult public func ImGuiInputInt(_ label: String? = nil, _ v: UnsafeMutablePointer!, _ step: Int32, _ step_fast: Int32, _ flags: ImGuiInputTextFlags) -> Bool { - label.withOptionalCString { labelPtr in - return igInputInt(labelPtr,v,step,step_fast,flags) - } + label.withOptionalCString { labelPtr in + igInputInt(labelPtr, v, step, step_fast, flags) + } } @inlinable @discardableResult public func ImGuiInputInt2(_ label: String? = nil, _ v: inout SIMD2, _ flags: ImGuiInputTextFlags) -> Bool { - label.withOptionalCString { labelPtr in - withUnsafeMutablePointer(to: &v) { vMutPtr in - vMutPtr.withMemoryRebound(to: Int32.self, capacity: 2) { vPtr in - return igInputInt2(labelPtr,vPtr,flags) - } - } - } + label.withOptionalCString { labelPtr in + withUnsafeMutablePointer(to: &v) { vMutPtr in + vMutPtr.withMemoryRebound(to: Int32.self, capacity: 2) { vPtr in + igInputInt2(labelPtr, vPtr, flags) + } + } + } } @inlinable @discardableResult public func ImGuiInputInt3(_ label: String? = nil, _ v: inout SIMD3, _ flags: ImGuiInputTextFlags) -> Bool { - label.withOptionalCString { labelPtr in - withUnsafeMutablePointer(to: &v) { vMutPtr in - vMutPtr.withMemoryRebound(to: Int32.self, capacity: 3) { vPtr in - return igInputInt3(labelPtr,vPtr,flags) - } - } - } + label.withOptionalCString { labelPtr in + withUnsafeMutablePointer(to: &v) { vMutPtr in + vMutPtr.withMemoryRebound(to: Int32.self, capacity: 3) { vPtr in + igInputInt3(labelPtr, vPtr, flags) + } + } + } } @inlinable @discardableResult public func ImGuiInputInt4(_ label: String? = nil, _ v: inout SIMD4, _ flags: ImGuiInputTextFlags) -> Bool { - label.withOptionalCString { labelPtr in - withUnsafeMutablePointer(to: &v) { vMutPtr in - vMutPtr.withMemoryRebound(to: Int32.self, capacity: 4) { vPtr in - return igInputInt4(labelPtr,vPtr,flags) - } - } - } + label.withOptionalCString { labelPtr in + withUnsafeMutablePointer(to: &v) { vMutPtr in + vMutPtr.withMemoryRebound(to: Int32.self, capacity: 4) { vPtr in + igInputInt4(labelPtr, vPtr, flags) + } + } + } } @inlinable @discardableResult public func ImGuiInputScalar(_ label: String? = nil, _ data_type: ImGuiDataType, _ p_data: UnsafeMutableRawPointer!, _ p_step: UnsafeRawPointer!, _ p_step_fast: UnsafeRawPointer!, _ format: String? = nil, _ flags: ImGuiInputTextFlags) -> Bool { - label.withOptionalCString { labelPtr in - format.withOptionalCString { formatPtr in - return igInputScalar(labelPtr,data_type,p_data,p_step,p_step_fast,formatPtr,flags) - } - } + label.withOptionalCString { labelPtr in + format.withOptionalCString { formatPtr in + igInputScalar(labelPtr, data_type, p_data, p_step, p_step_fast, formatPtr, flags) + } + } } @inlinable @discardableResult public func ImGuiInputScalarN(_ label: String? = nil, _ data_type: ImGuiDataType, _ p_data: UnsafeMutableRawPointer!, _ components: Int32, _ p_step: UnsafeRawPointer!, _ p_step_fast: UnsafeRawPointer!, _ format: String? = nil, _ flags: ImGuiInputTextFlags) -> Bool { - label.withOptionalCString { labelPtr in - format.withOptionalCString { formatPtr in - return igInputScalarN(labelPtr,data_type,p_data,components,p_step,p_step_fast,formatPtr,flags) - } - } + label.withOptionalCString { labelPtr in + format.withOptionalCString { formatPtr in + igInputScalarN(labelPtr, data_type, p_data, components, p_step, p_step_fast, formatPtr, flags) + } + } } @inlinable @discardableResult public func ImGuiInputText(_ label: String? = nil, _ buf: inout String?, _ buf_size: Int, _ flags: ImGuiInputTextFlags, _ callback: @escaping ImGuiInputTextCallback, _ user_data: UnsafeMutableRawPointer!) -> Bool { - label.withOptionalCString { labelPtr in - buf.withOptionalCString { bufPtr in - return igInputText(labelPtr,UnsafeMutablePointer(mutating: bufPtr),buf_size,flags,callback,user_data) - } - } + label.withOptionalCString { labelPtr in + buf.withOptionalCString { bufPtr in + igInputText(labelPtr, UnsafeMutablePointer(mutating: bufPtr), buf_size, flags, callback, user_data) + } + } } -@inlinable public func ImGuiInputTextCallbackDataClearSelection(_ this: UnsafeMutablePointer!) -> Void { - return ImGuiInputTextCallbackData_ClearSelection(this) +@inlinable public func ImGuiInputTextCallbackDataClearSelection(_ this: UnsafeMutablePointer!) { + ImGuiInputTextCallbackData_ClearSelection(this) } -@inlinable public func ImGuiInputTextCallbackDataDeleteChars(_ this: UnsafeMutablePointer!, _ pos: Int32, _ bytes_count: Int32) -> Void { - return ImGuiInputTextCallbackData_DeleteChars(this,pos,bytes_count) +@inlinable public func ImGuiInputTextCallbackDataDeleteChars(_ this: UnsafeMutablePointer!, _ pos: Int32, _ bytes_count: Int32) { + ImGuiInputTextCallbackData_DeleteChars(this, pos, bytes_count) } @inlinable @discardableResult public func ImGuiInputTextCallbackDataHasSelection(_ this: UnsafeMutablePointer!) -> Bool { - return ImGuiInputTextCallbackData_HasSelection(this) + ImGuiInputTextCallbackData_HasSelection(this) } -@inlinable public func ImGuiInputTextCallbackDataInsertChars(_ this: UnsafeMutablePointer!, _ pos: Int32, _ text: String? = nil, _ text_end: String? = nil) -> Void { - text.withOptionalCString { textPtr in - text_end.withOptionalCString { text_endPtr in - return ImGuiInputTextCallbackData_InsertChars(this,pos,textPtr,text_endPtr) - } - } +@inlinable public func ImGuiInputTextCallbackDataInsertChars(_ this: UnsafeMutablePointer!, _ pos: Int32, _ text: String? = nil, _ text_end: String? = nil) { + text.withOptionalCString { textPtr in + text_end.withOptionalCString { text_endPtr in + ImGuiInputTextCallbackData_InsertChars(this, pos, textPtr, text_endPtr) + } + } } -@inlinable public func ImGuiInputTextCallbackDataSelectAll(_ this: UnsafeMutablePointer!) -> Void { - return ImGuiInputTextCallbackData_SelectAll(this) +@inlinable public func ImGuiInputTextCallbackDataSelectAll(_ this: UnsafeMutablePointer!) { + ImGuiInputTextCallbackData_SelectAll(this) } @inlinable @discardableResult public func ImGuiInputTextEx(_ label: String? = nil, _ hint: String? = nil, _ buf: inout String?, _ buf_size: Int32, _ size_arg: ImVec2, _ flags: ImGuiInputTextFlags, _ callback: @escaping ImGuiInputTextCallback, _ user_data: UnsafeMutableRawPointer!) -> Bool { - label.withOptionalCString { labelPtr in - hint.withOptionalCString { hintPtr in - buf.withOptionalCString { bufPtr in - return igInputTextEx(labelPtr,hintPtr,UnsafeMutablePointer(mutating: bufPtr),buf_size,size_arg,flags,callback,user_data) - } - } - } + label.withOptionalCString { labelPtr in + hint.withOptionalCString { hintPtr in + buf.withOptionalCString { bufPtr in + igInputTextEx(labelPtr, hintPtr, UnsafeMutablePointer(mutating: bufPtr), buf_size, size_arg, flags, callback, user_data) + } + } + } } @inlinable @discardableResult public func ImGuiInputTextMultiline(_ label: String? = nil, _ buf: inout String?, _ buf_size: Int, _ size: ImVec2, _ flags: ImGuiInputTextFlags, _ callback: @escaping ImGuiInputTextCallback, _ user_data: UnsafeMutableRawPointer!) -> Bool { - label.withOptionalCString { labelPtr in - buf.withOptionalCString { bufPtr in - return igInputTextMultiline(labelPtr,UnsafeMutablePointer(mutating: bufPtr),buf_size,size,flags,callback,user_data) - } - } + label.withOptionalCString { labelPtr in + buf.withOptionalCString { bufPtr in + igInputTextMultiline(labelPtr, UnsafeMutablePointer(mutating: bufPtr), buf_size, size, flags, callback, user_data) + } + } } -@inlinable public func ImGuiInputTextStateClearFreeMemory(_ this: UnsafeMutablePointer!) -> Void { - return ImGuiInputTextState_ClearFreeMemory(this) +@inlinable public func ImGuiInputTextStateClearFreeMemory(_ this: UnsafeMutablePointer!) { + ImGuiInputTextState_ClearFreeMemory(this) } -@inlinable public func ImGuiInputTextStateClearSelection(_ this: UnsafeMutablePointer!) -> Void { - return ImGuiInputTextState_ClearSelection(this) +@inlinable public func ImGuiInputTextStateClearSelection(_ this: UnsafeMutablePointer!) { + ImGuiInputTextState_ClearSelection(this) } -@inlinable public func ImGuiInputTextStateClearText(_ this: UnsafeMutablePointer!) -> Void { - return ImGuiInputTextState_ClearText(this) +@inlinable public func ImGuiInputTextStateClearText(_ this: UnsafeMutablePointer!) { + ImGuiInputTextState_ClearText(this) } -@inlinable public func ImGuiInputTextStateCursorAnimReset(_ this: UnsafeMutablePointer!) -> Void { - return ImGuiInputTextState_CursorAnimReset(this) +@inlinable public func ImGuiInputTextStateCursorAnimReset(_ this: UnsafeMutablePointer!) { + ImGuiInputTextState_CursorAnimReset(this) } -@inlinable public func ImGuiInputTextStateCursorClamp(_ this: UnsafeMutablePointer!) -> Void { - return ImGuiInputTextState_CursorClamp(this) +@inlinable public func ImGuiInputTextStateCursorClamp(_ this: UnsafeMutablePointer!) { + ImGuiInputTextState_CursorClamp(this) } @inlinable public func ImGuiInputTextStateGetCursorPos(_ this: UnsafeMutablePointer!) -> Int32 { - return ImGuiInputTextState_GetCursorPos(this) + ImGuiInputTextState_GetCursorPos(this) } @inlinable public func ImGuiInputTextStateGetRedoAvailCount(_ this: UnsafeMutablePointer!) -> Int32 { - return ImGuiInputTextState_GetRedoAvailCount(this) + ImGuiInputTextState_GetRedoAvailCount(this) } @inlinable public func ImGuiInputTextStateGetSelectionEnd(_ this: UnsafeMutablePointer!) -> Int32 { - return ImGuiInputTextState_GetSelectionEnd(this) + ImGuiInputTextState_GetSelectionEnd(this) } @inlinable public func ImGuiInputTextStateGetSelectionStart(_ this: UnsafeMutablePointer!) -> Int32 { - return ImGuiInputTextState_GetSelectionStart(this) + ImGuiInputTextState_GetSelectionStart(this) } @inlinable public func ImGuiInputTextStateGetUndoAvailCount(_ this: UnsafeMutablePointer!) -> Int32 { - return ImGuiInputTextState_GetUndoAvailCount(this) + ImGuiInputTextState_GetUndoAvailCount(this) } @inlinable @discardableResult public func ImGuiInputTextStateHasSelection(_ this: UnsafeMutablePointer!) -> Bool { - return ImGuiInputTextState_HasSelection(this) + ImGuiInputTextState_HasSelection(this) } -@inlinable public func ImGuiInputTextStateOnKeyPressed(_ this: UnsafeMutablePointer!, _ key: Int32) -> Void { - return ImGuiInputTextState_OnKeyPressed(this,key) +@inlinable public func ImGuiInputTextStateOnKeyPressed(_ this: UnsafeMutablePointer!, _ key: Int32) { + ImGuiInputTextState_OnKeyPressed(this, key) } -@inlinable public func ImGuiInputTextStateSelectAll(_ this: UnsafeMutablePointer!) -> Void { - return ImGuiInputTextState_SelectAll(this) +@inlinable public func ImGuiInputTextStateSelectAll(_ this: UnsafeMutablePointer!) { + ImGuiInputTextState_SelectAll(this) } @inlinable @discardableResult public func ImGuiInputTextWithHint(_ label: String? = nil, _ hint: String? = nil, _ buf: inout String?, _ buf_size: Int, _ flags: ImGuiInputTextFlags, _ callback: @escaping ImGuiInputTextCallback, _ user_data: UnsafeMutableRawPointer!) -> Bool { - label.withOptionalCString { labelPtr in - hint.withOptionalCString { hintPtr in - buf.withOptionalCString { bufPtr in - return igInputTextWithHint(labelPtr,hintPtr,UnsafeMutablePointer(mutating: bufPtr),buf_size,flags,callback,user_data) - } - } - } + label.withOptionalCString { labelPtr in + hint.withOptionalCString { hintPtr in + buf.withOptionalCString { bufPtr in + igInputTextWithHint(labelPtr, hintPtr, UnsafeMutablePointer(mutating: bufPtr), buf_size, flags, callback, user_data) + } + } + } } @inlinable @discardableResult public func ImGuiInvisibleButton(_ str_id: String? = nil, _ size: ImVec2, _ flags: ImGuiButtonFlags) -> Bool { - str_id.withOptionalCString { str_idPtr in - return igInvisibleButton(str_idPtr,size,flags) - } + str_id.withOptionalCString { str_idPtr in + igInvisibleButton(str_idPtr, size, flags) + } } @inlinable @discardableResult public func ImGuiIsActiveIdUsingKey(_ key: ImGuiKey) -> Bool { - return igIsActiveIdUsingKey(key) + igIsActiveIdUsingKey(key) } @inlinable @discardableResult public func ImGuiIsActiveIdUsingNavDir(_ dir: ImGuiDir) -> Bool { - return igIsActiveIdUsingNavDir(dir) + igIsActiveIdUsingNavDir(dir) } @inlinable @discardableResult public func ImGuiIsActiveIdUsingNavInput(_ input: ImGuiNavInput) -> Bool { - return igIsActiveIdUsingNavInput(input) + igIsActiveIdUsingNavInput(input) } @inlinable @discardableResult public func ImGuiIsAnyItemActive() -> Bool { - return igIsAnyItemActive() + igIsAnyItemActive() } @inlinable @discardableResult public func ImGuiIsAnyItemFocused() -> Bool { - return igIsAnyItemFocused() + igIsAnyItemFocused() } @inlinable @discardableResult public func ImGuiIsAnyItemHovered() -> Bool { - return igIsAnyItemHovered() + igIsAnyItemHovered() } @inlinable @discardableResult public func ImGuiIsAnyMouseDown() -> Bool { - return igIsAnyMouseDown() + igIsAnyMouseDown() } @inlinable @discardableResult public func ImGuiIsClippedEx(_ bb: ImRect, _ id: ImGuiID) -> Bool { - return igIsClippedEx(bb,id) + igIsClippedEx(bb, id) } @inlinable @discardableResult public func ImGuiIsDragDropPayloadBeingAccepted() -> Bool { - return igIsDragDropPayloadBeingAccepted() + igIsDragDropPayloadBeingAccepted() } @inlinable @discardableResult public func ImGuiIsItemActivated() -> Bool { - return igIsItemActivated() + igIsItemActivated() } @inlinable @discardableResult public func ImGuiIsItemActive() -> Bool { - return igIsItemActive() + igIsItemActive() } @inlinable @discardableResult public func ImGuiIsItemClicked(_ mouse_button: ImGuiMouseButton) -> Bool { - return igIsItemClicked(mouse_button) + igIsItemClicked(mouse_button) } @inlinable @discardableResult public func ImGuiIsItemDeactivated() -> Bool { - return igIsItemDeactivated() + igIsItemDeactivated() } @inlinable @discardableResult public func ImGuiIsItemDeactivatedAfterEdit() -> Bool { - return igIsItemDeactivatedAfterEdit() + igIsItemDeactivatedAfterEdit() } @inlinable @discardableResult public func ImGuiIsItemEdited() -> Bool { - return igIsItemEdited() + igIsItemEdited() } @inlinable @discardableResult public func ImGuiIsItemFocused() -> Bool { - return igIsItemFocused() + igIsItemFocused() } @inlinable @discardableResult public func ImGuiIsItemHovered(_ flags: ImGuiHoveredFlags) -> Bool { - return igIsItemHovered(flags) + igIsItemHovered(flags) } @inlinable @discardableResult public func ImGuiIsItemToggledOpen() -> Bool { - return igIsItemToggledOpen() + igIsItemToggledOpen() } @inlinable @discardableResult public func ImGuiIsItemToggledSelection() -> Bool { - return igIsItemToggledSelection() + igIsItemToggledSelection() } @inlinable @discardableResult public func ImGuiIsItemVisible() -> Bool { - return igIsItemVisible() + igIsItemVisible() } @inlinable @discardableResult public func ImGuiIsKeyDown(_ user_key_index: Int32) -> Bool { - return igIsKeyDown(user_key_index) + igIsKeyDown(user_key_index) } -@inlinable @discardableResult public func ImGuiIsKeyPressed(_ user_key_index: Int32, _ `repeat`: Bool) -> Bool { - return igIsKeyPressed(user_key_index,`repeat`) +@inlinable @discardableResult public func ImGuiIsKeyPressed(_ user_key_index: Int32, _ repeat: Bool) -> Bool { + igIsKeyPressed(user_key_index, `repeat`) } -@inlinable @discardableResult public func ImGuiIsKeyPressedMap(_ key: ImGuiKey, _ `repeat`: Bool) -> Bool { - return igIsKeyPressedMap(key,`repeat`) +@inlinable @discardableResult public func ImGuiIsKeyPressedMap(_ key: ImGuiKey, _ repeat: Bool) -> Bool { + igIsKeyPressedMap(key, `repeat`) } @inlinable @discardableResult public func ImGuiIsKeyReleased(_ user_key_index: Int32) -> Bool { - return igIsKeyReleased(user_key_index) + igIsKeyReleased(user_key_index) } -@inlinable @discardableResult public func ImGuiIsMouseClicked(_ button: ImGuiMouseButton, _ `repeat`: Bool) -> Bool { - return igIsMouseClicked(button,`repeat`) +@inlinable @discardableResult public func ImGuiIsMouseClicked(_ button: ImGuiMouseButton, _ repeat: Bool) -> Bool { + igIsMouseClicked(button, `repeat`) } @inlinable @discardableResult public func ImGuiIsMouseDoubleClicked(_ button: ImGuiMouseButton) -> Bool { - return igIsMouseDoubleClicked(button) + igIsMouseDoubleClicked(button) } @inlinable @discardableResult public func ImGuiIsMouseDown(_ button: ImGuiMouseButton) -> Bool { - return igIsMouseDown(button) + igIsMouseDown(button) } @inlinable @discardableResult public func ImGuiIsMouseDragPastThreshold(_ button: ImGuiMouseButton, _ lock_threshold: Float) -> Bool { - return igIsMouseDragPastThreshold(button,lock_threshold) + igIsMouseDragPastThreshold(button, lock_threshold) } @inlinable @discardableResult public func ImGuiIsMouseDragging(_ button: ImGuiMouseButton, _ lock_threshold: Float) -> Bool { - return igIsMouseDragging(button,lock_threshold) + igIsMouseDragging(button, lock_threshold) } @inlinable @discardableResult public func ImGuiIsMouseHoveringRect(_ r_min: ImVec2, _ r_max: ImVec2, _ clip: Bool) -> Bool { - return igIsMouseHoveringRect(r_min,r_max,clip) + igIsMouseHoveringRect(r_min, r_max, clip) } @inlinable @discardableResult public func ImGuiIsMousePosValid(_ mouse_pos: UnsafePointer!) -> Bool { - return igIsMousePosValid(mouse_pos) + igIsMousePosValid(mouse_pos) } @inlinable @discardableResult public func ImGuiIsMouseReleased(_ button: ImGuiMouseButton) -> Bool { - return igIsMouseReleased(button) + igIsMouseReleased(button) } @inlinable @discardableResult public func ImGuiIsNavInputDown(_ n: ImGuiNavInput) -> Bool { - return igIsNavInputDown(n) + igIsNavInputDown(n) } @inlinable @discardableResult public func ImGuiIsNavInputTest(_ n: ImGuiNavInput, _ rm: ImGuiInputReadMode) -> Bool { - return igIsNavInputTest(n,rm) + igIsNavInputTest(n, rm) } @inlinable @discardableResult public func ImGuiIsPopupOpen(_ str_id: String? = nil, _ flags: ImGuiPopupFlags) -> Bool { - str_id.withOptionalCString { str_idPtr in - return igIsPopupOpen_Str(str_idPtr,flags) - } + str_id.withOptionalCString { str_idPtr in + igIsPopupOpen_Str(str_idPtr, flags) + } } @inlinable @discardableResult public func ImGuiIsPopupOpen(_ id: ImGuiID, _ popup_flags: ImGuiPopupFlags) -> Bool { - return igIsPopupOpen_ID(id,popup_flags) + igIsPopupOpen_ID(id, popup_flags) } @inlinable @discardableResult public func ImGuiIsRectVisible(_ size: ImVec2) -> Bool { - return igIsRectVisible_Nil(size) + igIsRectVisible_Nil(size) } @inlinable @discardableResult public func ImGuiIsRectVisible(_ rect_min: ImVec2, _ rect_max: ImVec2) -> Bool { - return igIsRectVisible_Vec2(rect_min,rect_max) + igIsRectVisible_Vec2(rect_min, rect_max) } @inlinable @discardableResult public func ImGuiIsWindowAbove(_ potential_above: UnsafeMutablePointer!, _ potential_below: UnsafeMutablePointer!) -> Bool { - return igIsWindowAbove(potential_above,potential_below) + igIsWindowAbove(potential_above, potential_below) } @inlinable @discardableResult public func ImGuiIsWindowAppearing() -> Bool { - return igIsWindowAppearing() + igIsWindowAppearing() } @inlinable @discardableResult public func ImGuiIsWindowChildOf(_ window: UnsafeMutablePointer!, _ potential_parent: UnsafeMutablePointer!, _ popup_hierarchy: Bool) -> Bool { - return igIsWindowChildOf(window,potential_parent,popup_hierarchy) + igIsWindowChildOf(window, potential_parent, popup_hierarchy) } @inlinable @discardableResult public func ImGuiIsWindowCollapsed() -> Bool { - return igIsWindowCollapsed() + igIsWindowCollapsed() } @inlinable @discardableResult public func ImGuiIsWindowFocused(_ flags: ImGuiFocusedFlags) -> Bool { - return igIsWindowFocused(flags) + igIsWindowFocused(flags) } @inlinable @discardableResult public func ImGuiIsWindowHovered(_ flags: ImGuiHoveredFlags) -> Bool { - return igIsWindowHovered(flags) + igIsWindowHovered(flags) } @inlinable @discardableResult public func ImGuiIsWindowNavFocusable(_ window: UnsafeMutablePointer!) -> Bool { - return igIsWindowNavFocusable(window) + igIsWindowNavFocusable(window) } @inlinable @discardableResult public func ImGuiIsWindowWithinBeginStackOf(_ window: UnsafeMutablePointer!, _ potential_parent: UnsafeMutablePointer!) -> Bool { - return igIsWindowWithinBeginStackOf(window,potential_parent) + igIsWindowWithinBeginStackOf(window, potential_parent) } @inlinable @discardableResult public func ImGuiItemAdd(_ bb: ImRect, _ id: ImGuiID, _ nav_bb: UnsafePointer!, _ extra_flags: ImGuiItemFlags) -> Bool { - return igItemAdd(bb,id,nav_bb,extra_flags) + igItemAdd(bb, id, nav_bb, extra_flags) } @inlinable @discardableResult public func ImGuiItemHoverable(_ bb: ImRect, _ id: ImGuiID) -> Bool { - return igItemHoverable(bb,id) + igItemHoverable(bb, id) } -@inlinable public func ImGuiItemSize(_ size: ImVec2, _ text_baseline_y: Float) -> Void { - return igItemSize_Vec2(size,text_baseline_y) +@inlinable public func ImGuiItemSize(_ size: ImVec2, _ text_baseline_y: Float) { + igItemSize_Vec2(size, text_baseline_y) } -@inlinable public func ImGuiItemSize(_ bb: ImRect, _ text_baseline_y: Float) -> Void { - return igItemSize_Rect(bb,text_baseline_y) +@inlinable public func ImGuiItemSize(_ bb: ImRect, _ text_baseline_y: Float) { + igItemSize_Rect(bb, text_baseline_y) } -@inlinable public func ImGuiKeepAliveID(_ id: ImGuiID) -> Void { - return igKeepAliveID(id) +@inlinable public func ImGuiKeepAliveID(_ id: ImGuiID) { + igKeepAliveID(id) } -@inlinable public func ImGuiLabelTextV(_ label: String? = nil, _ fmt: String? = nil, _ args: CVarArg...) -> Void { - label.withOptionalCString { labelPtr in - fmt.withOptionalCString { fmtPtr in - withVaList(args) { varArgsPtr in - return igLabelTextV(labelPtr,fmtPtr,varArgsPtr) - } - } - } +@inlinable public func ImGuiLabelTextV(_ label: String? = nil, _ fmt: String? = nil, _ args: CVarArg...) { + label.withOptionalCString { labelPtr in + fmt.withOptionalCString { fmtPtr in + withVaList(args) { varArgsPtr in + igLabelTextV(labelPtr, fmtPtr, varArgsPtr) + } + } + } } @inlinable @discardableResult public func ImGuiListBox(_ label: String? = nil, _ current_item: UnsafeMutablePointer!, _ items: [String], _ items_count: Int32, _ height_in_items: Int32) -> Bool { - label.withOptionalCString { labelPtr in - withArrayOfCStringsBasePointer(items) { itemsPtr in - return igListBox_Str_arr(labelPtr,current_item,itemsPtr,items_count,height_in_items) - } - } + label.withOptionalCString { labelPtr in + withArrayOfCStringsBasePointer(items) { itemsPtr in + igListBox_Str_arr(labelPtr, current_item, itemsPtr, items_count, height_in_items) + } + } } -@inlinable public func ImGuiListClipperBegin(_ this: UnsafeMutablePointer!, _ items_count: Int32, _ items_height: Float) -> Void { - return ImGuiListClipper_Begin(this,items_count,items_height) +@inlinable public func ImGuiListClipperBegin(_ this: UnsafeMutablePointer!, _ items_count: Int32, _ items_height: Float) { + ImGuiListClipper_Begin(this, items_count, items_height) } -@inlinable public func ImGuiListClipperDataReset(_ this: UnsafeMutablePointer!, _ clipper: UnsafeMutablePointer!) -> Void { - return ImGuiListClipperData_Reset(this,clipper) +@inlinable public func ImGuiListClipperDataReset(_ this: UnsafeMutablePointer!, _ clipper: UnsafeMutablePointer!) { + ImGuiListClipperData_Reset(this, clipper) } -@inlinable public func ImGuiListClipperEnd(_ this: UnsafeMutablePointer!) -> Void { - return ImGuiListClipper_End(this) +@inlinable public func ImGuiListClipperEnd(_ this: UnsafeMutablePointer!) { + ImGuiListClipper_End(this) } -@inlinable public func ImGuiListClipperForceDisplayRangeByIndices(_ this: UnsafeMutablePointer!, _ item_min: Int32, _ item_max: Int32) -> Void { - return ImGuiListClipper_ForceDisplayRangeByIndices(this,item_min,item_max) +@inlinable public func ImGuiListClipperForceDisplayRangeByIndices(_ this: UnsafeMutablePointer!, _ item_min: Int32, _ item_max: Int32) { + ImGuiListClipper_ForceDisplayRangeByIndices(this, item_min, item_max) } @inlinable public func ImGuiListClipperRangeFromIndices(_ min: Int32, _ max: Int32) -> ImGuiListClipperRange { - return ImGuiListClipperRange_FromIndices(min,max) + ImGuiListClipperRange_FromIndices(min, max) } @inlinable public func ImGuiListClipperRangeFromPositions(_ y1: Float, _ y2: Float, _ off_min: Int32, _ off_max: Int32) -> ImGuiListClipperRange { - return ImGuiListClipperRange_FromPositions(y1,y2,off_min,off_max) + ImGuiListClipperRange_FromPositions(y1, y2, off_min, off_max) } @inlinable @discardableResult public func ImGuiListClipperStep(_ this: UnsafeMutablePointer!) -> Bool { - return ImGuiListClipper_Step(this) + ImGuiListClipper_Step(this) } -@inlinable public func ImGuiLoadIniSettingsFromDisk(_ ini_filename: String? = nil) -> Void { - ini_filename.withOptionalCString { ini_filenamePtr in - return igLoadIniSettingsFromDisk(ini_filenamePtr) - } +@inlinable public func ImGuiLoadIniSettingsFromDisk(_ ini_filename: String? = nil) { + ini_filename.withOptionalCString { ini_filenamePtr in + igLoadIniSettingsFromDisk(ini_filenamePtr) + } } -@inlinable public func ImGuiLoadIniSettingsFromMemory(_ ini_data: String? = nil, _ ini_size: Int) -> Void { - ini_data.withOptionalCString { ini_dataPtr in - return igLoadIniSettingsFromMemory(ini_dataPtr,ini_size) - } +@inlinable public func ImGuiLoadIniSettingsFromMemory(_ ini_data: String? = nil, _ ini_size: Int) { + ini_data.withOptionalCString { ini_dataPtr in + igLoadIniSettingsFromMemory(ini_dataPtr, ini_size) + } } -@inlinable public func ImGuiLogBegin(_ type: ImGuiLogType, _ auto_open_depth: Int32) -> Void { - return igLogBegin(type,auto_open_depth) +@inlinable public func ImGuiLogBegin(_ type: ImGuiLogType, _ auto_open_depth: Int32) { + igLogBegin(type, auto_open_depth) } -@inlinable public func ImGuiLogButtons() -> Void { - return igLogButtons() +@inlinable public func ImGuiLogButtons() { + igLogButtons() } -@inlinable public func ImGuiLogFinish() -> Void { - return igLogFinish() +@inlinable public func ImGuiLogFinish() { + igLogFinish() } -@inlinable public func ImGuiLogRenderedText(_ ref_pos: UnsafePointer!, _ text: String? = nil, _ text_end: String? = nil) -> Void { - text.withOptionalCString { textPtr in - text_end.withOptionalCString { text_endPtr in - return igLogRenderedText(ref_pos,textPtr,text_endPtr) - } - } +@inlinable public func ImGuiLogRenderedText(_ ref_pos: UnsafePointer!, _ text: String? = nil, _ text_end: String? = nil) { + text.withOptionalCString { textPtr in + text_end.withOptionalCString { text_endPtr in + igLogRenderedText(ref_pos, textPtr, text_endPtr) + } + } } -@inlinable public func ImGuiLogSetNextTextDecoration(_ `prefix`: String? = nil, _ suffix: String? = nil) -> Void { - `prefix`.withOptionalCString { prefixPtr in - suffix.withOptionalCString { suffixPtr in - return igLogSetNextTextDecoration(prefixPtr,suffixPtr) - } - } +@inlinable public func ImGuiLogSetNextTextDecoration(_ prefix: String? = nil, _ suffix: String? = nil) { + prefix.withOptionalCString { prefixPtr in + suffix.withOptionalCString { suffixPtr in + igLogSetNextTextDecoration(prefixPtr, suffixPtr) + } + } } -@inlinable public func ImGuiLogTextV(_ fmt: String? = nil, _ args: CVarArg...) -> Void { - fmt.withOptionalCString { fmtPtr in - withVaList(args) { varArgsPtr in - return igLogTextV(fmtPtr,varArgsPtr) - } - } +@inlinable public func ImGuiLogTextV(_ fmt: String? = nil, _ args: CVarArg...) { + fmt.withOptionalCString { fmtPtr in + withVaList(args) { varArgsPtr in + igLogTextV(fmtPtr, varArgsPtr) + } + } } -@inlinable public func ImGuiLogToBuffer(_ auto_open_depth: Int32) -> Void { - return igLogToBuffer(auto_open_depth) +@inlinable public func ImGuiLogToBuffer(_ auto_open_depth: Int32) { + igLogToBuffer(auto_open_depth) } -@inlinable public func ImGuiLogToClipboard(_ auto_open_depth: Int32) -> Void { - return igLogToClipboard(auto_open_depth) +@inlinable public func ImGuiLogToClipboard(_ auto_open_depth: Int32) { + igLogToClipboard(auto_open_depth) } -@inlinable public func ImGuiLogToFile(_ auto_open_depth: Int32, _ filename: String? = nil) -> Void { - filename.withOptionalCString { filenamePtr in - return igLogToFile(auto_open_depth,filenamePtr) - } +@inlinable public func ImGuiLogToFile(_ auto_open_depth: Int32, _ filename: String? = nil) { + filename.withOptionalCString { filenamePtr in + igLogToFile(auto_open_depth, filenamePtr) + } } -@inlinable public func ImGuiLogToTTY(_ auto_open_depth: Int32) -> Void { - return igLogToTTY(auto_open_depth) +@inlinable public func ImGuiLogToTTY(_ auto_open_depth: Int32) { + igLogToTTY(auto_open_depth) } -@inlinable public func ImGuiMarkIniSettingsDirty() -> Void { - return igMarkIniSettingsDirty_Nil() +@inlinable public func ImGuiMarkIniSettingsDirty() { + igMarkIniSettingsDirty_Nil() } -@inlinable public func ImGuiMarkIniSettingsDirty(_ window: UnsafeMutablePointer!) -> Void { - return igMarkIniSettingsDirty_WindowPtr(window) +@inlinable public func ImGuiMarkIniSettingsDirty(_ window: UnsafeMutablePointer!) { + igMarkIniSettingsDirty_WindowPtr(window) } -@inlinable public func ImGuiMarkItemEdited(_ id: ImGuiID) -> Void { - return igMarkItemEdited(id) +@inlinable public func ImGuiMarkItemEdited(_ id: ImGuiID) { + igMarkItemEdited(id) } @inlinable public func ImGuiMemAlloc(_ size: Int) -> UnsafeMutableRawPointer! { - return igMemAlloc(size) + igMemAlloc(size) } -@inlinable public func ImGuiMemFree(_ ptr: UnsafeMutableRawPointer!) -> Void { - return igMemFree(ptr) +@inlinable public func ImGuiMemFree(_ ptr: UnsafeMutableRawPointer!) { + igMemFree(ptr) } -@inlinable public func ImGuiMenuColumnsCalcNextTotalWidth(_ this: UnsafeMutablePointer!, _ update_offsets: Bool) -> Void { - return ImGuiMenuColumns_CalcNextTotalWidth(this,update_offsets) +@inlinable public func ImGuiMenuColumnsCalcNextTotalWidth(_ this: UnsafeMutablePointer!, _ update_offsets: Bool) { + ImGuiMenuColumns_CalcNextTotalWidth(this, update_offsets) } @inlinable public func ImGuiMenuColumnsDeclColumns(_ this: UnsafeMutablePointer!, _ w_icon: Float, _ w_label: Float, _ w_shortcut: Float, _ w_mark: Float) -> Float { - return ImGuiMenuColumns_DeclColumns(this,w_icon,w_label,w_shortcut,w_mark) + ImGuiMenuColumns_DeclColumns(this, w_icon, w_label, w_shortcut, w_mark) } -@inlinable public func ImGuiMenuColumnsUpdate(_ this: UnsafeMutablePointer!, _ spacing: Float, _ window_reappearing: Bool) -> Void { - return ImGuiMenuColumns_Update(this,spacing,window_reappearing) +@inlinable public func ImGuiMenuColumnsUpdate(_ this: UnsafeMutablePointer!, _ spacing: Float, _ window_reappearing: Bool) { + ImGuiMenuColumns_Update(this, spacing, window_reappearing) } @inlinable @discardableResult public func ImGuiMenuItem(_ label: String? = nil, _ shortcut: String? = nil, _ selected: Bool, _ enabled: Bool) -> Bool { - label.withOptionalCString { labelPtr in - shortcut.withOptionalCString { shortcutPtr in - return igMenuItem_Bool(labelPtr,shortcutPtr,selected,enabled) - } - } + label.withOptionalCString { labelPtr in + shortcut.withOptionalCString { shortcutPtr in + igMenuItem_Bool(labelPtr, shortcutPtr, selected, enabled) + } + } } @inlinable @discardableResult public func ImGuiMenuItem(_ label: String? = nil, _ shortcut: String? = nil, _ p_selected: UnsafeMutablePointer!, _ enabled: Bool) -> Bool { - label.withOptionalCString { labelPtr in - shortcut.withOptionalCString { shortcutPtr in - return igMenuItem_BoolPtr(labelPtr,shortcutPtr,p_selected,enabled) - } - } + label.withOptionalCString { labelPtr in + shortcut.withOptionalCString { shortcutPtr in + igMenuItem_BoolPtr(labelPtr, shortcutPtr, p_selected, enabled) + } + } } @inlinable @discardableResult public func ImGuiMenuItemEx(_ label: String? = nil, _ icon: String? = nil, _ shortcut: String? = nil, _ selected: Bool, _ enabled: Bool) -> Bool { - label.withOptionalCString { labelPtr in - icon.withOptionalCString { iconPtr in - shortcut.withOptionalCString { shortcutPtr in - return igMenuItemEx(labelPtr,iconPtr,shortcutPtr,selected,enabled) - } - } - } + label.withOptionalCString { labelPtr in + icon.withOptionalCString { iconPtr in + shortcut.withOptionalCString { shortcutPtr in + igMenuItemEx(labelPtr, iconPtr, shortcutPtr, selected, enabled) + } + } + } } -@inlinable public func ImGuiNavInitRequestApplyResult() -> Void { - return igNavInitRequestApplyResult() +@inlinable public func ImGuiNavInitRequestApplyResult() { + igNavInitRequestApplyResult() } -@inlinable public func ImGuiNavInitWindow(_ window: UnsafeMutablePointer!, _ force_reinit: Bool) -> Void { - return igNavInitWindow(window,force_reinit) +@inlinable public func ImGuiNavInitWindow(_ window: UnsafeMutablePointer!, _ force_reinit: Bool) { + igNavInitWindow(window, force_reinit) } -@inlinable public func ImGuiNavItemDataClear(_ this: UnsafeMutablePointer!) -> Void { - return ImGuiNavItemData_Clear(this) +@inlinable public func ImGuiNavItemDataClear(_ this: UnsafeMutablePointer!) { + ImGuiNavItemData_Clear(this) } -@inlinable public func ImGuiNavMoveRequestApplyResult() -> Void { - return igNavMoveRequestApplyResult() +@inlinable public func ImGuiNavMoveRequestApplyResult() { + igNavMoveRequestApplyResult() } @inlinable @discardableResult public func ImGuiNavMoveRequestButNoResultYet() -> Bool { - return igNavMoveRequestButNoResultYet() + igNavMoveRequestButNoResultYet() } -@inlinable public func ImGuiNavMoveRequestCancel() -> Void { - return igNavMoveRequestCancel() +@inlinable public func ImGuiNavMoveRequestCancel() { + igNavMoveRequestCancel() } -@inlinable public func ImGuiNavMoveRequestForward(_ move_dir: ImGuiDir, _ clip_dir: ImGuiDir, _ move_flags: ImGuiNavMoveFlags, _ scroll_flags: ImGuiScrollFlags) -> Void { - return igNavMoveRequestForward(move_dir,clip_dir,move_flags,scroll_flags) +@inlinable public func ImGuiNavMoveRequestForward(_ move_dir: ImGuiDir, _ clip_dir: ImGuiDir, _ move_flags: ImGuiNavMoveFlags, _ scroll_flags: ImGuiScrollFlags) { + igNavMoveRequestForward(move_dir, clip_dir, move_flags, scroll_flags) } -@inlinable public func ImGuiNavMoveRequestResolveWithLastItem(_ result: UnsafeMutablePointer!) -> Void { - return igNavMoveRequestResolveWithLastItem(result) +@inlinable public func ImGuiNavMoveRequestResolveWithLastItem(_ result: UnsafeMutablePointer!) { + igNavMoveRequestResolveWithLastItem(result) } -@inlinable public func ImGuiNavMoveRequestSubmit(_ move_dir: ImGuiDir, _ clip_dir: ImGuiDir, _ move_flags: ImGuiNavMoveFlags, _ scroll_flags: ImGuiScrollFlags) -> Void { - return igNavMoveRequestSubmit(move_dir,clip_dir,move_flags,scroll_flags) +@inlinable public func ImGuiNavMoveRequestSubmit(_ move_dir: ImGuiDir, _ clip_dir: ImGuiDir, _ move_flags: ImGuiNavMoveFlags, _ scroll_flags: ImGuiScrollFlags) { + igNavMoveRequestSubmit(move_dir, clip_dir, move_flags, scroll_flags) } -@inlinable public func ImGuiNavMoveRequestTryWrapping(_ window: UnsafeMutablePointer!, _ move_flags: ImGuiNavMoveFlags) -> Void { - return igNavMoveRequestTryWrapping(window,move_flags) +@inlinable public func ImGuiNavMoveRequestTryWrapping(_ window: UnsafeMutablePointer!, _ move_flags: ImGuiNavMoveFlags) { + igNavMoveRequestTryWrapping(window, move_flags) } -@inlinable public func ImGuiNewFrame() -> Void { - return igNewFrame() +@inlinable public func ImGuiNewFrame() { + igNewFrame() } -@inlinable public func ImGuiNewLine() -> Void { - return igNewLine() +@inlinable public func ImGuiNewLine() { + igNewLine() } -@inlinable public func ImGuiNextColumn() -> Void { - return igNextColumn() +@inlinable public func ImGuiNextColumn() { + igNextColumn() } -@inlinable public func ImGuiNextItemDataClearFlags(_ this: UnsafeMutablePointer!) -> Void { - return ImGuiNextItemData_ClearFlags(this) +@inlinable public func ImGuiNextItemDataClearFlags(_ this: UnsafeMutablePointer!) { + ImGuiNextItemData_ClearFlags(this) } -@inlinable public func ImGuiNextWindowDataClearFlags(_ this: UnsafeMutablePointer!) -> Void { - return ImGuiNextWindowData_ClearFlags(this) +@inlinable public func ImGuiNextWindowDataClearFlags(_ this: UnsafeMutablePointer!) { + ImGuiNextWindowData_ClearFlags(this) } -@inlinable public func ImGuiOpenPopup(_ str_id: String? = nil, _ popup_flags: ImGuiPopupFlags) -> Void { - str_id.withOptionalCString { str_idPtr in - return igOpenPopup_Str(str_idPtr,popup_flags) - } +@inlinable public func ImGuiOpenPopup(_ str_id: String? = nil, _ popup_flags: ImGuiPopupFlags) { + str_id.withOptionalCString { str_idPtr in + igOpenPopup_Str(str_idPtr, popup_flags) + } } -@inlinable public func ImGuiOpenPopup(_ id: ImGuiID, _ popup_flags: ImGuiPopupFlags) -> Void { - return igOpenPopup_ID(id,popup_flags) +@inlinable public func ImGuiOpenPopup(_ id: ImGuiID, _ popup_flags: ImGuiPopupFlags) { + igOpenPopup_ID(id, popup_flags) } -@inlinable public func ImGuiOpenPopupEx(_ id: ImGuiID, _ popup_flags: ImGuiPopupFlags) -> Void { - return igOpenPopupEx(id,popup_flags) +@inlinable public func ImGuiOpenPopupEx(_ id: ImGuiID, _ popup_flags: ImGuiPopupFlags) { + igOpenPopupEx(id, popup_flags) } -@inlinable public func ImGuiOpenPopupOnItemClick(_ str_id: String? = nil, _ popup_flags: ImGuiPopupFlags) -> Void { - str_id.withOptionalCString { str_idPtr in - return igOpenPopupOnItemClick(str_idPtr,popup_flags) - } +@inlinable public func ImGuiOpenPopupOnItemClick(_ str_id: String? = nil, _ popup_flags: ImGuiPopupFlags) { + str_id.withOptionalCString { str_idPtr in + igOpenPopupOnItemClick(str_idPtr, popup_flags) + } } -@inlinable public func ImGuiPayloadClear(_ this: UnsafeMutablePointer!) -> Void { - return ImGuiPayload_Clear(this) +@inlinable public func ImGuiPayloadClear(_ this: UnsafeMutablePointer!) { + ImGuiPayload_Clear(this) } @inlinable @discardableResult public func ImGuiPayloadIsDataType(_ this: UnsafeMutablePointer!, _ type: String? = nil) -> Bool { - type.withOptionalCString { typePtr in - return ImGuiPayload_IsDataType(this,typePtr) - } + type.withOptionalCString { typePtr in + ImGuiPayload_IsDataType(this, typePtr) + } } @inlinable @discardableResult public func ImGuiPayloadIsDelivery(_ this: UnsafeMutablePointer!) -> Bool { - return ImGuiPayload_IsDelivery(this) + ImGuiPayload_IsDelivery(this) } @inlinable @discardableResult public func ImGuiPayloadIsPreview(_ this: UnsafeMutablePointer!) -> Bool { - return ImGuiPayload_IsPreview(this) + ImGuiPayload_IsPreview(this) } -@inlinable public func ImGuiPlotHistogram(_ label: String? = nil, _ values: UnsafePointer!, _ values_count: Int32, _ values_offset: Int32, _ overlay_text: String? = nil, _ scale_min: Float, _ scale_max: Float, _ graph_size: ImVec2, _ stride: Int32) -> Void { - label.withOptionalCString { labelPtr in - overlay_text.withOptionalCString { overlay_textPtr in - return igPlotHistogram_FloatPtr(labelPtr,values,values_count,values_offset,overlay_textPtr,scale_min,scale_max,graph_size,stride) - } - } +@inlinable public func ImGuiPlotHistogram(_ label: String? = nil, _ values: UnsafePointer!, _ values_count: Int32, _ values_offset: Int32, _ overlay_text: String? = nil, _ scale_min: Float, _ scale_max: Float, _ graph_size: ImVec2, _ stride: Int32) { + label.withOptionalCString { labelPtr in + overlay_text.withOptionalCString { overlay_textPtr in + igPlotHistogram_FloatPtr(labelPtr, values, values_count, values_offset, overlay_textPtr, scale_min, scale_max, graph_size, stride) + } + } } -@inlinable public func ImGuiPlotLines(_ label: String? = nil, _ values: UnsafePointer!, _ values_count: Int32, _ values_offset: Int32, _ overlay_text: String? = nil, _ scale_min: Float, _ scale_max: Float, _ graph_size: ImVec2, _ stride: Int32) -> Void { - label.withOptionalCString { labelPtr in - overlay_text.withOptionalCString { overlay_textPtr in - return igPlotLines_FloatPtr(labelPtr,values,values_count,values_offset,overlay_textPtr,scale_min,scale_max,graph_size,stride) - } - } +@inlinable public func ImGuiPlotLines(_ label: String? = nil, _ values: UnsafePointer!, _ values_count: Int32, _ values_offset: Int32, _ overlay_text: String? = nil, _ scale_min: Float, _ scale_max: Float, _ graph_size: ImVec2, _ stride: Int32) { + label.withOptionalCString { labelPtr in + overlay_text.withOptionalCString { overlay_textPtr in + igPlotLines_FloatPtr(labelPtr, values, values_count, values_offset, overlay_textPtr, scale_min, scale_max, graph_size, stride) + } + } } -@inlinable public func ImGuiPopAllowKeyboardFocus() -> Void { - return igPopAllowKeyboardFocus() +@inlinable public func ImGuiPopAllowKeyboardFocus() { + igPopAllowKeyboardFocus() } -@inlinable public func ImGuiPopButtonRepeat() -> Void { - return igPopButtonRepeat() +@inlinable public func ImGuiPopButtonRepeat() { + igPopButtonRepeat() } -@inlinable public func ImGuiPopClipRect() -> Void { - return igPopClipRect() +@inlinable public func ImGuiPopClipRect() { + igPopClipRect() } -@inlinable public func ImGuiPopColumnsBackground() -> Void { - return igPopColumnsBackground() +@inlinable public func ImGuiPopColumnsBackground() { + igPopColumnsBackground() } -@inlinable public func ImGuiPopFocusScope() -> Void { - return igPopFocusScope() +@inlinable public func ImGuiPopFocusScope() { + igPopFocusScope() } -@inlinable public func ImGuiPopFont() -> Void { - return igPopFont() +@inlinable public func ImGuiPopFont() { + igPopFont() } -@inlinable public func ImGuiPopID() -> Void { - return igPopID() +@inlinable public func ImGuiPopID() { + igPopID() } -@inlinable public func ImGuiPopItemFlag() -> Void { - return igPopItemFlag() +@inlinable public func ImGuiPopItemFlag() { + igPopItemFlag() } -@inlinable public func ImGuiPopItemWidth() -> Void { - return igPopItemWidth() +@inlinable public func ImGuiPopItemWidth() { + igPopItemWidth() } -@inlinable public func ImGuiPopStyleColor(_ count: Int32) -> Void { - return igPopStyleColor(count) +@inlinable public func ImGuiPopStyleColor(_ count: Int32) { + igPopStyleColor(count) } -@inlinable public func ImGuiPopStyleVar(_ count: Int32) -> Void { - return igPopStyleVar(count) +@inlinable public func ImGuiPopStyleVar(_ count: Int32) { + igPopStyleVar(count) } -@inlinable public func ImGuiPopTextWrapPos() -> Void { - return igPopTextWrapPos() +@inlinable public func ImGuiPopTextWrapPos() { + igPopTextWrapPos() } -@inlinable public func ImGuiProgressBar(_ fraction: Float, _ size_arg: ImVec2, _ overlay: String? = nil) -> Void { - overlay.withOptionalCString { overlayPtr in - return igProgressBar(fraction,size_arg,overlayPtr) - } +@inlinable public func ImGuiProgressBar(_ fraction: Float, _ size_arg: ImVec2, _ overlay: String? = nil) { + overlay.withOptionalCString { overlayPtr in + igProgressBar(fraction, size_arg, overlayPtr) + } } -@inlinable public func ImGuiPushAllowKeyboardFocus(_ allow_keyboard_focus: Bool) -> Void { - return igPushAllowKeyboardFocus(allow_keyboard_focus) +@inlinable public func ImGuiPushAllowKeyboardFocus(_ allow_keyboard_focus: Bool) { + igPushAllowKeyboardFocus(allow_keyboard_focus) } -@inlinable public func ImGuiPushButtonRepeat(_ `repeat`: Bool) -> Void { - return igPushButtonRepeat(`repeat`) +@inlinable public func ImGuiPushButtonRepeat(_ repeat: Bool) { + igPushButtonRepeat(`repeat`) } -@inlinable public func ImGuiPushClipRect(_ clip_rect_min: ImVec2, _ clip_rect_max: ImVec2, _ intersect_with_current_clip_rect: Bool) -> Void { - return igPushClipRect(clip_rect_min,clip_rect_max,intersect_with_current_clip_rect) +@inlinable public func ImGuiPushClipRect(_ clip_rect_min: ImVec2, _ clip_rect_max: ImVec2, _ intersect_with_current_clip_rect: Bool) { + igPushClipRect(clip_rect_min, clip_rect_max, intersect_with_current_clip_rect) } -@inlinable public func ImGuiPushColumnClipRect(_ column_index: Int32) -> Void { - return igPushColumnClipRect(column_index) +@inlinable public func ImGuiPushColumnClipRect(_ column_index: Int32) { + igPushColumnClipRect(column_index) } -@inlinable public func ImGuiPushColumnsBackground() -> Void { - return igPushColumnsBackground() +@inlinable public func ImGuiPushColumnsBackground() { + igPushColumnsBackground() } -@inlinable public func ImGuiPushFocusScope(_ id: ImGuiID) -> Void { - return igPushFocusScope(id) +@inlinable public func ImGuiPushFocusScope(_ id: ImGuiID) { + igPushFocusScope(id) } -@inlinable public func ImGuiPushFont(_ font: UnsafeMutablePointer!) -> Void { - return igPushFont(font) +@inlinable public func ImGuiPushFont(_ font: UnsafeMutablePointer!) { + igPushFont(font) } -@inlinable public func ImGuiPushID(_ str_id: String? = nil) -> Void { - str_id.withOptionalCString { str_idPtr in - return igPushID_Str(str_idPtr) - } +@inlinable public func ImGuiPushID(_ str_id: String? = nil) { + str_id.withOptionalCString { str_idPtr in + igPushID_Str(str_idPtr) + } } -@inlinable public func ImGuiPushID(_ str_id_begin: String? = nil, _ str_id_end: String? = nil) -> Void { - str_id_begin.withOptionalCString { str_id_beginPtr in - str_id_end.withOptionalCString { str_id_endPtr in - return igPushID_StrStr(str_id_beginPtr,str_id_endPtr) - } - } +@inlinable public func ImGuiPushID(_ str_id_begin: String? = nil, _ str_id_end: String? = nil) { + str_id_begin.withOptionalCString { str_id_beginPtr in + str_id_end.withOptionalCString { str_id_endPtr in + igPushID_StrStr(str_id_beginPtr, str_id_endPtr) + } + } } -@inlinable public func ImGuiPushID(_ ptr_id: UnsafeRawPointer!) -> Void { - return igPushID_Ptr(ptr_id) +@inlinable public func ImGuiPushID(_ ptr_id: UnsafeRawPointer!) { + igPushID_Ptr(ptr_id) } -@inlinable public func ImGuiPushID(_ int_id: Int32) -> Void { - return igPushID_Int(int_id) +@inlinable public func ImGuiPushID(_ int_id: Int32) { + igPushID_Int(int_id) } -@inlinable public func ImGuiPushItemFlag(_ option: ImGuiItemFlags, _ enabled: Bool) -> Void { - return igPushItemFlag(option,enabled) +@inlinable public func ImGuiPushItemFlag(_ option: ImGuiItemFlags, _ enabled: Bool) { + igPushItemFlag(option, enabled) } -@inlinable public func ImGuiPushItemWidth(_ item_width: Float) -> Void { - return igPushItemWidth(item_width) +@inlinable public func ImGuiPushItemWidth(_ item_width: Float) { + igPushItemWidth(item_width) } -@inlinable public func ImGuiPushMultiItemsWidths(_ components: Int32, _ width_full: Float) -> Void { - return igPushMultiItemsWidths(components,width_full) +@inlinable public func ImGuiPushMultiItemsWidths(_ components: Int32, _ width_full: Float) { + igPushMultiItemsWidths(components, width_full) } -@inlinable public func ImGuiPushOverrideID(_ id: ImGuiID) -> Void { - return igPushOverrideID(id) +@inlinable public func ImGuiPushOverrideID(_ id: ImGuiID) { + igPushOverrideID(id) } -@inlinable public func ImGuiPushStyleColor(_ idx: ImGuiCol, _ col: ImU32) -> Void { - return igPushStyleColor_U32(idx,col) +@inlinable public func ImGuiPushStyleColor(_ idx: ImGuiCol, _ col: ImU32) { + igPushStyleColor_U32(idx, col) } -@inlinable public func ImGuiPushStyleColor(_ idx: ImGuiCol, _ col: ImVec4) -> Void { - return igPushStyleColor_Vec4(idx,col) +@inlinable public func ImGuiPushStyleColor(_ idx: ImGuiCol, _ col: ImVec4) { + igPushStyleColor_Vec4(idx, col) } -@inlinable public func ImGuiPushStyleVar(_ idx: ImGuiStyleVar, _ val: Float) -> Void { - return igPushStyleVar_Float(idx,val) +@inlinable public func ImGuiPushStyleVar(_ idx: ImGuiStyleVar, _ val: Float) { + igPushStyleVar_Float(idx, val) } -@inlinable public func ImGuiPushStyleVar(_ idx: ImGuiStyleVar, _ val: ImVec2) -> Void { - return igPushStyleVar_Vec2(idx,val) +@inlinable public func ImGuiPushStyleVar(_ idx: ImGuiStyleVar, _ val: ImVec2) { + igPushStyleVar_Vec2(idx, val) } -@inlinable public func ImGuiPushTextWrapPos(_ wrap_local_pos_x: Float) -> Void { - return igPushTextWrapPos(wrap_local_pos_x) +@inlinable public func ImGuiPushTextWrapPos(_ wrap_local_pos_x: Float) { + igPushTextWrapPos(wrap_local_pos_x) } @inlinable @discardableResult public func ImGuiRadioButton(_ label: String? = nil, _ active: Bool) -> Bool { - label.withOptionalCString { labelPtr in - return igRadioButton_Bool(labelPtr,active) - } + label.withOptionalCString { labelPtr in + igRadioButton_Bool(labelPtr, active) + } } @inlinable @discardableResult public func ImGuiRadioButton(_ label: String? = nil, _ v: UnsafeMutablePointer!, _ v_button: Int32) -> Bool { - label.withOptionalCString { labelPtr in - return igRadioButton_IntPtr(labelPtr,v,v_button) - } + label.withOptionalCString { labelPtr in + igRadioButton_IntPtr(labelPtr, v, v_button) + } } -@inlinable public func ImGuiRemoveContextHook(_ context: UnsafeMutablePointer!, _ hook_to_remove: ImGuiID) -> Void { - return igRemoveContextHook(context,hook_to_remove) +@inlinable public func ImGuiRemoveContextHook(_ context: UnsafeMutablePointer!, _ hook_to_remove: ImGuiID) { + igRemoveContextHook(context, hook_to_remove) } -@inlinable public func ImGuiRender() -> Void { - return igRender() +@inlinable public func ImGuiRender() { + igRender() } -@inlinable public func ImGuiRenderArrow(_ draw_list: UnsafeMutablePointer!, _ pos: ImVec2, _ col: ImU32, _ dir: ImGuiDir, _ scale: Float) -> Void { - return igRenderArrow(draw_list,pos,col,dir,scale) +@inlinable public func ImGuiRenderArrow(_ draw_list: UnsafeMutablePointer!, _ pos: ImVec2, _ col: ImU32, _ dir: ImGuiDir, _ scale: Float) { + igRenderArrow(draw_list, pos, col, dir, scale) } -@inlinable public func ImGuiRenderArrowPointingAt(_ draw_list: UnsafeMutablePointer!, _ pos: ImVec2, _ half_sz: ImVec2, _ direction: ImGuiDir, _ col: ImU32) -> Void { - return igRenderArrowPointingAt(draw_list,pos,half_sz,direction,col) +@inlinable public func ImGuiRenderArrowPointingAt(_ draw_list: UnsafeMutablePointer!, _ pos: ImVec2, _ half_sz: ImVec2, _ direction: ImGuiDir, _ col: ImU32) { + igRenderArrowPointingAt(draw_list, pos, half_sz, direction, col) } -@inlinable public func ImGuiRenderBullet(_ draw_list: UnsafeMutablePointer!, _ pos: ImVec2, _ col: ImU32) -> Void { - return igRenderBullet(draw_list,pos,col) +@inlinable public func ImGuiRenderBullet(_ draw_list: UnsafeMutablePointer!, _ pos: ImVec2, _ col: ImU32) { + igRenderBullet(draw_list, pos, col) } -@inlinable public func ImGuiRenderCheckMark(_ draw_list: UnsafeMutablePointer!, _ pos: ImVec2, _ col: ImU32, _ sz: Float) -> Void { - return igRenderCheckMark(draw_list,pos,col,sz) +@inlinable public func ImGuiRenderCheckMark(_ draw_list: UnsafeMutablePointer!, _ pos: ImVec2, _ col: ImU32, _ sz: Float) { + igRenderCheckMark(draw_list, pos, col, sz) } -@inlinable public func ImGuiRenderColorRectWithAlphaCheckerboard(_ draw_list: UnsafeMutablePointer!, _ p_min: ImVec2, _ p_max: ImVec2, _ fill_col: ImU32, _ grid_step: Float, _ grid_off: ImVec2, _ rounding: Float, _ flags: ImDrawFlags) -> Void { - return igRenderColorRectWithAlphaCheckerboard(draw_list,p_min,p_max,fill_col,grid_step,grid_off,rounding,flags) +@inlinable public func ImGuiRenderColorRectWithAlphaCheckerboard(_ draw_list: UnsafeMutablePointer!, _ p_min: ImVec2, _ p_max: ImVec2, _ fill_col: ImU32, _ grid_step: Float, _ grid_off: ImVec2, _ rounding: Float, _ flags: ImDrawFlags) { + igRenderColorRectWithAlphaCheckerboard(draw_list, p_min, p_max, fill_col, grid_step, grid_off, rounding, flags) } -@inlinable public func ImGuiRenderFrame(_ p_min: ImVec2, _ p_max: ImVec2, _ fill_col: ImU32, _ border: Bool, _ rounding: Float) -> Void { - return igRenderFrame(p_min,p_max,fill_col,border,rounding) +@inlinable public func ImGuiRenderFrame(_ p_min: ImVec2, _ p_max: ImVec2, _ fill_col: ImU32, _ border: Bool, _ rounding: Float) { + igRenderFrame(p_min, p_max, fill_col, border, rounding) } -@inlinable public func ImGuiRenderFrameBorder(_ p_min: ImVec2, _ p_max: ImVec2, _ rounding: Float) -> Void { - return igRenderFrameBorder(p_min,p_max,rounding) +@inlinable public func ImGuiRenderFrameBorder(_ p_min: ImVec2, _ p_max: ImVec2, _ rounding: Float) { + igRenderFrameBorder(p_min, p_max, rounding) } -@inlinable public func ImGuiRenderMouseCursor(_ draw_list: UnsafeMutablePointer!, _ pos: ImVec2, _ scale: Float, _ mouse_cursor: ImGuiMouseCursor, _ col_fill: ImU32, _ col_border: ImU32, _ col_shadow: ImU32) -> Void { - return igRenderMouseCursor(draw_list,pos,scale,mouse_cursor,col_fill,col_border,col_shadow) +@inlinable public func ImGuiRenderMouseCursor(_ draw_list: UnsafeMutablePointer!, _ pos: ImVec2, _ scale: Float, _ mouse_cursor: ImGuiMouseCursor, _ col_fill: ImU32, _ col_border: ImU32, _ col_shadow: ImU32) { + igRenderMouseCursor(draw_list, pos, scale, mouse_cursor, col_fill, col_border, col_shadow) } -@inlinable public func ImGuiRenderNavHighlight(_ bb: ImRect, _ id: ImGuiID, _ flags: ImGuiNavHighlightFlags) -> Void { - return igRenderNavHighlight(bb,id,flags) +@inlinable public func ImGuiRenderNavHighlight(_ bb: ImRect, _ id: ImGuiID, _ flags: ImGuiNavHighlightFlags) { + igRenderNavHighlight(bb, id, flags) } -@inlinable public func ImGuiRenderRectFilledRangeH(_ draw_list: UnsafeMutablePointer!, _ rect: ImRect, _ col: ImU32, _ x_start_norm: Float, _ x_end_norm: Float, _ rounding: Float) -> Void { - return igRenderRectFilledRangeH(draw_list,rect,col,x_start_norm,x_end_norm,rounding) +@inlinable public func ImGuiRenderRectFilledRangeH(_ draw_list: UnsafeMutablePointer!, _ rect: ImRect, _ col: ImU32, _ x_start_norm: Float, _ x_end_norm: Float, _ rounding: Float) { + igRenderRectFilledRangeH(draw_list, rect, col, x_start_norm, x_end_norm, rounding) } -@inlinable public func ImGuiRenderRectFilledWithHole(_ draw_list: UnsafeMutablePointer!, _ outer: ImRect, _ inner: ImRect, _ col: ImU32, _ rounding: Float) -> Void { - return igRenderRectFilledWithHole(draw_list,outer,inner,col,rounding) +@inlinable public func ImGuiRenderRectFilledWithHole(_ draw_list: UnsafeMutablePointer!, _ outer: ImRect, _ inner: ImRect, _ col: ImU32, _ rounding: Float) { + igRenderRectFilledWithHole(draw_list, outer, inner, col, rounding) } -@inlinable public func ImGuiRenderText(_ pos: ImVec2, _ text: String? = nil, _ text_end: String? = nil, _ hide_text_after_hash: Bool) -> Void { - text.withOptionalCString { textPtr in - text_end.withOptionalCString { text_endPtr in - return igRenderText(pos,textPtr,text_endPtr,hide_text_after_hash) - } - } +@inlinable public func ImGuiRenderText(_ pos: ImVec2, _ text: String? = nil, _ text_end: String? = nil, _ hide_text_after_hash: Bool) { + text.withOptionalCString { textPtr in + text_end.withOptionalCString { text_endPtr in + igRenderText(pos, textPtr, text_endPtr, hide_text_after_hash) + } + } } -@inlinable public func ImGuiRenderTextClipped(_ pos_min: ImVec2, _ pos_max: ImVec2, _ text: String? = nil, _ text_end: String? = nil, _ text_size_if_known: UnsafePointer!, _ align: ImVec2, _ clip_rect: UnsafePointer!) -> Void { - text.withOptionalCString { textPtr in - text_end.withOptionalCString { text_endPtr in - return igRenderTextClipped(pos_min,pos_max,textPtr,text_endPtr,text_size_if_known,align,clip_rect) - } - } +@inlinable public func ImGuiRenderTextClipped(_ pos_min: ImVec2, _ pos_max: ImVec2, _ text: String? = nil, _ text_end: String? = nil, _ text_size_if_known: UnsafePointer!, _ align: ImVec2, _ clip_rect: UnsafePointer!) { + text.withOptionalCString { textPtr in + text_end.withOptionalCString { text_endPtr in + igRenderTextClipped(pos_min, pos_max, textPtr, text_endPtr, text_size_if_known, align, clip_rect) + } + } } -@inlinable public func ImGuiRenderTextClippedEx(_ draw_list: UnsafeMutablePointer!, _ pos_min: ImVec2, _ pos_max: ImVec2, _ text: String? = nil, _ text_end: String? = nil, _ text_size_if_known: UnsafePointer!, _ align: ImVec2, _ clip_rect: UnsafePointer!) -> Void { - text.withOptionalCString { textPtr in - text_end.withOptionalCString { text_endPtr in - return igRenderTextClippedEx(draw_list,pos_min,pos_max,textPtr,text_endPtr,text_size_if_known,align,clip_rect) - } - } +@inlinable public func ImGuiRenderTextClippedEx(_ draw_list: UnsafeMutablePointer!, _ pos_min: ImVec2, _ pos_max: ImVec2, _ text: String? = nil, _ text_end: String? = nil, _ text_size_if_known: UnsafePointer!, _ align: ImVec2, _ clip_rect: UnsafePointer!) { + text.withOptionalCString { textPtr in + text_end.withOptionalCString { text_endPtr in + igRenderTextClippedEx(draw_list, pos_min, pos_max, textPtr, text_endPtr, text_size_if_known, align, clip_rect) + } + } } -@inlinable public func ImGuiRenderTextEllipsis(_ draw_list: UnsafeMutablePointer!, _ pos_min: ImVec2, _ pos_max: ImVec2, _ clip_max_x: Float, _ ellipsis_max_x: Float, _ text: String? = nil, _ text_end: String? = nil, _ text_size_if_known: UnsafePointer!) -> Void { - text.withOptionalCString { textPtr in - text_end.withOptionalCString { text_endPtr in - return igRenderTextEllipsis(draw_list,pos_min,pos_max,clip_max_x,ellipsis_max_x,textPtr,text_endPtr,text_size_if_known) - } - } +@inlinable public func ImGuiRenderTextEllipsis(_ draw_list: UnsafeMutablePointer!, _ pos_min: ImVec2, _ pos_max: ImVec2, _ clip_max_x: Float, _ ellipsis_max_x: Float, _ text: String? = nil, _ text_end: String? = nil, _ text_size_if_known: UnsafePointer!) { + text.withOptionalCString { textPtr in + text_end.withOptionalCString { text_endPtr in + igRenderTextEllipsis(draw_list, pos_min, pos_max, clip_max_x, ellipsis_max_x, textPtr, text_endPtr, text_size_if_known) + } + } } -@inlinable public func ImGuiRenderTextWrapped(_ pos: ImVec2, _ text: String? = nil, _ text_end: String? = nil, _ wrap_width: Float) -> Void { - text.withOptionalCString { textPtr in - text_end.withOptionalCString { text_endPtr in - return igRenderTextWrapped(pos,textPtr,text_endPtr,wrap_width) - } - } +@inlinable public func ImGuiRenderTextWrapped(_ pos: ImVec2, _ text: String? = nil, _ text_end: String? = nil, _ wrap_width: Float) { + text.withOptionalCString { textPtr in + text_end.withOptionalCString { text_endPtr in + igRenderTextWrapped(pos, textPtr, text_endPtr, wrap_width) + } + } } -@inlinable public func ImGuiResetMouseDragDelta(_ button: ImGuiMouseButton) -> Void { - return igResetMouseDragDelta(button) +@inlinable public func ImGuiResetMouseDragDelta(_ button: ImGuiMouseButton) { + igResetMouseDragDelta(button) } -@inlinable public func ImGuiSameLine(_ offset_from_start_x: Float, _ spacing: Float) -> Void { - return igSameLine(offset_from_start_x,spacing) +@inlinable public func ImGuiSameLine(_ offset_from_start_x: Float, _ spacing: Float) { + igSameLine(offset_from_start_x, spacing) } -@inlinable public func ImGuiSaveIniSettingsToDisk(_ ini_filename: String? = nil) -> Void { - ini_filename.withOptionalCString { ini_filenamePtr in - return igSaveIniSettingsToDisk(ini_filenamePtr) - } +@inlinable public func ImGuiSaveIniSettingsToDisk(_ ini_filename: String? = nil) { + ini_filename.withOptionalCString { ini_filenamePtr in + igSaveIniSettingsToDisk(ini_filenamePtr) + } } @inlinable public func ImGuiSaveIniSettingsToMemory(_ out_ini_size: UnsafeMutablePointer!) -> String? { - return String(cString: igSaveIniSettingsToMemory(out_ini_size)) + String(cString: igSaveIniSettingsToMemory(out_ini_size)) } -@inlinable public func ImGuiScrollToBringRectIntoView(_ window: UnsafeMutablePointer!, _ rect: ImRect) -> Void { - return igScrollToBringRectIntoView(window,rect) +@inlinable public func ImGuiScrollToBringRectIntoView(_ window: UnsafeMutablePointer!, _ rect: ImRect) { + igScrollToBringRectIntoView(window, rect) } -@inlinable public func ImGuiScrollToItem(_ flags: ImGuiScrollFlags) -> Void { - return igScrollToItem(flags) +@inlinable public func ImGuiScrollToItem(_ flags: ImGuiScrollFlags) { + igScrollToItem(flags) } -@inlinable public func ImGuiScrollToRect(_ window: UnsafeMutablePointer!, _ rect: ImRect, _ flags: ImGuiScrollFlags) -> Void { - return igScrollToRect(window,rect,flags) +@inlinable public func ImGuiScrollToRect(_ window: UnsafeMutablePointer!, _ rect: ImRect, _ flags: ImGuiScrollFlags) { + igScrollToRect(window, rect, flags) } -@inlinable public func ImGuiScrollToRectEx(_ pOut: UnsafeMutablePointer!, _ window: UnsafeMutablePointer!, _ rect: ImRect, _ flags: ImGuiScrollFlags) -> Void { - return igScrollToRectEx(pOut,window,rect,flags) +@inlinable public func ImGuiScrollToRectEx(_ pOut: UnsafeMutablePointer!, _ window: UnsafeMutablePointer!, _ rect: ImRect, _ flags: ImGuiScrollFlags) { + igScrollToRectEx(pOut, window, rect, flags) } -@inlinable public func ImGuiScrollbar(_ axis: ImGuiAxis) -> Void { - return igScrollbar(axis) +@inlinable public func ImGuiScrollbar(_ axis: ImGuiAxis) { + igScrollbar(axis) } @inlinable @discardableResult public func ImGuiScrollbarEx(_ bb: ImRect, _ id: ImGuiID, _ axis: ImGuiAxis, _ p_scroll_v: UnsafeMutablePointer!, _ avail_v: ImS64, _ contents_v: ImS64, _ flags: ImDrawFlags) -> Bool { - return igScrollbarEx(bb,id,axis,p_scroll_v,avail_v,contents_v,flags) + igScrollbarEx(bb, id, axis, p_scroll_v, avail_v, contents_v, flags) } @inlinable @discardableResult public func ImGuiSelectable(_ label: String? = nil, _ selected: Bool, _ flags: ImGuiSelectableFlags, _ size: ImVec2) -> Bool { - label.withOptionalCString { labelPtr in - return igSelectable_Bool(labelPtr,selected,flags,size) - } + label.withOptionalCString { labelPtr in + igSelectable_Bool(labelPtr, selected, flags, size) + } } @inlinable @discardableResult public func ImGuiSelectable(_ label: String? = nil, _ p_selected: UnsafeMutablePointer!, _ flags: ImGuiSelectableFlags, _ size: ImVec2) -> Bool { - label.withOptionalCString { labelPtr in - return igSelectable_BoolPtr(labelPtr,p_selected,flags,size) - } + label.withOptionalCString { labelPtr in + igSelectable_BoolPtr(labelPtr, p_selected, flags, size) + } } -@inlinable public func ImGuiSeparator() -> Void { - return igSeparator() +@inlinable public func ImGuiSeparator() { + igSeparator() } -@inlinable public func ImGuiSeparatorEx(_ flags: ImGuiSeparatorFlags) -> Void { - return igSeparatorEx(flags) +@inlinable public func ImGuiSeparatorEx(_ flags: ImGuiSeparatorFlags) { + igSeparatorEx(flags) } -@inlinable public func ImGuiSetActiveID(_ id: ImGuiID, _ window: UnsafeMutablePointer!) -> Void { - return igSetActiveID(id,window) +@inlinable public func ImGuiSetActiveID(_ id: ImGuiID, _ window: UnsafeMutablePointer!) { + igSetActiveID(id, window) } -@inlinable public func ImGuiSetActiveIdUsingNavAndKeys() -> Void { - return igSetActiveIdUsingNavAndKeys() +@inlinable public func ImGuiSetActiveIdUsingNavAndKeys() { + igSetActiveIdUsingNavAndKeys() } -@inlinable public func ImGuiSetClipboardText(_ text: String? = nil) -> Void { - text.withOptionalCString { textPtr in - return igSetClipboardText(textPtr) - } +@inlinable public func ImGuiSetClipboardText(_ text: String? = nil) { + text.withOptionalCString { textPtr in + igSetClipboardText(textPtr) + } } -@inlinable public func ImGuiSetColorEditOptions(_ flags: ImGuiColorEditFlags) -> Void { - return igSetColorEditOptions(flags) +@inlinable public func ImGuiSetColorEditOptions(_ flags: ImGuiColorEditFlags) { + igSetColorEditOptions(flags) } -@inlinable public func ImGuiSetColumnOffset(_ column_index: Int32, _ offset_x: Float) -> Void { - return igSetColumnOffset(column_index,offset_x) +@inlinable public func ImGuiSetColumnOffset(_ column_index: Int32, _ offset_x: Float) { + igSetColumnOffset(column_index, offset_x) } -@inlinable public func ImGuiSetColumnWidth(_ column_index: Int32, _ width: Float) -> Void { - return igSetColumnWidth(column_index,width) +@inlinable public func ImGuiSetColumnWidth(_ column_index: Int32, _ width: Float) { + igSetColumnWidth(column_index, width) } -@inlinable public func ImGuiSetCurrentContext(_ ctx: UnsafeMutablePointer!) -> Void { - return igSetCurrentContext(ctx) +@inlinable public func ImGuiSetCurrentContext(_ ctx: UnsafeMutablePointer!) { + igSetCurrentContext(ctx) } -@inlinable public func ImGuiSetCurrentFont(_ font: UnsafeMutablePointer!) -> Void { - return igSetCurrentFont(font) +@inlinable public func ImGuiSetCurrentFont(_ font: UnsafeMutablePointer!) { + igSetCurrentFont(font) } -@inlinable public func ImGuiSetCursorPos(_ local_pos: ImVec2) -> Void { - return igSetCursorPos(local_pos) +@inlinable public func ImGuiSetCursorPos(_ local_pos: ImVec2) { + igSetCursorPos(local_pos) } -@inlinable public func ImGuiSetCursorPosX(_ local_x: Float) -> Void { - return igSetCursorPosX(local_x) +@inlinable public func ImGuiSetCursorPosX(_ local_x: Float) { + igSetCursorPosX(local_x) } -@inlinable public func ImGuiSetCursorPosY(_ local_y: Float) -> Void { - return igSetCursorPosY(local_y) +@inlinable public func ImGuiSetCursorPosY(_ local_y: Float) { + igSetCursorPosY(local_y) } -@inlinable public func ImGuiSetCursorScreenPos(_ pos: ImVec2) -> Void { - return igSetCursorScreenPos(pos) +@inlinable public func ImGuiSetCursorScreenPos(_ pos: ImVec2) { + igSetCursorScreenPos(pos) } @inlinable @discardableResult public func ImGuiSetDragDropPayload(_ type: String? = nil, _ data: UnsafeRawPointer!, _ sz: Int, _ cond: ImGuiCond) -> Bool { - type.withOptionalCString { typePtr in - return igSetDragDropPayload(typePtr,data,sz,cond) - } + type.withOptionalCString { typePtr in + igSetDragDropPayload(typePtr, data, sz, cond) + } } -@inlinable public func ImGuiSetFocusID(_ id: ImGuiID, _ window: UnsafeMutablePointer!) -> Void { - return igSetFocusID(id,window) +@inlinable public func ImGuiSetFocusID(_ id: ImGuiID, _ window: UnsafeMutablePointer!) { + igSetFocusID(id, window) } -@inlinable public func ImGuiSetHoveredID(_ id: ImGuiID) -> Void { - return igSetHoveredID(id) +@inlinable public func ImGuiSetHoveredID(_ id: ImGuiID) { + igSetHoveredID(id) } -@inlinable public func ImGuiSetItemAllowOverlap() -> Void { - return igSetItemAllowOverlap() +@inlinable public func ImGuiSetItemAllowOverlap() { + igSetItemAllowOverlap() } -@inlinable public func ImGuiSetItemDefaultFocus() -> Void { - return igSetItemDefaultFocus() +@inlinable public func ImGuiSetItemDefaultFocus() { + igSetItemDefaultFocus() } -@inlinable public func ImGuiSetItemUsingMouseWheel() -> Void { - return igSetItemUsingMouseWheel() +@inlinable public func ImGuiSetItemUsingMouseWheel() { + igSetItemUsingMouseWheel() } -@inlinable public func ImGuiSetKeyboardFocusHere(_ offset: Int32) -> Void { - return igSetKeyboardFocusHere(offset) +@inlinable public func ImGuiSetKeyboardFocusHere(_ offset: Int32) { + igSetKeyboardFocusHere(offset) } -@inlinable public func ImGuiSetLastItemData(_ item_id: ImGuiID, _ in_flags: ImGuiItemFlags, _ status_flags: ImGuiItemStatusFlags, _ item_rect: ImRect) -> Void { - return igSetLastItemData(item_id,in_flags,status_flags,item_rect) +@inlinable public func ImGuiSetLastItemData(_ item_id: ImGuiID, _ in_flags: ImGuiItemFlags, _ status_flags: ImGuiItemStatusFlags, _ item_rect: ImRect) { + igSetLastItemData(item_id, in_flags, status_flags, item_rect) } -@inlinable public func ImGuiSetMouseCursor(_ cursor_type: ImGuiMouseCursor) -> Void { - return igSetMouseCursor(cursor_type) +@inlinable public func ImGuiSetMouseCursor(_ cursor_type: ImGuiMouseCursor) { + igSetMouseCursor(cursor_type) } -@inlinable public func ImGuiSetNavID(_ id: ImGuiID, _ nav_layer: ImGuiNavLayer, _ focus_scope_id: ImGuiID, _ rect_rel: ImRect) -> Void { - return igSetNavID(id,nav_layer,focus_scope_id,rect_rel) +@inlinable public func ImGuiSetNavID(_ id: ImGuiID, _ nav_layer: ImGuiNavLayer, _ focus_scope_id: ImGuiID, _ rect_rel: ImRect) { + igSetNavID(id, nav_layer, focus_scope_id, rect_rel) } -@inlinable public func ImGuiSetNextItemOpen(_ is_open: Bool, _ cond: ImGuiCond) -> Void { - return igSetNextItemOpen(is_open,cond) +@inlinable public func ImGuiSetNextItemOpen(_ is_open: Bool, _ cond: ImGuiCond) { + igSetNextItemOpen(is_open, cond) } -@inlinable public func ImGuiSetNextItemWidth(_ item_width: Float) -> Void { - return igSetNextItemWidth(item_width) +@inlinable public func ImGuiSetNextItemWidth(_ item_width: Float) { + igSetNextItemWidth(item_width) } -@inlinable public func ImGuiSetNextWindowBgAlpha(_ alpha: Float) -> Void { - return igSetNextWindowBgAlpha(alpha) +@inlinable public func ImGuiSetNextWindowBgAlpha(_ alpha: Float) { + igSetNextWindowBgAlpha(alpha) } -@inlinable public func ImGuiSetNextWindowCollapsed(_ collapsed: Bool, _ cond: ImGuiCond) -> Void { - return igSetNextWindowCollapsed(collapsed,cond) +@inlinable public func ImGuiSetNextWindowCollapsed(_ collapsed: Bool, _ cond: ImGuiCond) { + igSetNextWindowCollapsed(collapsed, cond) } -@inlinable public func ImGuiSetNextWindowContentSize(_ size: ImVec2) -> Void { - return igSetNextWindowContentSize(size) +@inlinable public func ImGuiSetNextWindowContentSize(_ size: ImVec2) { + igSetNextWindowContentSize(size) } -@inlinable public func ImGuiSetNextWindowFocus() -> Void { - return igSetNextWindowFocus() +@inlinable public func ImGuiSetNextWindowFocus() { + igSetNextWindowFocus() } -@inlinable public func ImGuiSetNextWindowPos(_ pos: ImVec2, _ cond: ImGuiCond, _ pivot: ImVec2) -> Void { - return igSetNextWindowPos(pos,cond,pivot) +@inlinable public func ImGuiSetNextWindowPos(_ pos: ImVec2, _ cond: ImGuiCond, _ pivot: ImVec2) { + igSetNextWindowPos(pos, cond, pivot) } -@inlinable public func ImGuiSetNextWindowScroll(_ scroll: ImVec2) -> Void { - return igSetNextWindowScroll(scroll) +@inlinable public func ImGuiSetNextWindowScroll(_ scroll: ImVec2) { + igSetNextWindowScroll(scroll) } -@inlinable public func ImGuiSetNextWindowSize(_ size: ImVec2, _ cond: ImGuiCond) -> Void { - return igSetNextWindowSize(size,cond) +@inlinable public func ImGuiSetNextWindowSize(_ size: ImVec2, _ cond: ImGuiCond) { + igSetNextWindowSize(size, cond) } -@inlinable public func ImGuiSetNextWindowSizeConstraints(_ size_min: ImVec2, _ size_max: ImVec2, _ custom_callback: @escaping ImGuiSizeCallback, _ custom_callback_data: UnsafeMutableRawPointer!) -> Void { - return igSetNextWindowSizeConstraints(size_min,size_max,custom_callback,custom_callback_data) +@inlinable public func ImGuiSetNextWindowSizeConstraints(_ size_min: ImVec2, _ size_max: ImVec2, _ custom_callback: @escaping ImGuiSizeCallback, _ custom_callback_data: UnsafeMutableRawPointer!) { + igSetNextWindowSizeConstraints(size_min, size_max, custom_callback, custom_callback_data) } -@inlinable public func ImGuiSetScrollFromPosX(_ local_x: Float, _ center_x_ratio: Float) -> Void { - return igSetScrollFromPosX_Float(local_x,center_x_ratio) +@inlinable public func ImGuiSetScrollFromPosX(_ local_x: Float, _ center_x_ratio: Float) { + igSetScrollFromPosX_Float(local_x, center_x_ratio) } -@inlinable public func ImGuiSetScrollFromPosX(_ window: UnsafeMutablePointer!, _ local_x: Float, _ center_x_ratio: Float) -> Void { - return igSetScrollFromPosX_WindowPtr(window,local_x,center_x_ratio) +@inlinable public func ImGuiSetScrollFromPosX(_ window: UnsafeMutablePointer!, _ local_x: Float, _ center_x_ratio: Float) { + igSetScrollFromPosX_WindowPtr(window, local_x, center_x_ratio) } -@inlinable public func ImGuiSetScrollFromPosY(_ local_y: Float, _ center_y_ratio: Float) -> Void { - return igSetScrollFromPosY_Float(local_y,center_y_ratio) +@inlinable public func ImGuiSetScrollFromPosY(_ local_y: Float, _ center_y_ratio: Float) { + igSetScrollFromPosY_Float(local_y, center_y_ratio) } -@inlinable public func ImGuiSetScrollFromPosY(_ window: UnsafeMutablePointer!, _ local_y: Float, _ center_y_ratio: Float) -> Void { - return igSetScrollFromPosY_WindowPtr(window,local_y,center_y_ratio) +@inlinable public func ImGuiSetScrollFromPosY(_ window: UnsafeMutablePointer!, _ local_y: Float, _ center_y_ratio: Float) { + igSetScrollFromPosY_WindowPtr(window, local_y, center_y_ratio) } -@inlinable public func ImGuiSetScrollHereX(_ center_x_ratio: Float) -> Void { - return igSetScrollHereX(center_x_ratio) +@inlinable public func ImGuiSetScrollHereX(_ center_x_ratio: Float) { + igSetScrollHereX(center_x_ratio) } -@inlinable public func ImGuiSetScrollHereY(_ center_y_ratio: Float) -> Void { - return igSetScrollHereY(center_y_ratio) +@inlinable public func ImGuiSetScrollHereY(_ center_y_ratio: Float) { + igSetScrollHereY(center_y_ratio) } -@inlinable public func ImGuiSetScrollX(_ scroll_x: Float) -> Void { - return igSetScrollX_Float(scroll_x) +@inlinable public func ImGuiSetScrollX(_ scroll_x: Float) { + igSetScrollX_Float(scroll_x) } -@inlinable public func ImGuiSetScrollX(_ window: UnsafeMutablePointer!, _ scroll_x: Float) -> Void { - return igSetScrollX_WindowPtr(window,scroll_x) +@inlinable public func ImGuiSetScrollX(_ window: UnsafeMutablePointer!, _ scroll_x: Float) { + igSetScrollX_WindowPtr(window, scroll_x) } -@inlinable public func ImGuiSetScrollY(_ scroll_y: Float) -> Void { - return igSetScrollY_Float(scroll_y) +@inlinable public func ImGuiSetScrollY(_ scroll_y: Float) { + igSetScrollY_Float(scroll_y) } -@inlinable public func ImGuiSetScrollY(_ window: UnsafeMutablePointer!, _ scroll_y: Float) -> Void { - return igSetScrollY_WindowPtr(window,scroll_y) +@inlinable public func ImGuiSetScrollY(_ window: UnsafeMutablePointer!, _ scroll_y: Float) { + igSetScrollY_WindowPtr(window, scroll_y) } -@inlinable public func ImGuiSetStateStorage(_ storage: UnsafeMutablePointer!) -> Void { - return igSetStateStorage(storage) +@inlinable public func ImGuiSetStateStorage(_ storage: UnsafeMutablePointer!) { + igSetStateStorage(storage) } -@inlinable public func ImGuiSetTabItemClosed(_ tab_or_docked_window_label: String? = nil) -> Void { - tab_or_docked_window_label.withOptionalCString { tab_or_docked_window_labelPtr in - return igSetTabItemClosed(tab_or_docked_window_labelPtr) - } +@inlinable public func ImGuiSetTabItemClosed(_ tab_or_docked_window_label: String? = nil) { + tab_or_docked_window_label.withOptionalCString { tab_or_docked_window_labelPtr in + igSetTabItemClosed(tab_or_docked_window_labelPtr) + } } -@inlinable public func ImGuiSetTooltipV(_ fmt: String? = nil, _ args: CVarArg...) -> Void { - fmt.withOptionalCString { fmtPtr in - withVaList(args) { varArgsPtr in - return igSetTooltipV(fmtPtr,varArgsPtr) - } - } +@inlinable public func ImGuiSetTooltipV(_ fmt: String? = nil, _ args: CVarArg...) { + fmt.withOptionalCString { fmtPtr in + withVaList(args) { varArgsPtr in + igSetTooltipV(fmtPtr, varArgsPtr) + } + } } -@inlinable public func ImGuiSetWindowClipRectBeforeSetChannel(_ window: UnsafeMutablePointer!, _ clip_rect: ImRect) -> Void { - return igSetWindowClipRectBeforeSetChannel(window,clip_rect) +@inlinable public func ImGuiSetWindowClipRectBeforeSetChannel(_ window: UnsafeMutablePointer!, _ clip_rect: ImRect) { + igSetWindowClipRectBeforeSetChannel(window, clip_rect) } -@inlinable public func ImGuiSetWindowCollapsed(_ collapsed: Bool, _ cond: ImGuiCond) -> Void { - return igSetWindowCollapsed_Bool(collapsed,cond) +@inlinable public func ImGuiSetWindowCollapsed(_ collapsed: Bool, _ cond: ImGuiCond) { + igSetWindowCollapsed_Bool(collapsed, cond) } -@inlinable public func ImGuiSetWindowCollapsed(_ name: String? = nil, _ collapsed: Bool, _ cond: ImGuiCond) -> Void { - name.withOptionalCString { namePtr in - return igSetWindowCollapsed_Str(namePtr,collapsed,cond) - } +@inlinable public func ImGuiSetWindowCollapsed(_ name: String? = nil, _ collapsed: Bool, _ cond: ImGuiCond) { + name.withOptionalCString { namePtr in + igSetWindowCollapsed_Str(namePtr, collapsed, cond) + } } -@inlinable public func ImGuiSetWindowCollapsed(_ window: UnsafeMutablePointer!, _ collapsed: Bool, _ cond: ImGuiCond) -> Void { - return igSetWindowCollapsed_WindowPtr(window,collapsed,cond) +@inlinable public func ImGuiSetWindowCollapsed(_ window: UnsafeMutablePointer!, _ collapsed: Bool, _ cond: ImGuiCond) { + igSetWindowCollapsed_WindowPtr(window, collapsed, cond) } -@inlinable public func ImGuiSetWindowFocus() -> Void { - return igSetWindowFocus_Nil() +@inlinable public func ImGuiSetWindowFocus() { + igSetWindowFocus_Nil() } -@inlinable public func ImGuiSetWindowFocus(_ name: String? = nil) -> Void { - name.withOptionalCString { namePtr in - return igSetWindowFocus_Str(namePtr) - } +@inlinable public func ImGuiSetWindowFocus(_ name: String? = nil) { + name.withOptionalCString { namePtr in + igSetWindowFocus_Str(namePtr) + } } -@inlinable public func ImGuiSetWindowFontScale(_ scale: Float) -> Void { - return igSetWindowFontScale(scale) +@inlinable public func ImGuiSetWindowFontScale(_ scale: Float) { + igSetWindowFontScale(scale) } -@inlinable public func ImGuiSetWindowHitTestHole(_ window: UnsafeMutablePointer!, _ pos: ImVec2, _ size: ImVec2) -> Void { - return igSetWindowHitTestHole(window,pos,size) +@inlinable public func ImGuiSetWindowHitTestHole(_ window: UnsafeMutablePointer!, _ pos: ImVec2, _ size: ImVec2) { + igSetWindowHitTestHole(window, pos, size) } -@inlinable public func ImGuiSetWindowPos(_ pos: ImVec2, _ cond: ImGuiCond) -> Void { - return igSetWindowPos_Vec2(pos,cond) +@inlinable public func ImGuiSetWindowPos(_ pos: ImVec2, _ cond: ImGuiCond) { + igSetWindowPos_Vec2(pos, cond) } -@inlinable public func ImGuiSetWindowPos(_ name: String? = nil, _ pos: ImVec2, _ cond: ImGuiCond) -> Void { - name.withOptionalCString { namePtr in - return igSetWindowPos_Str(namePtr,pos,cond) - } +@inlinable public func ImGuiSetWindowPos(_ name: String? = nil, _ pos: ImVec2, _ cond: ImGuiCond) { + name.withOptionalCString { namePtr in + igSetWindowPos_Str(namePtr, pos, cond) + } } -@inlinable public func ImGuiSetWindowPos(_ window: UnsafeMutablePointer!, _ pos: ImVec2, _ cond: ImGuiCond) -> Void { - return igSetWindowPos_WindowPtr(window,pos,cond) +@inlinable public func ImGuiSetWindowPos(_ window: UnsafeMutablePointer!, _ pos: ImVec2, _ cond: ImGuiCond) { + igSetWindowPos_WindowPtr(window, pos, cond) } -@inlinable public func ImGuiSetWindowSize(_ size: ImVec2, _ cond: ImGuiCond) -> Void { - return igSetWindowSize_Vec2(size,cond) +@inlinable public func ImGuiSetWindowSize(_ size: ImVec2, _ cond: ImGuiCond) { + igSetWindowSize_Vec2(size, cond) } -@inlinable public func ImGuiSetWindowSize(_ name: String? = nil, _ size: ImVec2, _ cond: ImGuiCond) -> Void { - name.withOptionalCString { namePtr in - return igSetWindowSize_Str(namePtr,size,cond) - } +@inlinable public func ImGuiSetWindowSize(_ name: String? = nil, _ size: ImVec2, _ cond: ImGuiCond) { + name.withOptionalCString { namePtr in + igSetWindowSize_Str(namePtr, size, cond) + } } -@inlinable public func ImGuiSetWindowSize(_ window: UnsafeMutablePointer!, _ size: ImVec2, _ cond: ImGuiCond) -> Void { - return igSetWindowSize_WindowPtr(window,size,cond) +@inlinable public func ImGuiSetWindowSize(_ window: UnsafeMutablePointer!, _ size: ImVec2, _ cond: ImGuiCond) { + igSetWindowSize_WindowPtr(window, size, cond) } -@inlinable public func ImGuiShadeVertsLinearColorGradientKeepAlpha(_ draw_list: UnsafeMutablePointer!, _ vert_start_idx: Int32, _ vert_end_idx: Int32, _ gradient_p0: ImVec2, _ gradient_p1: ImVec2, _ col0: ImU32, _ col1: ImU32) -> Void { - return igShadeVertsLinearColorGradientKeepAlpha(draw_list,vert_start_idx,vert_end_idx,gradient_p0,gradient_p1,col0,col1) +@inlinable public func ImGuiShadeVertsLinearColorGradientKeepAlpha(_ draw_list: UnsafeMutablePointer!, _ vert_start_idx: Int32, _ vert_end_idx: Int32, _ gradient_p0: ImVec2, _ gradient_p1: ImVec2, _ col0: ImU32, _ col1: ImU32) { + igShadeVertsLinearColorGradientKeepAlpha(draw_list, vert_start_idx, vert_end_idx, gradient_p0, gradient_p1, col0, col1) } -@inlinable public func ImGuiShadeVertsLinearUV(_ draw_list: UnsafeMutablePointer!, _ vert_start_idx: Int32, _ vert_end_idx: Int32, _ a: ImVec2, _ b: ImVec2, _ uv_a: ImVec2, _ uv_b: ImVec2, _ clamp: Bool) -> Void { - return igShadeVertsLinearUV(draw_list,vert_start_idx,vert_end_idx,a,b,uv_a,uv_b,clamp) +@inlinable public func ImGuiShadeVertsLinearUV(_ draw_list: UnsafeMutablePointer!, _ vert_start_idx: Int32, _ vert_end_idx: Int32, _ a: ImVec2, _ b: ImVec2, _ uv_a: ImVec2, _ uv_b: ImVec2, _ clamp: Bool) { + igShadeVertsLinearUV(draw_list, vert_start_idx, vert_end_idx, a, b, uv_a, uv_b, clamp) } -@inlinable public func ImGuiShowAboutWindow(_ p_open: UnsafeMutablePointer!) -> Void { - return igShowAboutWindow(p_open) +@inlinable public func ImGuiShowAboutWindow(_ p_open: UnsafeMutablePointer!) { + igShowAboutWindow(p_open) } -@inlinable public func ImGuiShowDemoWindow(_ p_open: UnsafeMutablePointer!) -> Void { - return igShowDemoWindow(p_open) +@inlinable public func ImGuiShowDemoWindow(_ p_open: UnsafeMutablePointer!) { + igShowDemoWindow(p_open) } -@inlinable public func ImGuiShowFontAtlas(_ atlas: UnsafeMutablePointer!) -> Void { - return igShowFontAtlas(atlas) +@inlinable public func ImGuiShowFontAtlas(_ atlas: UnsafeMutablePointer!) { + igShowFontAtlas(atlas) } -@inlinable public func ImGuiShowFontSelector(_ label: String? = nil) -> Void { - label.withOptionalCString { labelPtr in - return igShowFontSelector(labelPtr) - } +@inlinable public func ImGuiShowFontSelector(_ label: String? = nil) { + label.withOptionalCString { labelPtr in + igShowFontSelector(labelPtr) + } } -@inlinable public func ImGuiShowMetricsWindow(_ p_open: UnsafeMutablePointer!) -> Void { - return igShowMetricsWindow(p_open) +@inlinable public func ImGuiShowMetricsWindow(_ p_open: UnsafeMutablePointer!) { + igShowMetricsWindow(p_open) } -@inlinable public func ImGuiShowStackToolWindow(_ p_open: UnsafeMutablePointer!) -> Void { - return igShowStackToolWindow(p_open) +@inlinable public func ImGuiShowStackToolWindow(_ p_open: UnsafeMutablePointer!) { + igShowStackToolWindow(p_open) } -@inlinable public func ImGuiShowStyleEditor(_ ref: UnsafeMutablePointer!) -> Void { - return igShowStyleEditor(ref) +@inlinable public func ImGuiShowStyleEditor(_ ref: UnsafeMutablePointer!) { + igShowStyleEditor(ref) } @inlinable @discardableResult public func ImGuiShowStyleSelector(_ label: String? = nil) -> Bool { - label.withOptionalCString { labelPtr in - return igShowStyleSelector(labelPtr) - } + label.withOptionalCString { labelPtr in + igShowStyleSelector(labelPtr) + } } -@inlinable public func ImGuiShowUserGuide() -> Void { - return igShowUserGuide() +@inlinable public func ImGuiShowUserGuide() { + igShowUserGuide() } -@inlinable public func ImGuiShrinkWidths(_ items: UnsafeMutablePointer!, _ count: Int32, _ width_excess: Float) -> Void { - return igShrinkWidths(items,count,width_excess) +@inlinable public func ImGuiShrinkWidths(_ items: UnsafeMutablePointer!, _ count: Int32, _ width_excess: Float) { + igShrinkWidths(items, count, width_excess) } -@inlinable public func ImGuiShutdown(_ context: UnsafeMutablePointer!) -> Void { - return igShutdown(context) +@inlinable public func ImGuiShutdown(_ context: UnsafeMutablePointer!) { + igShutdown(context) } @inlinable @discardableResult public func ImGuiSliderAngle(_ label: String? = nil, _ v_rad: UnsafeMutablePointer!, _ v_degrees_min: Float, _ v_degrees_max: Float, _ format: String? = nil, _ flags: ImGuiSliderFlags) -> Bool { - label.withOptionalCString { labelPtr in - format.withOptionalCString { formatPtr in - return igSliderAngle(labelPtr,v_rad,v_degrees_min,v_degrees_max,formatPtr,flags) - } - } + label.withOptionalCString { labelPtr in + format.withOptionalCString { formatPtr in + igSliderAngle(labelPtr, v_rad, v_degrees_min, v_degrees_max, formatPtr, flags) + } + } } @inlinable @discardableResult public func ImGuiSliderBehavior(_ bb: ImRect, _ id: ImGuiID, _ data_type: ImGuiDataType, _ p_v: UnsafeMutableRawPointer!, _ p_min: UnsafeRawPointer!, _ p_max: UnsafeRawPointer!, _ format: String? = nil, _ flags: ImGuiSliderFlags, _ out_grab_bb: UnsafeMutablePointer!) -> Bool { - format.withOptionalCString { formatPtr in - return igSliderBehavior(bb,id,data_type,p_v,p_min,p_max,formatPtr,flags,out_grab_bb) - } + format.withOptionalCString { formatPtr in + igSliderBehavior(bb, id, data_type, p_v, p_min, p_max, formatPtr, flags, out_grab_bb) + } } @inlinable @discardableResult public func ImGuiSliderFloat(_ label: String? = nil, _ v: UnsafeMutablePointer!, _ v_min: Float, _ v_max: Float, _ format: String? = nil, _ flags: ImGuiSliderFlags) -> Bool { - label.withOptionalCString { labelPtr in - format.withOptionalCString { formatPtr in - return igSliderFloat(labelPtr,v,v_min,v_max,formatPtr,flags) - } - } + label.withOptionalCString { labelPtr in + format.withOptionalCString { formatPtr in + igSliderFloat(labelPtr, v, v_min, v_max, formatPtr, flags) + } + } } @inlinable @discardableResult public func ImGuiSliderFloat2(_ label: String? = nil, _ v: inout SIMD2, _ v_min: Float, _ v_max: Float, _ format: String? = nil, _ flags: ImGuiSliderFlags) -> Bool { - label.withOptionalCString { labelPtr in - withUnsafeMutablePointer(to: &v) { vMutPtr in - vMutPtr.withMemoryRebound(to: Float.self, capacity: 2) { vPtr in - format.withOptionalCString { formatPtr in - return igSliderFloat2(labelPtr,vPtr,v_min,v_max,formatPtr,flags) - } - } - } - } + label.withOptionalCString { labelPtr in + withUnsafeMutablePointer(to: &v) { vMutPtr in + vMutPtr.withMemoryRebound(to: Float.self, capacity: 2) { vPtr in + format.withOptionalCString { formatPtr in + igSliderFloat2(labelPtr, vPtr, v_min, v_max, formatPtr, flags) + } + } + } + } } @inlinable @discardableResult public func ImGuiSliderFloat3(_ label: String? = nil, _ v: inout SIMD3, _ v_min: Float, _ v_max: Float, _ format: String? = nil, _ flags: ImGuiSliderFlags) -> Bool { - label.withOptionalCString { labelPtr in - withUnsafeMutablePointer(to: &v) { vMutPtr in - vMutPtr.withMemoryRebound(to: Float.self, capacity: 3) { vPtr in - format.withOptionalCString { formatPtr in - return igSliderFloat3(labelPtr,vPtr,v_min,v_max,formatPtr,flags) - } - } - } - } + label.withOptionalCString { labelPtr in + withUnsafeMutablePointer(to: &v) { vMutPtr in + vMutPtr.withMemoryRebound(to: Float.self, capacity: 3) { vPtr in + format.withOptionalCString { formatPtr in + igSliderFloat3(labelPtr, vPtr, v_min, v_max, formatPtr, flags) + } + } + } + } } @inlinable @discardableResult public func ImGuiSliderFloat4(_ label: String? = nil, _ v: inout SIMD4, _ v_min: Float, _ v_max: Float, _ format: String? = nil, _ flags: ImGuiSliderFlags) -> Bool { - label.withOptionalCString { labelPtr in - withUnsafeMutablePointer(to: &v) { vMutPtr in - vMutPtr.withMemoryRebound(to: Float.self, capacity: 4) { vPtr in - format.withOptionalCString { formatPtr in - return igSliderFloat4(labelPtr,vPtr,v_min,v_max,formatPtr,flags) - } - } - } - } + label.withOptionalCString { labelPtr in + withUnsafeMutablePointer(to: &v) { vMutPtr in + vMutPtr.withMemoryRebound(to: Float.self, capacity: 4) { vPtr in + format.withOptionalCString { formatPtr in + igSliderFloat4(labelPtr, vPtr, v_min, v_max, formatPtr, flags) + } + } + } + } } @inlinable @discardableResult public func ImGuiSliderInt(_ label: String? = nil, _ v: UnsafeMutablePointer!, _ v_min: Int32, _ v_max: Int32, _ format: String? = nil, _ flags: ImGuiSliderFlags) -> Bool { - label.withOptionalCString { labelPtr in - format.withOptionalCString { formatPtr in - return igSliderInt(labelPtr,v,v_min,v_max,formatPtr,flags) - } - } + label.withOptionalCString { labelPtr in + format.withOptionalCString { formatPtr in + igSliderInt(labelPtr, v, v_min, v_max, formatPtr, flags) + } + } } @inlinable @discardableResult public func ImGuiSliderInt2(_ label: String? = nil, _ v: inout SIMD2, _ v_min: Int32, _ v_max: Int32, _ format: String? = nil, _ flags: ImGuiSliderFlags) -> Bool { - label.withOptionalCString { labelPtr in - withUnsafeMutablePointer(to: &v) { vMutPtr in - vMutPtr.withMemoryRebound(to: Int32.self, capacity: 2) { vPtr in - format.withOptionalCString { formatPtr in - return igSliderInt2(labelPtr,vPtr,v_min,v_max,formatPtr,flags) - } - } - } - } + label.withOptionalCString { labelPtr in + withUnsafeMutablePointer(to: &v) { vMutPtr in + vMutPtr.withMemoryRebound(to: Int32.self, capacity: 2) { vPtr in + format.withOptionalCString { formatPtr in + igSliderInt2(labelPtr, vPtr, v_min, v_max, formatPtr, flags) + } + } + } + } } @inlinable @discardableResult public func ImGuiSliderInt3(_ label: String? = nil, _ v: inout SIMD3, _ v_min: Int32, _ v_max: Int32, _ format: String? = nil, _ flags: ImGuiSliderFlags) -> Bool { - label.withOptionalCString { labelPtr in - withUnsafeMutablePointer(to: &v) { vMutPtr in - vMutPtr.withMemoryRebound(to: Int32.self, capacity: 3) { vPtr in - format.withOptionalCString { formatPtr in - return igSliderInt3(labelPtr,vPtr,v_min,v_max,formatPtr,flags) - } - } - } - } + label.withOptionalCString { labelPtr in + withUnsafeMutablePointer(to: &v) { vMutPtr in + vMutPtr.withMemoryRebound(to: Int32.self, capacity: 3) { vPtr in + format.withOptionalCString { formatPtr in + igSliderInt3(labelPtr, vPtr, v_min, v_max, formatPtr, flags) + } + } + } + } } @inlinable @discardableResult public func ImGuiSliderInt4(_ label: String? = nil, _ v: inout SIMD4, _ v_min: Int32, _ v_max: Int32, _ format: String? = nil, _ flags: ImGuiSliderFlags) -> Bool { - label.withOptionalCString { labelPtr in - withUnsafeMutablePointer(to: &v) { vMutPtr in - vMutPtr.withMemoryRebound(to: Int32.self, capacity: 4) { vPtr in - format.withOptionalCString { formatPtr in - return igSliderInt4(labelPtr,vPtr,v_min,v_max,formatPtr,flags) - } - } - } - } + label.withOptionalCString { labelPtr in + withUnsafeMutablePointer(to: &v) { vMutPtr in + vMutPtr.withMemoryRebound(to: Int32.self, capacity: 4) { vPtr in + format.withOptionalCString { formatPtr in + igSliderInt4(labelPtr, vPtr, v_min, v_max, formatPtr, flags) + } + } + } + } } @inlinable @discardableResult public func ImGuiSliderScalar(_ label: String? = nil, _ data_type: ImGuiDataType, _ p_data: UnsafeMutableRawPointer!, _ p_min: UnsafeRawPointer!, _ p_max: UnsafeRawPointer!, _ format: String? = nil, _ flags: ImGuiSliderFlags) -> Bool { - label.withOptionalCString { labelPtr in - format.withOptionalCString { formatPtr in - return igSliderScalar(labelPtr,data_type,p_data,p_min,p_max,formatPtr,flags) - } - } + label.withOptionalCString { labelPtr in + format.withOptionalCString { formatPtr in + igSliderScalar(labelPtr, data_type, p_data, p_min, p_max, formatPtr, flags) + } + } } @inlinable @discardableResult public func ImGuiSliderScalarN(_ label: String? = nil, _ data_type: ImGuiDataType, _ p_data: UnsafeMutableRawPointer!, _ components: Int32, _ p_min: UnsafeRawPointer!, _ p_max: UnsafeRawPointer!, _ format: String? = nil, _ flags: ImGuiSliderFlags) -> Bool { - label.withOptionalCString { labelPtr in - format.withOptionalCString { formatPtr in - return igSliderScalarN(labelPtr,data_type,p_data,components,p_min,p_max,formatPtr,flags) - } - } + label.withOptionalCString { labelPtr in + format.withOptionalCString { formatPtr in + igSliderScalarN(labelPtr, data_type, p_data, components, p_min, p_max, formatPtr, flags) + } + } } @inlinable @discardableResult public func ImGuiSmallButton(_ label: String? = nil) -> Bool { - label.withOptionalCString { labelPtr in - return igSmallButton(labelPtr) - } + label.withOptionalCString { labelPtr in + igSmallButton(labelPtr) + } } -@inlinable public func ImGuiSpacing() -> Void { - return igSpacing() +@inlinable public func ImGuiSpacing() { + igSpacing() } @inlinable @discardableResult public func ImGuiSplitterBehavior(_ bb: ImRect, _ id: ImGuiID, _ axis: ImGuiAxis, _ size1: UnsafeMutablePointer!, _ size2: UnsafeMutablePointer!, _ min_size1: Float, _ min_size2: Float, _ hover_extend: Float, _ hover_visibility_delay: Float) -> Bool { - return igSplitterBehavior(bb,id,axis,size1,size2,min_size1,min_size2,hover_extend,hover_visibility_delay) + igSplitterBehavior(bb, id, axis, size1, size2, min_size1, min_size2, hover_extend, hover_visibility_delay) } -@inlinable public func ImGuiStackSizesCompareWithCurrentState(_ this: UnsafeMutablePointer!) -> Void { - return ImGuiStackSizes_CompareWithCurrentState(this) +@inlinable public func ImGuiStackSizesCompareWithCurrentState(_ this: UnsafeMutablePointer!) { + ImGuiStackSizes_CompareWithCurrentState(this) } -@inlinable public func ImGuiStackSizesSetToCurrentState(_ this: UnsafeMutablePointer!) -> Void { - return ImGuiStackSizes_SetToCurrentState(this) +@inlinable public func ImGuiStackSizesSetToCurrentState(_ this: UnsafeMutablePointer!) { + ImGuiStackSizes_SetToCurrentState(this) } -@inlinable public func ImGuiStartMouseMovingWindow(_ window: UnsafeMutablePointer!) -> Void { - return igStartMouseMovingWindow(window) +@inlinable public func ImGuiStartMouseMovingWindow(_ window: UnsafeMutablePointer!) { + igStartMouseMovingWindow(window) } -@inlinable public func ImGuiStorageBuildSortByKey(_ this: UnsafeMutablePointer!) -> Void { - return ImGuiStorage_BuildSortByKey(this) +@inlinable public func ImGuiStorageBuildSortByKey(_ this: UnsafeMutablePointer!) { + ImGuiStorage_BuildSortByKey(this) } -@inlinable public func ImGuiStorageClear(_ this: UnsafeMutablePointer!) -> Void { - return ImGuiStorage_Clear(this) +@inlinable public func ImGuiStorageClear(_ this: UnsafeMutablePointer!) { + ImGuiStorage_Clear(this) } @inlinable @discardableResult public func ImGuiStorageGetBool(_ this: UnsafeMutablePointer!, _ key: ImGuiID, _ default_val: Bool) -> Bool { - return ImGuiStorage_GetBool(this,key,default_val) + ImGuiStorage_GetBool(this, key, default_val) } @inlinable @discardableResult public func ImGuiStorageGetBoolRef(_ this: UnsafeMutablePointer!, _ key: ImGuiID, _ default_val: Bool) -> UnsafeMutablePointer! { - return ImGuiStorage_GetBoolRef(this,key,default_val) + ImGuiStorage_GetBoolRef(this, key, default_val) } @inlinable public func ImGuiStorageGetFloat(_ this: UnsafeMutablePointer!, _ key: ImGuiID, _ default_val: Float) -> Float { - return ImGuiStorage_GetFloat(this,key,default_val) + ImGuiStorage_GetFloat(this, key, default_val) } @inlinable public func ImGuiStorageGetFloatRef(_ this: UnsafeMutablePointer!, _ key: ImGuiID, _ default_val: Float) -> UnsafeMutablePointer! { - return ImGuiStorage_GetFloatRef(this,key,default_val) + ImGuiStorage_GetFloatRef(this, key, default_val) } @inlinable public func ImGuiStorageGetInt(_ this: UnsafeMutablePointer!, _ key: ImGuiID, _ default_val: Int32) -> Int32 { - return ImGuiStorage_GetInt(this,key,default_val) + ImGuiStorage_GetInt(this, key, default_val) } @inlinable public func ImGuiStorageGetIntRef(_ this: UnsafeMutablePointer!, _ key: ImGuiID, _ default_val: Int32) -> UnsafeMutablePointer! { - return ImGuiStorage_GetIntRef(this,key,default_val) + ImGuiStorage_GetIntRef(this, key, default_val) } @inlinable public func ImGuiStorageGetVoidPtr(_ this: UnsafeMutablePointer!, _ key: ImGuiID) -> UnsafeMutableRawPointer! { - return ImGuiStorage_GetVoidPtr(this,key) + ImGuiStorage_GetVoidPtr(this, key) } -@inlinable public func ImGuiStorageSetAllInt(_ this: UnsafeMutablePointer!, _ val: Int32) -> Void { - return ImGuiStorage_SetAllInt(this,val) +@inlinable public func ImGuiStorageSetAllInt(_ this: UnsafeMutablePointer!, _ val: Int32) { + ImGuiStorage_SetAllInt(this, val) } -@inlinable public func ImGuiStorageSetBool(_ this: UnsafeMutablePointer!, _ key: ImGuiID, _ val: Bool) -> Void { - return ImGuiStorage_SetBool(this,key,val) +@inlinable public func ImGuiStorageSetBool(_ this: UnsafeMutablePointer!, _ key: ImGuiID, _ val: Bool) { + ImGuiStorage_SetBool(this, key, val) } -@inlinable public func ImGuiStorageSetFloat(_ this: UnsafeMutablePointer!, _ key: ImGuiID, _ val: Float) -> Void { - return ImGuiStorage_SetFloat(this,key,val) +@inlinable public func ImGuiStorageSetFloat(_ this: UnsafeMutablePointer!, _ key: ImGuiID, _ val: Float) { + ImGuiStorage_SetFloat(this, key, val) } -@inlinable public func ImGuiStorageSetInt(_ this: UnsafeMutablePointer!, _ key: ImGuiID, _ val: Int32) -> Void { - return ImGuiStorage_SetInt(this,key,val) +@inlinable public func ImGuiStorageSetInt(_ this: UnsafeMutablePointer!, _ key: ImGuiID, _ val: Int32) { + ImGuiStorage_SetInt(this, key, val) } -@inlinable public func ImGuiStorageSetVoidPtr(_ this: UnsafeMutablePointer!, _ key: ImGuiID, _ val: UnsafeMutableRawPointer!) -> Void { - return ImGuiStorage_SetVoidPtr(this,key,val) +@inlinable public func ImGuiStorageSetVoidPtr(_ this: UnsafeMutablePointer!, _ key: ImGuiID, _ val: UnsafeMutableRawPointer!) { + ImGuiStorage_SetVoidPtr(this, key, val) } -@inlinable public func ImGuiStyleColorsClassic(_ dst: UnsafeMutablePointer!) -> Void { - return igStyleColorsClassic(dst) +@inlinable public func ImGuiStyleColorsClassic(_ dst: UnsafeMutablePointer!) { + igStyleColorsClassic(dst) } -@inlinable public func ImGuiStyleColorsDark(_ dst: UnsafeMutablePointer!) -> Void { - return igStyleColorsDark(dst) +@inlinable public func ImGuiStyleColorsDark(_ dst: UnsafeMutablePointer!) { + igStyleColorsDark(dst) } -@inlinable public func ImGuiStyleColorsLight(_ dst: UnsafeMutablePointer!) -> Void { - return igStyleColorsLight(dst) +@inlinable public func ImGuiStyleColorsLight(_ dst: UnsafeMutablePointer!) { + igStyleColorsLight(dst) } -@inlinable public func ImGuiStyleScaleAllSizes(_ this: UnsafeMutablePointer!, _ scale_factor: Float) -> Void { - return ImGuiStyle_ScaleAllSizes(this,scale_factor) +@inlinable public func ImGuiStyleScaleAllSizes(_ this: UnsafeMutablePointer!, _ scale_factor: Float) { + ImGuiStyle_ScaleAllSizes(this, scale_factor) } -@inlinable public func ImGuiTabBarCloseTab(_ tab_bar: UnsafeMutablePointer!, _ tab: UnsafeMutablePointer!) -> Void { - return igTabBarCloseTab(tab_bar,tab) +@inlinable public func ImGuiTabBarCloseTab(_ tab_bar: UnsafeMutablePointer!, _ tab: UnsafeMutablePointer!) { + igTabBarCloseTab(tab_bar, tab) } @inlinable public func ImGuiTabBarFindTabByID(_ tab_bar: UnsafeMutablePointer!, _ tab_id: ImGuiID) -> UnsafeMutablePointer! { - return igTabBarFindTabByID(tab_bar,tab_id) + igTabBarFindTabByID(tab_bar, tab_id) } @inlinable public func ImGuiTabBarGetTabName(_ this: UnsafeMutablePointer!, _ tab: UnsafePointer!) -> String? { - return String(cString: ImGuiTabBar_GetTabName(this,tab)) + String(cString: ImGuiTabBar_GetTabName(this, tab)) } @inlinable public func ImGuiTabBarGetTabOrder(_ this: UnsafeMutablePointer!, _ tab: UnsafePointer!) -> Int32 { - return ImGuiTabBar_GetTabOrder(this,tab) + ImGuiTabBar_GetTabOrder(this, tab) } @inlinable @discardableResult public func ImGuiTabBarProcessReorder(_ tab_bar: UnsafeMutablePointer!) -> Bool { - return igTabBarProcessReorder(tab_bar) + igTabBarProcessReorder(tab_bar) } -@inlinable public func ImGuiTabBarQueueReorder(_ tab_bar: UnsafeMutablePointer!, _ tab: UnsafePointer!, _ offset: Int32) -> Void { - return igTabBarQueueReorder(tab_bar,tab,offset) +@inlinable public func ImGuiTabBarQueueReorder(_ tab_bar: UnsafeMutablePointer!, _ tab: UnsafePointer!, _ offset: Int32) { + igTabBarQueueReorder(tab_bar, tab, offset) } -@inlinable public func ImGuiTabBarQueueReorderFromMousePos(_ tab_bar: UnsafeMutablePointer!, _ tab: UnsafePointer!, _ mouse_pos: ImVec2) -> Void { - return igTabBarQueueReorderFromMousePos(tab_bar,tab,mouse_pos) +@inlinable public func ImGuiTabBarQueueReorderFromMousePos(_ tab_bar: UnsafeMutablePointer!, _ tab: UnsafePointer!, _ mouse_pos: ImVec2) { + igTabBarQueueReorderFromMousePos(tab_bar, tab, mouse_pos) } -@inlinable public func ImGuiTabBarRemoveTab(_ tab_bar: UnsafeMutablePointer!, _ tab_id: ImGuiID) -> Void { - return igTabBarRemoveTab(tab_bar,tab_id) +@inlinable public func ImGuiTabBarRemoveTab(_ tab_bar: UnsafeMutablePointer!, _ tab_id: ImGuiID) { + igTabBarRemoveTab(tab_bar, tab_id) } -@inlinable public func ImGuiTabItemBackground(_ draw_list: UnsafeMutablePointer!, _ bb: ImRect, _ flags: ImGuiTabItemFlags, _ col: ImU32) -> Void { - return igTabItemBackground(draw_list,bb,flags,col) +@inlinable public func ImGuiTabItemBackground(_ draw_list: UnsafeMutablePointer!, _ bb: ImRect, _ flags: ImGuiTabItemFlags, _ col: ImU32) { + igTabItemBackground(draw_list, bb, flags, col) } @inlinable @discardableResult public func ImGuiTabItemButton(_ label: String? = nil, _ flags: ImGuiTabItemFlags) -> Bool { - label.withOptionalCString { labelPtr in - return igTabItemButton(labelPtr,flags) - } + label.withOptionalCString { labelPtr in + igTabItemButton(labelPtr, flags) + } } -@inlinable public func ImGuiTabItemCalcSize(_ pOut: UnsafeMutablePointer!, _ label: String? = nil, _ has_close_button: Bool) -> Void { - label.withOptionalCString { labelPtr in - return igTabItemCalcSize(pOut,labelPtr,has_close_button) - } +@inlinable public func ImGuiTabItemCalcSize(_ pOut: UnsafeMutablePointer!, _ label: String? = nil, _ has_close_button: Bool) { + label.withOptionalCString { labelPtr in + igTabItemCalcSize(pOut, labelPtr, has_close_button) + } } @inlinable @discardableResult public func ImGuiTabItemEx(_ tab_bar: UnsafeMutablePointer!, _ label: String? = nil, _ p_open: UnsafeMutablePointer!, _ flags: ImGuiTabItemFlags) -> Bool { - label.withOptionalCString { labelPtr in - return igTabItemEx(tab_bar,labelPtr,p_open,flags) - } + label.withOptionalCString { labelPtr in + igTabItemEx(tab_bar, labelPtr, p_open, flags) + } } -@inlinable public func ImGuiTabItemLabelAndCloseButton(_ draw_list: UnsafeMutablePointer!, _ bb: ImRect, _ flags: ImGuiTabItemFlags, _ frame_padding: ImVec2, _ label: String? = nil, _ tab_id: ImGuiID, _ close_button_id: ImGuiID, _ is_contents_visible: Bool, _ out_just_closed: UnsafeMutablePointer!, _ out_text_clipped: UnsafeMutablePointer!) -> Void { - label.withOptionalCString { labelPtr in - return igTabItemLabelAndCloseButton(draw_list,bb,flags,frame_padding,labelPtr,tab_id,close_button_id,is_contents_visible,out_just_closed,out_text_clipped) - } +@inlinable public func ImGuiTabItemLabelAndCloseButton(_ draw_list: UnsafeMutablePointer!, _ bb: ImRect, _ flags: ImGuiTabItemFlags, _ frame_padding: ImVec2, _ label: String? = nil, _ tab_id: ImGuiID, _ close_button_id: ImGuiID, _ is_contents_visible: Bool, _ out_just_closed: UnsafeMutablePointer!, _ out_text_clipped: UnsafeMutablePointer!) { + label.withOptionalCString { labelPtr in + igTabItemLabelAndCloseButton(draw_list, bb, flags, frame_padding, labelPtr, tab_id, close_button_id, is_contents_visible, out_just_closed, out_text_clipped) + } } -@inlinable public func ImGuiTableBeginApplyRequests(_ table: UnsafeMutablePointer!) -> Void { - return igTableBeginApplyRequests(table) +@inlinable public func ImGuiTableBeginApplyRequests(_ table: UnsafeMutablePointer!) { + igTableBeginApplyRequests(table) } -@inlinable public func ImGuiTableBeginCell(_ table: UnsafeMutablePointer!, _ column_n: Int32) -> Void { - return igTableBeginCell(table,column_n) +@inlinable public func ImGuiTableBeginCell(_ table: UnsafeMutablePointer!, _ column_n: Int32) { + igTableBeginCell(table, column_n) } -@inlinable public func ImGuiTableBeginInitMemory(_ table: UnsafeMutablePointer!, _ columns_count: Int32) -> Void { - return igTableBeginInitMemory(table,columns_count) +@inlinable public func ImGuiTableBeginInitMemory(_ table: UnsafeMutablePointer!, _ columns_count: Int32) { + igTableBeginInitMemory(table, columns_count) } -@inlinable public func ImGuiTableBeginRow(_ table: UnsafeMutablePointer!) -> Void { - return igTableBeginRow(table) +@inlinable public func ImGuiTableBeginRow(_ table: UnsafeMutablePointer!) { + igTableBeginRow(table) } -@inlinable public func ImGuiTableDrawBorders(_ table: UnsafeMutablePointer!) -> Void { - return igTableDrawBorders(table) +@inlinable public func ImGuiTableDrawBorders(_ table: UnsafeMutablePointer!) { + igTableDrawBorders(table) } -@inlinable public func ImGuiTableDrawContextMenu(_ table: UnsafeMutablePointer!) -> Void { - return igTableDrawContextMenu(table) +@inlinable public func ImGuiTableDrawContextMenu(_ table: UnsafeMutablePointer!) { + igTableDrawContextMenu(table) } -@inlinable public func ImGuiTableEndCell(_ table: UnsafeMutablePointer!) -> Void { - return igTableEndCell(table) +@inlinable public func ImGuiTableEndCell(_ table: UnsafeMutablePointer!) { + igTableEndCell(table) } -@inlinable public func ImGuiTableEndRow(_ table: UnsafeMutablePointer!) -> Void { - return igTableEndRow(table) +@inlinable public func ImGuiTableEndRow(_ table: UnsafeMutablePointer!) { + igTableEndRow(table) } @inlinable public func ImGuiTableFindByID(_ id: ImGuiID) -> UnsafeMutablePointer! { - return igTableFindByID(id) + igTableFindByID(id) } -@inlinable public func ImGuiTableFixColumnSortDirection(_ table: UnsafeMutablePointer!, _ column: UnsafeMutablePointer!) -> Void { - return igTableFixColumnSortDirection(table,column) +@inlinable public func ImGuiTableFixColumnSortDirection(_ table: UnsafeMutablePointer!, _ column: UnsafeMutablePointer!) { + igTableFixColumnSortDirection(table, column) } -@inlinable public func ImGuiTableGcCompactSettings() -> Void { - return igTableGcCompactSettings() +@inlinable public func ImGuiTableGcCompactSettings() { + igTableGcCompactSettings() } -@inlinable public func ImGuiTableGcCompactTransientBuffers(_ table: UnsafeMutablePointer!) -> Void { - return igTableGcCompactTransientBuffers_TablePtr(table) +@inlinable public func ImGuiTableGcCompactTransientBuffers(_ table: UnsafeMutablePointer!) { + igTableGcCompactTransientBuffers_TablePtr(table) } -@inlinable public func ImGuiTableGcCompactTransientBuffers(_ table: UnsafeMutablePointer!) -> Void { - return igTableGcCompactTransientBuffers_TableTempDataPtr(table) +@inlinable public func ImGuiTableGcCompactTransientBuffers(_ table: UnsafeMutablePointer!) { + igTableGcCompactTransientBuffers_TableTempDataPtr(table) } @inlinable public func ImGuiTableGetBoundSettings(_ table: UnsafeMutablePointer!) -> UnsafeMutablePointer! { - return igTableGetBoundSettings(table) + igTableGetBoundSettings(table) } -@inlinable public func ImGuiTableGetCellBgRect(_ pOut: UnsafeMutablePointer!, _ table: UnsafePointer!, _ column_n: Int32) -> Void { - return igTableGetCellBgRect(pOut,table,column_n) +@inlinable public func ImGuiTableGetCellBgRect(_ pOut: UnsafeMutablePointer!, _ table: UnsafePointer!, _ column_n: Int32) { + igTableGetCellBgRect(pOut, table, column_n) } @inlinable public func ImGuiTableGetColumnCount() -> Int32 { - return igTableGetColumnCount() + igTableGetColumnCount() } @inlinable public func ImGuiTableGetColumnFlags(_ column_n: Int32) -> ImGuiTableColumnFlags { - return igTableGetColumnFlags(column_n) + igTableGetColumnFlags(column_n) } @inlinable public func ImGuiTableGetColumnIndex() -> Int32 { - return igTableGetColumnIndex() + igTableGetColumnIndex() } @inlinable public func ImGuiTableGetColumnName(_ column_n: Int32) -> String? { - return String(cString: igTableGetColumnName_Int(column_n)) + String(cString: igTableGetColumnName_Int(column_n)) } @inlinable public func ImGuiTableGetColumnName(_ table: UnsafePointer!, _ column_n: Int32) -> String? { - return String(cString: igTableGetColumnName_TablePtr(table,column_n)) + String(cString: igTableGetColumnName_TablePtr(table, column_n)) } @inlinable public func ImGuiTableGetColumnNextSortDirection(_ column: UnsafeMutablePointer!) -> ImGuiSortDirection { - return igTableGetColumnNextSortDirection(column) + igTableGetColumnNextSortDirection(column) } @inlinable public func ImGuiTableGetColumnResizeID(_ table: UnsafePointer!, _ column_n: Int32, _ instance_no: Int32) -> ImGuiID { - return igTableGetColumnResizeID(table,column_n,instance_no) + igTableGetColumnResizeID(table, column_n, instance_no) } @inlinable public func ImGuiTableGetColumnWidthAuto(_ table: UnsafeMutablePointer!, _ column: UnsafeMutablePointer!) -> Float { - return igTableGetColumnWidthAuto(table,column) + igTableGetColumnWidthAuto(table, column) } @inlinable public func ImGuiTableGetHeaderRowHeight() -> Float { - return igTableGetHeaderRowHeight() + igTableGetHeaderRowHeight() } @inlinable public func ImGuiTableGetHoveredColumn() -> Int32 { - return igTableGetHoveredColumn() + igTableGetHoveredColumn() } @inlinable public func ImGuiTableGetMaxColumnWidth(_ table: UnsafePointer!, _ column_n: Int32) -> Float { - return igTableGetMaxColumnWidth(table,column_n) + igTableGetMaxColumnWidth(table, column_n) } @inlinable public func ImGuiTableGetRowIndex() -> Int32 { - return igTableGetRowIndex() + igTableGetRowIndex() } @inlinable public func ImGuiTableGetSortSpecs() -> UnsafeMutablePointer! { - return igTableGetSortSpecs() + igTableGetSortSpecs() } -@inlinable public func ImGuiTableHeader(_ label: String? = nil) -> Void { - label.withOptionalCString { labelPtr in - return igTableHeader(labelPtr) - } +@inlinable public func ImGuiTableHeader(_ label: String? = nil) { + label.withOptionalCString { labelPtr in + igTableHeader(labelPtr) + } } -@inlinable public func ImGuiTableHeadersRow() -> Void { - return igTableHeadersRow() +@inlinable public func ImGuiTableHeadersRow() { + igTableHeadersRow() } -@inlinable public func ImGuiTableLoadSettings(_ table: UnsafeMutablePointer!) -> Void { - return igTableLoadSettings(table) +@inlinable public func ImGuiTableLoadSettings(_ table: UnsafeMutablePointer!) { + igTableLoadSettings(table) } -@inlinable public func ImGuiTableMergeDrawChannels(_ table: UnsafeMutablePointer!) -> Void { - return igTableMergeDrawChannels(table) +@inlinable public func ImGuiTableMergeDrawChannels(_ table: UnsafeMutablePointer!) { + igTableMergeDrawChannels(table) } @inlinable @discardableResult public func ImGuiTableNextColumn() -> Bool { - return igTableNextColumn() + igTableNextColumn() } -@inlinable public func ImGuiTableNextRow(_ row_flags: ImGuiTableRowFlags, _ min_row_height: Float) -> Void { - return igTableNextRow(row_flags,min_row_height) +@inlinable public func ImGuiTableNextRow(_ row_flags: ImGuiTableRowFlags, _ min_row_height: Float) { + igTableNextRow(row_flags, min_row_height) } -@inlinable public func ImGuiTableOpenContextMenu(_ column_n: Int32) -> Void { - return igTableOpenContextMenu(column_n) +@inlinable public func ImGuiTableOpenContextMenu(_ column_n: Int32) { + igTableOpenContextMenu(column_n) } -@inlinable public func ImGuiTablePopBackgroundChannel() -> Void { - return igTablePopBackgroundChannel() +@inlinable public func ImGuiTablePopBackgroundChannel() { + igTablePopBackgroundChannel() } -@inlinable public func ImGuiTablePushBackgroundChannel() -> Void { - return igTablePushBackgroundChannel() +@inlinable public func ImGuiTablePushBackgroundChannel() { + igTablePushBackgroundChannel() } -@inlinable public func ImGuiTableRemove(_ table: UnsafeMutablePointer!) -> Void { - return igTableRemove(table) +@inlinable public func ImGuiTableRemove(_ table: UnsafeMutablePointer!) { + igTableRemove(table) } -@inlinable public func ImGuiTableResetSettings(_ table: UnsafeMutablePointer!) -> Void { - return igTableResetSettings(table) +@inlinable public func ImGuiTableResetSettings(_ table: UnsafeMutablePointer!) { + igTableResetSettings(table) } -@inlinable public func ImGuiTableSaveSettings(_ table: UnsafeMutablePointer!) -> Void { - return igTableSaveSettings(table) +@inlinable public func ImGuiTableSaveSettings(_ table: UnsafeMutablePointer!) { + igTableSaveSettings(table) } -@inlinable public func ImGuiTableSetBgColor(_ target: ImGuiTableBgTarget, _ color: ImU32, _ column_n: Int32) -> Void { - return igTableSetBgColor(target,color,column_n) +@inlinable public func ImGuiTableSetBgColor(_ target: ImGuiTableBgTarget, _ color: ImU32, _ column_n: Int32) { + igTableSetBgColor(target, color, column_n) } -@inlinable public func ImGuiTableSetColumnEnabled(_ column_n: Int32, _ v: Bool) -> Void { - return igTableSetColumnEnabled(column_n,v) +@inlinable public func ImGuiTableSetColumnEnabled(_ column_n: Int32, _ v: Bool) { + igTableSetColumnEnabled(column_n, v) } @inlinable @discardableResult public func ImGuiTableSetColumnIndex(_ column_n: Int32) -> Bool { - return igTableSetColumnIndex(column_n) + igTableSetColumnIndex(column_n) } -@inlinable public func ImGuiTableSetColumnSortDirection(_ column_n: Int32, _ sort_direction: ImGuiSortDirection, _ append_to_sort_specs: Bool) -> Void { - return igTableSetColumnSortDirection(column_n,sort_direction,append_to_sort_specs) +@inlinable public func ImGuiTableSetColumnSortDirection(_ column_n: Int32, _ sort_direction: ImGuiSortDirection, _ append_to_sort_specs: Bool) { + igTableSetColumnSortDirection(column_n, sort_direction, append_to_sort_specs) } -@inlinable public func ImGuiTableSetColumnWidth(_ column_n: Int32, _ width: Float) -> Void { - return igTableSetColumnWidth(column_n,width) +@inlinable public func ImGuiTableSetColumnWidth(_ column_n: Int32, _ width: Float) { + igTableSetColumnWidth(column_n, width) } -@inlinable public func ImGuiTableSetColumnWidthAutoAll(_ table: UnsafeMutablePointer!) -> Void { - return igTableSetColumnWidthAutoAll(table) +@inlinable public func ImGuiTableSetColumnWidthAutoAll(_ table: UnsafeMutablePointer!) { + igTableSetColumnWidthAutoAll(table) } -@inlinable public func ImGuiTableSetColumnWidthAutoSingle(_ table: UnsafeMutablePointer!, _ column_n: Int32) -> Void { - return igTableSetColumnWidthAutoSingle(table,column_n) +@inlinable public func ImGuiTableSetColumnWidthAutoSingle(_ table: UnsafeMutablePointer!, _ column_n: Int32) { + igTableSetColumnWidthAutoSingle(table, column_n) } @inlinable public func ImGuiTableSettingsCreate(_ id: ImGuiID, _ columns_count: Int32) -> UnsafeMutablePointer! { - return igTableSettingsCreate(id,columns_count) + igTableSettingsCreate(id, columns_count) } @inlinable public func ImGuiTableSettingsFindByID(_ id: ImGuiID) -> UnsafeMutablePointer! { - return igTableSettingsFindByID(id) + igTableSettingsFindByID(id) } @inlinable public func ImGuiTableSettingsGetColumnSettings(_ this: UnsafeMutablePointer!) -> UnsafeMutablePointer! { - return ImGuiTableSettings_GetColumnSettings(this) + ImGuiTableSettings_GetColumnSettings(this) } -@inlinable public func ImGuiTableSettingsInstallHandler(_ context: UnsafeMutablePointer!) -> Void { - return igTableSettingsInstallHandler(context) +@inlinable public func ImGuiTableSettingsInstallHandler(_ context: UnsafeMutablePointer!) { + igTableSettingsInstallHandler(context) } -@inlinable public func ImGuiTableSetupColumn(_ label: String? = nil, _ flags: ImGuiTableColumnFlags, _ init_width_or_weight: Float, _ user_id: ImGuiID) -> Void { - label.withOptionalCString { labelPtr in - return igTableSetupColumn(labelPtr,flags,init_width_or_weight,user_id) - } +@inlinable public func ImGuiTableSetupColumn(_ label: String? = nil, _ flags: ImGuiTableColumnFlags, _ init_width_or_weight: Float, _ user_id: ImGuiID) { + label.withOptionalCString { labelPtr in + igTableSetupColumn(labelPtr, flags, init_width_or_weight, user_id) + } } -@inlinable public func ImGuiTableSetupDrawChannels(_ table: UnsafeMutablePointer!) -> Void { - return igTableSetupDrawChannels(table) +@inlinable public func ImGuiTableSetupDrawChannels(_ table: UnsafeMutablePointer!) { + igTableSetupDrawChannels(table) } -@inlinable public func ImGuiTableSetupScrollFreeze(_ cols: Int32, _ rows: Int32) -> Void { - return igTableSetupScrollFreeze(cols,rows) +@inlinable public func ImGuiTableSetupScrollFreeze(_ cols: Int32, _ rows: Int32) { + igTableSetupScrollFreeze(cols, rows) } -@inlinable public func ImGuiTableSortSpecsBuild(_ table: UnsafeMutablePointer!) -> Void { - return igTableSortSpecsBuild(table) +@inlinable public func ImGuiTableSortSpecsBuild(_ table: UnsafeMutablePointer!) { + igTableSortSpecsBuild(table) } -@inlinable public func ImGuiTableSortSpecsSanitize(_ table: UnsafeMutablePointer!) -> Void { - return igTableSortSpecsSanitize(table) +@inlinable public func ImGuiTableSortSpecsSanitize(_ table: UnsafeMutablePointer!) { + igTableSortSpecsSanitize(table) } -@inlinable public func ImGuiTableUpdateBorders(_ table: UnsafeMutablePointer!) -> Void { - return igTableUpdateBorders(table) +@inlinable public func ImGuiTableUpdateBorders(_ table: UnsafeMutablePointer!) { + igTableUpdateBorders(table) } -@inlinable public func ImGuiTableUpdateColumnsWeightFromWidth(_ table: UnsafeMutablePointer!) -> Void { - return igTableUpdateColumnsWeightFromWidth(table) +@inlinable public func ImGuiTableUpdateColumnsWeightFromWidth(_ table: UnsafeMutablePointer!) { + igTableUpdateColumnsWeightFromWidth(table) } -@inlinable public func ImGuiTableUpdateLayout(_ table: UnsafeMutablePointer!) -> Void { - return igTableUpdateLayout(table) +@inlinable public func ImGuiTableUpdateLayout(_ table: UnsafeMutablePointer!) { + igTableUpdateLayout(table) } @inlinable @discardableResult public func ImGuiTempInputIsActive(_ id: ImGuiID) -> Bool { - return igTempInputIsActive(id) + igTempInputIsActive(id) } @inlinable @discardableResult public func ImGuiTempInputScalar(_ bb: ImRect, _ id: ImGuiID, _ label: String? = nil, _ data_type: ImGuiDataType, _ p_data: UnsafeMutableRawPointer!, _ format: String? = nil, _ p_clamp_min: UnsafeRawPointer!, _ p_clamp_max: UnsafeRawPointer!) -> Bool { - label.withOptionalCString { labelPtr in - format.withOptionalCString { formatPtr in - return igTempInputScalar(bb,id,labelPtr,data_type,p_data,formatPtr,p_clamp_min,p_clamp_max) - } - } + label.withOptionalCString { labelPtr in + format.withOptionalCString { formatPtr in + igTempInputScalar(bb, id, labelPtr, data_type, p_data, formatPtr, p_clamp_min, p_clamp_max) + } + } } @inlinable @discardableResult public func ImGuiTempInputText(_ bb: ImRect, _ id: ImGuiID, _ label: String? = nil, _ buf: inout String?, _ buf_size: Int32, _ flags: ImGuiInputTextFlags) -> Bool { - label.withOptionalCString { labelPtr in - buf.withOptionalCString { bufPtr in - return igTempInputText(bb,id,labelPtr,UnsafeMutablePointer(mutating: bufPtr),buf_size,flags) - } - } + label.withOptionalCString { labelPtr in + buf.withOptionalCString { bufPtr in + igTempInputText(bb, id, labelPtr, UnsafeMutablePointer(mutating: bufPtr), buf_size, flags) + } + } } -@inlinable public func ImGuiTextBufferappend(_ this: UnsafeMutablePointer!, _ str: String? = nil, _ str_end: String? = nil) -> Void { - str.withOptionalCString { strPtr in - str_end.withOptionalCString { str_endPtr in - return ImGuiTextBuffer_append(this,strPtr,str_endPtr) - } - } +@inlinable public func ImGuiTextBufferappend(_ this: UnsafeMutablePointer!, _ str: String? = nil, _ str_end: String? = nil) { + str.withOptionalCString { strPtr in + str_end.withOptionalCString { str_endPtr in + ImGuiTextBuffer_append(this, strPtr, str_endPtr) + } + } } -@inlinable public func ImGuiTextBufferappendfv(_ this: UnsafeMutablePointer!, _ fmt: String? = nil, _ args: CVarArg...) -> Void { - fmt.withOptionalCString { fmtPtr in - withVaList(args) { varArgsPtr in - return ImGuiTextBuffer_appendfv(this,fmtPtr,varArgsPtr) - } - } +@inlinable public func ImGuiTextBufferappendfv(_ this: UnsafeMutablePointer!, _ fmt: String? = nil, _ args: CVarArg...) { + fmt.withOptionalCString { fmtPtr in + withVaList(args) { varArgsPtr in + ImGuiTextBuffer_appendfv(this, fmtPtr, varArgsPtr) + } + } } @inlinable public func ImGuiTextBufferbegin(_ this: UnsafeMutablePointer!) -> String? { - return String(cString: ImGuiTextBuffer_begin(this)) + String(cString: ImGuiTextBuffer_begin(this)) } -@inlinable public func ImGuiTextBufferclear(_ this: UnsafeMutablePointer!) -> Void { - return ImGuiTextBuffer_clear(this) +@inlinable public func ImGuiTextBufferclear(_ this: UnsafeMutablePointer!) { + ImGuiTextBuffer_clear(this) } @inlinable public func ImGuiTextBuffercstr(_ this: UnsafeMutablePointer!) -> String? { - return String(cString: ImGuiTextBuffer_c_str(this)) + String(cString: ImGuiTextBuffer_c_str(this)) } @inlinable @discardableResult public func ImGuiTextBufferempty(_ this: UnsafeMutablePointer!) -> Bool { - return ImGuiTextBuffer_empty(this) + ImGuiTextBuffer_empty(this) } @inlinable public func ImGuiTextBufferend(_ this: UnsafeMutablePointer!) -> String? { - return String(cString: ImGuiTextBuffer_end(this)) + String(cString: ImGuiTextBuffer_end(this)) } -@inlinable public func ImGuiTextBufferreserve(_ this: UnsafeMutablePointer!, _ capacity: Int32) -> Void { - return ImGuiTextBuffer_reserve(this,capacity) +@inlinable public func ImGuiTextBufferreserve(_ this: UnsafeMutablePointer!, _ capacity: Int32) { + ImGuiTextBuffer_reserve(this, capacity) } @inlinable public func ImGuiTextBuffersize(_ this: UnsafeMutablePointer!) -> Int32 { - return ImGuiTextBuffer_size(this) + ImGuiTextBuffer_size(this) } -@inlinable public func ImGuiTextColoredV(_ col: ImVec4, _ fmt: String? = nil, _ args: CVarArg...) -> Void { - fmt.withOptionalCString { fmtPtr in - withVaList(args) { varArgsPtr in - return igTextColoredV(col,fmtPtr,varArgsPtr) - } - } +@inlinable public func ImGuiTextColoredV(_ col: ImVec4, _ fmt: String? = nil, _ args: CVarArg...) { + fmt.withOptionalCString { fmtPtr in + withVaList(args) { varArgsPtr in + igTextColoredV(col, fmtPtr, varArgsPtr) + } + } } -@inlinable public func ImGuiTextDisabledV(_ fmt: String? = nil, _ args: CVarArg...) -> Void { - fmt.withOptionalCString { fmtPtr in - withVaList(args) { varArgsPtr in - return igTextDisabledV(fmtPtr,varArgsPtr) - } - } +@inlinable public func ImGuiTextDisabledV(_ fmt: String? = nil, _ args: CVarArg...) { + fmt.withOptionalCString { fmtPtr in + withVaList(args) { varArgsPtr in + igTextDisabledV(fmtPtr, varArgsPtr) + } + } } -@inlinable public func ImGuiTextEx(_ text: String? = nil, _ text_end: String? = nil, _ flags: ImGuiTextFlags) -> Void { - text.withOptionalCString { textPtr in - text_end.withOptionalCString { text_endPtr in - return igTextEx(textPtr,text_endPtr,flags) - } - } +@inlinable public func ImGuiTextEx(_ text: String? = nil, _ text_end: String? = nil, _ flags: ImGuiTextFlags) { + text.withOptionalCString { textPtr in + text_end.withOptionalCString { text_endPtr in + igTextEx(textPtr, text_endPtr, flags) + } + } } -@inlinable public func ImGuiTextFilterBuild(_ this: UnsafeMutablePointer!) -> Void { - return ImGuiTextFilter_Build(this) +@inlinable public func ImGuiTextFilterBuild(_ this: UnsafeMutablePointer!) { + ImGuiTextFilter_Build(this) } -@inlinable public func ImGuiTextFilterClear(_ this: UnsafeMutablePointer!) -> Void { - return ImGuiTextFilter_Clear(this) +@inlinable public func ImGuiTextFilterClear(_ this: UnsafeMutablePointer!) { + ImGuiTextFilter_Clear(this) } @inlinable @discardableResult public func ImGuiTextFilterDraw(_ this: UnsafeMutablePointer!, _ label: String? = nil, _ width: Float) -> Bool { - label.withOptionalCString { labelPtr in - return ImGuiTextFilter_Draw(this,labelPtr,width) - } + label.withOptionalCString { labelPtr in + ImGuiTextFilter_Draw(this, labelPtr, width) + } } @inlinable @discardableResult public func ImGuiTextFilterIsActive(_ this: UnsafeMutablePointer!) -> Bool { - return ImGuiTextFilter_IsActive(this) + ImGuiTextFilter_IsActive(this) } @inlinable @discardableResult public func ImGuiTextFilterPassFilter(_ this: UnsafeMutablePointer!, _ text: String? = nil, _ text_end: String? = nil) -> Bool { - text.withOptionalCString { textPtr in - text_end.withOptionalCString { text_endPtr in - return ImGuiTextFilter_PassFilter(this,textPtr,text_endPtr) - } - } + text.withOptionalCString { textPtr in + text_end.withOptionalCString { text_endPtr in + ImGuiTextFilter_PassFilter(this, textPtr, text_endPtr) + } + } } @inlinable @discardableResult public func ImGuiTextRangeempty(_ this: UnsafeMutablePointer!) -> Bool { - return ImGuiTextRange_empty(this) + ImGuiTextRange_empty(this) } -@inlinable public func ImGuiTextRangesplit(_ this: UnsafeMutablePointer!, _ separator: CChar, _ out: UnsafeMutablePointer!) -> Void { - return ImGuiTextRange_split(this,separator,out) +@inlinable public func ImGuiTextRangesplit(_ this: UnsafeMutablePointer!, _ separator: CChar, _ out: UnsafeMutablePointer!) { + ImGuiTextRange_split(this, separator, out) } -@inlinable public func ImGuiTextUnformatted(_ text: String? = nil, _ text_end: String? = nil) -> Void { - text.withOptionalCString { textPtr in - text_end.withOptionalCString { text_endPtr in - return igTextUnformatted(textPtr,text_endPtr) - } - } +@inlinable public func ImGuiTextUnformatted(_ text: String? = nil, _ text_end: String? = nil) { + text.withOptionalCString { textPtr in + text_end.withOptionalCString { text_endPtr in + igTextUnformatted(textPtr, text_endPtr) + } + } } -@inlinable public func ImGuiTextV(_ fmt: String? = nil, _ args: CVarArg...) -> Void { - fmt.withOptionalCString { fmtPtr in - withVaList(args) { varArgsPtr in - return igTextV(fmtPtr,varArgsPtr) - } - } +@inlinable public func ImGuiTextV(_ fmt: String? = nil, _ args: CVarArg...) { + fmt.withOptionalCString { fmtPtr in + withVaList(args) { varArgsPtr in + igTextV(fmtPtr, varArgsPtr) + } + } } -@inlinable public func ImGuiTextWrappedV(_ fmt: String? = nil, _ args: CVarArg...) -> Void { - fmt.withOptionalCString { fmtPtr in - withVaList(args) { varArgsPtr in - return igTextWrappedV(fmtPtr,varArgsPtr) - } - } +@inlinable public func ImGuiTextWrappedV(_ fmt: String? = nil, _ args: CVarArg...) { + fmt.withOptionalCString { fmtPtr in + withVaList(args) { varArgsPtr in + igTextWrappedV(fmtPtr, varArgsPtr) + } + } } @inlinable @discardableResult public func ImGuiTreeNode(_ label: String? = nil) -> Bool { - label.withOptionalCString { labelPtr in - return igTreeNode_Str(labelPtr) - } + label.withOptionalCString { labelPtr in + igTreeNode_Str(labelPtr) + } } @inlinable @discardableResult public func ImGuiTreeNodeBehavior(_ id: ImGuiID, _ flags: ImGuiTreeNodeFlags, _ label: String? = nil, _ label_end: String? = nil) -> Bool { - label.withOptionalCString { labelPtr in - label_end.withOptionalCString { label_endPtr in - return igTreeNodeBehavior(id,flags,labelPtr,label_endPtr) - } - } + label.withOptionalCString { labelPtr in + label_end.withOptionalCString { label_endPtr in + igTreeNodeBehavior(id, flags, labelPtr, label_endPtr) + } + } } @inlinable @discardableResult public func ImGuiTreeNodeBehaviorIsOpen(_ id: ImGuiID, _ flags: ImGuiTreeNodeFlags) -> Bool { - return igTreeNodeBehaviorIsOpen(id,flags) + igTreeNodeBehaviorIsOpen(id, flags) } @inlinable @discardableResult public func ImGuiTreeNodeEx(_ label: String? = nil, _ flags: ImGuiTreeNodeFlags) -> Bool { - label.withOptionalCString { labelPtr in - return igTreeNodeEx_Str(labelPtr,flags) - } + label.withOptionalCString { labelPtr in + igTreeNodeEx_Str(labelPtr, flags) + } } @inlinable @discardableResult public func ImGuiTreeNodeExV(_ str_id: String? = nil, _ flags: ImGuiTreeNodeFlags, _ fmt: String? = nil, _ args: CVarArg...) -> Bool { - str_id.withOptionalCString { str_idPtr in - fmt.withOptionalCString { fmtPtr in - withVaList(args) { varArgsPtr in - return igTreeNodeExV_Str(str_idPtr,flags,fmtPtr,varArgsPtr) - } - } - } + str_id.withOptionalCString { str_idPtr in + fmt.withOptionalCString { fmtPtr in + withVaList(args) { varArgsPtr in + igTreeNodeExV_Str(str_idPtr, flags, fmtPtr, varArgsPtr) + } + } + } } @inlinable @discardableResult public func ImGuiTreeNodeExV(_ ptr_id: UnsafeRawPointer!, _ flags: ImGuiTreeNodeFlags, _ fmt: String? = nil, _ args: CVarArg...) -> Bool { - fmt.withOptionalCString { fmtPtr in - withVaList(args) { varArgsPtr in - return igTreeNodeExV_Ptr(ptr_id,flags,fmtPtr,varArgsPtr) - } - } + fmt.withOptionalCString { fmtPtr in + withVaList(args) { varArgsPtr in + igTreeNodeExV_Ptr(ptr_id, flags, fmtPtr, varArgsPtr) + } + } } @inlinable @discardableResult public func ImGuiTreeNodeV(_ str_id: String? = nil, _ fmt: String? = nil, _ args: CVarArg...) -> Bool { - str_id.withOptionalCString { str_idPtr in - fmt.withOptionalCString { fmtPtr in - withVaList(args) { varArgsPtr in - return igTreeNodeV_Str(str_idPtr,fmtPtr,varArgsPtr) - } - } - } + str_id.withOptionalCString { str_idPtr in + fmt.withOptionalCString { fmtPtr in + withVaList(args) { varArgsPtr in + igTreeNodeV_Str(str_idPtr, fmtPtr, varArgsPtr) + } + } + } } @inlinable @discardableResult public func ImGuiTreeNodeV(_ ptr_id: UnsafeRawPointer!, _ fmt: String? = nil, _ args: CVarArg...) -> Bool { - fmt.withOptionalCString { fmtPtr in - withVaList(args) { varArgsPtr in - return igTreeNodeV_Ptr(ptr_id,fmtPtr,varArgsPtr) - } - } + fmt.withOptionalCString { fmtPtr in + withVaList(args) { varArgsPtr in + igTreeNodeV_Ptr(ptr_id, fmtPtr, varArgsPtr) + } + } } -@inlinable public func ImGuiTreePop() -> Void { - return igTreePop() +@inlinable public func ImGuiTreePop() { + igTreePop() } -@inlinable public func ImGuiTreePush(_ str_id: String? = nil) -> Void { - str_id.withOptionalCString { str_idPtr in - return igTreePush_Str(str_idPtr) - } +@inlinable public func ImGuiTreePush(_ str_id: String? = nil) { + str_id.withOptionalCString { str_idPtr in + igTreePush_Str(str_idPtr) + } } -@inlinable public func ImGuiTreePush(_ ptr_id: UnsafeRawPointer!) -> Void { - return igTreePush_Ptr(ptr_id) +@inlinable public func ImGuiTreePush(_ ptr_id: UnsafeRawPointer!) { + igTreePush_Ptr(ptr_id) } -@inlinable public func ImGuiTreePushOverrideID(_ id: ImGuiID) -> Void { - return igTreePushOverrideID(id) +@inlinable public func ImGuiTreePushOverrideID(_ id: ImGuiID) { + igTreePushOverrideID(id) } -@inlinable public func ImGuiUnindent(_ indent_w: Float) -> Void { - return igUnindent(indent_w) +@inlinable public func ImGuiUnindent(_ indent_w: Float) { + igUnindent(indent_w) } -@inlinable public func ImGuiUpdateHoveredWindowAndCaptureFlags() -> Void { - return igUpdateHoveredWindowAndCaptureFlags() +@inlinable public func ImGuiUpdateHoveredWindowAndCaptureFlags() { + igUpdateHoveredWindowAndCaptureFlags() } -@inlinable public func ImGuiUpdateMouseMovingWindowEndFrame() -> Void { - return igUpdateMouseMovingWindowEndFrame() +@inlinable public func ImGuiUpdateMouseMovingWindowEndFrame() { + igUpdateMouseMovingWindowEndFrame() } -@inlinable public func ImGuiUpdateMouseMovingWindowNewFrame() -> Void { - return igUpdateMouseMovingWindowNewFrame() +@inlinable public func ImGuiUpdateMouseMovingWindowNewFrame() { + igUpdateMouseMovingWindowNewFrame() } -@inlinable public func ImGuiUpdateWindowParentAndRootLinks(_ window: UnsafeMutablePointer!, _ flags: ImGuiWindowFlags, _ parent_window: UnsafeMutablePointer!) -> Void { - return igUpdateWindowParentAndRootLinks(window,flags,parent_window) +@inlinable public func ImGuiUpdateWindowParentAndRootLinks(_ window: UnsafeMutablePointer!, _ flags: ImGuiWindowFlags, _ parent_window: UnsafeMutablePointer!) { + igUpdateWindowParentAndRootLinks(window, flags, parent_window) } @inlinable @discardableResult public func ImGuiVSliderFloat(_ label: String? = nil, _ size: ImVec2, _ v: UnsafeMutablePointer!, _ v_min: Float, _ v_max: Float, _ format: String? = nil, _ flags: ImGuiSliderFlags) -> Bool { - label.withOptionalCString { labelPtr in - format.withOptionalCString { formatPtr in - return igVSliderFloat(labelPtr,size,v,v_min,v_max,formatPtr,flags) - } - } + label.withOptionalCString { labelPtr in + format.withOptionalCString { formatPtr in + igVSliderFloat(labelPtr, size, v, v_min, v_max, formatPtr, flags) + } + } } @inlinable @discardableResult public func ImGuiVSliderInt(_ label: String? = nil, _ size: ImVec2, _ v: UnsafeMutablePointer!, _ v_min: Int32, _ v_max: Int32, _ format: String? = nil, _ flags: ImGuiSliderFlags) -> Bool { - label.withOptionalCString { labelPtr in - format.withOptionalCString { formatPtr in - return igVSliderInt(labelPtr,size,v,v_min,v_max,formatPtr,flags) - } - } + label.withOptionalCString { labelPtr in + format.withOptionalCString { formatPtr in + igVSliderInt(labelPtr, size, v, v_min, v_max, formatPtr, flags) + } + } } @inlinable @discardableResult public func ImGuiVSliderScalar(_ label: String? = nil, _ size: ImVec2, _ data_type: ImGuiDataType, _ p_data: UnsafeMutableRawPointer!, _ p_min: UnsafeRawPointer!, _ p_max: UnsafeRawPointer!, _ format: String? = nil, _ flags: ImGuiSliderFlags) -> Bool { - label.withOptionalCString { labelPtr in - format.withOptionalCString { formatPtr in - return igVSliderScalar(labelPtr,size,data_type,p_data,p_min,p_max,formatPtr,flags) - } - } + label.withOptionalCString { labelPtr in + format.withOptionalCString { formatPtr in + igVSliderScalar(labelPtr, size, data_type, p_data, p_min, p_max, formatPtr, flags) + } + } } -@inlinable public func ImGuiValue(_ `prefix`: String? = nil, _ b: Bool) -> Void { - `prefix`.withOptionalCString { prefixPtr in - return igValue_Bool(prefixPtr,b) - } +@inlinable public func ImGuiValue(_ prefix: String? = nil, _ b: Bool) { + prefix.withOptionalCString { prefixPtr in + igValue_Bool(prefixPtr, b) + } } -@inlinable public func ImGuiValue(_ `prefix`: String? = nil, _ v: Int32) -> Void { - `prefix`.withOptionalCString { prefixPtr in - return igValue_Int(prefixPtr,v) - } +@inlinable public func ImGuiValue(_ prefix: String? = nil, _ v: Int32) { + prefix.withOptionalCString { prefixPtr in + igValue_Int(prefixPtr, v) + } } -@inlinable public func ImGuiValue(_ `prefix`: String? = nil, _ v: UInt32) -> Void { - `prefix`.withOptionalCString { prefixPtr in - return igValue_Uint(prefixPtr,v) - } +@inlinable public func ImGuiValue(_ prefix: String? = nil, _ v: UInt32) { + prefix.withOptionalCString { prefixPtr in + igValue_Uint(prefixPtr, v) + } } -@inlinable public func ImGuiValue(_ `prefix`: String? = nil, _ v: Float, _ float_format: String? = nil) -> Void { - `prefix`.withOptionalCString { prefixPtr in - float_format.withOptionalCString { float_formatPtr in - return igValue_Float(prefixPtr,v,float_formatPtr) - } - } +@inlinable public func ImGuiValue(_ prefix: String? = nil, _ v: Float, _ float_format: String? = nil) { + prefix.withOptionalCString { prefixPtr in + float_format.withOptionalCString { float_formatPtr in + igValue_Float(prefixPtr, v, float_formatPtr) + } + } } -@inlinable public func ImGuiViewportGetCenter(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!) -> Void { - return ImGuiViewport_GetCenter(pOut,this) +@inlinable public func ImGuiViewportGetCenter(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!) { + ImGuiViewport_GetCenter(pOut, this) } -@inlinable public func ImGuiViewportGetWorkCenter(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!) -> Void { - return ImGuiViewport_GetWorkCenter(pOut,this) +@inlinable public func ImGuiViewportGetWorkCenter(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!) { + ImGuiViewport_GetWorkCenter(pOut, this) } -@inlinable public func ImGuiViewportPCalcWorkRectPos(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!, _ off_min: ImVec2) -> Void { - return ImGuiViewportP_CalcWorkRectPos(pOut,this,off_min) +@inlinable public func ImGuiViewportPCalcWorkRectPos(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!, _ off_min: ImVec2) { + ImGuiViewportP_CalcWorkRectPos(pOut, this, off_min) } -@inlinable public func ImGuiViewportPCalcWorkRectSize(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!, _ off_min: ImVec2, _ off_max: ImVec2) -> Void { - return ImGuiViewportP_CalcWorkRectSize(pOut,this,off_min,off_max) +@inlinable public func ImGuiViewportPCalcWorkRectSize(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!, _ off_min: ImVec2, _ off_max: ImVec2) { + ImGuiViewportP_CalcWorkRectSize(pOut, this, off_min, off_max) } -@inlinable public func ImGuiViewportPGetBuildWorkRect(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!) -> Void { - return ImGuiViewportP_GetBuildWorkRect(pOut,this) +@inlinable public func ImGuiViewportPGetBuildWorkRect(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!) { + ImGuiViewportP_GetBuildWorkRect(pOut, this) } -@inlinable public func ImGuiViewportPGetMainRect(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!) -> Void { - return ImGuiViewportP_GetMainRect(pOut,this) +@inlinable public func ImGuiViewportPGetMainRect(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!) { + ImGuiViewportP_GetMainRect(pOut, this) } -@inlinable public func ImGuiViewportPGetWorkRect(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!) -> Void { - return ImGuiViewportP_GetWorkRect(pOut,this) +@inlinable public func ImGuiViewportPGetWorkRect(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!) { + ImGuiViewportP_GetWorkRect(pOut, this) } -@inlinable public func ImGuiViewportPUpdateWorkRect(_ this: UnsafeMutablePointer!) -> Void { - return ImGuiViewportP_UpdateWorkRect(this) +@inlinable public func ImGuiViewportPUpdateWorkRect(_ this: UnsafeMutablePointer!) { + ImGuiViewportP_UpdateWorkRect(this) } @inlinable public func ImGuiWindowCalcFontSize(_ this: UnsafeMutablePointer!) -> Float { - return ImGuiWindow_CalcFontSize(this) + ImGuiWindow_CalcFontSize(this) } @inlinable public func ImGuiWindowGetID(_ this: UnsafeMutablePointer!, _ str: String? = nil, _ str_end: String? = nil) -> ImGuiID { - str.withOptionalCString { strPtr in - str_end.withOptionalCString { str_endPtr in - return ImGuiWindow_GetID_Str(this,strPtr,str_endPtr) - } - } + str.withOptionalCString { strPtr in + str_end.withOptionalCString { str_endPtr in + ImGuiWindow_GetID_Str(this, strPtr, str_endPtr) + } + } } @inlinable public func ImGuiWindowGetID(_ this: UnsafeMutablePointer!, _ ptr: UnsafeRawPointer!) -> ImGuiID { - return ImGuiWindow_GetID_Ptr(this,ptr) + ImGuiWindow_GetID_Ptr(this, ptr) } @inlinable public func ImGuiWindowGetID(_ this: UnsafeMutablePointer!, _ n: Int32) -> ImGuiID { - return ImGuiWindow_GetID_Int(this,n) + ImGuiWindow_GetID_Int(this, n) } @inlinable public func ImGuiWindowGetIDFromRectangle(_ this: UnsafeMutablePointer!, _ r_abs: ImRect) -> ImGuiID { - return ImGuiWindow_GetIDFromRectangle(this,r_abs) + ImGuiWindow_GetIDFromRectangle(this, r_abs) } @inlinable public func ImGuiWindowGetIDNoKeepAlive(_ this: UnsafeMutablePointer!, _ str: String? = nil, _ str_end: String? = nil) -> ImGuiID { - str.withOptionalCString { strPtr in - str_end.withOptionalCString { str_endPtr in - return ImGuiWindow_GetIDNoKeepAlive_Str(this,strPtr,str_endPtr) - } - } + str.withOptionalCString { strPtr in + str_end.withOptionalCString { str_endPtr in + ImGuiWindow_GetIDNoKeepAlive_Str(this, strPtr, str_endPtr) + } + } } @inlinable public func ImGuiWindowGetIDNoKeepAlive(_ this: UnsafeMutablePointer!, _ ptr: UnsafeRawPointer!) -> ImGuiID { - return ImGuiWindow_GetIDNoKeepAlive_Ptr(this,ptr) + ImGuiWindow_GetIDNoKeepAlive_Ptr(this, ptr) } @inlinable public func ImGuiWindowGetIDNoKeepAlive(_ this: UnsafeMutablePointer!, _ n: Int32) -> ImGuiID { - return ImGuiWindow_GetIDNoKeepAlive_Int(this,n) + ImGuiWindow_GetIDNoKeepAlive_Int(this, n) } @inlinable public func ImGuiWindowMenuBarHeight(_ this: UnsafeMutablePointer!) -> Float { - return ImGuiWindow_MenuBarHeight(this) + ImGuiWindow_MenuBarHeight(this) } -@inlinable public func ImGuiWindowMenuBarRect(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!) -> Void { - return ImGuiWindow_MenuBarRect(pOut,this) +@inlinable public func ImGuiWindowMenuBarRect(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!) { + ImGuiWindow_MenuBarRect(pOut, this) } -@inlinable public func ImGuiWindowRect(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!) -> Void { - return ImGuiWindow_Rect(pOut,this) +@inlinable public func ImGuiWindowRect(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!) { + ImGuiWindow_Rect(pOut, this) } -@inlinable public func ImGuiWindowRectAbsToRel(_ pOut: UnsafeMutablePointer!, _ window: UnsafeMutablePointer!, _ r: ImRect) -> Void { - return igWindowRectAbsToRel(pOut,window,r) +@inlinable public func ImGuiWindowRectAbsToRel(_ pOut: UnsafeMutablePointer!, _ window: UnsafeMutablePointer!, _ r: ImRect) { + igWindowRectAbsToRel(pOut, window, r) } -@inlinable public func ImGuiWindowRectRelToAbs(_ pOut: UnsafeMutablePointer!, _ window: UnsafeMutablePointer!, _ r: ImRect) -> Void { - return igWindowRectRelToAbs(pOut,window,r) +@inlinable public func ImGuiWindowRectRelToAbs(_ pOut: UnsafeMutablePointer!, _ window: UnsafeMutablePointer!, _ r: ImRect) { + igWindowRectRelToAbs(pOut, window, r) } @inlinable public func ImGuiWindowSettingsGetName(_ this: UnsafeMutablePointer!) -> String? { - return String(cString: ImGuiWindowSettings_GetName(this)) + String(cString: ImGuiWindowSettings_GetName(this)) } @inlinable public func ImGuiWindowTitleBarHeight(_ this: UnsafeMutablePointer!) -> Float { - return ImGuiWindow_TitleBarHeight(this) + ImGuiWindow_TitleBarHeight(this) } -@inlinable public func ImGuiWindowTitleBarRect(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!) -> Void { - return ImGuiWindow_TitleBarRect(pOut,this) +@inlinable public func ImGuiWindowTitleBarRect(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!) { + ImGuiWindow_TitleBarRect(pOut, this) } @inlinable public func ImHashData(_ data: UnsafeRawPointer!, _ data_size: Int, _ seed: ImU32) -> ImGuiID { - return igImHashData(data,data_size,seed) + igImHashData(data, data_size, seed) } @inlinable public func ImHashStr(_ data: String? = nil, _ data_size: Int, _ seed: ImU32) -> ImGuiID { - data.withOptionalCString { dataPtr in - return igImHashStr(dataPtr,data_size,seed) - } + data.withOptionalCString { dataPtr in + igImHashStr(dataPtr, data_size, seed) + } } @inlinable public func ImInvLength(_ lhs: ImVec2, _ fail_value: Float) -> Float { - return igImInvLength(lhs,fail_value) + igImInvLength(lhs, fail_value) } @inlinable @discardableResult public func ImIsFloatAboveGuaranteedIntegerPrecision(_ f: Float) -> Bool { - return igImIsFloatAboveGuaranteedIntegerPrecision(f) + igImIsFloatAboveGuaranteedIntegerPrecision(f) } @inlinable @discardableResult public func ImIsPowerOfTwo(_ v: Int32) -> Bool { - return igImIsPowerOfTwo_Int(v) + igImIsPowerOfTwo_Int(v) } @inlinable @discardableResult public func ImIsPowerOfTwo(_ v: ImU64) -> Bool { - return igImIsPowerOfTwo_U64(v) + igImIsPowerOfTwo_U64(v) } @inlinable public func ImLengthSqr(_ lhs: ImVec2) -> Float { - return igImLengthSqr_Vec2(lhs) + igImLengthSqr_Vec2(lhs) } @inlinable public func ImLengthSqr(_ lhs: ImVec4) -> Float { - return igImLengthSqr_Vec4(lhs) + igImLengthSqr_Vec4(lhs) } -@inlinable public func ImLerp(_ pOut: UnsafeMutablePointer!, _ a: ImVec2, _ b: ImVec2, _ t: Float) -> Void { - return igImLerp_Vec2Float(pOut,a,b,t) +@inlinable public func ImLerp(_ pOut: UnsafeMutablePointer!, _ a: ImVec2, _ b: ImVec2, _ t: Float) { + igImLerp_Vec2Float(pOut, a, b, t) } -@inlinable public func ImLerp(_ pOut: UnsafeMutablePointer!, _ a: ImVec2, _ b: ImVec2, _ t: ImVec2) -> Void { - return igImLerp_Vec2Vec2(pOut,a,b,t) +@inlinable public func ImLerp(_ pOut: UnsafeMutablePointer!, _ a: ImVec2, _ b: ImVec2, _ t: ImVec2) { + igImLerp_Vec2Vec2(pOut, a, b, t) } -@inlinable public func ImLerp(_ pOut: UnsafeMutablePointer!, _ a: ImVec4, _ b: ImVec4, _ t: Float) -> Void { - return igImLerp_Vec4(pOut,a,b,t) +@inlinable public func ImLerp(_ pOut: UnsafeMutablePointer!, _ a: ImVec4, _ b: ImVec4, _ t: Float) { + igImLerp_Vec4(pOut, a, b, t) } -@inlinable public func ImLineClosestPoint(_ pOut: UnsafeMutablePointer!, _ a: ImVec2, _ b: ImVec2, _ p: ImVec2) -> Void { - return igImLineClosestPoint(pOut,a,b,p) +@inlinable public func ImLineClosestPoint(_ pOut: UnsafeMutablePointer!, _ a: ImVec2, _ b: ImVec2, _ p: ImVec2) { + igImLineClosestPoint(pOut, a, b, p) } @inlinable public func ImLinearSweep(_ current: Float, _ target: Float, _ speed: Float) -> Float { - return igImLinearSweep(current,target,speed) + igImLinearSweep(current, target, speed) } @inlinable public func ImLog(_ x: Float) -> Float { - return igImLog_Float(x) + igImLog_Float(x) } @inlinable public func ImLog(_ x: Double) -> Double { - return igImLog_double(x) + igImLog_double(x) } -@inlinable public func ImMax(_ pOut: UnsafeMutablePointer!, _ lhs: ImVec2, _ rhs: ImVec2) -> Void { - return igImMax(pOut,lhs,rhs) +@inlinable public func ImMax(_ pOut: UnsafeMutablePointer!, _ lhs: ImVec2, _ rhs: ImVec2) { + igImMax(pOut, lhs, rhs) } -@inlinable public func ImMin(_ pOut: UnsafeMutablePointer!, _ lhs: ImVec2, _ rhs: ImVec2) -> Void { - return igImMin(pOut,lhs,rhs) +@inlinable public func ImMin(_ pOut: UnsafeMutablePointer!, _ lhs: ImVec2, _ rhs: ImVec2) { + igImMin(pOut, lhs, rhs) } @inlinable public func ImModPositive(_ a: Int32, _ b: Int32) -> Int32 { - return igImModPositive(a,b) + igImModPositive(a, b) } -@inlinable public func ImMul(_ pOut: UnsafeMutablePointer!, _ lhs: ImVec2, _ rhs: ImVec2) -> Void { - return igImMul(pOut,lhs,rhs) +@inlinable public func ImMul(_ pOut: UnsafeMutablePointer!, _ lhs: ImVec2, _ rhs: ImVec2) { + igImMul(pOut, lhs, rhs) } @inlinable public func ImParseFormatFindEnd(_ format: String? = nil) -> String? { - format.withOptionalCString { formatPtr in - return String(cString: igImParseFormatFindEnd(formatPtr)) - } + format.withOptionalCString { formatPtr in + String(cString: igImParseFormatFindEnd(formatPtr)) + } } @inlinable public func ImParseFormatFindStart(_ format: String? = nil) -> String? { - format.withOptionalCString { formatPtr in - return String(cString: igImParseFormatFindStart(formatPtr)) - } + format.withOptionalCString { formatPtr in + String(cString: igImParseFormatFindStart(formatPtr)) + } } @inlinable public func ImParseFormatPrecision(_ format: String? = nil, _ default_value: Int32) -> Int32 { - format.withOptionalCString { formatPtr in - return igImParseFormatPrecision(formatPtr,default_value) - } + format.withOptionalCString { formatPtr in + igImParseFormatPrecision(formatPtr, default_value) + } } @inlinable public func ImParseFormatTrimDecorations(_ format: String? = nil, _ buf: inout String?, _ buf_size: Int) -> String? { - format.withOptionalCString { formatPtr in - buf.withOptionalCString { bufPtr in - return String(cString: igImParseFormatTrimDecorations(formatPtr,UnsafeMutablePointer(mutating: bufPtr),buf_size)) - } - } + format.withOptionalCString { formatPtr in + buf.withOptionalCString { bufPtr in + String(cString: igImParseFormatTrimDecorations(formatPtr, UnsafeMutablePointer(mutating: bufPtr), buf_size)) + } + } } @inlinable public func ImPow(_ x: Float, _ y: Float) -> Float { - return igImPow_Float(x,y) + igImPow_Float(x, y) } @inlinable public func ImPow(_ x: Double, _ y: Double) -> Double { - return igImPow_double(x,y) + igImPow_double(x, y) } -@inlinable public func ImRectAdd(_ this: UnsafeMutablePointer!, _ p: ImVec2) -> Void { - return ImRect_Add_Vec2(this,p) +@inlinable public func ImRectAdd(_ this: UnsafeMutablePointer!, _ p: ImVec2) { + ImRect_Add_Vec2(this, p) } -@inlinable public func ImRectAdd(_ this: UnsafeMutablePointer!, _ r: ImRect) -> Void { - return ImRect_Add_Rect(this,r) +@inlinable public func ImRectAdd(_ this: UnsafeMutablePointer!, _ r: ImRect) { + ImRect_Add_Rect(this, r) } -@inlinable public func ImRectClipWith(_ this: UnsafeMutablePointer!, _ r: ImRect) -> Void { - return ImRect_ClipWith(this,r) +@inlinable public func ImRectClipWith(_ this: UnsafeMutablePointer!, _ r: ImRect) { + ImRect_ClipWith(this, r) } -@inlinable public func ImRectClipWithFull(_ this: UnsafeMutablePointer!, _ r: ImRect) -> Void { - return ImRect_ClipWithFull(this,r) +@inlinable public func ImRectClipWithFull(_ this: UnsafeMutablePointer!, _ r: ImRect) { + ImRect_ClipWithFull(this, r) } @inlinable @discardableResult public func ImRectContains(_ this: UnsafeMutablePointer!, _ p: ImVec2) -> Bool { - return ImRect_Contains_Vec2(this,p) + ImRect_Contains_Vec2(this, p) } @inlinable @discardableResult public func ImRectContains(_ this: UnsafeMutablePointer!, _ r: ImRect) -> Bool { - return ImRect_Contains_Rect(this,r) + ImRect_Contains_Rect(this, r) } -@inlinable public func ImRectExpand(_ this: UnsafeMutablePointer!, _ amount: Float) -> Void { - return ImRect_Expand_Float(this,amount) +@inlinable public func ImRectExpand(_ this: UnsafeMutablePointer!, _ amount: Float) { + ImRect_Expand_Float(this, amount) } -@inlinable public func ImRectExpand(_ this: UnsafeMutablePointer!, _ amount: ImVec2) -> Void { - return ImRect_Expand_Vec2(this,amount) +@inlinable public func ImRectExpand(_ this: UnsafeMutablePointer!, _ amount: ImVec2) { + ImRect_Expand_Vec2(this, amount) } -@inlinable public func ImRectFloor(_ this: UnsafeMutablePointer!) -> Void { - return ImRect_Floor(this) +@inlinable public func ImRectFloor(_ this: UnsafeMutablePointer!) { + ImRect_Floor(this) } @inlinable public func ImRectGetArea(_ this: UnsafeMutablePointer!) -> Float { - return ImRect_GetArea(this) + ImRect_GetArea(this) } -@inlinable public func ImRectGetBL(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!) -> Void { - return ImRect_GetBL(pOut,this) +@inlinable public func ImRectGetBL(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!) { + ImRect_GetBL(pOut, this) } -@inlinable public func ImRectGetBR(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!) -> Void { - return ImRect_GetBR(pOut,this) +@inlinable public func ImRectGetBR(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!) { + ImRect_GetBR(pOut, this) } -@inlinable public func ImRectGetCenter(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!) -> Void { - return ImRect_GetCenter(pOut,this) +@inlinable public func ImRectGetCenter(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!) { + ImRect_GetCenter(pOut, this) } @inlinable public func ImRectGetHeight(_ this: UnsafeMutablePointer!) -> Float { - return ImRect_GetHeight(this) + ImRect_GetHeight(this) } -@inlinable public func ImRectGetSize(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!) -> Void { - return ImRect_GetSize(pOut,this) +@inlinable public func ImRectGetSize(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!) { + ImRect_GetSize(pOut, this) } -@inlinable public func ImRectGetTL(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!) -> Void { - return ImRect_GetTL(pOut,this) +@inlinable public func ImRectGetTL(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!) { + ImRect_GetTL(pOut, this) } -@inlinable public func ImRectGetTR(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!) -> Void { - return ImRect_GetTR(pOut,this) +@inlinable public func ImRectGetTR(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!) { + ImRect_GetTR(pOut, this) } @inlinable public func ImRectGetWidth(_ this: UnsafeMutablePointer!) -> Float { - return ImRect_GetWidth(this) + ImRect_GetWidth(this) } @inlinable @discardableResult public func ImRectIsInverted(_ this: UnsafeMutablePointer!) -> Bool { - return ImRect_IsInverted(this) + ImRect_IsInverted(this) } @inlinable @discardableResult public func ImRectOverlaps(_ this: UnsafeMutablePointer!, _ r: ImRect) -> Bool { - return ImRect_Overlaps(this,r) + ImRect_Overlaps(this, r) } -@inlinable public func ImRectToVec4(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!) -> Void { - return ImRect_ToVec4(pOut,this) +@inlinable public func ImRectToVec4(_ pOut: UnsafeMutablePointer!, _ this: UnsafeMutablePointer!) { + ImRect_ToVec4(pOut, this) } -@inlinable public func ImRectTranslate(_ this: UnsafeMutablePointer!, _ d: ImVec2) -> Void { - return ImRect_Translate(this,d) +@inlinable public func ImRectTranslate(_ this: UnsafeMutablePointer!, _ d: ImVec2) { + ImRect_Translate(this, d) } -@inlinable public func ImRectTranslateX(_ this: UnsafeMutablePointer!, _ dx: Float) -> Void { - return ImRect_TranslateX(this,dx) +@inlinable public func ImRectTranslateX(_ this: UnsafeMutablePointer!, _ dx: Float) { + ImRect_TranslateX(this, dx) } -@inlinable public func ImRectTranslateY(_ this: UnsafeMutablePointer!, _ dy: Float) -> Void { - return ImRect_TranslateY(this,dy) +@inlinable public func ImRectTranslateY(_ this: UnsafeMutablePointer!, _ dy: Float) { + ImRect_TranslateY(this, dy) } -@inlinable public func ImRotate(_ pOut: UnsafeMutablePointer!, _ v: ImVec2, _ cos_a: Float, _ sin_a: Float) -> Void { - return igImRotate(pOut,v,cos_a,sin_a) +@inlinable public func ImRotate(_ pOut: UnsafeMutablePointer!, _ v: ImVec2, _ cos_a: Float, _ sin_a: Float) { + igImRotate(pOut, v, cos_a, sin_a) } @inlinable public func ImRsqrt(_ x: Float) -> Float { - return igImRsqrt_Float(x) + igImRsqrt_Float(x) } @inlinable public func ImRsqrt(_ x: Double) -> Double { - return igImRsqrt_double(x) + igImRsqrt_double(x) } @inlinable public func ImSaturate(_ f: Float) -> Float { - return igImSaturate(f) + igImSaturate(f) } @inlinable public func ImSign(_ x: Float) -> Float { - return igImSign_Float(x) + igImSign_Float(x) } @inlinable public func ImSign(_ x: Double) -> Double { - return igImSign_double(x) + igImSign_double(x) } @inlinable public func ImStrSkipBlank(_ str: String? = nil) -> String? { - str.withOptionalCString { strPtr in - return String(cString: igImStrSkipBlank(strPtr)) - } + str.withOptionalCString { strPtr in + String(cString: igImStrSkipBlank(strPtr)) + } } -@inlinable public func ImStrTrimBlanks(_ str: inout String?) -> Void { - str.withOptionalCString { strPtr in - return igImStrTrimBlanks(UnsafeMutablePointer(mutating: strPtr)) - } +@inlinable public func ImStrTrimBlanks(_ str: inout String?) { + str.withOptionalCString { strPtr in + igImStrTrimBlanks(UnsafeMutablePointer(mutating: strPtr)) + } } @inlinable public func ImStrbolW(_ buf_mid_line: UnsafePointer!, _ buf_begin: UnsafePointer!) -> UnsafePointer! { - return igImStrbolW(buf_mid_line,buf_begin) + igImStrbolW(buf_mid_line, buf_begin) } @inlinable public func ImStrchrRange(_ str_begin: String? = nil, _ str_end: String? = nil, _ c: CChar) -> String? { - str_begin.withOptionalCString { str_beginPtr in - str_end.withOptionalCString { str_endPtr in - return String(cString: igImStrchrRange(str_beginPtr,str_endPtr,c)) - } - } + str_begin.withOptionalCString { str_beginPtr in + str_end.withOptionalCString { str_endPtr in + String(cString: igImStrchrRange(str_beginPtr, str_endPtr, c)) + } + } } @inlinable public func ImStrdup(_ str: String? = nil) -> String? { - str.withOptionalCString { strPtr in - return String(cString: igImStrdup(strPtr)) - } + str.withOptionalCString { strPtr in + String(cString: igImStrdup(strPtr)) + } } @inlinable public func ImStrdupcpy(_ dst: inout String?, _ p_dst_size: UnsafeMutablePointer!, _ str: String? = nil) -> String? { - dst.withOptionalCString { dstPtr in - str.withOptionalCString { strPtr in - return String(cString: igImStrdupcpy(UnsafeMutablePointer(mutating: dstPtr),p_dst_size,strPtr)) - } - } + dst.withOptionalCString { dstPtr in + str.withOptionalCString { strPtr in + String(cString: igImStrdupcpy(UnsafeMutablePointer(mutating: dstPtr), p_dst_size, strPtr)) + } + } } @inlinable public func ImStreolRange(_ str: String? = nil, _ str_end: String? = nil) -> String? { - str.withOptionalCString { strPtr in - str_end.withOptionalCString { str_endPtr in - return String(cString: igImStreolRange(strPtr,str_endPtr)) - } - } + str.withOptionalCString { strPtr in + str_end.withOptionalCString { str_endPtr in + String(cString: igImStreolRange(strPtr, str_endPtr)) + } + } } @inlinable public func ImStricmp(_ str1: String? = nil, _ str2: String? = nil) -> Int32 { - str1.withOptionalCString { str1Ptr in - str2.withOptionalCString { str2Ptr in - return igImStricmp(str1Ptr,str2Ptr) - } - } + str1.withOptionalCString { str1Ptr in + str2.withOptionalCString { str2Ptr in + igImStricmp(str1Ptr, str2Ptr) + } + } } @inlinable public func ImStristr(_ haystack: String? = nil, _ haystack_end: String? = nil, _ needle: String? = nil, _ needle_end: String? = nil) -> String? { - haystack.withOptionalCString { haystackPtr in - haystack_end.withOptionalCString { haystack_endPtr in - needle.withOptionalCString { needlePtr in - needle_end.withOptionalCString { needle_endPtr in - return String(cString: igImStristr(haystackPtr,haystack_endPtr,needlePtr,needle_endPtr)) - } - } - } - } + haystack.withOptionalCString { haystackPtr in + haystack_end.withOptionalCString { haystack_endPtr in + needle.withOptionalCString { needlePtr in + needle_end.withOptionalCString { needle_endPtr in + String(cString: igImStristr(haystackPtr, haystack_endPtr, needlePtr, needle_endPtr)) + } + } + } + } } @inlinable public func ImStrlenW(_ str: UnsafePointer!) -> Int32 { - return igImStrlenW(str) + igImStrlenW(str) } -@inlinable public func ImStrncpy(_ dst: inout String?, _ src: String? = nil, _ count: Int) -> Void { - dst.withOptionalCString { dstPtr in - src.withOptionalCString { srcPtr in - return igImStrncpy(UnsafeMutablePointer(mutating: dstPtr),srcPtr,count) - } - } +@inlinable public func ImStrncpy(_ dst: inout String?, _ src: String? = nil, _ count: Int) { + dst.withOptionalCString { dstPtr in + src.withOptionalCString { srcPtr in + igImStrncpy(UnsafeMutablePointer(mutating: dstPtr), srcPtr, count) + } + } } @inlinable public func ImStrnicmp(_ str1: String? = nil, _ str2: String? = nil, _ count: Int) -> Int32 { - str1.withOptionalCString { str1Ptr in - str2.withOptionalCString { str2Ptr in - return igImStrnicmp(str1Ptr,str2Ptr,count) - } - } + str1.withOptionalCString { str1Ptr in + str2.withOptionalCString { str2Ptr in + igImStrnicmp(str1Ptr, str2Ptr, count) + } + } } @inlinable public func ImTextCharFromUtf8(_ out_char: UnsafeMutablePointer!, _ in_text: String? = nil, _ in_text_end: String? = nil) -> Int32 { - in_text.withOptionalCString { in_textPtr in - in_text_end.withOptionalCString { in_text_endPtr in - return igImTextCharFromUtf8(out_char,in_textPtr,in_text_endPtr) - } - } + in_text.withOptionalCString { in_textPtr in + in_text_end.withOptionalCString { in_text_endPtr in + igImTextCharFromUtf8(out_char, in_textPtr, in_text_endPtr) + } + } } -@inlinable public func ImTextCharToUtf8(_ out_buf: inout (CChar,CChar,CChar,CChar,CChar), _ c: UInt32) -> String? { - withUnsafeMutablePointer(to: &out_buf.0) { - return String(cString: igImTextCharToUtf8(UnsafeMutableBufferPointer(start: $0, count: 5).baseAddress!,c)) - } +@inlinable public func ImTextCharToUtf8(_ out_buf: inout (CChar, CChar, CChar, CChar, CChar), _ c: UInt32) -> String? { + withUnsafeMutablePointer(to: &out_buf.0) { + String(cString: igImTextCharToUtf8(UnsafeMutableBufferPointer(start: $0, count: 5).baseAddress!, c)) + } } @inlinable public func ImTextCountCharsFromUtf8(_ in_text: String? = nil, _ in_text_end: String? = nil) -> Int32 { - in_text.withOptionalCString { in_textPtr in - in_text_end.withOptionalCString { in_text_endPtr in - return igImTextCountCharsFromUtf8(in_textPtr,in_text_endPtr) - } - } + in_text.withOptionalCString { in_textPtr in + in_text_end.withOptionalCString { in_text_endPtr in + igImTextCountCharsFromUtf8(in_textPtr, in_text_endPtr) + } + } } @inlinable public func ImTextCountUtf8BytesFromChar(_ in_text: String? = nil, _ in_text_end: String? = nil) -> Int32 { - in_text.withOptionalCString { in_textPtr in - in_text_end.withOptionalCString { in_text_endPtr in - return igImTextCountUtf8BytesFromChar(in_textPtr,in_text_endPtr) - } - } + in_text.withOptionalCString { in_textPtr in + in_text_end.withOptionalCString { in_text_endPtr in + igImTextCountUtf8BytesFromChar(in_textPtr, in_text_endPtr) + } + } } @inlinable public func ImTextCountUtf8BytesFromStr(_ in_text: UnsafePointer!, _ in_text_end: UnsafePointer!) -> Int32 { - return igImTextCountUtf8BytesFromStr(in_text,in_text_end) + igImTextCountUtf8BytesFromStr(in_text, in_text_end) } @inlinable public func ImTextStrToUtf8(_ out_buf: inout String?, _ out_buf_size: Int32, _ in_text: UnsafePointer!, _ in_text_end: UnsafePointer!) -> Int32 { - out_buf.withOptionalCString { out_bufPtr in - return igImTextStrToUtf8(UnsafeMutablePointer(mutating: out_bufPtr),out_buf_size,in_text,in_text_end) - } + out_buf.withOptionalCString { out_bufPtr in + igImTextStrToUtf8(UnsafeMutablePointer(mutating: out_bufPtr), out_buf_size, in_text, in_text_end) + } } @inlinable public func ImTriangleArea(_ a: ImVec2, _ b: ImVec2, _ c: ImVec2) -> Float { - return igImTriangleArea(a,b,c) + igImTriangleArea(a, b, c) } -@inlinable public func ImTriangleClosestPoint(_ pOut: UnsafeMutablePointer!, _ a: ImVec2, _ b: ImVec2, _ c: ImVec2, _ p: ImVec2) -> Void { - return igImTriangleClosestPoint(pOut,a,b,c,p) +@inlinable public func ImTriangleClosestPoint(_ pOut: UnsafeMutablePointer!, _ a: ImVec2, _ b: ImVec2, _ c: ImVec2, _ p: ImVec2) { + igImTriangleClosestPoint(pOut, a, b, c, p) } @inlinable @discardableResult public func ImTriangleContainsPoint(_ a: ImVec2, _ b: ImVec2, _ c: ImVec2, _ p: ImVec2) -> Bool { - return igImTriangleContainsPoint(a,b,c,p) + igImTriangleContainsPoint(a, b, c, p) } @inlinable public func ImUpperPowerOfTwo(_ v: Int32) -> Int32 { - return igImUpperPowerOfTwo(v) + igImUpperPowerOfTwo(v) } - diff --git a/Tests/ImGuiTests/XCTestManifests.swift b/Tests/ImGuiTests/XCTestManifests.swift index e5fc019..ac412d5 100644 --- a/Tests/ImGuiTests/XCTestManifests.swift +++ b/Tests/ImGuiTests/XCTestManifests.swift @@ -1,20 +1,20 @@ #if !canImport(ObjectiveC) -import XCTest + import XCTest -extension ImGuiTests { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__ImGuiTests = [ - ("testCreateContext", testCreateContext), - ("testGetIO", testGetIO), - ("testImGuiVersion", testImGuiVersion) - ] -} + extension ImGuiTests { + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__ImGuiTests = [ + ("testCreateContext", testCreateContext), + ("testGetIO", testGetIO), + ("testImGuiVersion", testImGuiVersion), + ] + } -public func __allTests() -> [XCTestCaseEntry] { - return [ - testCase(ImGuiTests.__allTests__ImGuiTests) - ] -} + public func __allTests() -> [XCTestCaseEntry] { + [ + testCase(ImGuiTests.__allTests__ImGuiTests), + ] + } #endif