Skip to content

Autogenerated callbacks #224

@gucio321

Description

@gucio321

If you were sent here from Pool panic

make sure you didn't exceed max amount of callbacks (currently 32). Also consider using ClearXXXPool if you set callback every frame/on specific event.

If you think you experience a bug, please ping me here.

read this for some implementation details.

original OP

Things like InputTextCallback should be autogenerated. I have an idea how to do this

  • declare go callback type
  • if C function needs callback, take go callback and convert it to uintptr via cgo.handle
  • in c declare a local function (in the function that wants to pass callback to c++) and make it compatible with our destination type
  • in go were should also have an exported to c function that takes uintptr (and other necessary parameters of needed). This one should just decide uintptr back to go type and call it
  • local c function mentioned above calf go exported function

This workflow should allow us to autogenerate callbacks

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions