Change objc_class_name to objc_name with objc_is_class_method

This commit is contained in:
gingerBill
2022-02-14 17:31:55 +00:00
parent e69738c079
commit 03aec70287
18 changed files with 166 additions and 172 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ Array :: struct {
using _: Copying(Array),
}
@(objc_type=Array, objc_class_name="alloc")
@(objc_type=Array, objc_name="alloc", objc_is_class_method=true)
Array_alloc :: proc() -> ^Array {
return msgSend(^Array, Array, "alloc")
}
@@ -3,7 +3,7 @@ package objc_Foundation
@(objc_class="NSAutoreleasePool")
AutoreleasePool :: struct {using _: Object}
@(objc_type=AutoreleasePool, objc_class_name="alloc")
@(objc_type=AutoreleasePool, objc_name="alloc", objc_is_class_method=true)
AutoreleasePool_alloc :: proc() -> ^AutoreleasePool {
return msgSend(^AutoreleasePool, AutoreleasePool, "alloc")
}
+4 -4
View File
@@ -3,23 +3,23 @@ package objc_Foundation
@(objc_class="NSBundle")
Bundle :: struct { using _: Object }
@(objc_type=Bundle, objc_class_name="mainBundle")
@(objc_type=Bundle, objc_name="mainBundle", objc_is_class_method=true)
Bundle_mainBundle :: proc() -> ^Bundle {
return msgSend(^Bundle, Bundle, "mainBundle")
}
@(objc_type=Bundle, objc_class_name="bundleWithPath")
@(objc_type=Bundle, objc_name="bundleWithPath", objc_is_class_method=true)
Bundle_bundleWithPath :: proc(path: ^String) -> ^Bundle {
return msgSend(^Bundle, Bundle, "bundleWithPath:", path)
}
@(objc_type=Bundle, objc_class_name="bundleWithURL")
@(objc_type=Bundle, objc_name="bundleWithURL", objc_is_class_method=true)
Bundle_bundleWithURL :: proc(url: ^URL) -> ^Bundle {
return msgSend(^Bundle, Bundle, "bundleWithUrl:", url)
}
@(objc_type=Bundle, objc_class_name="alloc")
@(objc_type=Bundle, objc_name="alloc", objc_is_class_method=true)
Bundle_alloc :: proc() -> ^Bundle {
return msgSend(^Bundle, Bundle, "alloc")
}
+1 -1
View File
@@ -3,7 +3,7 @@ package objc_Foundation
@(objc_class="NSData")
Data :: struct {using _: Copying(Data)}
@(objc_type=Data, objc_class_name="alloc")
@(objc_type=Data, objc_name="alloc", objc_is_class_method=true)
Data_alloc :: proc() -> ^Data {
return msgSend(^Data, Data, "alloc")
}
+1 -1
View File
@@ -3,7 +3,7 @@ package objc_Foundation
@(objc_class="NSDate")
Date :: struct {using _: Copying(Date)}
@(objc_type=Date, objc_class_name="alloc")
@(objc_type=Date, objc_name="alloc", objc_is_class_method=true)
Date_alloc :: proc() -> ^Date {
return msgSend(^Date, Date, "alloc")
}
+4 -4
View File
@@ -3,23 +3,23 @@ package objc_Foundation
@(objc_class="NSDictionary")
Dictionary :: struct {using _: Copying(Dictionary)}
@(objc_type=Dictionary, objc_class_name="dictionary")
@(objc_type=Dictionary, objc_name="dictionary", objc_is_class_method=true)
Dictionary_dictionary :: proc() -> ^Dictionary {
return msgSend(^Dictionary, Dictionary, "dictionary")
}
@(objc_type=Dictionary, objc_class_name="dictionaryWithObject")
@(objc_type=Dictionary, objc_name="dictionaryWithObject", objc_is_class_method=true)
Dictionary_dictionaryWithObject :: proc(object: ^Object, forKey: ^Object) -> ^Dictionary {
return msgSend(^Dictionary, Dictionary, "dictionaryWithObject:forKey:", object, forKey)
}
@(objc_type=Dictionary, objc_class_name="dictionaryWithObjects")
@(objc_type=Dictionary, objc_name="dictionaryWithObjects", objc_is_class_method=true)
Dictionary_dictionaryWithObjects :: proc(objects: [^]^Object, forKeys: [^]^Object, count: UInteger) -> ^Dictionary {
return msgSend(^Dictionary, Dictionary, "dictionaryWithObjects:forKeys:count", objects, forKeys, count)
}
@(objc_type=Dictionary, objc_class_name="alloc")
@(objc_type=Dictionary, objc_name="alloc", objc_is_class_method=true)
Dictionary_alloc :: proc() -> ^Dictionary {
return msgSend(^Dictionary, Dictionary, "alloc")
}
+1 -1
View File
@@ -19,7 +19,7 @@ Enumerator :: struct($T: typeid) where intrinsics.type_is_pointer(T), intrinsics
}
@(objc_type=FastEnumeration, objc_class_name="alloc")
@(objc_type=FastEnumeration, objc_name="alloc", objc_is_class_method=true)
FastEnumeration_alloc :: proc() -> ^FastEnumeration {
return msgSend(^FastEnumeration, FastEnumeration, "alloc")
}
+2 -2
View File
@@ -32,7 +32,7 @@ foreign Foundation {
Error :: struct { using _: Copying(Error) }
@(objc_type=Error, objc_class_name="alloc")
@(objc_type=Error, objc_name="alloc", objc_is_class_method=true)
Error_alloc :: proc() -> ^Error {
return msgSend(^Error, Error, "alloc")
}
@@ -42,7 +42,7 @@ Error_init :: proc(self: ^Error) -> ^Error {
return msgSend(^Error, self, "init")
}
@(objc_type=Error, objc_class_name="errorWithDomain")
@(objc_type=Error, objc_name="errorWithDomain", objc_is_class_method=true)
Error_errorWithDomain :: proc(domain: ErrorDomain, code: Integer, userInfo: ^Dictionary) -> ^Error {
return msgSend(^Error, Error, "errorWithDomain:code:userInfo:", domain, code, userInfo)
}
+1 -1
View File
@@ -13,7 +13,7 @@ Locking_unlock :: proc(self: ^Locking($T)) {
Condition :: struct {using _: Locking(Condition) }
@(objc_type=Condition, objc_class_name="alloc")
@(objc_type=Condition, objc_name="alloc", objc_is_class_method=true)
Condition_alloc :: proc() -> ^Condition {
return msgSend(^Condition, Condition, "alloc")
}
@@ -4,7 +4,7 @@ package objc_Foundation
Notification :: struct{using _: Object}
@(objc_type=Notification, objc_class_name="alloc")
@(objc_type=Notification, objc_name="alloc", objc_is_class_method=true)
Notification_alloc :: proc() -> ^Notification {
return msgSend(^Notification, Notification, "alloc")
}
+17 -17
View File
@@ -8,7 +8,7 @@ import "core:c"
@(objc_class="NSValue")
Value :: struct{using _: Copying(Value)}
@(objc_type=Value, objc_class_name="alloc")
@(objc_type=Value, objc_name="alloc", objc_is_class_method=true)
Value_alloc :: proc() -> ^Value {
return msgSend(^Value, Value, "alloc")
}
@@ -18,12 +18,12 @@ Value_init :: proc(self: ^Value) -> ^Value {
return msgSend(^Value, self, "init")
}
@(objc_type=Value, objc_class_name="valueWithBytes")
@(objc_type=Value, objc_name="valueWithBytes", objc_is_class_method=true)
Value_valueWithBytes :: proc(value: rawptr, type: cstring) -> ^Value {
return msgSend(^Value, Value, "valueWithBytes:objCType:", value, type)
}
@(objc_type=Value, objc_class_name="valueWithPointer")
@(objc_type=Value, objc_name="valueWithPointer", objc_is_class_method=true)
Value_valueWithPointer :: proc(pointer: rawptr) -> ^Value {
return msgSend(^Value, Value, "valueWithPointer:", pointer)
}
@@ -64,7 +64,7 @@ Value_pointerValue :: proc(self: ^Value) -> rawptr {
Number :: struct{using _: Copying(Number), using _: Value}
@(objc_type=Number, objc_class_name="alloc")
@(objc_type=Number, objc_name="alloc", objc_is_class_method=true)
Number_alloc :: proc() -> ^Number {
return msgSend(^Number, Number, "alloc")
}
@@ -74,19 +74,19 @@ Number_init :: proc(self: ^Number) -> ^Number {
return msgSend(^Number, self, "init")
}
@(objc_type=Number, objc_class_name="numberWithI8") Number_numberWithI8 :: proc(value: i8) -> ^Number { return msgSend(^Number, Number, "numberWithChar:", value) }
@(objc_type=Number, objc_class_name="numberWithU8") Number_numberWithU8 :: proc(value: u8) -> ^Number { return msgSend(^Number, Number, "numberWithUnsignedChar:", value) }
@(objc_type=Number, objc_class_name="numberWithI16") Number_numberWithI16 :: proc(value: i16) -> ^Number { return msgSend(^Number, Number, "numberWithShort:", value) }
@(objc_type=Number, objc_class_name="numberWithU16") Number_numberWithU16 :: proc(value: u16) -> ^Number { return msgSend(^Number, Number, "numberWithUnsignedShort:", value) }
@(objc_type=Number, objc_class_name="numberWithI32") Number_numberWithI32 :: proc(value: i32) -> ^Number { return msgSend(^Number, Number, "numberWithInt:", value) }
@(objc_type=Number, objc_class_name="numberWithU32") Number_numberWithU32 :: proc(value: u32) -> ^Number { return msgSend(^Number, Number, "numberWithUnsignedInt:", value) }
@(objc_type=Number, objc_class_name="numberWithInt") Number_numberWithInt :: proc(value: int) -> ^Number { return msgSend(^Number, Number, "numberWithLong:", value) }
@(objc_type=Number, objc_class_name="numberWithUint") Number_numberWithUint :: proc(value: uint) -> ^Number { return msgSend(^Number, Number, "numberWithUnsignedLong:", value) }
@(objc_type=Number, objc_class_name="numberWithU64") Number_numberWithU64 :: proc(value: u64) -> ^Number { return msgSend(^Number, Number, "numberWithLongLong:", value) }
@(objc_type=Number, objc_class_name="numberWithI64") Number_numberWithI64 :: proc(value: i64) -> ^Number { return msgSend(^Number, Number, "numberWithUnsignedLongLong:", value) }
@(objc_type=Number, objc_class_name="numberWithF32") Number_numberWithF32 :: proc(value: f32) -> ^Number { return msgSend(^Number, Number, "numberWithFloat:", value) }
@(objc_type=Number, objc_class_name="numberWithF64") Number_numberWithF64 :: proc(value: f64) -> ^Number { return msgSend(^Number, Number, "numberWithDouble:", value) }
@(objc_type=Number, objc_class_name="numberWithBool") Number_numberWithBool :: proc(value: BOOL) -> ^Number { return msgSend(^Number, Number, "numberWithBool:", value) }
@(objc_type=Number, objc_name="numberWithI8", objc_is_class_method=true) Number_numberWithI8 :: proc(value: i8) -> ^Number { return msgSend(^Number, Number, "numberWithChar:", value) }
@(objc_type=Number, objc_name="numberWithU8", objc_is_class_method=true) Number_numberWithU8 :: proc(value: u8) -> ^Number { return msgSend(^Number, Number, "numberWithUnsignedChar:", value) }
@(objc_type=Number, objc_name="numberWithI16", objc_is_class_method=true) Number_numberWithI16 :: proc(value: i16) -> ^Number { return msgSend(^Number, Number, "numberWithShort:", value) }
@(objc_type=Number, objc_name="numberWithU16", objc_is_class_method=true) Number_numberWithU16 :: proc(value: u16) -> ^Number { return msgSend(^Number, Number, "numberWithUnsignedShort:", value) }
@(objc_type=Number, objc_name="numberWithI32", objc_is_class_method=true) Number_numberWithI32 :: proc(value: i32) -> ^Number { return msgSend(^Number, Number, "numberWithInt:", value) }
@(objc_type=Number, objc_name="numberWithU32", objc_is_class_method=true) Number_numberWithU32 :: proc(value: u32) -> ^Number { return msgSend(^Number, Number, "numberWithUnsignedInt:", value) }
@(objc_type=Number, objc_name="numberWithInt", objc_is_class_method=true) Number_numberWithInt :: proc(value: int) -> ^Number { return msgSend(^Number, Number, "numberWithLong:", value) }
@(objc_type=Number, objc_name="numberWithUint", objc_is_class_method=true) Number_numberWithUint :: proc(value: uint) -> ^Number { return msgSend(^Number, Number, "numberWithUnsignedLong:", value) }
@(objc_type=Number, objc_name="numberWithU64", objc_is_class_method=true) Number_numberWithU64 :: proc(value: u64) -> ^Number { return msgSend(^Number, Number, "numberWithLongLong:", value) }
@(objc_type=Number, objc_name="numberWithI64", objc_is_class_method=true) Number_numberWithI64 :: proc(value: i64) -> ^Number { return msgSend(^Number, Number, "numberWithUnsignedLongLong:", value) }
@(objc_type=Number, objc_name="numberWithF32", objc_is_class_method=true) Number_numberWithF32 :: proc(value: f32) -> ^Number { return msgSend(^Number, Number, "numberWithFloat:", value) }
@(objc_type=Number, objc_name="numberWithF64", objc_is_class_method=true) Number_numberWithF64 :: proc(value: f64) -> ^Number { return msgSend(^Number, Number, "numberWithDouble:", value) }
@(objc_type=Number, objc_name="numberWithBool", objc_is_class_method=true) Number_numberWithBool :: proc(value: BOOL) -> ^Number { return msgSend(^Number, Number, "numberWithBool:", value) }
Number_number :: proc{
Number_numberWithI8,
+1 -1
View File
@@ -59,7 +59,7 @@ MakeConstantString :: proc "c" (#const c: cstring) -> ^String {
}
@(objc_type=String, objc_class_name="alloc")
@(objc_type=String, objc_name="alloc", objc_is_class_method=true)
String_alloc :: proc() -> ^String {
return msgSend(^String, String, "alloc")
}
+1 -1
View File
@@ -4,7 +4,7 @@ package objc_Foundation
URL :: struct{using _: Copying(URL)}
@(objc_type=URL, objc_class_name="alloc")
@(objc_type=URL, objc_name="alloc", objc_is_class_method=true)
URL_alloc :: proc() -> ^URL {
return msgSend(^URL, URL, "alloc")
}