Repository: godotengine/godot (language: cpp)

Issue:
`NOTIFICATION_WM_POSITION_CHANGED` is not exposed in GDExtension
### Tested versions

4.4.stable

### System information

Godot v4.4.stable - Windows 10 (build 19045) - Multi-window, 2 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 Ti (NVIDIA; 32.0.15.6636) - Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz (8 threads)

### Issue description

Originally reported here https://github.com/godotengine/godot-cpp/issues/1732

Then I realized it better fits here.
Basically, `extension_api.json` generated by Godot does not expose `NOTIFICATION_WM_POSITION_CHANGED`. Thus, it is not available in godot-cpp.

### Steps to reproduce

Call `godot --dump-extension-api` to generate api file. Observe that `NOTIFICATION_WM_POSITION_CHANGED` is not present.

### Minimal reproduction project (MRP)

N/A


Discussion / hints:
This is not exposed at all, it was introduced in:
* https://github.com/godotengine/godot/pull/99010

But not exposed

CC @Hilderin 
Can you describe what's your use case for `NOTIFICATION_WM_POSITION_CHANGED`?
I have a window manager that preserves window positions upon restart. Simple as that.
Without this callback you can't reliably save the last position.

Anyway, the callback is not the problem. Because this notification does propagate into my nodes. But there is no `NOTIFICATION_WM_POSITION_CHANGED` define, that I can use to compare to `what` in the `_notification()`. Currently I define it myself in a header `inline static constexpr int NOTIFICATION_WM_POSITION_CHANGED = 1012;`
Again, to make it clear, what is actually missing is the actual define in node.hpp.
The thing that is missing is a `BIND_ENUM_CONSTANT(NOTIFICATION_WM_POSITION_CHANGED)` if this is indeed required
Yes, this. I fail to understand why it wouldn't be required if it comes to a user, user should be able to match this notification to some value.

Fix patch:
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index 15852097fb5b..fd0a2594c293 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -1226,6 +1226,9 @@
 		<constant name="NOTIFICATION_VP_MOUSE_EXIT" value="1011">
 			Notification received when the mouse cursor leaves the [Viewport]'s visible area, that is not occluded behind other [Control]s or [Window]s, provided its [member Viewport.gui_disable_input] is [code]false[/code] and regardless if it's currently focused or not.
 		</constant>
+		<constant name="NOTIFICATION_WM_POSITION_CHANGED" value="1012">
+			Notification received when the window is moved.
+		</constant>
 		<constant name="NOTIFICATION_OS_MEMORY_WARNING" value="2009">
 			Notification received from the OS when the application is exceeding its allocated memory.
 			Implemented only on iOS.
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 0978aa9ddfb9..ed0add6f43cd 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -3811,6 +3811,7 @@ void Node::_bind_methods() {
 	BIND_CONSTANT(NOTIFICATION_WM_DPI_CHANGE);
 	BIND_CONSTANT(NOTIFICATION_VP_MOUSE_ENTER);
 	BIND_CONSTANT(NOTIFICATION_VP_MOUSE_EXIT);
+	BIND_CONSTANT(NOTIFICATION_WM_POSITION_CHANGED);
 	BIND_CONSTANT(NOTIFICATION_OS_MEMORY_WARNING);
 	BIND_CONSTANT(NOTIFICATION_TRANSLATION_CHANGED);
 	BIND_CONSTANT(NOTIFICATION_WM_ABOUT);


Test patch: