josemeyer
05/08/2017, 12:09 PMolonho
05/08/2017, 2:20 PMsvyatoslav.scherbina
05/08/2017, 2:37 PMCValue
by initializing each field individually using the following expression:
cValue<SDL_Color> {
r = 255
g = 255
b = 255
a = 0
}
If the type is known (e.g. when this expression is used as function argument), then type argument can be omitted:
cValue {
r = 255
...
}
(This approach is not documented yet, and the previous one with readValue
, described at
https://github.com/JetBrains/kotlin-native/blob/master/INTEROP.md#passing-and-receiving-structs-by-value
is less convenient)josemeyer
05/08/2017, 6:17 PM