Skip to content

Commit

Permalink
Add comment from removed argument.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
christiangnrd committed Dec 10, 2024
1 parent 03796fd commit 3be6aaa
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions res/wrap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,46 @@ This directory contains scripts to generate Julia wrappers for Metal and MetalPe
Currently, only `enums` and `structs` are able to be generated.

The scripts are meant to be run from this directory, and at the moment, [this Clang.jl branch](https://github.com/christiangnrd/Clang.jl/tree/objectiveC) must be used.

####

Comment from removed file on `MTLDataType`. Parsing the headers does not reveal these hidden values.

```
#=
Possible (undocumented) values for this enum can be iterated using the MTLTypeInternal type:
\`\`\`julia
load_framework("Metal")
@objcwrapper immutable=false MTLType <: NSObject
@objcwrapper immutable=false MTLTypeInternal <: MTLType
@objcproperties MTLTypeInternal begin
@autoproperty dataType::UInt64
@autoproperty description::id{NSString}
end
function MTLTypeInternal(dataType::Integer)
obj = MTLTypeInternal(@objc [MTLTypeInternal alloc]::id{MTLTypeInternal})
finalizer(dealloc, obj)
@objc [obj::id{MTLTypeInternal} initWithDataType:dataType::UInt64]::id{MTLTypeInternal}
return obj
end
dealloc(obj::MTLTypeInternal) = @objc [obj::id{MTLTypeInternal} dealloc]::Cvoid
for i in 1:200
typ = MTLTypeInternal(i)
name = string(typ.description)
if name != "Unknown"
println(" $name = $i")
end
end
\`\`\`
=#
```

0 comments on commit 3be6aaa

Please sign in to comment.