Browse Source

Correct types in methods

gingerBill 3 năm trước cách đây
mục cha
commit
5fe9aa919b

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 231 - 182
core/sys/darwin/Metal/MetalClasses.odin


+ 3 - 3
core/sys/darwin/Metal/MetalProcedures.odin

@@ -8,7 +8,7 @@ foreign import "system:Metal.framework"
 @(default_calling_convention="c", link_prefix="MTL")
 foreign Metal {
 	CopyAllDevices             :: proc() -> ^NS.Array ---
-	CopyAllDevicesWithObserver :: proc(observer: ^^NS.Object, handler: DeviceNotificationHandler) -> ^NS.Array ---
-	CreateSystemDefaultDevice  :: proc() -> ^NS.Object ---
-	RemoveDeviceObserver       :: proc(observer: ^NS.Object) ---
+	CopyAllDevicesWithObserver :: proc(observer: ^id, handler: DeviceNotificationHandler) -> ^NS.Array ---
+	CreateSystemDefaultDevice  :: proc() -> ^Device ---
+	RemoveDeviceObserver       :: proc(observer: id) ---
 }

+ 4 - 0
core/sys/darwin/Metal/MetalTypes.odin

@@ -4,11 +4,15 @@ import NS "core:sys/darwin/Foundation"
 import "core:intrinsics"
 
 BOOL :: NS.BOOL
+id :: ^NS.Object
 
 CFTimeInterval :: NS.TimeInterval
 
 IOSurfaceRef :: distinct rawptr
 
+dispatch_queue_t :: id
+dispatch_data_t  :: id
+
 @(private)
 msgSend :: intrinsics.objc_send
 

+ 8 - 0
examples/objc/objc_main.odin

@@ -0,0 +1,8 @@
+package objc_test
+
+import NS "core:sys/darwin/Foundation"
+import MTL "core:sys/darwin/Metal"
+
+main :: proc() {
+	
+}

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác