Improve utilities

This commit is contained in:
gingerBill committed 2022-04-15 11:33:28 +01:00
1 parent cfeb16f917
commit 6b7c04e046
3 files changed
+23 -4

No files matched your search

+5
View File
@@ -11,4 +11,9 @@ foreign Metal {
CopyAllDevicesWithObserver :: proc(observer: ^id, handler: DeviceNotificationHandler) -> ^NS.Array ---
CreateSystemDefaultDevice :: proc() -> ^Device ---
RemoveDeviceObserver :: proc(observer: id) ---
}
new :: proc($T: typeid) -> ^T where intrinsics.type_is_subtype_of(T, NS.Object) {
return T.alloc()->init()
}