NSDictionary.odin 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. package objc_Foundation
  2. @(objc_class="NSDictionary")
  3. Dictionary :: struct {using _: Copying(Dictionary)}
  4. @(objc_type=Dictionary, objc_name="dictionary", objc_is_class_method=true)
  5. Dictionary_dictionary :: proc "c" () -> ^Dictionary {
  6. return msgSend(^Dictionary, Dictionary, "dictionary")
  7. }
  8. @(objc_type=Dictionary, objc_name="dictionaryWithObject", objc_is_class_method=true)
  9. Dictionary_dictionaryWithObject :: proc "c" (object: ^Object, forKey: ^Object) -> ^Dictionary {
  10. return msgSend(^Dictionary, Dictionary, "dictionaryWithObject:forKey:", object, forKey)
  11. }
  12. @(objc_type=Dictionary, objc_name="dictionaryWithObjects", objc_is_class_method=true)
  13. Dictionary_dictionaryWithObjects :: proc "c" (objects: [^]^Object, forKeys: [^]^Object, count: UInteger) -> ^Dictionary {
  14. return msgSend(^Dictionary, Dictionary, "dictionaryWithObjects:forKeys:count", objects, forKeys, count)
  15. }
  16. @(objc_type=Dictionary, objc_name="alloc", objc_is_class_method=true)
  17. Dictionary_alloc :: proc "c" () -> ^Dictionary {
  18. return msgSend(^Dictionary, Dictionary, "alloc")
  19. }
  20. @(objc_type=Dictionary, objc_name="init")
  21. Dictionary_init :: proc "c" (self: ^Dictionary) -> ^Dictionary {
  22. return msgSend(^Dictionary, self, "init")
  23. }
  24. @(objc_type=Dictionary, objc_name="initWithObjects")
  25. Dictionary_initWithObjects :: proc "c" (self: ^Dictionary, objects: [^]^Object, forKeys: [^]^Object, count: UInteger) -> ^Dictionary {
  26. return msgSend(^Dictionary, self, "initWithObjects:forKeys:count", objects, forKeys, count)
  27. }
  28. @(objc_type=Dictionary, objc_name="objectForKey")
  29. Dictionary_objectForKey :: proc "c" (self: ^Dictionary, key: ^Object) -> ^Object {
  30. return msgSend(^Dictionary, self, "objectForKey:", key)
  31. }
  32. @(objc_type=Dictionary, objc_name="count")
  33. Dictionary_count :: proc "c" (self: ^Dictionary) -> UInteger {
  34. return msgSend(UInteger, self, "count")
  35. }
  36. @(objc_type=Dictionary, objc_name="keyEnumerator")
  37. Dictionary_keyEnumerator :: proc "c" (self: ^Dictionary, $KeyType: typeid) -> (enumerator: ^Enumerator(KeyType)) {
  38. return msgSend(type_of(enumerator), self, "keyEnumerator")
  39. }