Merge pull request #115434 from syntaxerror247/landscape-or-portrait

Add device orientation change signal to DisplayServer
This commit is contained in:
Thaddeus Crews 2026-01-27 15:18:22 -06:00
commit ea1e6640f0
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC
7 changed files with 38 additions and 8 deletions

View file

@ -2533,6 +2533,16 @@
</description>
</method>
</methods>
<signals>
<signal name="orientation_changed">
<param index="0" name="orientation" type="int" />
<description>
Emitted when the device orientation changes. [param orientation] is the new orientation.
Returns [code]1[/code] for portrait, [code]2[/code] for landscape, and [code]0[/code] if the orientation is undefined.
[b]Note:[/b] This method is implemented on Android and iOS.
</description>
</signal>
</signals>
<constants>
<constant name="FEATURE_GLOBAL_MENU" value="0" enum="Feature" deprecated="Use [NativeMenu] or [PopupMenu] instead.">
Display server supports global menu. This allows the application to display its menu items in the operating system's top bar. [b]macOS[/b]