Enums: add missing binds - #117205
Conversation
|
I didn't add ConnectFlags.CONNECT_INHERITED as I'm not sure if it should be exposed. Lines 573 to 580 in 220b0b2 |
047e880 to
04dadf9
Compare
|
Regarding the shadowmask mode enum, see my comment on the docs issue:
|
| <constant name="TRANSITION_TO_TIME_PREVIOUS_POSITION" value="2" enum="TransitionToTime"> | ||
| </constant> | ||
| <constant name="TRANSITION_TO_TIME_MAX" value="3" enum="TransitionToTime"> | ||
| </constant> |
There was a problem hiding this comment.
In #114129 I added the binding for TRANSITION_TO_TIME_PREVIOUS_POSITION along with documentation. I did not bind TRANSITION_TO_TIME_MAX. The other enums in this file do not bind that; nor does e.g. AudioStreamRandomizer.PlaybackMode. It's also illegal to pass TRANSITION_TO_TIME_MAX to e.g. add_transition. So I don't think it's correct to bind it.
There was a problem hiding this comment.
I think I've got a bit confused; I was told that XML files are all generated using --doc-tools but it seems that ..._MAX enum values are not generated through binding in the cpp file. Sorry! It would be nice in general to have more instructions on how the documentation should be contributed to because I think I'm probably hindering more than helping!
There was a problem hiding this comment.
My suggestion (bearing in mind I'm just a guy who occasionally sends 1-line PRs!)
- Remove the
interactive_musicchanges from this branch - it's covered in Bind AudioStreamInteractiveTRANSITION_TO_TIME_PREVIOUS_POSITION#114129 which I hope will be merged at some point! - Don't bind
OPENXR_ACTION_MAX - Write documentation for SHADOWMASK_MODE_ONLY & OPENXR_ACTION_HAPTIC
There was a problem hiding this comment.
Okay cool; I was also confused at why some _MAX enum values are documented and how they are being added to the XML files if they're not bound?
There was a problem hiding this comment.
I think you might be missing where it's bound because they are bound if they are added to the documentation
There was a problem hiding this comment.
I'm still a bit confused. e.g. why is <constant name="CLOSE_BUTTON_MAX" value="3" enum="CloseButtonDisplayPolicy"> allowed to be bound, but TRANSITION_TO_TIME_MAX is not allowed to be bound here? I don't understand how to distinguish what should/shouldn't be bound.
There was a problem hiding this comment.
By wjt's logic, I would suspect its also not valid to pass CLOSE_BUTTON_MAX (or many other of the _MAX enums found in the docs) to their respective functions, but they are still included in the XML files. Maybe I'm wrong though and there's some MAX enum values which have actual usage beyond just representing the max size?
There was a problem hiding this comment.
This is the explanation:
It's also illegal to pass
TRANSITION_TO_TIME_MAXto e.g.add_transition. So I don't think it's correct to bind it.
But I'd say that's up to the person implementing the feature, so doing that without understanding the feature or the logic is not a good idea, so I think this might not be the right task for you
In the cases where they are missing, I'd suggest just going back to the PR that added them, see if there's an explanation, and if not ask somewhere about it, there's usually a good idea behind that, but not always (you can use the "blame" tab on each file in the GitHub web interface to explore the history of any file)
But the enum shouldn't generally be bound unless it's actually useful to binds, a lot of the time it's strictly used internally to do range checking, like ERR_FAIL_INDEX(p_arg, 0, SPECIFIC_ENUM_MAX); (and isn't relevant to iterating over valid values, for example if there's no value for a specific entry between 0 and X_MAX)
|
I'm realising I don't really know what I'm doing wrt the documentation so feel free to close this PR |
TransitionToTime,ActionTypeandShadowmaskModeenums