class_displayserver.rst 195 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/DisplayServer.xml.
  6. .. _class_DisplayServer:
  7. DisplayServer
  8. =============
  9. **Inherits:** :ref:`Object<class_Object>`
  10. Methods
  11. -------
  12. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  13. | :ref:`String<class_String>` | :ref:`clipboard_get<class_DisplayServer_method_clipboard_get>` **(** **)** |const| |
  14. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  15. | :ref:`String<class_String>` | :ref:`clipboard_get_primary<class_DisplayServer_method_clipboard_get_primary>` **(** **)** |const| |
  16. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  17. | :ref:`bool<class_bool>` | :ref:`clipboard_has<class_DisplayServer_method_clipboard_has>` **(** **)** |const| |
  18. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  19. | void | :ref:`clipboard_set<class_DisplayServer_method_clipboard_set>` **(** :ref:`String<class_String>` clipboard **)** |
  20. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | void | :ref:`clipboard_set_primary<class_DisplayServer_method_clipboard_set_primary>` **(** :ref:`String<class_String>` clipboard_primary **)** |
  22. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`int<class_int>` | :ref:`create_sub_window<class_DisplayServer_method_create_sub_window>` **(** :ref:`WindowMode<enum_DisplayServer_WindowMode>` mode, :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` vsync_mode, :ref:`int<class_int>` flags, :ref:`Rect2i<class_Rect2i>` rect=Rect2i(0, 0, 0, 0) **)** |
  24. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`CursorShape<enum_DisplayServer_CursorShape>` | :ref:`cursor_get_shape<class_DisplayServer_method_cursor_get_shape>` **(** **)** |const| |
  26. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | void | :ref:`cursor_set_custom_image<class_DisplayServer_method_cursor_set_custom_image>` **(** :ref:`Resource<class_Resource>` cursor, :ref:`CursorShape<enum_DisplayServer_CursorShape>` shape=0, :ref:`Vector2<class_Vector2>` hotspot=Vector2(0, 0) **)** |
  28. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | void | :ref:`cursor_set_shape<class_DisplayServer_method_cursor_set_shape>` **(** :ref:`CursorShape<enum_DisplayServer_CursorShape>` shape **)** |
  30. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | void | :ref:`delete_sub_window<class_DisplayServer_method_delete_sub_window>` **(** :ref:`int<class_int>` window_id **)** |
  32. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`dialog_input_text<class_DisplayServer_method_dialog_input_text>` **(** :ref:`String<class_String>` title, :ref:`String<class_String>` description, :ref:`String<class_String>` existing_text, :ref:`Callable<class_Callable>` callback **)** |
  34. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`dialog_show<class_DisplayServer_method_dialog_show>` **(** :ref:`String<class_String>` title, :ref:`String<class_String>` description, :ref:`PackedStringArray<class_PackedStringArray>` buttons, :ref:`Callable<class_Callable>` callback **)** |
  36. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | void | :ref:`enable_for_stealing_focus<class_DisplayServer_method_enable_for_stealing_focus>` **(** :ref:`int<class_int>` process_id **)** |
  38. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | void | :ref:`force_process_and_drop_events<class_DisplayServer_method_force_process_and_drop_events>` **(** **)** |
  40. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | :ref:`Array<class_Array>` | :ref:`get_display_cutouts<class_DisplayServer_method_get_display_cutouts>` **(** **)** |const| |
  42. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. | :ref:`Rect2i<class_Rect2i>` | :ref:`get_display_safe_area<class_DisplayServer_method_get_display_safe_area>` **(** **)** |const| |
  44. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  45. | :ref:`String<class_String>` | :ref:`get_name<class_DisplayServer_method_get_name>` **(** **)** |const| |
  46. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  47. | :ref:`int<class_int>` | :ref:`get_screen_count<class_DisplayServer_method_get_screen_count>` **(** **)** |const| |
  48. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  49. | :ref:`bool<class_bool>` | :ref:`get_swap_cancel_ok<class_DisplayServer_method_get_swap_cancel_ok>` **(** **)** |
  50. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  51. | :ref:`int<class_int>` | :ref:`get_window_at_screen_position<class_DisplayServer_method_get_window_at_screen_position>` **(** :ref:`Vector2i<class_Vector2i>` position **)** |const| |
  52. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  53. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_window_list<class_DisplayServer_method_get_window_list>` **(** **)** |const| |
  54. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  55. | void | :ref:`global_menu_add_check_item<class_DisplayServer_method_global_menu_add_check_item>` **(** :ref:`String<class_String>` menu_root, :ref:`String<class_String>` label, :ref:`Callable<class_Callable>` callback, :ref:`Variant<class_Variant>` tag=null, :ref:`Key<enum_@GlobalScope_Key>` accelerator=0, :ref:`int<class_int>` index=-1 **)** |
  56. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  57. | void | :ref:`global_menu_add_icon_check_item<class_DisplayServer_method_global_menu_add_icon_check_item>` **(** :ref:`String<class_String>` menu_root, :ref:`Texture2D<class_Texture2D>` icon, :ref:`String<class_String>` label, :ref:`Callable<class_Callable>` callback, :ref:`Variant<class_Variant>` tag=null, :ref:`Key<enum_@GlobalScope_Key>` accelerator=0, :ref:`int<class_int>` index=-1 **)** |
  58. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  59. | void | :ref:`global_menu_add_icon_item<class_DisplayServer_method_global_menu_add_icon_item>` **(** :ref:`String<class_String>` menu_root, :ref:`Texture2D<class_Texture2D>` icon, :ref:`String<class_String>` label, :ref:`Callable<class_Callable>` callback, :ref:`Variant<class_Variant>` tag=null, :ref:`Key<enum_@GlobalScope_Key>` accelerator=0, :ref:`int<class_int>` index=-1 **)** |
  60. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  61. | void | :ref:`global_menu_add_icon_radio_check_item<class_DisplayServer_method_global_menu_add_icon_radio_check_item>` **(** :ref:`String<class_String>` menu_root, :ref:`Texture2D<class_Texture2D>` icon, :ref:`String<class_String>` label, :ref:`Callable<class_Callable>` callback, :ref:`Variant<class_Variant>` tag=null, :ref:`Key<enum_@GlobalScope_Key>` accelerator=0, :ref:`int<class_int>` index=-1 **)** |
  62. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  63. | void | :ref:`global_menu_add_item<class_DisplayServer_method_global_menu_add_item>` **(** :ref:`String<class_String>` menu_root, :ref:`String<class_String>` label, :ref:`Callable<class_Callable>` callback, :ref:`Variant<class_Variant>` tag=null, :ref:`Key<enum_@GlobalScope_Key>` accelerator=0, :ref:`int<class_int>` index=-1 **)** |
  64. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  65. | void | :ref:`global_menu_add_multistate_item<class_DisplayServer_method_global_menu_add_multistate_item>` **(** :ref:`String<class_String>` menu_root, :ref:`String<class_String>` labe, :ref:`int<class_int>` max_states, :ref:`int<class_int>` default_state, :ref:`Callable<class_Callable>` callback, :ref:`Variant<class_Variant>` tag=null, :ref:`Key<enum_@GlobalScope_Key>` accelerator=0, :ref:`int<class_int>` index=-1 **)** |
  66. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  67. | void | :ref:`global_menu_add_radio_check_item<class_DisplayServer_method_global_menu_add_radio_check_item>` **(** :ref:`String<class_String>` menu_root, :ref:`String<class_String>` label, :ref:`Callable<class_Callable>` callback, :ref:`Variant<class_Variant>` tag=null, :ref:`Key<enum_@GlobalScope_Key>` accelerator=0, :ref:`int<class_int>` index=-1 **)** |
  68. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  69. | void | :ref:`global_menu_add_separator<class_DisplayServer_method_global_menu_add_separator>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` index=-1 **)** |
  70. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  71. | void | :ref:`global_menu_add_submenu_item<class_DisplayServer_method_global_menu_add_submenu_item>` **(** :ref:`String<class_String>` menu_root, :ref:`String<class_String>` label, :ref:`String<class_String>` submenu, :ref:`int<class_int>` index=-1 **)** |
  72. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  73. | void | :ref:`global_menu_clear<class_DisplayServer_method_global_menu_clear>` **(** :ref:`String<class_String>` menu_root **)** |
  74. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  75. | :ref:`Key<enum_@GlobalScope_Key>` | :ref:`global_menu_get_item_accelerator<class_DisplayServer_method_global_menu_get_item_accelerator>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const| |
  76. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  77. | :ref:`Callable<class_Callable>` | :ref:`global_menu_get_item_callback<class_DisplayServer_method_global_menu_get_item_callback>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const| |
  78. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  79. | :ref:`Texture2D<class_Texture2D>` | :ref:`global_menu_get_item_icon<class_DisplayServer_method_global_menu_get_item_icon>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const| |
  80. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  81. | :ref:`int<class_int>` | :ref:`global_menu_get_item_index_from_tag<class_DisplayServer_method_global_menu_get_item_index_from_tag>` **(** :ref:`String<class_String>` menu_root, :ref:`Variant<class_Variant>` tag **)** |const| |
  82. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  83. | :ref:`int<class_int>` | :ref:`global_menu_get_item_index_from_text<class_DisplayServer_method_global_menu_get_item_index_from_text>` **(** :ref:`String<class_String>` menu_root, :ref:`String<class_String>` text **)** |const| |
  84. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  85. | :ref:`int<class_int>` | :ref:`global_menu_get_item_max_states<class_DisplayServer_method_global_menu_get_item_max_states>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const| |
  86. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  87. | :ref:`int<class_int>` | :ref:`global_menu_get_item_state<class_DisplayServer_method_global_menu_get_item_state>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const| |
  88. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  89. | :ref:`String<class_String>` | :ref:`global_menu_get_item_submenu<class_DisplayServer_method_global_menu_get_item_submenu>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const| |
  90. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  91. | :ref:`Variant<class_Variant>` | :ref:`global_menu_get_item_tag<class_DisplayServer_method_global_menu_get_item_tag>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const| |
  92. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  93. | :ref:`String<class_String>` | :ref:`global_menu_get_item_text<class_DisplayServer_method_global_menu_get_item_text>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const| |
  94. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  95. | :ref:`String<class_String>` | :ref:`global_menu_get_item_tooltip<class_DisplayServer_method_global_menu_get_item_tooltip>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const| |
  96. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  97. | :ref:`bool<class_bool>` | :ref:`global_menu_is_item_checkable<class_DisplayServer_method_global_menu_is_item_checkable>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const| |
  98. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  99. | :ref:`bool<class_bool>` | :ref:`global_menu_is_item_checked<class_DisplayServer_method_global_menu_is_item_checked>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const| |
  100. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  101. | :ref:`bool<class_bool>` | :ref:`global_menu_is_item_disabled<class_DisplayServer_method_global_menu_is_item_disabled>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const| |
  102. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  103. | :ref:`bool<class_bool>` | :ref:`global_menu_is_item_radio_checkable<class_DisplayServer_method_global_menu_is_item_radio_checkable>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const| |
  104. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  105. | void | :ref:`global_menu_remove_item<class_DisplayServer_method_global_menu_remove_item>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |
  106. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  107. | void | :ref:`global_menu_set_item_accelerator<class_DisplayServer_method_global_menu_set_item_accelerator>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`Key<enum_@GlobalScope_Key>` keycode **)** |
  108. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  109. | void | :ref:`global_menu_set_item_callback<class_DisplayServer_method_global_menu_set_item_callback>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`Callable<class_Callable>` callback **)** |
  110. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  111. | void | :ref:`global_menu_set_item_checkable<class_DisplayServer_method_global_menu_set_item_checkable>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`bool<class_bool>` checkable **)** |
  112. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  113. | void | :ref:`global_menu_set_item_checked<class_DisplayServer_method_global_menu_set_item_checked>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`bool<class_bool>` checked **)** |
  114. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  115. | void | :ref:`global_menu_set_item_disabled<class_DisplayServer_method_global_menu_set_item_disabled>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`bool<class_bool>` disabled **)** |
  116. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  117. | void | :ref:`global_menu_set_item_icon<class_DisplayServer_method_global_menu_set_item_icon>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`Texture2D<class_Texture2D>` icon **)** |
  118. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  119. | void | :ref:`global_menu_set_item_max_states<class_DisplayServer_method_global_menu_set_item_max_states>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`int<class_int>` max_states **)** |
  120. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  121. | void | :ref:`global_menu_set_item_radio_checkable<class_DisplayServer_method_global_menu_set_item_radio_checkable>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`bool<class_bool>` checkable **)** |
  122. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  123. | void | :ref:`global_menu_set_item_state<class_DisplayServer_method_global_menu_set_item_state>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`int<class_int>` state **)** |
  124. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  125. | void | :ref:`global_menu_set_item_submenu<class_DisplayServer_method_global_menu_set_item_submenu>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`String<class_String>` submenu **)** |
  126. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  127. | void | :ref:`global_menu_set_item_tag<class_DisplayServer_method_global_menu_set_item_tag>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`Variant<class_Variant>` tag **)** |
  128. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  129. | void | :ref:`global_menu_set_item_text<class_DisplayServer_method_global_menu_set_item_text>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`String<class_String>` text **)** |
  130. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  131. | void | :ref:`global_menu_set_item_tooltip<class_DisplayServer_method_global_menu_set_item_tooltip>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`String<class_String>` tooltip **)** |
  132. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  133. | :ref:`bool<class_bool>` | :ref:`has_feature<class_DisplayServer_method_has_feature>` **(** :ref:`Feature<enum_DisplayServer_Feature>` feature **)** |const| |
  134. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  135. | :ref:`Vector2i<class_Vector2i>` | :ref:`ime_get_selection<class_DisplayServer_method_ime_get_selection>` **(** **)** |const| |
  136. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  137. | :ref:`String<class_String>` | :ref:`ime_get_text<class_DisplayServer_method_ime_get_text>` **(** **)** |const| |
  138. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  139. | :ref:`int<class_int>` | :ref:`keyboard_get_current_layout<class_DisplayServer_method_keyboard_get_current_layout>` **(** **)** |const| |
  140. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  141. | :ref:`Key<enum_@GlobalScope_Key>` | :ref:`keyboard_get_keycode_from_physical<class_DisplayServer_method_keyboard_get_keycode_from_physical>` **(** :ref:`Key<enum_@GlobalScope_Key>` keycode **)** |const| |
  142. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  143. | :ref:`int<class_int>` | :ref:`keyboard_get_layout_count<class_DisplayServer_method_keyboard_get_layout_count>` **(** **)** |const| |
  144. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  145. | :ref:`String<class_String>` | :ref:`keyboard_get_layout_language<class_DisplayServer_method_keyboard_get_layout_language>` **(** :ref:`int<class_int>` index **)** |const| |
  146. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  147. | :ref:`String<class_String>` | :ref:`keyboard_get_layout_name<class_DisplayServer_method_keyboard_get_layout_name>` **(** :ref:`int<class_int>` index **)** |const| |
  148. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  149. | void | :ref:`keyboard_set_current_layout<class_DisplayServer_method_keyboard_set_current_layout>` **(** :ref:`int<class_int>` index **)** |
  150. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  151. | :ref:`MouseButton<enum_@GlobalScope_MouseButton>` | :ref:`mouse_get_button_state<class_DisplayServer_method_mouse_get_button_state>` **(** **)** |const| |
  152. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  153. | :ref:`MouseMode<enum_DisplayServer_MouseMode>` | :ref:`mouse_get_mode<class_DisplayServer_method_mouse_get_mode>` **(** **)** |const| |
  154. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  155. | :ref:`Vector2i<class_Vector2i>` | :ref:`mouse_get_position<class_DisplayServer_method_mouse_get_position>` **(** **)** |const| |
  156. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  157. | void | :ref:`mouse_set_mode<class_DisplayServer_method_mouse_set_mode>` **(** :ref:`MouseMode<enum_DisplayServer_MouseMode>` mouse_mode **)** |
  158. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  159. | void | :ref:`process_events<class_DisplayServer_method_process_events>` **(** **)** |
  160. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  161. | :ref:`int<class_int>` | :ref:`screen_get_dpi<class_DisplayServer_method_screen_get_dpi>` **(** :ref:`int<class_int>` screen=-1 **)** |const| |
  162. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  163. | :ref:`float<class_float>` | :ref:`screen_get_max_scale<class_DisplayServer_method_screen_get_max_scale>` **(** **)** |const| |
  164. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  165. | :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` | :ref:`screen_get_orientation<class_DisplayServer_method_screen_get_orientation>` **(** :ref:`int<class_int>` screen=-1 **)** |const| |
  166. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  167. | :ref:`Vector2i<class_Vector2i>` | :ref:`screen_get_position<class_DisplayServer_method_screen_get_position>` **(** :ref:`int<class_int>` screen=-1 **)** |const| |
  168. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  169. | :ref:`float<class_float>` | :ref:`screen_get_refresh_rate<class_DisplayServer_method_screen_get_refresh_rate>` **(** :ref:`int<class_int>` screen=-1 **)** |const| |
  170. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  171. | :ref:`float<class_float>` | :ref:`screen_get_scale<class_DisplayServer_method_screen_get_scale>` **(** :ref:`int<class_int>` screen=-1 **)** |const| |
  172. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  173. | :ref:`Vector2i<class_Vector2i>` | :ref:`screen_get_size<class_DisplayServer_method_screen_get_size>` **(** :ref:`int<class_int>` screen=-1 **)** |const| |
  174. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  175. | :ref:`Rect2i<class_Rect2i>` | :ref:`screen_get_usable_rect<class_DisplayServer_method_screen_get_usable_rect>` **(** :ref:`int<class_int>` screen=-1 **)** |const| |
  176. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  177. | :ref:`bool<class_bool>` | :ref:`screen_is_kept_on<class_DisplayServer_method_screen_is_kept_on>` **(** **)** |const| |
  178. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  179. | :ref:`bool<class_bool>` | :ref:`screen_is_touchscreen<class_DisplayServer_method_screen_is_touchscreen>` **(** :ref:`int<class_int>` screen=-1 **)** |const| |
  180. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  181. | void | :ref:`screen_set_keep_on<class_DisplayServer_method_screen_set_keep_on>` **(** :ref:`bool<class_bool>` enable **)** |
  182. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  183. | void | :ref:`screen_set_orientation<class_DisplayServer_method_screen_set_orientation>` **(** :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` orientation, :ref:`int<class_int>` screen=-1 **)** |
  184. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  185. | void | :ref:`set_icon<class_DisplayServer_method_set_icon>` **(** :ref:`Image<class_Image>` image **)** |
  186. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  187. | void | :ref:`set_native_icon<class_DisplayServer_method_set_native_icon>` **(** :ref:`String<class_String>` filename **)** |
  188. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  189. | :ref:`String<class_String>` | :ref:`tablet_get_current_driver<class_DisplayServer_method_tablet_get_current_driver>` **(** **)** |const| |
  190. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  191. | :ref:`int<class_int>` | :ref:`tablet_get_driver_count<class_DisplayServer_method_tablet_get_driver_count>` **(** **)** |const| |
  192. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  193. | :ref:`String<class_String>` | :ref:`tablet_get_driver_name<class_DisplayServer_method_tablet_get_driver_name>` **(** :ref:`int<class_int>` idx **)** |const| |
  194. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  195. | void | :ref:`tablet_set_current_driver<class_DisplayServer_method_tablet_set_current_driver>` **(** :ref:`String<class_String>` name **)** |
  196. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  197. | :ref:`Array<class_Array>` | :ref:`tts_get_voices<class_DisplayServer_method_tts_get_voices>` **(** **)** |const| |
  198. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  199. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`tts_get_voices_for_language<class_DisplayServer_method_tts_get_voices_for_language>` **(** :ref:`String<class_String>` language **)** |const| |
  200. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  201. | :ref:`bool<class_bool>` | :ref:`tts_is_paused<class_DisplayServer_method_tts_is_paused>` **(** **)** |const| |
  202. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  203. | :ref:`bool<class_bool>` | :ref:`tts_is_speaking<class_DisplayServer_method_tts_is_speaking>` **(** **)** |const| |
  204. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  205. | void | :ref:`tts_pause<class_DisplayServer_method_tts_pause>` **(** **)** |
  206. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  207. | void | :ref:`tts_resume<class_DisplayServer_method_tts_resume>` **(** **)** |
  208. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  209. | void | :ref:`tts_set_utterance_callback<class_DisplayServer_method_tts_set_utterance_callback>` **(** :ref:`TTSUtteranceEvent<enum_DisplayServer_TTSUtteranceEvent>` event, :ref:`Callable<class_Callable>` callable **)** |
  210. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  211. | void | :ref:`tts_speak<class_DisplayServer_method_tts_speak>` **(** :ref:`String<class_String>` text, :ref:`String<class_String>` voice, :ref:`int<class_int>` volume=50, :ref:`float<class_float>` pitch=1.0, :ref:`float<class_float>` rate=1.0, :ref:`int<class_int>` utterance_id=0, :ref:`bool<class_bool>` interrupt=false **)** |
  212. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  213. | void | :ref:`tts_stop<class_DisplayServer_method_tts_stop>` **(** **)** |
  214. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  215. | :ref:`int<class_int>` | :ref:`virtual_keyboard_get_height<class_DisplayServer_method_virtual_keyboard_get_height>` **(** **)** |const| |
  216. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  217. | void | :ref:`virtual_keyboard_hide<class_DisplayServer_method_virtual_keyboard_hide>` **(** **)** |
  218. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  219. | void | :ref:`virtual_keyboard_show<class_DisplayServer_method_virtual_keyboard_show>` **(** :ref:`String<class_String>` existing_text, :ref:`Rect2<class_Rect2>` position=Rect2(0, 0, 0, 0), :ref:`bool<class_bool>` multiline=false, :ref:`int<class_int>` max_length=-1, :ref:`int<class_int>` cursor_start=-1, :ref:`int<class_int>` cursor_end=-1 **)** |
  220. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  221. | void | :ref:`warp_mouse<class_DisplayServer_method_warp_mouse>` **(** :ref:`Vector2i<class_Vector2i>` position **)** |
  222. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  223. | void | :ref:`window_attach_instance_id<class_DisplayServer_method_window_attach_instance_id>` **(** :ref:`int<class_int>` instance_id, :ref:`int<class_int>` window_id=0 **)** |
  224. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  225. | :ref:`bool<class_bool>` | :ref:`window_can_draw<class_DisplayServer_method_window_can_draw>` **(** :ref:`int<class_int>` window_id=0 **)** |const| |
  226. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  227. | :ref:`int<class_int>` | :ref:`window_get_active_popup<class_DisplayServer_method_window_get_active_popup>` **(** **)** |const| |
  228. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  229. | :ref:`int<class_int>` | :ref:`window_get_attached_instance_id<class_DisplayServer_method_window_get_attached_instance_id>` **(** :ref:`int<class_int>` window_id=0 **)** |const| |
  230. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  231. | :ref:`int<class_int>` | :ref:`window_get_current_screen<class_DisplayServer_method_window_get_current_screen>` **(** :ref:`int<class_int>` window_id=0 **)** |const| |
  232. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  233. | :ref:`bool<class_bool>` | :ref:`window_get_flag<class_DisplayServer_method_window_get_flag>` **(** :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` flag, :ref:`int<class_int>` window_id=0 **)** |const| |
  234. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  235. | :ref:`Vector2i<class_Vector2i>` | :ref:`window_get_max_size<class_DisplayServer_method_window_get_max_size>` **(** :ref:`int<class_int>` window_id=0 **)** |const| |
  236. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  237. | :ref:`Vector2i<class_Vector2i>` | :ref:`window_get_min_size<class_DisplayServer_method_window_get_min_size>` **(** :ref:`int<class_int>` window_id=0 **)** |const| |
  238. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  239. | :ref:`WindowMode<enum_DisplayServer_WindowMode>` | :ref:`window_get_mode<class_DisplayServer_method_window_get_mode>` **(** :ref:`int<class_int>` window_id=0 **)** |const| |
  240. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  241. | :ref:`int<class_int>` | :ref:`window_get_native_handle<class_DisplayServer_method_window_get_native_handle>` **(** :ref:`HandleType<enum_DisplayServer_HandleType>` handle_type, :ref:`int<class_int>` window_id=0 **)** |const| |
  242. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  243. | :ref:`Rect2i<class_Rect2i>` | :ref:`window_get_popup_safe_rect<class_DisplayServer_method_window_get_popup_safe_rect>` **(** :ref:`int<class_int>` window **)** |const| |
  244. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  245. | :ref:`Vector2i<class_Vector2i>` | :ref:`window_get_position<class_DisplayServer_method_window_get_position>` **(** :ref:`int<class_int>` window_id=0 **)** |const| |
  246. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  247. | :ref:`Vector2i<class_Vector2i>` | :ref:`window_get_real_size<class_DisplayServer_method_window_get_real_size>` **(** :ref:`int<class_int>` window_id=0 **)** |const| |
  248. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  249. | :ref:`Vector2i<class_Vector2i>` | :ref:`window_get_size<class_DisplayServer_method_window_get_size>` **(** :ref:`int<class_int>` window_id=0 **)** |const| |
  250. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  251. | :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` | :ref:`window_get_vsync_mode<class_DisplayServer_method_window_get_vsync_mode>` **(** :ref:`int<class_int>` window_id=0 **)** |const| |
  252. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  253. | void | :ref:`window_move_to_foreground<class_DisplayServer_method_window_move_to_foreground>` **(** :ref:`int<class_int>` window_id=0 **)** |
  254. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  255. | void | :ref:`window_request_attention<class_DisplayServer_method_window_request_attention>` **(** :ref:`int<class_int>` window_id=0 **)** |
  256. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  257. | void | :ref:`window_set_current_screen<class_DisplayServer_method_window_set_current_screen>` **(** :ref:`int<class_int>` screen, :ref:`int<class_int>` window_id=0 **)** |
  258. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  259. | void | :ref:`window_set_drop_files_callback<class_DisplayServer_method_window_set_drop_files_callback>` **(** :ref:`Callable<class_Callable>` callback, :ref:`int<class_int>` window_id=0 **)** |
  260. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  261. | void | :ref:`window_set_exclusive<class_DisplayServer_method_window_set_exclusive>` **(** :ref:`int<class_int>` window_id, :ref:`bool<class_bool>` exclusive **)** |
  262. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  263. | void | :ref:`window_set_flag<class_DisplayServer_method_window_set_flag>` **(** :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` flag, :ref:`bool<class_bool>` enabled, :ref:`int<class_int>` window_id=0 **)** |
  264. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  265. | void | :ref:`window_set_ime_active<class_DisplayServer_method_window_set_ime_active>` **(** :ref:`bool<class_bool>` active, :ref:`int<class_int>` window_id=0 **)** |
  266. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  267. | void | :ref:`window_set_ime_position<class_DisplayServer_method_window_set_ime_position>` **(** :ref:`Vector2i<class_Vector2i>` position, :ref:`int<class_int>` window_id=0 **)** |
  268. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  269. | void | :ref:`window_set_input_event_callback<class_DisplayServer_method_window_set_input_event_callback>` **(** :ref:`Callable<class_Callable>` callback, :ref:`int<class_int>` window_id=0 **)** |
  270. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  271. | void | :ref:`window_set_input_text_callback<class_DisplayServer_method_window_set_input_text_callback>` **(** :ref:`Callable<class_Callable>` callback, :ref:`int<class_int>` window_id=0 **)** |
  272. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  273. | void | :ref:`window_set_max_size<class_DisplayServer_method_window_set_max_size>` **(** :ref:`Vector2i<class_Vector2i>` max_size, :ref:`int<class_int>` window_id=0 **)** |
  274. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  275. | void | :ref:`window_set_min_size<class_DisplayServer_method_window_set_min_size>` **(** :ref:`Vector2i<class_Vector2i>` min_size, :ref:`int<class_int>` window_id=0 **)** |
  276. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  277. | void | :ref:`window_set_mode<class_DisplayServer_method_window_set_mode>` **(** :ref:`WindowMode<enum_DisplayServer_WindowMode>` mode, :ref:`int<class_int>` window_id=0 **)** |
  278. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  279. | void | :ref:`window_set_mouse_passthrough<class_DisplayServer_method_window_set_mouse_passthrough>` **(** :ref:`PackedVector2Array<class_PackedVector2Array>` region, :ref:`int<class_int>` window_id=0 **)** |
  280. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  281. | void | :ref:`window_set_popup_safe_rect<class_DisplayServer_method_window_set_popup_safe_rect>` **(** :ref:`int<class_int>` window, :ref:`Rect2i<class_Rect2i>` rect **)** |
  282. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  283. | void | :ref:`window_set_position<class_DisplayServer_method_window_set_position>` **(** :ref:`Vector2i<class_Vector2i>` position, :ref:`int<class_int>` window_id=0 **)** |
  284. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  285. | void | :ref:`window_set_rect_changed_callback<class_DisplayServer_method_window_set_rect_changed_callback>` **(** :ref:`Callable<class_Callable>` callback, :ref:`int<class_int>` window_id=0 **)** |
  286. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  287. | void | :ref:`window_set_size<class_DisplayServer_method_window_set_size>` **(** :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` window_id=0 **)** |
  288. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  289. | void | :ref:`window_set_title<class_DisplayServer_method_window_set_title>` **(** :ref:`String<class_String>` title, :ref:`int<class_int>` window_id=0 **)** |
  290. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  291. | void | :ref:`window_set_transient<class_DisplayServer_method_window_set_transient>` **(** :ref:`int<class_int>` window_id, :ref:`int<class_int>` parent_window_id **)** |
  292. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  293. | void | :ref:`window_set_vsync_mode<class_DisplayServer_method_window_set_vsync_mode>` **(** :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` vsync_mode, :ref:`int<class_int>` window_id=0 **)** |
  294. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  295. | void | :ref:`window_set_window_event_callback<class_DisplayServer_method_window_set_window_event_callback>` **(** :ref:`Callable<class_Callable>` callback, :ref:`int<class_int>` window_id=0 **)** |
  296. +----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  297. Enumerations
  298. ------------
  299. .. _enum_DisplayServer_Feature:
  300. .. _class_DisplayServer_constant_FEATURE_GLOBAL_MENU:
  301. .. _class_DisplayServer_constant_FEATURE_SUBWINDOWS:
  302. .. _class_DisplayServer_constant_FEATURE_TOUCHSCREEN:
  303. .. _class_DisplayServer_constant_FEATURE_MOUSE:
  304. .. _class_DisplayServer_constant_FEATURE_MOUSE_WARP:
  305. .. _class_DisplayServer_constant_FEATURE_CLIPBOARD:
  306. .. _class_DisplayServer_constant_FEATURE_VIRTUAL_KEYBOARD:
  307. .. _class_DisplayServer_constant_FEATURE_CURSOR_SHAPE:
  308. .. _class_DisplayServer_constant_FEATURE_CUSTOM_CURSOR_SHAPE:
  309. .. _class_DisplayServer_constant_FEATURE_NATIVE_DIALOG:
  310. .. _class_DisplayServer_constant_FEATURE_IME:
  311. .. _class_DisplayServer_constant_FEATURE_WINDOW_TRANSPARENCY:
  312. .. _class_DisplayServer_constant_FEATURE_HIDPI:
  313. .. _class_DisplayServer_constant_FEATURE_ICON:
  314. .. _class_DisplayServer_constant_FEATURE_NATIVE_ICON:
  315. .. _class_DisplayServer_constant_FEATURE_ORIENTATION:
  316. .. _class_DisplayServer_constant_FEATURE_SWAP_BUFFERS:
  317. .. _class_DisplayServer_constant_FEATURE_CLIPBOARD_PRIMARY:
  318. .. _class_DisplayServer_constant_FEATURE_TEXT_TO_SPEECH:
  319. enum **Feature**:
  320. - **FEATURE_GLOBAL_MENU** = **0**
  321. - **FEATURE_SUBWINDOWS** = **1**
  322. - **FEATURE_TOUCHSCREEN** = **2**
  323. - **FEATURE_MOUSE** = **3**
  324. - **FEATURE_MOUSE_WARP** = **4**
  325. - **FEATURE_CLIPBOARD** = **5**
  326. - **FEATURE_VIRTUAL_KEYBOARD** = **6**
  327. - **FEATURE_CURSOR_SHAPE** = **7**
  328. - **FEATURE_CUSTOM_CURSOR_SHAPE** = **8**
  329. - **FEATURE_NATIVE_DIALOG** = **9**
  330. - **FEATURE_IME** = **10**
  331. - **FEATURE_WINDOW_TRANSPARENCY** = **11**
  332. - **FEATURE_HIDPI** = **12**
  333. - **FEATURE_ICON** = **13**
  334. - **FEATURE_NATIVE_ICON** = **14**
  335. - **FEATURE_ORIENTATION** = **15**
  336. - **FEATURE_SWAP_BUFFERS** = **16**
  337. - **FEATURE_CLIPBOARD_PRIMARY** = **18**
  338. - **FEATURE_TEXT_TO_SPEECH** = **19** --- Display server supports text-to-speech. See ``tts_*`` methods.
  339. ----
  340. .. _enum_DisplayServer_MouseMode:
  341. .. _class_DisplayServer_constant_MOUSE_MODE_VISIBLE:
  342. .. _class_DisplayServer_constant_MOUSE_MODE_HIDDEN:
  343. .. _class_DisplayServer_constant_MOUSE_MODE_CAPTURED:
  344. .. _class_DisplayServer_constant_MOUSE_MODE_CONFINED:
  345. .. _class_DisplayServer_constant_MOUSE_MODE_CONFINED_HIDDEN:
  346. enum **MouseMode**:
  347. - **MOUSE_MODE_VISIBLE** = **0** --- Makes the mouse cursor visible if it is hidden.
  348. - **MOUSE_MODE_HIDDEN** = **1** --- Makes the mouse cursor hidden if it is visible.
  349. - **MOUSE_MODE_CAPTURED** = **2** --- Captures the mouse. The mouse will be hidden and its position locked at the center of the screen.
  350. \ **Note:** If you want to process the mouse's movement in this mode, you need to use :ref:`InputEventMouseMotion.relative<class_InputEventMouseMotion_property_relative>`.
  351. - **MOUSE_MODE_CONFINED** = **3** --- Confines the mouse cursor to the game window, and make it visible.
  352. - **MOUSE_MODE_CONFINED_HIDDEN** = **4** --- Confines the mouse cursor to the game window, and make it hidden.
  353. ----
  354. .. _enum_DisplayServer_ScreenOrientation:
  355. .. _class_DisplayServer_constant_SCREEN_LANDSCAPE:
  356. .. _class_DisplayServer_constant_SCREEN_PORTRAIT:
  357. .. _class_DisplayServer_constant_SCREEN_REVERSE_LANDSCAPE:
  358. .. _class_DisplayServer_constant_SCREEN_REVERSE_PORTRAIT:
  359. .. _class_DisplayServer_constant_SCREEN_SENSOR_LANDSCAPE:
  360. .. _class_DisplayServer_constant_SCREEN_SENSOR_PORTRAIT:
  361. .. _class_DisplayServer_constant_SCREEN_SENSOR:
  362. enum **ScreenOrientation**:
  363. - **SCREEN_LANDSCAPE** = **0**
  364. - **SCREEN_PORTRAIT** = **1**
  365. - **SCREEN_REVERSE_LANDSCAPE** = **2**
  366. - **SCREEN_REVERSE_PORTRAIT** = **3**
  367. - **SCREEN_SENSOR_LANDSCAPE** = **4**
  368. - **SCREEN_SENSOR_PORTRAIT** = **5**
  369. - **SCREEN_SENSOR** = **6**
  370. ----
  371. .. _enum_DisplayServer_CursorShape:
  372. .. _class_DisplayServer_constant_CURSOR_ARROW:
  373. .. _class_DisplayServer_constant_CURSOR_IBEAM:
  374. .. _class_DisplayServer_constant_CURSOR_POINTING_HAND:
  375. .. _class_DisplayServer_constant_CURSOR_CROSS:
  376. .. _class_DisplayServer_constant_CURSOR_WAIT:
  377. .. _class_DisplayServer_constant_CURSOR_BUSY:
  378. .. _class_DisplayServer_constant_CURSOR_DRAG:
  379. .. _class_DisplayServer_constant_CURSOR_CAN_DROP:
  380. .. _class_DisplayServer_constant_CURSOR_FORBIDDEN:
  381. .. _class_DisplayServer_constant_CURSOR_VSIZE:
  382. .. _class_DisplayServer_constant_CURSOR_HSIZE:
  383. .. _class_DisplayServer_constant_CURSOR_BDIAGSIZE:
  384. .. _class_DisplayServer_constant_CURSOR_FDIAGSIZE:
  385. .. _class_DisplayServer_constant_CURSOR_MOVE:
  386. .. _class_DisplayServer_constant_CURSOR_VSPLIT:
  387. .. _class_DisplayServer_constant_CURSOR_HSPLIT:
  388. .. _class_DisplayServer_constant_CURSOR_HELP:
  389. .. _class_DisplayServer_constant_CURSOR_MAX:
  390. enum **CursorShape**:
  391. - **CURSOR_ARROW** = **0**
  392. - **CURSOR_IBEAM** = **1**
  393. - **CURSOR_POINTING_HAND** = **2**
  394. - **CURSOR_CROSS** = **3**
  395. - **CURSOR_WAIT** = **4**
  396. - **CURSOR_BUSY** = **5**
  397. - **CURSOR_DRAG** = **6**
  398. - **CURSOR_CAN_DROP** = **7**
  399. - **CURSOR_FORBIDDEN** = **8**
  400. - **CURSOR_VSIZE** = **9**
  401. - **CURSOR_HSIZE** = **10**
  402. - **CURSOR_BDIAGSIZE** = **11**
  403. - **CURSOR_FDIAGSIZE** = **12**
  404. - **CURSOR_MOVE** = **13**
  405. - **CURSOR_VSPLIT** = **14**
  406. - **CURSOR_HSPLIT** = **15**
  407. - **CURSOR_HELP** = **16**
  408. - **CURSOR_MAX** = **17**
  409. ----
  410. .. _enum_DisplayServer_WindowMode:
  411. .. _class_DisplayServer_constant_WINDOW_MODE_WINDOWED:
  412. .. _class_DisplayServer_constant_WINDOW_MODE_MINIMIZED:
  413. .. _class_DisplayServer_constant_WINDOW_MODE_MAXIMIZED:
  414. .. _class_DisplayServer_constant_WINDOW_MODE_FULLSCREEN:
  415. .. _class_DisplayServer_constant_WINDOW_MODE_EXCLUSIVE_FULLSCREEN:
  416. enum **WindowMode**:
  417. - **WINDOW_MODE_WINDOWED** = **0**
  418. - **WINDOW_MODE_MINIMIZED** = **1**
  419. - **WINDOW_MODE_MAXIMIZED** = **2**
  420. - **WINDOW_MODE_FULLSCREEN** = **3** --- Fullscreen window mode. Note that this is not *exclusive* fullscreen. On Windows and Linux, a borderless window is used to emulate fullscreen. On macOS, a new desktop is used to display the running project.
  421. Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports :doc:`multiple resolutions <../tutorials/rendering/multiple_resolutions>` when enabling fullscreen mode.
  422. - **WINDOW_MODE_EXCLUSIVE_FULLSCREEN** = **4** --- Exclusive fullscreen window mode. This mode is implemented on Windows only. On other platforms, it is equivalent to :ref:`WINDOW_MODE_FULLSCREEN<class_DisplayServer_constant_WINDOW_MODE_FULLSCREEN>`.
  423. Only one window in exclusive fullscreen mode can be visible on a given screen at a time. If multiple windows are in exclusive fullscreen mode for the same screen, the last one being set to this mode takes precedence.
  424. Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports :doc:`multiple resolutions <../tutorials/rendering/multiple_resolutions>` when enabling fullscreen mode.
  425. ----
  426. .. _enum_DisplayServer_WindowFlags:
  427. .. _class_DisplayServer_constant_WINDOW_FLAG_RESIZE_DISABLED:
  428. .. _class_DisplayServer_constant_WINDOW_FLAG_BORDERLESS:
  429. .. _class_DisplayServer_constant_WINDOW_FLAG_ALWAYS_ON_TOP:
  430. .. _class_DisplayServer_constant_WINDOW_FLAG_TRANSPARENT:
  431. .. _class_DisplayServer_constant_WINDOW_FLAG_NO_FOCUS:
  432. .. _class_DisplayServer_constant_WINDOW_FLAG_POPUP:
  433. .. _class_DisplayServer_constant_WINDOW_FLAG_MAX:
  434. enum **WindowFlags**:
  435. - **WINDOW_FLAG_RESIZE_DISABLED** = **0** --- Window can't be resizing by dragging its resize grip. It's still possible to resize the window using :ref:`window_set_size<class_DisplayServer_method_window_set_size>`. This flag is ignored for full screen windows.
  436. - **WINDOW_FLAG_BORDERLESS** = **1** --- Window do not have native title bar and other decorations. This flag is ignored for full-screen windows.
  437. - **WINDOW_FLAG_ALWAYS_ON_TOP** = **2** --- Window is floating above other regular windows. This flag is ignored for full-screen windows.
  438. - **WINDOW_FLAG_TRANSPARENT** = **3** --- Window is will be destroyed with its transient parent and displayed on top of non-exclusive full-screen parent window. Transient windows can't enter full-screen mode.
  439. - **WINDOW_FLAG_NO_FOCUS** = **4** --- Window can't be focused. No-focus window will ignore all input, except mouse clicks.
  440. - **WINDOW_FLAG_POPUP** = **5** --- Window is part of menu or :ref:`OptionButton<class_OptionButton>` dropdown. This flag can't be changed when window is visible. An active popup window will exclusively receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have :ref:`WINDOW_FLAG_TRANSPARENT<class_DisplayServer_constant_WINDOW_FLAG_TRANSPARENT>` set.
  441. - **WINDOW_FLAG_MAX** = **6**
  442. ----
  443. .. _enum_DisplayServer_WindowEvent:
  444. .. _class_DisplayServer_constant_WINDOW_EVENT_MOUSE_ENTER:
  445. .. _class_DisplayServer_constant_WINDOW_EVENT_MOUSE_EXIT:
  446. .. _class_DisplayServer_constant_WINDOW_EVENT_FOCUS_IN:
  447. .. _class_DisplayServer_constant_WINDOW_EVENT_FOCUS_OUT:
  448. .. _class_DisplayServer_constant_WINDOW_EVENT_CLOSE_REQUEST:
  449. .. _class_DisplayServer_constant_WINDOW_EVENT_GO_BACK_REQUEST:
  450. .. _class_DisplayServer_constant_WINDOW_EVENT_DPI_CHANGE:
  451. enum **WindowEvent**:
  452. - **WINDOW_EVENT_MOUSE_ENTER** = **0**
  453. - **WINDOW_EVENT_MOUSE_EXIT** = **1**
  454. - **WINDOW_EVENT_FOCUS_IN** = **2**
  455. - **WINDOW_EVENT_FOCUS_OUT** = **3**
  456. - **WINDOW_EVENT_CLOSE_REQUEST** = **4**
  457. - **WINDOW_EVENT_GO_BACK_REQUEST** = **5**
  458. - **WINDOW_EVENT_DPI_CHANGE** = **6**
  459. ----
  460. .. _enum_DisplayServer_VSyncMode:
  461. .. _class_DisplayServer_constant_VSYNC_DISABLED:
  462. .. _class_DisplayServer_constant_VSYNC_ENABLED:
  463. .. _class_DisplayServer_constant_VSYNC_ADAPTIVE:
  464. .. _class_DisplayServer_constant_VSYNC_MAILBOX:
  465. enum **VSyncMode**:
  466. - **VSYNC_DISABLED** = **0** --- No vertical synchronization, which means the engine will display frames as fast as possible (tearing may be visible).
  467. - **VSYNC_ENABLED** = **1** --- Default vertical synchronization mode, the image is displayed only on vertical blanking intervals (no tearing is visible).
  468. - **VSYNC_ADAPTIVE** = **2** --- Behaves like :ref:`VSYNC_DISABLED<class_DisplayServer_constant_VSYNC_DISABLED>` when the framerate drops below the screen's refresh rate to reduce stuttering (tearing may be visible), otherwise vertical synchronization is enabled to avoid tearing.
  469. - **VSYNC_MAILBOX** = **3** --- Displays the most recent image in the queue on vertical blanking intervals, while rendering to the other images (no tearing is visible).
  470. Although not guaranteed, the images can be rendered as fast as possible, which may reduce input lag.
  471. ----
  472. .. _enum_DisplayServer_HandleType:
  473. .. _class_DisplayServer_constant_DISPLAY_HANDLE:
  474. .. _class_DisplayServer_constant_WINDOW_HANDLE:
  475. .. _class_DisplayServer_constant_WINDOW_VIEW:
  476. enum **HandleType**:
  477. - **DISPLAY_HANDLE** = **0** --- Display handle:
  478. - Linux: ``X11::Display*`` for the display.
  479. - **WINDOW_HANDLE** = **1** --- Window handle:
  480. - Windows: ``HWND`` for the window.
  481. - Linux: ``X11::Window*`` for the window.
  482. - MacOS: ``NSWindow*`` for the window.
  483. - iOS: ``UIViewController*`` for the view controller.
  484. - Android: ``jObject`` for the activity.
  485. - **WINDOW_VIEW** = **2** --- Window view:
  486. - MacOS: ``NSView*`` for the window main view.
  487. - iOS: ``UIView*`` for the window main view.
  488. ----
  489. .. _enum_DisplayServer_TTSUtteranceEvent:
  490. .. _class_DisplayServer_constant_TTS_UTTERANCE_STARTED:
  491. .. _class_DisplayServer_constant_TTS_UTTERANCE_ENDED:
  492. .. _class_DisplayServer_constant_TTS_UTTERANCE_CANCELED:
  493. .. _class_DisplayServer_constant_TTS_UTTERANCE_BOUNDARY:
  494. enum **TTSUtteranceEvent**:
  495. - **TTS_UTTERANCE_STARTED** = **0** --- Utterance has begun to be spoken.
  496. - **TTS_UTTERANCE_ENDED** = **1** --- Utterance was successfully finished.
  497. - **TTS_UTTERANCE_CANCELED** = **2** --- Utterance was canceled, or TTS service was unable to process it.
  498. - **TTS_UTTERANCE_BOUNDARY** = **3** --- Utterance reached a word or sentence boundary.
  499. Constants
  500. ---------
  501. .. _class_DisplayServer_constant_SCREEN_OF_MAIN_WINDOW:
  502. .. _class_DisplayServer_constant_MAIN_WINDOW_ID:
  503. .. _class_DisplayServer_constant_INVALID_WINDOW_ID:
  504. - **SCREEN_OF_MAIN_WINDOW** = **-1**
  505. - **MAIN_WINDOW_ID** = **0**
  506. - **INVALID_WINDOW_ID** = **-1**
  507. Method Descriptions
  508. -------------------
  509. .. _class_DisplayServer_method_clipboard_get:
  510. - :ref:`String<class_String>` **clipboard_get** **(** **)** |const|
  511. Returns the user's clipboard as a string if possible.
  512. ----
  513. .. _class_DisplayServer_method_clipboard_get_primary:
  514. - :ref:`String<class_String>` **clipboard_get_primary** **(** **)** |const|
  515. Returns the user's primary clipboard as a string if possible.
  516. \ **Note:** This method is only implemented on Linux.
  517. ----
  518. .. _class_DisplayServer_method_clipboard_has:
  519. - :ref:`bool<class_bool>` **clipboard_has** **(** **)** |const|
  520. Returns ``true`` if there is content on the user's clipboard.
  521. ----
  522. .. _class_DisplayServer_method_clipboard_set:
  523. - void **clipboard_set** **(** :ref:`String<class_String>` clipboard **)**
  524. Sets the user's clipboard content to the given string.
  525. ----
  526. .. _class_DisplayServer_method_clipboard_set_primary:
  527. - void **clipboard_set_primary** **(** :ref:`String<class_String>` clipboard_primary **)**
  528. Sets the user's primary clipboard content to the given string.
  529. \ **Note:** This method is only implemented on Linux.
  530. ----
  531. .. _class_DisplayServer_method_create_sub_window:
  532. - :ref:`int<class_int>` **create_sub_window** **(** :ref:`WindowMode<enum_DisplayServer_WindowMode>` mode, :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` vsync_mode, :ref:`int<class_int>` flags, :ref:`Rect2i<class_Rect2i>` rect=Rect2i(0, 0, 0, 0) **)**
  533. ----
  534. .. _class_DisplayServer_method_cursor_get_shape:
  535. - :ref:`CursorShape<enum_DisplayServer_CursorShape>` **cursor_get_shape** **(** **)** |const|
  536. ----
  537. .. _class_DisplayServer_method_cursor_set_custom_image:
  538. - void **cursor_set_custom_image** **(** :ref:`Resource<class_Resource>` cursor, :ref:`CursorShape<enum_DisplayServer_CursorShape>` shape=0, :ref:`Vector2<class_Vector2>` hotspot=Vector2(0, 0) **)**
  539. ----
  540. .. _class_DisplayServer_method_cursor_set_shape:
  541. - void **cursor_set_shape** **(** :ref:`CursorShape<enum_DisplayServer_CursorShape>` shape **)**
  542. ----
  543. .. _class_DisplayServer_method_delete_sub_window:
  544. - void **delete_sub_window** **(** :ref:`int<class_int>` window_id **)**
  545. ----
  546. .. _class_DisplayServer_method_dialog_input_text:
  547. - :ref:`Error<enum_@GlobalScope_Error>` **dialog_input_text** **(** :ref:`String<class_String>` title, :ref:`String<class_String>` description, :ref:`String<class_String>` existing_text, :ref:`Callable<class_Callable>` callback **)**
  548. ----
  549. .. _class_DisplayServer_method_dialog_show:
  550. - :ref:`Error<enum_@GlobalScope_Error>` **dialog_show** **(** :ref:`String<class_String>` title, :ref:`String<class_String>` description, :ref:`PackedStringArray<class_PackedStringArray>` buttons, :ref:`Callable<class_Callable>` callback **)**
  551. ----
  552. .. _class_DisplayServer_method_enable_for_stealing_focus:
  553. - void **enable_for_stealing_focus** **(** :ref:`int<class_int>` process_id **)**
  554. ----
  555. .. _class_DisplayServer_method_force_process_and_drop_events:
  556. - void **force_process_and_drop_events** **(** **)**
  557. ----
  558. .. _class_DisplayServer_method_get_display_cutouts:
  559. - :ref:`Array<class_Array>` **get_display_cutouts** **(** **)** |const|
  560. Returns an :ref:`Array<class_Array>` of :ref:`Rect2<class_Rect2>`, each of which is the bounding rectangle for a display cutout or notch. These are non-functional areas on edge-to-edge screens used by cameras and sensors. Returns an empty array if the device does not have cutouts. See also :ref:`get_display_safe_area<class_DisplayServer_method_get_display_safe_area>`.
  561. \ **Note:** Currently only implemented on Android. Other platforms will return an empty array even if they do have display cutouts or notches.
  562. ----
  563. .. _class_DisplayServer_method_get_display_safe_area:
  564. - :ref:`Rect2i<class_Rect2i>` **get_display_safe_area** **(** **)** |const|
  565. Returns the unobscured area of the display where interactive controls should be rendered. See also :ref:`get_display_cutouts<class_DisplayServer_method_get_display_cutouts>`.
  566. ----
  567. .. _class_DisplayServer_method_get_name:
  568. - :ref:`String<class_String>` **get_name** **(** **)** |const|
  569. ----
  570. .. _class_DisplayServer_method_get_screen_count:
  571. - :ref:`int<class_int>` **get_screen_count** **(** **)** |const|
  572. ----
  573. .. _class_DisplayServer_method_get_swap_cancel_ok:
  574. - :ref:`bool<class_bool>` **get_swap_cancel_ok** **(** **)**
  575. ----
  576. .. _class_DisplayServer_method_get_window_at_screen_position:
  577. - :ref:`int<class_int>` **get_window_at_screen_position** **(** :ref:`Vector2i<class_Vector2i>` position **)** |const|
  578. ----
  579. .. _class_DisplayServer_method_get_window_list:
  580. - :ref:`PackedInt32Array<class_PackedInt32Array>` **get_window_list** **(** **)** |const|
  581. ----
  582. .. _class_DisplayServer_method_global_menu_add_check_item:
  583. - void **global_menu_add_check_item** **(** :ref:`String<class_String>` menu_root, :ref:`String<class_String>` label, :ref:`Callable<class_Callable>` callback, :ref:`Variant<class_Variant>` tag=null, :ref:`Key<enum_@GlobalScope_Key>` accelerator=0, :ref:`int<class_int>` index=-1 **)**
  584. Adds a new checkable item with text ``label`` to the global menu with ID ``menu_root``.
  585. \ **Note:** This method is implemented on macOS.
  586. \ **Supported system menu IDs:**\
  587. ::
  588. "" - Main menu (macOS).
  589. "_dock" - Dock popup menu (macOS).
  590. ----
  591. .. _class_DisplayServer_method_global_menu_add_icon_check_item:
  592. - void **global_menu_add_icon_check_item** **(** :ref:`String<class_String>` menu_root, :ref:`Texture2D<class_Texture2D>` icon, :ref:`String<class_String>` label, :ref:`Callable<class_Callable>` callback, :ref:`Variant<class_Variant>` tag=null, :ref:`Key<enum_@GlobalScope_Key>` accelerator=0, :ref:`int<class_int>` index=-1 **)**
  593. Adds a new checkable item with text ``label`` and icon ``icon`` to the global menu with ID ``menu_root``.
  594. \ **Note:** This method is implemented on macOS.
  595. \ **Supported system menu IDs:**\
  596. ::
  597. "" - Main menu (macOS).
  598. "_dock" - Dock popup menu (macOS).
  599. ----
  600. .. _class_DisplayServer_method_global_menu_add_icon_item:
  601. - void **global_menu_add_icon_item** **(** :ref:`String<class_String>` menu_root, :ref:`Texture2D<class_Texture2D>` icon, :ref:`String<class_String>` label, :ref:`Callable<class_Callable>` callback, :ref:`Variant<class_Variant>` tag=null, :ref:`Key<enum_@GlobalScope_Key>` accelerator=0, :ref:`int<class_int>` index=-1 **)**
  602. Adds a new item with text ``label`` and icon ``icon`` to the global menu with ID ``menu_root``.
  603. \ **Note:** This method is implemented on macOS.
  604. \ **Supported system menu IDs:**\
  605. ::
  606. "" - Main menu (macOS).
  607. "_dock" - Dock popup menu (macOS).
  608. ----
  609. .. _class_DisplayServer_method_global_menu_add_icon_radio_check_item:
  610. - void **global_menu_add_icon_radio_check_item** **(** :ref:`String<class_String>` menu_root, :ref:`Texture2D<class_Texture2D>` icon, :ref:`String<class_String>` label, :ref:`Callable<class_Callable>` callback, :ref:`Variant<class_Variant>` tag=null, :ref:`Key<enum_@GlobalScope_Key>` accelerator=0, :ref:`int<class_int>` index=-1 **)**
  611. Adds a new radio-checkable item with text ``label`` and icon ``icon`` to the global menu with ID ``menu_root``.
  612. \ **Note:** Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`global_menu_set_item_checked<class_DisplayServer_method_global_menu_set_item_checked>` for more info on how to control it.
  613. \ **Note:** This method is implemented on macOS.
  614. \ **Supported system menu IDs:**\
  615. ::
  616. "" - Main menu (macOS).
  617. "_dock" - Dock popup menu (macOS).
  618. ----
  619. .. _class_DisplayServer_method_global_menu_add_item:
  620. - void **global_menu_add_item** **(** :ref:`String<class_String>` menu_root, :ref:`String<class_String>` label, :ref:`Callable<class_Callable>` callback, :ref:`Variant<class_Variant>` tag=null, :ref:`Key<enum_@GlobalScope_Key>` accelerator=0, :ref:`int<class_int>` index=-1 **)**
  621. Adds a new item with text ``label`` to the global menu with ID ``menu_root``.
  622. \ **Note:** This method is implemented on macOS.
  623. \ **Supported system menu IDs:**\
  624. ::
  625. "" - Main menu (macOS).
  626. "_dock" - Dock popup menu (macOS).
  627. ----
  628. .. _class_DisplayServer_method_global_menu_add_multistate_item:
  629. - void **global_menu_add_multistate_item** **(** :ref:`String<class_String>` menu_root, :ref:`String<class_String>` labe, :ref:`int<class_int>` max_states, :ref:`int<class_int>` default_state, :ref:`Callable<class_Callable>` callback, :ref:`Variant<class_Variant>` tag=null, :ref:`Key<enum_@GlobalScope_Key>` accelerator=0, :ref:`int<class_int>` index=-1 **)**
  630. Adds a new item with text ``label`` to the global menu with ID ``menu_root``.
  631. Contrarily to normal binary items, multistate items can have more than two states, as defined by ``max_states``. Each press or activate of the item will increase the state by one. The default value is defined by ``default_state``.
  632. \ **Note:** This method is implemented on macOS.
  633. \ **Supported system menu IDs:**\
  634. ::
  635. "" - Main menu (macOS).
  636. "_dock" - Dock popup menu (macOS).
  637. ----
  638. .. _class_DisplayServer_method_global_menu_add_radio_check_item:
  639. - void **global_menu_add_radio_check_item** **(** :ref:`String<class_String>` menu_root, :ref:`String<class_String>` label, :ref:`Callable<class_Callable>` callback, :ref:`Variant<class_Variant>` tag=null, :ref:`Key<enum_@GlobalScope_Key>` accelerator=0, :ref:`int<class_int>` index=-1 **)**
  640. Adds a new radio-checkable item with text ``label`` to the global menu with ID ``menu_root``.
  641. \ **Note:** Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`global_menu_set_item_checked<class_DisplayServer_method_global_menu_set_item_checked>` for more info on how to control it.
  642. \ **Note:** This method is implemented on macOS.
  643. \ **Supported system menu IDs:**\
  644. ::
  645. "" - Main menu (macOS).
  646. "_dock" - Dock popup menu (macOS).
  647. ----
  648. .. _class_DisplayServer_method_global_menu_add_separator:
  649. - void **global_menu_add_separator** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` index=-1 **)**
  650. Adds a separator between items to the global menu with ID ``menu_root``. Separators also occupy an index.
  651. \ **Note:** This method is implemented on macOS.
  652. \ **Supported system menu IDs:**\
  653. ::
  654. "" - Main menu (macOS).
  655. "_dock" - Dock popup menu (macOS).
  656. ----
  657. .. _class_DisplayServer_method_global_menu_add_submenu_item:
  658. - void **global_menu_add_submenu_item** **(** :ref:`String<class_String>` menu_root, :ref:`String<class_String>` label, :ref:`String<class_String>` submenu, :ref:`int<class_int>` index=-1 **)**
  659. Adds an item that will act as a submenu of the global menu ``menu_root``. The ``submenu`` argument is the ID of the global menu root that will be shown when the item is clicked.
  660. \ **Note:** This method is implemented on macOS.
  661. \ **Supported system menu IDs:**\
  662. ::
  663. "" - Main menu (macOS).
  664. "_dock" - Dock popup menu (macOS).
  665. ----
  666. .. _class_DisplayServer_method_global_menu_clear:
  667. - void **global_menu_clear** **(** :ref:`String<class_String>` menu_root **)**
  668. Removes all items from the global menu with ID ``menu_root``.
  669. \ **Note:** This method is implemented on macOS.
  670. \ **Supported system menu IDs:**\
  671. ::
  672. "" - Main menu (macOS).
  673. "_dock" - Dock popup menu (macOS).
  674. ----
  675. .. _class_DisplayServer_method_global_menu_get_item_accelerator:
  676. - :ref:`Key<enum_@GlobalScope_Key>` **global_menu_get_item_accelerator** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const|
  677. Returns the accelerator of the item at index ``idx``. Accelerators are special combinations of keys that activate the item, no matter which control is focused.
  678. \ **Note:** This method is implemented on macOS.
  679. ----
  680. .. _class_DisplayServer_method_global_menu_get_item_callback:
  681. - :ref:`Callable<class_Callable>` **global_menu_get_item_callback** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const|
  682. Returns the callback of the item at index ``idx``.
  683. \ **Note:** This method is implemented on macOS.
  684. ----
  685. .. _class_DisplayServer_method_global_menu_get_item_icon:
  686. - :ref:`Texture2D<class_Texture2D>` **global_menu_get_item_icon** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const|
  687. Returns the icon of the item at index ``idx``.
  688. \ **Note:** This method is implemented on macOS.
  689. ----
  690. .. _class_DisplayServer_method_global_menu_get_item_index_from_tag:
  691. - :ref:`int<class_int>` **global_menu_get_item_index_from_tag** **(** :ref:`String<class_String>` menu_root, :ref:`Variant<class_Variant>` tag **)** |const|
  692. Returns the index of the item with the specified ``tag``. Index is automatically assigned to each item by the engine. Index can not be set manually.
  693. \ **Note:** This method is implemented on macOS.
  694. ----
  695. .. _class_DisplayServer_method_global_menu_get_item_index_from_text:
  696. - :ref:`int<class_int>` **global_menu_get_item_index_from_text** **(** :ref:`String<class_String>` menu_root, :ref:`String<class_String>` text **)** |const|
  697. Returns the index of the item with the specified ``text``. Index is automatically assigned to each item by the engine. Index can not be set manually.
  698. \ **Note:** This method is implemented on macOS.
  699. ----
  700. .. _class_DisplayServer_method_global_menu_get_item_max_states:
  701. - :ref:`int<class_int>` **global_menu_get_item_max_states** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const|
  702. Returns number of states of an multistate item. See :ref:`global_menu_add_multistate_item<class_DisplayServer_method_global_menu_add_multistate_item>` for details.
  703. \ **Note:** This method is implemented on macOS.
  704. ----
  705. .. _class_DisplayServer_method_global_menu_get_item_state:
  706. - :ref:`int<class_int>` **global_menu_get_item_state** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const|
  707. Returns the state of an multistate item. See :ref:`global_menu_add_multistate_item<class_DisplayServer_method_global_menu_add_multistate_item>` for details.
  708. \ **Note:** This method is implemented on macOS.
  709. ----
  710. .. _class_DisplayServer_method_global_menu_get_item_submenu:
  711. - :ref:`String<class_String>` **global_menu_get_item_submenu** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const|
  712. Returns the submenu ID of the item at index ``idx``. See :ref:`global_menu_add_submenu_item<class_DisplayServer_method_global_menu_add_submenu_item>` for more info on how to add a submenu.
  713. \ **Note:** This method is implemented on macOS.
  714. ----
  715. .. _class_DisplayServer_method_global_menu_get_item_tag:
  716. - :ref:`Variant<class_Variant>` **global_menu_get_item_tag** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const|
  717. Returns the metadata of the specified item, which might be of any type. You can set it with :ref:`global_menu_set_item_tag<class_DisplayServer_method_global_menu_set_item_tag>`, which provides a simple way of assigning context data to items.
  718. \ **Note:** This method is implemented on macOS.
  719. ----
  720. .. _class_DisplayServer_method_global_menu_get_item_text:
  721. - :ref:`String<class_String>` **global_menu_get_item_text** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const|
  722. Returns the text of the item at index ``idx``.
  723. \ **Note:** This method is implemented on macOS.
  724. ----
  725. .. _class_DisplayServer_method_global_menu_get_item_tooltip:
  726. - :ref:`String<class_String>` **global_menu_get_item_tooltip** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const|
  727. Returns the tooltip associated with the specified index index ``idx``.
  728. \ **Note:** This method is implemented on macOS.
  729. ----
  730. .. _class_DisplayServer_method_global_menu_is_item_checkable:
  731. - :ref:`bool<class_bool>` **global_menu_is_item_checkable** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const|
  732. Returns ``true`` if the item at index ``idx`` is checkable in some way, i.e. if it has a checkbox or radio button.
  733. \ **Note:** This method is implemented on macOS.
  734. ----
  735. .. _class_DisplayServer_method_global_menu_is_item_checked:
  736. - :ref:`bool<class_bool>` **global_menu_is_item_checked** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const|
  737. Returns ``true`` if the item at index ``idx`` is checked.
  738. \ **Note:** This method is implemented on macOS.
  739. ----
  740. .. _class_DisplayServer_method_global_menu_is_item_disabled:
  741. - :ref:`bool<class_bool>` **global_menu_is_item_disabled** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const|
  742. Returns ``true`` if the item at index ``idx`` is disabled. When it is disabled it can't be selected, or its action invoked.
  743. See :ref:`global_menu_set_item_disabled<class_DisplayServer_method_global_menu_set_item_disabled>` for more info on how to disable an item.
  744. \ **Note:** This method is implemented on macOS.
  745. ----
  746. .. _class_DisplayServer_method_global_menu_is_item_radio_checkable:
  747. - :ref:`bool<class_bool>` **global_menu_is_item_radio_checkable** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const|
  748. Returns ``true`` if the item at index ``idx`` has radio button-style checkability.
  749. \ **Note:** This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups.
  750. \ **Note:** This method is implemented on macOS.
  751. ----
  752. .. _class_DisplayServer_method_global_menu_remove_item:
  753. - void **global_menu_remove_item** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)**
  754. Removes the item at index ``idx`` from the global menu ``menu_root``.
  755. \ **Note:** The indices of items after the removed item will be shifted by one.
  756. \ **Note:** This method is implemented on macOS.
  757. ----
  758. .. _class_DisplayServer_method_global_menu_set_item_accelerator:
  759. - void **global_menu_set_item_accelerator** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`Key<enum_@GlobalScope_Key>` keycode **)**
  760. Sets the accelerator of the item at index ``idx``.
  761. \ **Note:** This method is implemented on macOS.
  762. ----
  763. .. _class_DisplayServer_method_global_menu_set_item_callback:
  764. - void **global_menu_set_item_callback** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`Callable<class_Callable>` callback **)**
  765. Sets the callback of the item at index ``idx``. Callback is emitted when an item is pressed or its accelerator is activated.
  766. \ **Note:** This method is implemented on macOS.
  767. ----
  768. .. _class_DisplayServer_method_global_menu_set_item_checkable:
  769. - void **global_menu_set_item_checkable** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`bool<class_bool>` checkable **)**
  770. Sets whether the item at index ``idx`` has a checkbox. If ``false``, sets the type of the item to plain text.
  771. \ **Note:** This method is implemented on macOS.
  772. ----
  773. .. _class_DisplayServer_method_global_menu_set_item_checked:
  774. - void **global_menu_set_item_checked** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`bool<class_bool>` checked **)**
  775. Sets the checkstate status of the item at index ``idx``.
  776. \ **Note:** This method is implemented on macOS.
  777. ----
  778. .. _class_DisplayServer_method_global_menu_set_item_disabled:
  779. - void **global_menu_set_item_disabled** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`bool<class_bool>` disabled **)**
  780. Enables/disables the item at index ``idx``. When it is disabled, it can't be selected and its action can't be invoked.
  781. \ **Note:** This method is implemented on macOS.
  782. ----
  783. .. _class_DisplayServer_method_global_menu_set_item_icon:
  784. - void **global_menu_set_item_icon** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`Texture2D<class_Texture2D>` icon **)**
  785. Replaces the :ref:`Texture2D<class_Texture2D>` icon of the specified ``idx``.
  786. \ **Note:** This method is implemented on macOS.
  787. \ **Note:** This method is not supported by macOS "_dock" menu items.
  788. ----
  789. .. _class_DisplayServer_method_global_menu_set_item_max_states:
  790. - void **global_menu_set_item_max_states** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`int<class_int>` max_states **)**
  791. Sets number of state of an multistate item. See :ref:`global_menu_add_multistate_item<class_DisplayServer_method_global_menu_add_multistate_item>` for details.
  792. \ **Note:** This method is implemented on macOS.
  793. ----
  794. .. _class_DisplayServer_method_global_menu_set_item_radio_checkable:
  795. - void **global_menu_set_item_radio_checkable** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`bool<class_bool>` checkable **)**
  796. Sets the type of the item at the specified index ``idx`` to radio button. If ``false``, sets the type of the item to plain text
  797. \ **Note:** This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups.
  798. \ **Note:** This method is implemented on macOS.
  799. ----
  800. .. _class_DisplayServer_method_global_menu_set_item_state:
  801. - void **global_menu_set_item_state** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`int<class_int>` state **)**
  802. Sets the state of an multistate item. See :ref:`global_menu_add_multistate_item<class_DisplayServer_method_global_menu_add_multistate_item>` for details.
  803. \ **Note:** This method is implemented on macOS.
  804. ----
  805. .. _class_DisplayServer_method_global_menu_set_item_submenu:
  806. - void **global_menu_set_item_submenu** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`String<class_String>` submenu **)**
  807. Sets the submenu of the item at index ``idx``. The submenu is the ID of a global menu root that would be shown when the item is clicked.
  808. \ **Note:** This method is implemented on macOS.
  809. ----
  810. .. _class_DisplayServer_method_global_menu_set_item_tag:
  811. - void **global_menu_set_item_tag** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`Variant<class_Variant>` tag **)**
  812. Sets the metadata of an item, which may be of any type. You can later get it with :ref:`global_menu_get_item_tag<class_DisplayServer_method_global_menu_get_item_tag>`, which provides a simple way of assigning context data to items.
  813. \ **Note:** This method is implemented on macOS.
  814. ----
  815. .. _class_DisplayServer_method_global_menu_set_item_text:
  816. - void **global_menu_set_item_text** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`String<class_String>` text **)**
  817. Sets the text of the item at index ``idx``.
  818. \ **Note:** This method is implemented on macOS.
  819. ----
  820. .. _class_DisplayServer_method_global_menu_set_item_tooltip:
  821. - void **global_menu_set_item_tooltip** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`String<class_String>` tooltip **)**
  822. Sets the :ref:`String<class_String>` tooltip of the item at the specified index ``idx``.
  823. \ **Note:** This method is implemented on macOS.
  824. ----
  825. .. _class_DisplayServer_method_has_feature:
  826. - :ref:`bool<class_bool>` **has_feature** **(** :ref:`Feature<enum_DisplayServer_Feature>` feature **)** |const|
  827. ----
  828. .. _class_DisplayServer_method_ime_get_selection:
  829. - :ref:`Vector2i<class_Vector2i>` **ime_get_selection** **(** **)** |const|
  830. ----
  831. .. _class_DisplayServer_method_ime_get_text:
  832. - :ref:`String<class_String>` **ime_get_text** **(** **)** |const|
  833. ----
  834. .. _class_DisplayServer_method_keyboard_get_current_layout:
  835. - :ref:`int<class_int>` **keyboard_get_current_layout** **(** **)** |const|
  836. Returns active keyboard layout index.
  837. \ **Note:** This method is implemented on Linux, macOS and Windows.
  838. ----
  839. .. _class_DisplayServer_method_keyboard_get_keycode_from_physical:
  840. - :ref:`Key<enum_@GlobalScope_Key>` **keyboard_get_keycode_from_physical** **(** :ref:`Key<enum_@GlobalScope_Key>` keycode **)** |const|
  841. Converts a physical (US QWERTY) ``keycode`` to one in the active keyboard layout.
  842. \ **Note:** This method is implemented on Linux, macOS and Windows.
  843. ----
  844. .. _class_DisplayServer_method_keyboard_get_layout_count:
  845. - :ref:`int<class_int>` **keyboard_get_layout_count** **(** **)** |const|
  846. Returns the number of keyboard layouts.
  847. \ **Note:** This method is implemented on Linux, macOS and Windows.
  848. ----
  849. .. _class_DisplayServer_method_keyboard_get_layout_language:
  850. - :ref:`String<class_String>` **keyboard_get_layout_language** **(** :ref:`int<class_int>` index **)** |const|
  851. Returns the ISO-639/BCP-47 language code of the keyboard layout at position ``index``.
  852. \ **Note:** This method is implemented on Linux, macOS and Windows.
  853. ----
  854. .. _class_DisplayServer_method_keyboard_get_layout_name:
  855. - :ref:`String<class_String>` **keyboard_get_layout_name** **(** :ref:`int<class_int>` index **)** |const|
  856. Returns the localized name of the keyboard layout at position ``index``.
  857. \ **Note:** This method is implemented on Linux, macOS and Windows.
  858. ----
  859. .. _class_DisplayServer_method_keyboard_set_current_layout:
  860. - void **keyboard_set_current_layout** **(** :ref:`int<class_int>` index **)**
  861. Sets active keyboard layout.
  862. \ **Note:** This method is implemented on Linux, macOS and Windows.
  863. ----
  864. .. _class_DisplayServer_method_mouse_get_button_state:
  865. - :ref:`MouseButton<enum_@GlobalScope_MouseButton>` **mouse_get_button_state** **(** **)** |const|
  866. ----
  867. .. _class_DisplayServer_method_mouse_get_mode:
  868. - :ref:`MouseMode<enum_DisplayServer_MouseMode>` **mouse_get_mode** **(** **)** |const|
  869. ----
  870. .. _class_DisplayServer_method_mouse_get_position:
  871. - :ref:`Vector2i<class_Vector2i>` **mouse_get_position** **(** **)** |const|
  872. Returns the mouse cursor's current position.
  873. ----
  874. .. _class_DisplayServer_method_mouse_set_mode:
  875. - void **mouse_set_mode** **(** :ref:`MouseMode<enum_DisplayServer_MouseMode>` mouse_mode **)**
  876. ----
  877. .. _class_DisplayServer_method_process_events:
  878. - void **process_events** **(** **)**
  879. ----
  880. .. _class_DisplayServer_method_screen_get_dpi:
  881. - :ref:`int<class_int>` **screen_get_dpi** **(** :ref:`int<class_int>` screen=-1 **)** |const|
  882. Returns the dots per inch density of the specified screen. If ``screen`` is ``\ SCREEN_OF_MAIN_WINDOW`` (the default value), a screen with the main window will be used.
  883. \ **Note:** On macOS, returned value is inaccurate if fractional display scaling mode is used.
  884. \ **Note:** On Android devices, the actual screen densities are grouped into six generalized densities:
  885. ::
  886. ldpi - 120 dpi
  887. mdpi - 160 dpi
  888. hdpi - 240 dpi
  889. xhdpi - 320 dpi
  890. xxhdpi - 480 dpi
  891. xxxhdpi - 640 dpi
  892. \ **Note:** This method is implemented on Android, Linux, macOS and Windows. Returns ``72`` on unsupported platforms.
  893. ----
  894. .. _class_DisplayServer_method_screen_get_max_scale:
  895. - :ref:`float<class_float>` **screen_get_max_scale** **(** **)** |const|
  896. Returns the greatest scale factor of all screens.
  897. \ **Note:** On macOS returned value is ``2.0`` if there is at least one hiDPI (Retina) screen in the system, and ``1.0`` in all other cases.
  898. \ **Note:** This method is implemented on macOS.
  899. ----
  900. .. _class_DisplayServer_method_screen_get_orientation:
  901. - :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **screen_get_orientation** **(** :ref:`int<class_int>` screen=-1 **)** |const|
  902. ----
  903. .. _class_DisplayServer_method_screen_get_position:
  904. - :ref:`Vector2i<class_Vector2i>` **screen_get_position** **(** :ref:`int<class_int>` screen=-1 **)** |const|
  905. ----
  906. .. _class_DisplayServer_method_screen_get_refresh_rate:
  907. - :ref:`float<class_float>` **screen_get_refresh_rate** **(** :ref:`int<class_int>` screen=-1 **)** |const|
  908. Returns the current refresh rate of the specified screen. If ``screen`` is :ref:`SCREEN_OF_MAIN_WINDOW<class_DisplayServer_constant_SCREEN_OF_MAIN_WINDOW>` (the default value), a screen with the main window will be used.
  909. \ **Note:** Returns ``-1.0`` if the DisplayServer fails to find the refresh rate for the specified screen. On HTML5, :ref:`screen_get_refresh_rate<class_DisplayServer_method_screen_get_refresh_rate>` will always return ``-1.0`` as there is no way to retrieve the refresh rate on that platform.
  910. To fallback to a default refresh rate if the method fails, try:
  911. ::
  912. var refresh_rate = DisplayServer.screen_get_refresh_rate()
  913. if refresh_rate < 0:
  914. refresh_rate = 60.0
  915. ----
  916. .. _class_DisplayServer_method_screen_get_scale:
  917. - :ref:`float<class_float>` **screen_get_scale** **(** :ref:`int<class_int>` screen=-1 **)** |const|
  918. Returns the scale factor of the specified screen by index.
  919. \ **Note:** On macOS returned value is ``2.0`` for hiDPI (Retina) screen, and ``1.0`` for all other cases.
  920. \ **Note:** This method is implemented on macOS.
  921. ----
  922. .. _class_DisplayServer_method_screen_get_size:
  923. - :ref:`Vector2i<class_Vector2i>` **screen_get_size** **(** :ref:`int<class_int>` screen=-1 **)** |const|
  924. ----
  925. .. _class_DisplayServer_method_screen_get_usable_rect:
  926. - :ref:`Rect2i<class_Rect2i>` **screen_get_usable_rect** **(** :ref:`int<class_int>` screen=-1 **)** |const|
  927. ----
  928. .. _class_DisplayServer_method_screen_is_kept_on:
  929. - :ref:`bool<class_bool>` **screen_is_kept_on** **(** **)** |const|
  930. ----
  931. .. _class_DisplayServer_method_screen_is_touchscreen:
  932. - :ref:`bool<class_bool>` **screen_is_touchscreen** **(** :ref:`int<class_int>` screen=-1 **)** |const|
  933. ----
  934. .. _class_DisplayServer_method_screen_set_keep_on:
  935. - void **screen_set_keep_on** **(** :ref:`bool<class_bool>` enable **)**
  936. ----
  937. .. _class_DisplayServer_method_screen_set_orientation:
  938. - void **screen_set_orientation** **(** :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` orientation, :ref:`int<class_int>` screen=-1 **)**
  939. ----
  940. .. _class_DisplayServer_method_set_icon:
  941. - void **set_icon** **(** :ref:`Image<class_Image>` image **)**
  942. ----
  943. .. _class_DisplayServer_method_set_native_icon:
  944. - void **set_native_icon** **(** :ref:`String<class_String>` filename **)**
  945. ----
  946. .. _class_DisplayServer_method_tablet_get_current_driver:
  947. - :ref:`String<class_String>` **tablet_get_current_driver** **(** **)** |const|
  948. Returns current active tablet driver name.
  949. \ **Note:** This method is implemented on Windows.
  950. ----
  951. .. _class_DisplayServer_method_tablet_get_driver_count:
  952. - :ref:`int<class_int>` **tablet_get_driver_count** **(** **)** |const|
  953. Returns the total number of available tablet drivers.
  954. \ **Note:** This method is implemented on Windows.
  955. ----
  956. .. _class_DisplayServer_method_tablet_get_driver_name:
  957. - :ref:`String<class_String>` **tablet_get_driver_name** **(** :ref:`int<class_int>` idx **)** |const|
  958. Returns the tablet driver name for the given index.
  959. \ **Note:** This method is implemented on Windows.
  960. ----
  961. .. _class_DisplayServer_method_tablet_set_current_driver:
  962. - void **tablet_set_current_driver** **(** :ref:`String<class_String>` name **)**
  963. Set active tablet driver name.
  964. \ **Note:** This method is implemented on Windows.
  965. ----
  966. .. _class_DisplayServer_method_tts_get_voices:
  967. - :ref:`Array<class_Array>` **tts_get_voices** **(** **)** |const|
  968. Returns an :ref:`Array<class_Array>` of voice information dictionaries.
  969. Each :ref:`Dictionary<class_Dictionary>` contains two :ref:`String<class_String>` entries:
  970. - ``name`` is voice name.
  971. - ``id`` is voice identifier.
  972. - ``language`` is language code in ``lang_Variant`` format. ``lang`` part is a 2 or 3-letter code based on the ISO-639 standard, in lowercase. And ``Variant`` part is an engine dependent string describing country, region or/and dialect.
  973. \ **Note:** This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows.
  974. ----
  975. .. _class_DisplayServer_method_tts_get_voices_for_language:
  976. - :ref:`PackedStringArray<class_PackedStringArray>` **tts_get_voices_for_language** **(** :ref:`String<class_String>` language **)** |const|
  977. Returns an :ref:`PackedStringArray<class_PackedStringArray>` of voice identifiers for the ``language``.
  978. \ **Note:** This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows.
  979. ----
  980. .. _class_DisplayServer_method_tts_is_paused:
  981. - :ref:`bool<class_bool>` **tts_is_paused** **(** **)** |const|
  982. Returns ``true`` if the synthesizer is in a paused state.
  983. \ **Note:** This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows.
  984. ----
  985. .. _class_DisplayServer_method_tts_is_speaking:
  986. - :ref:`bool<class_bool>` **tts_is_speaking** **(** **)** |const|
  987. Returns ``true`` if the synthesizer is generating speech, or have utterance waiting in the queue.
  988. \ **Note:** This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows.
  989. ----
  990. .. _class_DisplayServer_method_tts_pause:
  991. - void **tts_pause** **(** **)**
  992. Puts the synthesizer into a paused state.
  993. \ **Note:** This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows.
  994. ----
  995. .. _class_DisplayServer_method_tts_resume:
  996. - void **tts_resume** **(** **)**
  997. Resumes the synthesizer if it was paused.
  998. \ **Note:** This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows.
  999. ----
  1000. .. _class_DisplayServer_method_tts_set_utterance_callback:
  1001. - void **tts_set_utterance_callback** **(** :ref:`TTSUtteranceEvent<enum_DisplayServer_TTSUtteranceEvent>` event, :ref:`Callable<class_Callable>` callable **)**
  1002. Adds a callback, which is called when the utterance has started, finished, canceled or reached a text boundary.
  1003. - ``TTS_UTTERANCE_STARTED``, ``TTS_UTTERANCE_ENDED``, and ``TTS_UTTERANCE_CANCELED`` callable's method should take one :ref:`int<class_int>` parameter, the utterance id.
  1004. - ``TTS_UTTERANCE_BOUNDARY`` callable's method should take two :ref:`int<class_int>` parameters, the index of the character and the utterance id.
  1005. \ **Note:** The granularity of the boundary callbacks is engine dependent.
  1006. \ **Note:** This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows.
  1007. ----
  1008. .. _class_DisplayServer_method_tts_speak:
  1009. - void **tts_speak** **(** :ref:`String<class_String>` text, :ref:`String<class_String>` voice, :ref:`int<class_int>` volume=50, :ref:`float<class_float>` pitch=1.0, :ref:`float<class_float>` rate=1.0, :ref:`int<class_int>` utterance_id=0, :ref:`bool<class_bool>` interrupt=false **)**
  1010. Adds an utterance to the queue. If ``interrupt`` is ``true``, the queue is cleared first.
  1011. - ``voice`` identifier is one of the ``"id"`` values returned by :ref:`tts_get_voices<class_DisplayServer_method_tts_get_voices>` or one of the values returned by :ref:`tts_get_voices_for_language<class_DisplayServer_method_tts_get_voices_for_language>`.
  1012. - ``volume`` ranges from ``0`` (lowest) to ``100`` (highest).
  1013. - ``pitch`` ranges from ``0.0`` (lowest) to ``2.0`` (highest), ``1.0`` is default pitch for the current voice.
  1014. - ``rate`` ranges from ``0.1`` (lowest) to ``10.0`` (highest), ``1.0`` is a normal speaking rate. Other values act as a percentage relative.
  1015. - ``utterance_id`` is passed as a parameter to the callback functions.
  1016. \ **Note:** On Windows and Linux, utterance ``text`` can use SSML markup. SSML support is engine and voice dependent. If the engine does not support SSML, you should strip out all XML markup before calling :ref:`tts_speak<class_DisplayServer_method_tts_speak>`.
  1017. \ **Note:** The granularity of pitch, rate, and volume is engine and voice dependent. Values may be truncated.
  1018. \ **Note:** This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows.
  1019. ----
  1020. .. _class_DisplayServer_method_tts_stop:
  1021. - void **tts_stop** **(** **)**
  1022. Stops synthesis in progress and removes all utterances from the queue.
  1023. \ **Note:** This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows.
  1024. ----
  1025. .. _class_DisplayServer_method_virtual_keyboard_get_height:
  1026. - :ref:`int<class_int>` **virtual_keyboard_get_height** **(** **)** |const|
  1027. Returns the on-screen keyboard's height in pixels. Returns 0 if there is no keyboard or if it is currently hidden.
  1028. ----
  1029. .. _class_DisplayServer_method_virtual_keyboard_hide:
  1030. - void **virtual_keyboard_hide** **(** **)**
  1031. Hides the virtual keyboard if it is shown, does nothing otherwise.
  1032. ----
  1033. .. _class_DisplayServer_method_virtual_keyboard_show:
  1034. - void **virtual_keyboard_show** **(** :ref:`String<class_String>` existing_text, :ref:`Rect2<class_Rect2>` position=Rect2(0, 0, 0, 0), :ref:`bool<class_bool>` multiline=false, :ref:`int<class_int>` max_length=-1, :ref:`int<class_int>` cursor_start=-1, :ref:`int<class_int>` cursor_end=-1 **)**
  1035. Shows the virtual keyboard if the platform has one.
  1036. \ ``existing_text`` parameter is useful for implementing your own :ref:`LineEdit<class_LineEdit>` or :ref:`TextEdit<class_TextEdit>`, as it tells the virtual keyboard what text has already been typed (the virtual keyboard uses it for auto-correct and predictions).
  1037. \ ``position`` parameter is the screen space :ref:`Rect2<class_Rect2>` of the edited text.
  1038. \ ``multiline`` parameter needs to be set to ``true`` to be able to enter multiple lines of text, as in :ref:`TextEdit<class_TextEdit>`.
  1039. \ ``max_length`` limits the number of characters that can be entered if different from ``-1``.
  1040. \ ``cursor_start`` can optionally define the current text cursor position if ``cursor_end`` is not set.
  1041. \ ``cursor_start`` and ``cursor_end`` can optionally define the current text selection.
  1042. \ **Note:** This method is implemented on Android, iOS and UWP.
  1043. ----
  1044. .. _class_DisplayServer_method_warp_mouse:
  1045. - void **warp_mouse** **(** :ref:`Vector2i<class_Vector2i>` position **)**
  1046. Sets the mouse cursor position to the given ``position`` relative to an origin at the upper left corner of the currently focused game Window Manager window.
  1047. ----
  1048. .. _class_DisplayServer_method_window_attach_instance_id:
  1049. - void **window_attach_instance_id** **(** :ref:`int<class_int>` instance_id, :ref:`int<class_int>` window_id=0 **)**
  1050. ----
  1051. .. _class_DisplayServer_method_window_can_draw:
  1052. - :ref:`bool<class_bool>` **window_can_draw** **(** :ref:`int<class_int>` window_id=0 **)** |const|
  1053. ----
  1054. .. _class_DisplayServer_method_window_get_active_popup:
  1055. - :ref:`int<class_int>` **window_get_active_popup** **(** **)** |const|
  1056. Returns ID of the active popup window, or :ref:`INVALID_WINDOW_ID<class_DisplayServer_constant_INVALID_WINDOW_ID>` if there is none.
  1057. ----
  1058. .. _class_DisplayServer_method_window_get_attached_instance_id:
  1059. - :ref:`int<class_int>` **window_get_attached_instance_id** **(** :ref:`int<class_int>` window_id=0 **)** |const|
  1060. ----
  1061. .. _class_DisplayServer_method_window_get_current_screen:
  1062. - :ref:`int<class_int>` **window_get_current_screen** **(** :ref:`int<class_int>` window_id=0 **)** |const|
  1063. ----
  1064. .. _class_DisplayServer_method_window_get_flag:
  1065. - :ref:`bool<class_bool>` **window_get_flag** **(** :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` flag, :ref:`int<class_int>` window_id=0 **)** |const|
  1066. Returns the current value of the given window's ``flag``.
  1067. ----
  1068. .. _class_DisplayServer_method_window_get_max_size:
  1069. - :ref:`Vector2i<class_Vector2i>` **window_get_max_size** **(** :ref:`int<class_int>` window_id=0 **)** |const|
  1070. ----
  1071. .. _class_DisplayServer_method_window_get_min_size:
  1072. - :ref:`Vector2i<class_Vector2i>` **window_get_min_size** **(** :ref:`int<class_int>` window_id=0 **)** |const|
  1073. ----
  1074. .. _class_DisplayServer_method_window_get_mode:
  1075. - :ref:`WindowMode<enum_DisplayServer_WindowMode>` **window_get_mode** **(** :ref:`int<class_int>` window_id=0 **)** |const|
  1076. Returns the mode of the given window.
  1077. ----
  1078. .. _class_DisplayServer_method_window_get_native_handle:
  1079. - :ref:`int<class_int>` **window_get_native_handle** **(** :ref:`HandleType<enum_DisplayServer_HandleType>` handle_type, :ref:`int<class_int>` window_id=0 **)** |const|
  1080. Returns internal structure pointers for use in plugins.
  1081. \ **Note:** This method is implemented on Android, Linux, macOS and Windows.
  1082. ----
  1083. .. _class_DisplayServer_method_window_get_popup_safe_rect:
  1084. - :ref:`Rect2i<class_Rect2i>` **window_get_popup_safe_rect** **(** :ref:`int<class_int>` window **)** |const|
  1085. Returns the bounding box of control, or menu item that was used to open the popup window, in the screen coordinate system.
  1086. ----
  1087. .. _class_DisplayServer_method_window_get_position:
  1088. - :ref:`Vector2i<class_Vector2i>` **window_get_position** **(** :ref:`int<class_int>` window_id=0 **)** |const|
  1089. Returns the position of the given window to on the screen.
  1090. ----
  1091. .. _class_DisplayServer_method_window_get_real_size:
  1092. - :ref:`Vector2i<class_Vector2i>` **window_get_real_size** **(** :ref:`int<class_int>` window_id=0 **)** |const|
  1093. ----
  1094. .. _class_DisplayServer_method_window_get_size:
  1095. - :ref:`Vector2i<class_Vector2i>` **window_get_size** **(** :ref:`int<class_int>` window_id=0 **)** |const|
  1096. ----
  1097. .. _class_DisplayServer_method_window_get_vsync_mode:
  1098. - :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` **window_get_vsync_mode** **(** :ref:`int<class_int>` window_id=0 **)** |const|
  1099. Returns the VSync mode of the given window.
  1100. ----
  1101. .. _class_DisplayServer_method_window_move_to_foreground:
  1102. - void **window_move_to_foreground** **(** :ref:`int<class_int>` window_id=0 **)**
  1103. ----
  1104. .. _class_DisplayServer_method_window_request_attention:
  1105. - void **window_request_attention** **(** :ref:`int<class_int>` window_id=0 **)**
  1106. ----
  1107. .. _class_DisplayServer_method_window_set_current_screen:
  1108. - void **window_set_current_screen** **(** :ref:`int<class_int>` screen, :ref:`int<class_int>` window_id=0 **)**
  1109. ----
  1110. .. _class_DisplayServer_method_window_set_drop_files_callback:
  1111. - void **window_set_drop_files_callback** **(** :ref:`Callable<class_Callable>` callback, :ref:`int<class_int>` window_id=0 **)**
  1112. ----
  1113. .. _class_DisplayServer_method_window_set_exclusive:
  1114. - void **window_set_exclusive** **(** :ref:`int<class_int>` window_id, :ref:`bool<class_bool>` exclusive **)**
  1115. If set to ``true``, this window will always stay on top of its parent window, parent window will ignore input while this window is opened.
  1116. \ **Note:** On macOS, exclusive windows are confined to the same space (virtual desktop or screen) as the parent window.
  1117. \ **Note:** This method is implemented on macOS and Windows.
  1118. ----
  1119. .. _class_DisplayServer_method_window_set_flag:
  1120. - void **window_set_flag** **(** :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` flag, :ref:`bool<class_bool>` enabled, :ref:`int<class_int>` window_id=0 **)**
  1121. Enables or disables the given window's given ``flag``. See :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` for possible values and their behavior.
  1122. ----
  1123. .. _class_DisplayServer_method_window_set_ime_active:
  1124. - void **window_set_ime_active** **(** :ref:`bool<class_bool>` active, :ref:`int<class_int>` window_id=0 **)**
  1125. ----
  1126. .. _class_DisplayServer_method_window_set_ime_position:
  1127. - void **window_set_ime_position** **(** :ref:`Vector2i<class_Vector2i>` position, :ref:`int<class_int>` window_id=0 **)**
  1128. ----
  1129. .. _class_DisplayServer_method_window_set_input_event_callback:
  1130. - void **window_set_input_event_callback** **(** :ref:`Callable<class_Callable>` callback, :ref:`int<class_int>` window_id=0 **)**
  1131. ----
  1132. .. _class_DisplayServer_method_window_set_input_text_callback:
  1133. - void **window_set_input_text_callback** **(** :ref:`Callable<class_Callable>` callback, :ref:`int<class_int>` window_id=0 **)**
  1134. ----
  1135. .. _class_DisplayServer_method_window_set_max_size:
  1136. - void **window_set_max_size** **(** :ref:`Vector2i<class_Vector2i>` max_size, :ref:`int<class_int>` window_id=0 **)**
  1137. ----
  1138. .. _class_DisplayServer_method_window_set_min_size:
  1139. - void **window_set_min_size** **(** :ref:`Vector2i<class_Vector2i>` min_size, :ref:`int<class_int>` window_id=0 **)**
  1140. Sets the minimum size for the given window to ``min_size`` (in pixels).
  1141. \ **Note:** By default, the main window has a minimum size of ``Vector2i(64, 64)``. This prevents issues that can arise when the window is resized to a near-zero size.
  1142. ----
  1143. .. _class_DisplayServer_method_window_set_mode:
  1144. - void **window_set_mode** **(** :ref:`WindowMode<enum_DisplayServer_WindowMode>` mode, :ref:`int<class_int>` window_id=0 **)**
  1145. Sets window mode for the given window to ``mode``. See :ref:`WindowMode<enum_DisplayServer_WindowMode>` for possible values and how each mode behaves.
  1146. \ **Note:** Setting the window to fullscreen forcibly sets the borderless flag to ``true``, so make sure to set it back to ``false`` when not wanted.
  1147. ----
  1148. .. _class_DisplayServer_method_window_set_mouse_passthrough:
  1149. - void **window_set_mouse_passthrough** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` region, :ref:`int<class_int>` window_id=0 **)**
  1150. Sets a polygonal region of the window which accepts mouse events. Mouse events outside the region will be passed through.
  1151. Passing an empty array will disable passthrough support (all mouse events will be intercepted by the window, which is the default behavior).
  1152. .. tabs::
  1153. .. code-tab:: gdscript
  1154. # Set region, using Path2D node.
  1155. DisplayServer.window_set_mouse_passthrough($Path2D.curve.get_baked_points())
  1156. # Set region, using Polygon2D node.
  1157. DisplayServer.window_set_mouse_passthrough($Polygon2D.polygon)
  1158. # Reset region to default.
  1159. DisplayServer.window_set_mouse_passthrough([])
  1160. .. code-tab:: csharp
  1161. // Set region, using Path2D node.
  1162. DisplayServer.WindowSetMousePassthrough(GetNode<Path2D>("Path2D").Curve.GetBakedPoints());
  1163. // Set region, using Polygon2D node.
  1164. DisplayServer.WindowSetMousePassthrough(GetNode<Polygon2D>("Polygon2D").Polygon);
  1165. // Reset region to default.
  1166. DisplayServer.WindowSetMousePassthrough(new Vector2[] {});
  1167. \ **Note:** On Windows, the portion of a window that lies outside the region is not drawn, while on Linux and macOS it is.
  1168. \ **Note:** This method is implemented on Linux, macOS and Windows.
  1169. ----
  1170. .. _class_DisplayServer_method_window_set_popup_safe_rect:
  1171. - void **window_set_popup_safe_rect** **(** :ref:`int<class_int>` window, :ref:`Rect2i<class_Rect2i>` rect **)**
  1172. Sets the bounding box of control, or menu item that was used to open the popup window, in the screen coordinate system. Clicking this area will not auto-close this popup.
  1173. ----
  1174. .. _class_DisplayServer_method_window_set_position:
  1175. - void **window_set_position** **(** :ref:`Vector2i<class_Vector2i>` position, :ref:`int<class_int>` window_id=0 **)**
  1176. Sets the position of the given window to ``position``.
  1177. ----
  1178. .. _class_DisplayServer_method_window_set_rect_changed_callback:
  1179. - void **window_set_rect_changed_callback** **(** :ref:`Callable<class_Callable>` callback, :ref:`int<class_int>` window_id=0 **)**
  1180. ----
  1181. .. _class_DisplayServer_method_window_set_size:
  1182. - void **window_set_size** **(** :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` window_id=0 **)**
  1183. Sets the size of the given window to ``size``.
  1184. ----
  1185. .. _class_DisplayServer_method_window_set_title:
  1186. - void **window_set_title** **(** :ref:`String<class_String>` title, :ref:`int<class_int>` window_id=0 **)**
  1187. Sets the title of the given window to ``title``.
  1188. ----
  1189. .. _class_DisplayServer_method_window_set_transient:
  1190. - void **window_set_transient** **(** :ref:`int<class_int>` window_id, :ref:`int<class_int>` parent_window_id **)**
  1191. ----
  1192. .. _class_DisplayServer_method_window_set_vsync_mode:
  1193. - void **window_set_vsync_mode** **(** :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` vsync_mode, :ref:`int<class_int>` window_id=0 **)**
  1194. Sets the VSync mode of the given window.
  1195. See :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` for possible values and how they affect the behavior of your application.
  1196. Depending on the platform and used renderer, the engine will fall back to :ref:`VSYNC_ENABLED<class_DisplayServer_constant_VSYNC_ENABLED>`, if the desired mode is not supported.
  1197. ----
  1198. .. _class_DisplayServer_method_window_set_window_event_callback:
  1199. - void **window_set_window_event_callback** **(** :ref:`Callable<class_Callable>` callback, :ref:`int<class_int>` window_id=0 **)**
  1200. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  1201. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  1202. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  1203. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  1204. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  1205. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`