mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Added Foundation bindings
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package objc_Foundation
|
||||
|
||||
@(objc_class = "URLRequest")
|
||||
URLRequest :: struct { using _: Object }
|
||||
|
||||
@(objc_type = URLRequest, objc_name = "alloc", objc_is_class_method = true)
|
||||
URLRequest_alloc :: proc "c" () -> ^URLRequest {
|
||||
return msgSend(^URLRequest, URLRequest, "alloc")
|
||||
}
|
||||
|
||||
@(objc_type = URLRequest, objc_name = "requestWithURL", objc_is_class_method = true)
|
||||
URLRequest_requestWithURL :: proc "c" (url: ^URL) -> ^URLRequest {
|
||||
return msgSend(^URLRequest, URLRequest, "requestWithURL:", url)
|
||||
}
|
||||
|
||||
@(objc_type = URLRequest, objc_name = "init")
|
||||
URLRequest_init :: proc "c" (self: ^URLRequest) -> ^URLRequest {
|
||||
return msgSend(^URLRequest, URLRequest, "init")
|
||||
}
|
||||
|
||||
@(objc_type = URLRequest, objc_name = "url")
|
||||
URLRequest_url :: proc "c" (self: ^URLRequest) -> ^URL {
|
||||
return msgSend(^URL, self, "URL")
|
||||
}
|
||||
Reference in New Issue
Block a user