Skip to content

feat(api) update imnodes to latest version #270

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed

feat(api) update imnodes to latest version #270

wants to merge 3 commits into from

Conversation

serivesmejia
Copy link
Contributor

@serivesmejia serivesmejia commented Sep 17, 2024

Type of change

  • New feature (non-breaking change which adds functionality)

I only pulled the latest version of imnodes from Git. I'm not too familiar when it comes to adding the bindings themselves. Lmk if i need to do anything else

@SpaiR
Copy link
Owner

SpaiR commented Sep 17, 2024

For this kind of change, simply updating the submodule version is not enough. The bindings also need to be regenerated, after first adapting them to the changes in the API. You need to open the diff between the versions and review the changes in the files, particularly imnodes.h. After adapting the binding, you can generate it using the generateApi method. Until then your PR updates nothing.

@SpaiR SpaiR added 3rd party deps Pull requests that update a dependency file invalid Invalid issue or pull request feat New feature or request and removed deps Pull requests that update a dependency file 3rd party labels Sep 17, 2024
@serivesmejia
Copy link
Contributor Author

Just to make sure, the generator uses the comments in the Java binding files as the JNI source code right?
image

Also, these getNode____SpacePos did break sometime in 1.87.x ... They are supposed to give back ImVec2, but now that I will get my hands on the binding i guess i could also fix it along the way

image

@SpaiR
Copy link
Owner

SpaiR commented Sep 26, 2024

Just to make sure, the generator uses the comments in the Java binding files as the JNI source code right?

Exactly. Comments in this form on native methods are transformed into JNI code with all the necessary wrappers—no additional JNI writing is required.

However, you should ensure you're working with the code inside the imgui-binding/src/main/java folder. After that, you need to run the :imgui-binding:generateApi command to generate the binding code, which should then be committed. Additionally, when updating submodules, you should run the generateAst command as well.

They are supposed to give back ImVec2, but now that I will get my hands on the binding i guess i could also fix it along the way

Yeah, I see. Change return type to ImVec2 for those methods. On their example you can also see how @BindingMethod annotation works. (It's even simplified API to generate bindings.)

@serivesmejia
Copy link
Contributor Author

i messed this up; i'll create a new repo and make the pr once i have it right

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request invalid Invalid issue or pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants