Implement CValuesRef in interop

* Represent pointer parameters of C functions as `CValuesRef`.
* Represent struct value parameters as `CValue`.
* Implement some helper methods to make the new approach more useful.
* Migrate some code to new interop approach for pointers and values.

Also do not map to `String?`:
- pointers to 8-bit integers;
- pointers to non-const chars.
This commit is contained in:
Svyatoslav Scherbina
2017-03-16 14:48:17 +07:00
committed by SvyatoslavScherbina
parent 7a876a3ccd
commit c9d8d4d57d
22 changed files with 2072 additions and 1557 deletions
+1 -1
View File
@@ -491,7 +491,7 @@ class Game(width: Int, height: Int, val visualizer: GameFieldVisualizer, val use
}
fun get_SDL_Error() = SDL_GetError()!!.asCString().toString()
fun get_SDL_Error() = SDL_GetError()!!.toKString()
class SDL_Visualizer(val width: Int, val height: Int): GameFieldVisualizer, UserInput {
private val CELL_SIZE = 20