diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2024-04-08 16:30:44 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-08 16:30:44 +0100 |
| commit | a00d96c0de2c0b6e4df76e58c1c394373e173751 (patch) | |
| tree | c12fb1c6a72d3c5282b1ff5a4ae241c11334a3c1 /core/sys/darwin/Foundation/NSDictionary.odin | |
| parent | ecac3aef3275e199deac2ce568647d14049f9e49 (diff) | |
| parent | ef82f3e71e6ad08ecffa578b44a6dd1323676f0b (diff) | |
Merge pull request #3395 from odin-lang/darwin-reorganizationdev-2024-04
Move `vendor:darwin/Foundation` to `core:sys/darwin/Foundation`
Diffstat (limited to 'core/sys/darwin/Foundation/NSDictionary.odin')
| -rw-r--r-- | core/sys/darwin/Foundation/NSDictionary.odin | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/core/sys/darwin/Foundation/NSDictionary.odin b/core/sys/darwin/Foundation/NSDictionary.odin new file mode 100644 index 000000000..8af58cf62 --- /dev/null +++ b/core/sys/darwin/Foundation/NSDictionary.odin @@ -0,0 +1,50 @@ +package objc_Foundation + +@(objc_class="NSDictionary") +Dictionary :: struct {using _: Copying(Dictionary)} + +@(objc_type=Dictionary, objc_name="dictionary", objc_is_class_method=true) +Dictionary_dictionary :: proc "c" () -> ^Dictionary { + return msgSend(^Dictionary, Dictionary, "dictionary") +} + +@(objc_type=Dictionary, objc_name="dictionaryWithObject", objc_is_class_method=true) +Dictionary_dictionaryWithObject :: proc "c" (object: ^Object, forKey: ^Object) -> ^Dictionary { + return msgSend(^Dictionary, Dictionary, "dictionaryWithObject:forKey:", object, forKey) +} + +@(objc_type=Dictionary, objc_name="dictionaryWithObjects", objc_is_class_method=true) +Dictionary_dictionaryWithObjects :: proc "c" (objects: [^]^Object, forKeys: [^]^Object, count: UInteger) -> ^Dictionary { + return msgSend(^Dictionary, Dictionary, "dictionaryWithObjects:forKeys:count", objects, forKeys, count) +} + + +@(objc_type=Dictionary, objc_name="alloc", objc_is_class_method=true) +Dictionary_alloc :: proc "c" () -> ^Dictionary { + return msgSend(^Dictionary, Dictionary, "alloc") +} + +@(objc_type=Dictionary, objc_name="init") +Dictionary_init :: proc "c" (self: ^Dictionary) -> ^Dictionary { + return msgSend(^Dictionary, self, "init") +} + +@(objc_type=Dictionary, objc_name="initWithObjects") +Dictionary_initWithObjects :: proc "c" (self: ^Dictionary, objects: [^]^Object, forKeys: [^]^Object, count: UInteger) -> ^Dictionary { + return msgSend(^Dictionary, self, "initWithObjects:forKeys:count", objects, forKeys, count) +} + +@(objc_type=Dictionary, objc_name="objectForKey") +Dictionary_objectForKey :: proc "c" (self: ^Dictionary, key: ^Object) -> ^Object { + return msgSend(^Dictionary, self, "objectForKey:", key) +} + +@(objc_type=Dictionary, objc_name="count") +Dictionary_count :: proc "c" (self: ^Dictionary) -> UInteger { + return msgSend(UInteger, self, "count") +} + +@(objc_type=Dictionary, objc_name="keyEnumerator") +Dictionary_keyEnumerator :: proc "c" (self: ^Dictionary, $KeyType: typeid) -> (enumerator: ^Enumerator(KeyType)) { + return msgSend(type_of(enumerator), self, "keyEnumerator") +} |