Begin work on core:sys/darwin/Foundation

This commit is contained in:
gingerBill
2022-02-09 00:19:20 +00:00
parent 340838c878
commit b95ade40c0
13 changed files with 414 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
package objc_Foundation
Locking :: struct($T: typeid) {using _: Object}
Locking_lock :: proc(self: ^Locking($T)) {
msgSend(nil, self, "lock")
}
Locking_unlock :: proc(self: ^Locking($T)) {
msgSend(nil, self, "unlock")
}
@(objc_class="NSCondition")
Condition :: struct {using _: Locking(Condition) }
Condition_wait :: proc(self: ^Condition) {
msgSend(nil, self, "wait")
}
Condition_waitUntilDate :: proc(self: ^Condition, limit: ^Date) -> BOOL {
return msgSend(BOOL, self, "waitUntilDate:", limit)
}
Condition_signal :: proc(self: ^Condition) {
msgSend(nil, self, "signal")
}
Condition_broadcast :: proc(self: ^Condition) {
msgSend(nil, self, "broadcast")
}