|
| 1 | +// AUTO GENERATED FILE, DO NOT EDIT. |
| 2 | +// |
| 3 | +// Generated by `package:ffigen`. |
| 4 | +// ignore_for_file: type=lint |
| 5 | +import 'dart:ffi' as ffi; |
| 6 | + |
| 7 | +class RustyPlatinumUtils { |
| 8 | + /// Holds the symbol lookup function. |
| 9 | + final ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName) |
| 10 | + _lookup; |
| 11 | + |
| 12 | + /// The symbols are looked up in [dynamicLibrary]. |
| 13 | + RustyPlatinumUtils(ffi.DynamicLibrary dynamicLibrary) |
| 14 | + : _lookup = dynamicLibrary.lookup; |
| 15 | + |
| 16 | + /// The symbols are looked up with [lookup]. |
| 17 | + RustyPlatinumUtils.fromLookup( |
| 18 | + ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName) |
| 19 | + lookup) |
| 20 | + : _lookup = lookup; |
| 21 | + |
| 22 | + ffi.Pointer<ffi.Void> rpu_load_wmb( |
| 23 | + ffi.Pointer<ffi.Char> wmb_path, |
| 24 | + ) { |
| 25 | + return _rpu_load_wmb( |
| 26 | + wmb_path, |
| 27 | + ); |
| 28 | + } |
| 29 | + |
| 30 | + late final _rpu_load_wmbPtr = _lookup< |
| 31 | + ffi.NativeFunction< |
| 32 | + ffi.Pointer<ffi.Void> Function( |
| 33 | + ffi.Pointer<ffi.Char>)>>('rpu_load_wmb'); |
| 34 | + late final _rpu_load_wmb = _rpu_load_wmbPtr |
| 35 | + .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Char>)>(); |
| 36 | + |
| 37 | + ffi.Pointer<ffi.Void> rpu_new_context() { |
| 38 | + return _rpu_new_context(); |
| 39 | + } |
| 40 | + |
| 41 | + late final _rpu_new_contextPtr = |
| 42 | + _lookup<ffi.NativeFunction<ffi.Pointer<ffi.Void> Function()>>( |
| 43 | + 'rpu_new_context'); |
| 44 | + late final _rpu_new_context = |
| 45 | + _rpu_new_contextPtr.asFunction<ffi.Pointer<ffi.Void> Function()>(); |
| 46 | + |
| 47 | + ffi.Pointer<ffi.Void> rpu_new_renderer( |
| 48 | + ffi.Pointer<ffi.Void> context, |
| 49 | + int width, |
| 50 | + int height, |
| 51 | + ffi.Pointer<ffi.Void> scene_data, |
| 52 | + ) { |
| 53 | + return _rpu_new_renderer( |
| 54 | + context, |
| 55 | + width, |
| 56 | + height, |
| 57 | + scene_data, |
| 58 | + ); |
| 59 | + } |
| 60 | + |
| 61 | + late final _rpu_new_rendererPtr = _lookup< |
| 62 | + ffi.NativeFunction< |
| 63 | + ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>, ffi.Uint32, |
| 64 | + ffi.Uint32, ffi.Pointer<ffi.Void>)>>('rpu_new_renderer'); |
| 65 | + late final _rpu_new_renderer = _rpu_new_rendererPtr.asFunction< |
| 66 | + ffi.Pointer<ffi.Void> Function( |
| 67 | + ffi.Pointer<ffi.Void>, int, int, ffi.Pointer<ffi.Void>)>(); |
| 68 | + |
| 69 | + void rpu_drop_renderer( |
| 70 | + ffi.Pointer<ffi.Void> state, |
| 71 | + ) { |
| 72 | + return _rpu_drop_renderer( |
| 73 | + state, |
| 74 | + ); |
| 75 | + } |
| 76 | + |
| 77 | + late final _rpu_drop_rendererPtr = |
| 78 | + _lookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>( |
| 79 | + 'rpu_drop_renderer'); |
| 80 | + late final _rpu_drop_renderer = |
| 81 | + _rpu_drop_rendererPtr.asFunction<void Function(ffi.Pointer<ffi.Void>)>(); |
| 82 | + |
| 83 | + int rpu_render( |
| 84 | + ffi.Pointer<ffi.Void> state, |
| 85 | + ffi.Pointer<ffi.Uint8> buffer, |
| 86 | + int buffer_size, |
| 87 | + int width, |
| 88 | + int height, |
| 89 | + double bg_r, |
| 90 | + double bg_g, |
| 91 | + double bg_b, |
| 92 | + double bg_a, |
| 93 | + ) { |
| 94 | + return _rpu_render( |
| 95 | + state, |
| 96 | + buffer, |
| 97 | + buffer_size, |
| 98 | + width, |
| 99 | + height, |
| 100 | + bg_r, |
| 101 | + bg_g, |
| 102 | + bg_b, |
| 103 | + bg_a, |
| 104 | + ); |
| 105 | + } |
| 106 | + |
| 107 | + late final _rpu_renderPtr = _lookup< |
| 108 | + ffi.NativeFunction< |
| 109 | + ffi.Int32 Function( |
| 110 | + ffi.Pointer<ffi.Void>, |
| 111 | + ffi.Pointer<ffi.Uint8>, |
| 112 | + ffi.Size, |
| 113 | + ffi.Uint32, |
| 114 | + ffi.Uint32, |
| 115 | + ffi.Float, |
| 116 | + ffi.Float, |
| 117 | + ffi.Float, |
| 118 | + ffi.Float)>>('rpu_render'); |
| 119 | + late final _rpu_render = _rpu_renderPtr.asFunction< |
| 120 | + int Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Uint8>, int, int, int, |
| 121 | + double, double, double, double)>(); |
| 122 | + |
| 123 | + void rpu_add_camera_rotation( |
| 124 | + ffi.Pointer<ffi.Void> state, |
| 125 | + double x, |
| 126 | + double y, |
| 127 | + ) { |
| 128 | + return _rpu_add_camera_rotation( |
| 129 | + state, |
| 130 | + x, |
| 131 | + y, |
| 132 | + ); |
| 133 | + } |
| 134 | + |
| 135 | + late final _rpu_add_camera_rotationPtr = _lookup< |
| 136 | + ffi.NativeFunction< |
| 137 | + ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Float, |
| 138 | + ffi.Float)>>('rpu_add_camera_rotation'); |
| 139 | + late final _rpu_add_camera_rotation = _rpu_add_camera_rotationPtr |
| 140 | + .asFunction<void Function(ffi.Pointer<ffi.Void>, double, double)>(); |
| 141 | + |
| 142 | + void rpu_add_camera_offset( |
| 143 | + ffi.Pointer<ffi.Void> state, |
| 144 | + double x, |
| 145 | + double y, |
| 146 | + ) { |
| 147 | + return _rpu_add_camera_offset( |
| 148 | + state, |
| 149 | + x, |
| 150 | + y, |
| 151 | + ); |
| 152 | + } |
| 153 | + |
| 154 | + late final _rpu_add_camera_offsetPtr = _lookup< |
| 155 | + ffi.NativeFunction< |
| 156 | + ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Float, |
| 157 | + ffi.Float)>>('rpu_add_camera_offset'); |
| 158 | + late final _rpu_add_camera_offset = _rpu_add_camera_offsetPtr |
| 159 | + .asFunction<void Function(ffi.Pointer<ffi.Void>, double, double)>(); |
| 160 | + |
| 161 | + void rpu_zoom_camera_by( |
| 162 | + ffi.Pointer<ffi.Void> state, |
| 163 | + double distance, |
| 164 | + ) { |
| 165 | + return _rpu_zoom_camera_by( |
| 166 | + state, |
| 167 | + distance, |
| 168 | + ); |
| 169 | + } |
| 170 | + |
| 171 | + late final _rpu_zoom_camera_byPtr = _lookup< |
| 172 | + ffi |
| 173 | + .NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Float)>>( |
| 174 | + 'rpu_zoom_camera_by'); |
| 175 | + late final _rpu_zoom_camera_by = _rpu_zoom_camera_byPtr |
| 176 | + .asFunction<void Function(ffi.Pointer<ffi.Void>, double)>(); |
| 177 | + |
| 178 | + void rpu_auto_set_target( |
| 179 | + ffi.Pointer<ffi.Void> state, |
| 180 | + ) { |
| 181 | + return _rpu_auto_set_target( |
| 182 | + state, |
| 183 | + ); |
| 184 | + } |
| 185 | + |
| 186 | + late final _rpu_auto_set_targetPtr = |
| 187 | + _lookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>( |
| 188 | + 'rpu_auto_set_target'); |
| 189 | + late final _rpu_auto_set_target = _rpu_auto_set_targetPtr |
| 190 | + .asFunction<void Function(ffi.Pointer<ffi.Void>)>(); |
| 191 | + |
| 192 | + void rpu_set_model_visibility( |
| 193 | + ffi.Pointer<ffi.Void> state, |
| 194 | + int model_id, |
| 195 | + bool visibility, |
| 196 | + ) { |
| 197 | + return _rpu_set_model_visibility( |
| 198 | + state, |
| 199 | + model_id, |
| 200 | + visibility, |
| 201 | + ); |
| 202 | + } |
| 203 | + |
| 204 | + late final _rpu_set_model_visibilityPtr = _lookup< |
| 205 | + ffi.NativeFunction< |
| 206 | + ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Uint32, |
| 207 | + ffi.Bool)>>('rpu_set_model_visibility'); |
| 208 | + late final _rpu_set_model_visibility = _rpu_set_model_visibilityPtr |
| 209 | + .asFunction<void Function(ffi.Pointer<ffi.Void>, int, bool)>(); |
| 210 | + |
| 211 | + ffi.Pointer<ffi.Uint32> rpu_get_model_states( |
| 212 | + ffi.Pointer<ffi.Void> state, |
| 213 | + ) { |
| 214 | + return _rpu_get_model_states( |
| 215 | + state, |
| 216 | + ); |
| 217 | + } |
| 218 | + |
| 219 | + late final _rpu_get_model_statesPtr = _lookup< |
| 220 | + ffi.NativeFunction< |
| 221 | + ffi.Pointer<ffi.Uint32> Function( |
| 222 | + ffi.Pointer<ffi.Void>)>>('rpu_get_model_states'); |
| 223 | + late final _rpu_get_model_states = _rpu_get_model_statesPtr |
| 224 | + .asFunction<ffi.Pointer<ffi.Uint32> Function(ffi.Pointer<ffi.Void>)>(); |
| 225 | +} |
0 commit comments