diff --git a/generate-all-bindings.sh b/generate-bindings.sh similarity index 62% rename from generate-all-bindings.sh rename to generate-bindings.sh index 3df1ec8f7..d61ed7cbd 100755 --- a/generate-all-bindings.sh +++ b/generate-bindings.sh @@ -6,7 +6,9 @@ # Get the directory containing this script SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -rm -rf "$SCRIPT_DIR/spine-c/codegen/node_modules" "$SCRIPT_DIR/spine-flutter/codegen/node_modules" "$SCRIPT_DIR/test/node_modules" +rm -rf "$SCRIPT_DIR/spine-c/codegen/node_modules" +rm -rf "$SCRIPT_DIR/spine-flutter/codegen/node_modules" +rm -rf "$SCRIPT_DIR/spine-ios/codegen/node_modules" # Source logging utilities source "$SCRIPT_DIR/formatters/logging/logging.sh" @@ -17,18 +19,12 @@ log_title "Generating all Spine runtime bindings" log_info "Generating C bindings" cd "$SCRIPT_DIR/spine-c" && ./build.sh codegen -log_info "Testing C compilation" -cd "$SCRIPT_DIR/spine-c" && ./build.sh clean - -# Clean GLFW -log_info "Test GLFW compilation" -cd "$SCRIPT_DIR/spine-glfw" && ./build.sh clean - # Generate Flutter bindings log_info "Generating Dart bindings" cd "$SCRIPT_DIR/spine-flutter" && ./generate-bindings.sh -log_info "Testing Dart" -cd "$SCRIPT_DIR/spine-flutter/test" && dart test headless_test.dart +# Generate iOS Swift bindings +log_info "Generating Swift bindings for iOS" +cd "$SCRIPT_DIR/spine-ios" && ./generate-bindings.sh log_summary "All bindings generated successfully" \ No newline at end of file diff --git a/spine-flutter/lib/generated/spine_dart_bindings_generated.dart b/spine-flutter/lib/generated/spine_dart_bindings_generated.dart index 8ec01d74e..ebcff5d67 100644 --- a/spine-flutter/lib/generated/spine_dart_bindings_generated.dart +++ b/spine-flutter/lib/generated/spine_dart_bindings_generated.dart @@ -7452,6 +7452,22 @@ class SpineDartBindings { late final _spine_skeleton_drawable_create = _spine_skeleton_drawable_createPtr.asFunction(); + void spine_skeleton_drawable_update( + spine_skeleton_drawable drawable, + double delta, + ) { + return _spine_skeleton_drawable_update( + drawable, + delta, + ); + } + + late final _spine_skeleton_drawable_updatePtr = + _lookup>( + 'spine_skeleton_drawable_update'); + late final _spine_skeleton_drawable_update = + _spine_skeleton_drawable_updatePtr.asFunction(); + spine_render_command spine_skeleton_drawable_render( spine_skeleton_drawable drawable, ) { @@ -39951,6 +39967,7 @@ class SpineDartBindings { /// mbstate_t is an opaque object to keep conversion state, during multibyte /// stream conversions. The content must not be referenced by user programs. +/// Forward declarations for all non-enum types final class spine_alpha_timeline_wrapper extends ffi.Opaque {} final class spine_animation_wrapper extends ffi.Opaque {} @@ -40400,57 +40417,114 @@ typedef spine_array_int = ffi.Pointer; typedef spine_array_unsigned_short = ffi.Pointer; typedef spine_array_property_id = ffi.Pointer; typedef spine_array_animation = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_animation = ffi.Pointer; typedef spine_array_atlas_page = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_atlas_page = ffi.Pointer; typedef spine_array_atlas_region = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_atlas_region = ffi.Pointer; typedef spine_array_attachment = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_attachment = ffi.Pointer; typedef spine_array_bone = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_bone = ffi.Pointer; typedef spine_array_bone_data = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_bone_data = ffi.Pointer; typedef spine_array_bone_pose = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_bone_pose = ffi.Pointer; typedef spine_array_bounding_box_attachment = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_bounding_box_attachment = ffi.Pointer; typedef spine_array_constraint = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_constraint = ffi.Pointer; typedef spine_array_constraint_data = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_constraint_data = ffi.Pointer; typedef spine_array_event = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_event = ffi.Pointer; typedef spine_array_event_data = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_event_data = ffi.Pointer; typedef spine_array_from_property = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_from_property = ffi.Pointer; typedef spine_array_physics_constraint = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_physics_constraint = ffi.Pointer; typedef spine_array_polygon = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_polygon = ffi.Pointer; typedef spine_array_skin = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_skin = ffi.Pointer; typedef spine_array_slot = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_slot = ffi.Pointer; typedef spine_array_slot_data = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_slot_data = ffi.Pointer; typedef spine_array_texture_region = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_texture_region = ffi.Pointer; typedef spine_array_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_timeline = ffi.Pointer; typedef spine_array_to_property = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_to_property = ffi.Pointer; typedef spine_array_track_entry = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_track_entry = ffi.Pointer; typedef spine_array_update = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_update = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_rtti = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_skeleton = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_bone_local = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_atlas = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_skeleton_data = ffi.Pointer; +/// Custom types for spine-c-new (not generated) final class spine_atlas_result_wrapper extends ffi.Opaque {} final class spine_skeleton_data_result_wrapper extends ffi.Opaque {} @@ -40465,6 +40539,7 @@ final class spine_skin_entries_wrapper extends ffi.Opaque {} final class spine_texture_loader_wrapper extends ffi.Opaque {} +/// Custom types for spine-c-new (not generated) typedef spine_atlas_result = ffi.Pointer; /// Texture loader callbacks @@ -40473,104 +40548,296 @@ typedef spine_texture_loader_load_funcFunction = ffi.Pointer Function( typedef spine_texture_loader_unload_func = ffi.Pointer>; typedef spine_texture_loader_unload_funcFunction = ffi.Void Function(ffi.Pointer texture); typedef Dartspine_texture_loader_unload_funcFunction = void Function(ffi.Pointer texture); + +/// Custom types for spine-c-new (not generated) typedef spine_skeleton_data_result = ffi.Pointer; + +/// Custom types for spine-c-new (not generated) typedef spine_skeleton_drawable = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_render_command = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_animation_state = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_animation_state_data = ffi.Pointer; + +/// Custom types for spine-c-new (not generated) typedef spine_animation_state_events = ffi.Pointer; + +/// Custom types for spine-c-new (not generated) typedef spine_skin_entries = ffi.Pointer; + +/// Custom types for spine-c-new (not generated) typedef spine_skin_entry = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_alpha_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_atlas_attachment_loader = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_region_attachment = ffi.Pointer; typedef spine_sequence = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_mesh_attachment = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_path_attachment = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_point_attachment = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_clipping_attachment = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_attachment_loader = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_attachment_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_color = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_bone_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_bone_timeline1 = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_bone_timeline2 = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_vertex_attachment = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_constraint_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_constraint_timeline1 = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_curve_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_curve_timeline1 = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_deform_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_draw_order_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_event_queue_entry = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_event_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_from_rotate = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_from_scale_x = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_from_scale_y = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_from_shear_y = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_from_x = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_from_y = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_ik_constraint = ffi.Pointer; typedef spine_ik_constraint_data = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_ik_constraint_pose = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_ik_constraint_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_inherit_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_linked_mesh = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_path_constraint = ffi.Pointer; typedef spine_path_constraint_data = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_path_constraint_pose = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_path_constraint_mix_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_path_constraint_position_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_path_constraint_spacing_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_physics_constraint_data = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_physics_constraint_pose = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_physics_constraint_damping_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_physics_constraint_gravity_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_physics_constraint_inertia_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_physics_constraint_mass_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_physics_constraint_mix_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_physics_constraint_reset_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_physics_constraint_strength_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_physics_constraint_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_physics_constraint_wind_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_posed = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_posed_active = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_posed_data = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_rgb2_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_rgba2_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_rgba_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_rgb_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_rotate_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_scale_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_scale_x_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_scale_y_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_slot_pose = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_sequence_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_shear_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_shear_x_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_shear_y_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_skeleton_clipping = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_skeleton_binary = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_skeleton_bounds = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_skeleton_json = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_skeleton_renderer = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_slider = ffi.Pointer; typedef spine_slider_data = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_slider_pose = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_slider_mix_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_slider_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_slot_curve_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_slot_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_transform_constraint_pose = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_to_rotate = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_to_scale_x = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_to_scale_y = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_to_shear_y = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_to_x = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_to_y = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_transform_constraint = ffi.Pointer; typedef spine_transform_constraint_data = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_transform_constraint_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_translate_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_translate_x_timeline = ffi.Pointer; + +/// Forward declarations for all non-enum types typedef spine_translate_y_timeline = ffi.Pointer;