david-swift 963a02b1e1
All checks were successful
Deploy Docs / publish (push) Successful in 21m42s
SwiftLint / SwiftLint (push) Successful in 3s
Add support for AdwBreakpointBin
2024-10-21 18:30:10 +02:00

25 lines
454 B
Swift

//
// Bool.swift
// Adwaita
//
// Created by david-swift on 15.01.24.
//
import CAdw
extension Bool {
/// Get the gboolean for C.
public var cBool: Int32 {
self ? 1 : 0
}
/// The gboolean as a GValue.
public var gValue: UnsafePointer<GValue> {
let pointer = UnsafeMutablePointer<GValue>.allocate(capacity: 1)
pointer.initialize(to: gtui_initialize_boolean(cBool))
return .init(pointer)
}
}