diff options
Diffstat (limited to 'core/sys/darwin/Foundation/NSURL.odin')
| -rw-r--r-- | core/sys/darwin/Foundation/NSURL.odin | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/core/sys/darwin/Foundation/NSURL.odin b/core/sys/darwin/Foundation/NSURL.odin new file mode 100644 index 000000000..9e9081219 --- /dev/null +++ b/core/sys/darwin/Foundation/NSURL.odin @@ -0,0 +1,30 @@ +package objc_Foundation + +@(objc_class="NSURL") +URL :: struct{using _: Copying(URL)} + + +@(objc_type=URL, objc_name="alloc", objc_is_class_method=true) +URL_alloc :: proc "c" () -> ^URL { + return msgSend(^URL, URL, "alloc") +} + +@(objc_type=URL, objc_name="init") +URL_init :: proc "c" (self: ^URL) -> ^URL { + return msgSend(^URL, self, "init") +} + +@(objc_type=URL, objc_name="initWithString") +URL_initWithString :: proc "c" (self: ^URL, value: ^String) -> ^URL { + return msgSend(^URL, self, "initWithString:", value) +} + +@(objc_type=URL, objc_name="initFileURLWithPath") +URL_initFileURLWithPath :: proc "c" (self: ^URL, path: ^String) -> ^URL { + return msgSend(^URL, self, "initFileURLWithPath:", path) +} + +@(objc_type=URL, objc_name="fileSystemRepresentation") +URL_fileSystemRepresentation :: proc "c" (self: ^URL) -> cstring { + return msgSend(cstring, self, "fileSystemRepresentation") +} |