david-swift 04c77831b5
Some checks are pending
Deploy Docs / publish (push) Waiting to run
SwiftLint / SwiftLint (push) Waiting to run
Remove Core library
2025-10-30 21:36:13 +01:00

25 lines
615 B
Swift

//
// ViewStorage.swift
// Adwaita
//
// Created by david-swift on 01.08.24.
//
extension ViewStorage {
/// Modify the view.
/// - Parameter modify: The modification function.
public func modify(_ modify: (OpaquePointer?) -> Void) {
modify(opaquePointer)
}
/// Convert the pointer to a pointer of a certain type and modify the view.
/// - Parameters:
/// - type: The pointer's type.
/// - modify: The modification function.
public func modify<T>(_ type: T.Type, _ modify: (UnsafeMutablePointer<T>?) -> Void) {
modify(opaquePointer?.cast())
}
}