class_displayserver.rst 318 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982
  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/4.2/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/4.2/doc/classes/DisplayServer.xml.
  6. .. _class_DisplayServer:
  7. DisplayServer
  8. =============
  9. **Inherits:** :ref:`Object<class_Object>`
  10. A server interface for low-level window management.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. **DisplayServer** handles everything related to window management. It is separated from :ref:`OS<class_OS>` as a single operating system may support multiple display servers.
  15. \ **Headless mode:** Starting the engine with the ``--headless`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>` disables all rendering and window management functions. Most functions from **DisplayServer** will return dummy values in this case.
  16. .. rst-class:: classref-reftable-group
  17. Methods
  18. -------
  19. .. table::
  20. :widths: auto
  21. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  22. | :ref:`String<class_String>` | :ref:`clipboard_get<class_DisplayServer_method_clipboard_get>` **(** **)** |const| |
  23. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  24. | :ref:`Image<class_Image>` | :ref:`clipboard_get_image<class_DisplayServer_method_clipboard_get_image>` **(** **)** |const| |
  25. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  26. | :ref:`String<class_String>` | :ref:`clipboard_get_primary<class_DisplayServer_method_clipboard_get_primary>` **(** **)** |const| |
  27. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  28. | :ref:`bool<class_bool>` | :ref:`clipboard_has<class_DisplayServer_method_clipboard_has>` **(** **)** |const| |
  29. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | :ref:`bool<class_bool>` | :ref:`clipboard_has_image<class_DisplayServer_method_clipboard_has_image>` **(** **)** |const| |
  31. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. | void | :ref:`clipboard_set<class_DisplayServer_method_clipboard_set>` **(** :ref:`String<class_String>` clipboard **)** |
  33. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | void | :ref:`clipboard_set_primary<class_DisplayServer_method_clipboard_set_primary>` **(** :ref:`String<class_String>` clipboard_primary **)** |
  35. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | :ref:`CursorShape<enum_DisplayServer_CursorShape>` | :ref:`cursor_get_shape<class_DisplayServer_method_cursor_get_shape>` **(** **)** |const| |
  37. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | 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) **)** |
  39. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | void | :ref:`cursor_set_shape<class_DisplayServer_method_cursor_set_shape>` **(** :ref:`CursorShape<enum_DisplayServer_CursorShape>` shape **)** |
  41. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | :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 **)** |
  43. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | :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 **)** |
  45. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | void | :ref:`enable_for_stealing_focus<class_DisplayServer_method_enable_for_stealing_focus>` **(** :ref:`int<class_int>` process_id **)** |
  47. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`file_dialog_show<class_DisplayServer_method_file_dialog_show>` **(** :ref:`String<class_String>` title, :ref:`String<class_String>` current_directory, :ref:`String<class_String>` filename, :ref:`bool<class_bool>` show_hidden, :ref:`FileDialogMode<enum_DisplayServer_FileDialogMode>` mode, :ref:`PackedStringArray<class_PackedStringArray>` filters, :ref:`Callable<class_Callable>` callback **)** |
  49. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | void | :ref:`force_process_and_drop_events<class_DisplayServer_method_force_process_and_drop_events>` **(** **)** |
  51. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | :ref:`Color<class_Color>` | :ref:`get_accent_color<class_DisplayServer_method_get_accent_color>` **(** **)** |const| |
  53. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | :ref:`Rect2[]<class_Rect2>` | :ref:`get_display_cutouts<class_DisplayServer_method_get_display_cutouts>` **(** **)** |const| |
  55. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | :ref:`Rect2i<class_Rect2i>` | :ref:`get_display_safe_area<class_DisplayServer_method_get_display_safe_area>` **(** **)** |const| |
  57. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | :ref:`int<class_int>` | :ref:`get_keyboard_focus_screen<class_DisplayServer_method_get_keyboard_focus_screen>` **(** **)** |const| |
  59. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | :ref:`String<class_String>` | :ref:`get_name<class_DisplayServer_method_get_name>` **(** **)** |const| |
  61. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | :ref:`int<class_int>` | :ref:`get_primary_screen<class_DisplayServer_method_get_primary_screen>` **(** **)** |const| |
  63. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | :ref:`int<class_int>` | :ref:`get_screen_count<class_DisplayServer_method_get_screen_count>` **(** **)** |const| |
  65. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | :ref:`int<class_int>` | :ref:`get_screen_from_rect<class_DisplayServer_method_get_screen_from_rect>` **(** :ref:`Rect2<class_Rect2>` rect **)** |const| |
  67. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | :ref:`bool<class_bool>` | :ref:`get_swap_cancel_ok<class_DisplayServer_method_get_swap_cancel_ok>` **(** **)** |
  69. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | :ref:`int<class_int>` | :ref:`get_window_at_screen_position<class_DisplayServer_method_get_window_at_screen_position>` **(** :ref:`Vector2i<class_Vector2i>` position **)** |const| |
  71. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_window_list<class_DisplayServer_method_get_window_list>` **(** **)** |const| |
  73. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | :ref:`int<class_int>` | :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=Callable(), :ref:`Callable<class_Callable>` key_callback=Callable(), :ref:`Variant<class_Variant>` tag=null, :ref:`Key<enum_@GlobalScope_Key>` accelerator=0, :ref:`int<class_int>` index=-1 **)** |
  75. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | :ref:`int<class_int>` | :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=Callable(), :ref:`Callable<class_Callable>` key_callback=Callable(), :ref:`Variant<class_Variant>` tag=null, :ref:`Key<enum_@GlobalScope_Key>` accelerator=0, :ref:`int<class_int>` index=-1 **)** |
  77. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | :ref:`int<class_int>` | :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=Callable(), :ref:`Callable<class_Callable>` key_callback=Callable(), :ref:`Variant<class_Variant>` tag=null, :ref:`Key<enum_@GlobalScope_Key>` accelerator=0, :ref:`int<class_int>` index=-1 **)** |
  79. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | :ref:`int<class_int>` | :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=Callable(), :ref:`Callable<class_Callable>` key_callback=Callable(), :ref:`Variant<class_Variant>` tag=null, :ref:`Key<enum_@GlobalScope_Key>` accelerator=0, :ref:`int<class_int>` index=-1 **)** |
  81. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | :ref:`int<class_int>` | :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=Callable(), :ref:`Callable<class_Callable>` key_callback=Callable(), :ref:`Variant<class_Variant>` tag=null, :ref:`Key<enum_@GlobalScope_Key>` accelerator=0, :ref:`int<class_int>` index=-1 **)** |
  83. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | :ref:`int<class_int>` | :ref:`global_menu_add_multistate_item<class_DisplayServer_method_global_menu_add_multistate_item>` **(** :ref:`String<class_String>` menu_root, :ref:`String<class_String>` label, :ref:`int<class_int>` max_states, :ref:`int<class_int>` default_state, :ref:`Callable<class_Callable>` callback=Callable(), :ref:`Callable<class_Callable>` key_callback=Callable(), :ref:`Variant<class_Variant>` tag=null, :ref:`Key<enum_@GlobalScope_Key>` accelerator=0, :ref:`int<class_int>` index=-1 **)** |
  85. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  86. | :ref:`int<class_int>` | :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=Callable(), :ref:`Callable<class_Callable>` key_callback=Callable(), :ref:`Variant<class_Variant>` tag=null, :ref:`Key<enum_@GlobalScope_Key>` accelerator=0, :ref:`int<class_int>` index=-1 **)** |
  87. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  88. | :ref:`int<class_int>` | :ref:`global_menu_add_separator<class_DisplayServer_method_global_menu_add_separator>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` index=-1 **)** |
  89. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  90. | :ref:`int<class_int>` | :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 **)** |
  91. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  92. | void | :ref:`global_menu_clear<class_DisplayServer_method_global_menu_clear>` **(** :ref:`String<class_String>` menu_root **)** |
  93. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  94. | :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| |
  95. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  96. | :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| |
  97. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  98. | :ref:`int<class_int>` | :ref:`global_menu_get_item_count<class_DisplayServer_method_global_menu_get_item_count>` **(** :ref:`String<class_String>` menu_root **)** |const| |
  99. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  100. | :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| |
  101. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  102. | :ref:`int<class_int>` | :ref:`global_menu_get_item_indentation_level<class_DisplayServer_method_global_menu_get_item_indentation_level>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const| |
  103. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  104. | :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| |
  105. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  106. | :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| |
  107. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  108. | :ref:`Callable<class_Callable>` | :ref:`global_menu_get_item_key_callback<class_DisplayServer_method_global_menu_get_item_key_callback>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const| |
  109. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  110. | :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| |
  111. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  112. | :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| |
  113. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  114. | :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| |
  115. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  116. | :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| |
  117. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  118. | :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| |
  119. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  120. | :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| |
  121. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  122. | :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| |
  123. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  124. | :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| |
  125. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  126. | :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| |
  127. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  128. | :ref:`bool<class_bool>` | :ref:`global_menu_is_item_hidden<class_DisplayServer_method_global_menu_is_item_hidden>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const| |
  129. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  130. | :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| |
  131. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  132. | void | :ref:`global_menu_remove_item<class_DisplayServer_method_global_menu_remove_item>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |
  133. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  134. | 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 **)** |
  135. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  136. | 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 **)** |
  137. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  138. | 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 **)** |
  139. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  140. | 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 **)** |
  141. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  142. | 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 **)** |
  143. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  144. | void | :ref:`global_menu_set_item_hidden<class_DisplayServer_method_global_menu_set_item_hidden>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`bool<class_bool>` hidden **)** |
  145. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  146. | void | :ref:`global_menu_set_item_hover_callbacks<class_DisplayServer_method_global_menu_set_item_hover_callbacks>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`Callable<class_Callable>` callback **)** |
  147. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  148. | 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 **)** |
  149. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  150. | void | :ref:`global_menu_set_item_indentation_level<class_DisplayServer_method_global_menu_set_item_indentation_level>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`int<class_int>` level **)** |
  151. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  152. | void | :ref:`global_menu_set_item_key_callback<class_DisplayServer_method_global_menu_set_item_key_callback>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`Callable<class_Callable>` key_callback **)** |
  153. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  154. | 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 **)** |
  155. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  156. | 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 **)** |
  157. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  158. | 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 **)** |
  159. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  160. | 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 **)** |
  161. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  162. | 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 **)** |
  163. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  164. | 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 **)** |
  165. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  166. | 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 **)** |
  167. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  168. | void | :ref:`global_menu_set_popup_callbacks<class_DisplayServer_method_global_menu_set_popup_callbacks>` **(** :ref:`String<class_String>` menu_root, :ref:`Callable<class_Callable>` open_callback, :ref:`Callable<class_Callable>` close_callback **)** |
  169. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  170. | :ref:`bool<class_bool>` | :ref:`has_feature<class_DisplayServer_method_has_feature>` **(** :ref:`Feature<enum_DisplayServer_Feature>` feature **)** |const| |
  171. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  172. | :ref:`Vector2i<class_Vector2i>` | :ref:`ime_get_selection<class_DisplayServer_method_ime_get_selection>` **(** **)** |const| |
  173. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  174. | :ref:`String<class_String>` | :ref:`ime_get_text<class_DisplayServer_method_ime_get_text>` **(** **)** |const| |
  175. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  176. | :ref:`bool<class_bool>` | :ref:`is_dark_mode<class_DisplayServer_method_is_dark_mode>` **(** **)** |const| |
  177. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  178. | :ref:`bool<class_bool>` | :ref:`is_dark_mode_supported<class_DisplayServer_method_is_dark_mode_supported>` **(** **)** |const| |
  179. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  180. | :ref:`bool<class_bool>` | :ref:`is_touchscreen_available<class_DisplayServer_method_is_touchscreen_available>` **(** **)** |const| |
  181. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  182. | :ref:`int<class_int>` | :ref:`keyboard_get_current_layout<class_DisplayServer_method_keyboard_get_current_layout>` **(** **)** |const| |
  183. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  184. | :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| |
  185. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  186. | :ref:`Key<enum_@GlobalScope_Key>` | :ref:`keyboard_get_label_from_physical<class_DisplayServer_method_keyboard_get_label_from_physical>` **(** :ref:`Key<enum_@GlobalScope_Key>` keycode **)** |const| |
  187. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  188. | :ref:`int<class_int>` | :ref:`keyboard_get_layout_count<class_DisplayServer_method_keyboard_get_layout_count>` **(** **)** |const| |
  189. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  190. | :ref:`String<class_String>` | :ref:`keyboard_get_layout_language<class_DisplayServer_method_keyboard_get_layout_language>` **(** :ref:`int<class_int>` index **)** |const| |
  191. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  192. | :ref:`String<class_String>` | :ref:`keyboard_get_layout_name<class_DisplayServer_method_keyboard_get_layout_name>` **(** :ref:`int<class_int>` index **)** |const| |
  193. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  194. | void | :ref:`keyboard_set_current_layout<class_DisplayServer_method_keyboard_set_current_layout>` **(** :ref:`int<class_int>` index **)** |
  195. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  196. | |bitfield|\<:ref:`MouseButtonMask<enum_@GlobalScope_MouseButtonMask>`\> | :ref:`mouse_get_button_state<class_DisplayServer_method_mouse_get_button_state>` **(** **)** |const| |
  197. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  198. | :ref:`MouseMode<enum_DisplayServer_MouseMode>` | :ref:`mouse_get_mode<class_DisplayServer_method_mouse_get_mode>` **(** **)** |const| |
  199. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  200. | :ref:`Vector2i<class_Vector2i>` | :ref:`mouse_get_position<class_DisplayServer_method_mouse_get_position>` **(** **)** |const| |
  201. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  202. | void | :ref:`mouse_set_mode<class_DisplayServer_method_mouse_set_mode>` **(** :ref:`MouseMode<enum_DisplayServer_MouseMode>` mouse_mode **)** |
  203. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  204. | void | :ref:`process_events<class_DisplayServer_method_process_events>` **(** **)** |
  205. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  206. | :ref:`int<class_int>` | :ref:`screen_get_dpi<class_DisplayServer_method_screen_get_dpi>` **(** :ref:`int<class_int>` screen=-1 **)** |const| |
  207. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  208. | :ref:`Image<class_Image>` | :ref:`screen_get_image<class_DisplayServer_method_screen_get_image>` **(** :ref:`int<class_int>` screen=-1 **)** |const| |
  209. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  210. | :ref:`float<class_float>` | :ref:`screen_get_max_scale<class_DisplayServer_method_screen_get_max_scale>` **(** **)** |const| |
  211. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  212. | :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` | :ref:`screen_get_orientation<class_DisplayServer_method_screen_get_orientation>` **(** :ref:`int<class_int>` screen=-1 **)** |const| |
  213. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  214. | :ref:`Color<class_Color>` | :ref:`screen_get_pixel<class_DisplayServer_method_screen_get_pixel>` **(** :ref:`Vector2i<class_Vector2i>` position **)** |const| |
  215. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  216. | :ref:`Vector2i<class_Vector2i>` | :ref:`screen_get_position<class_DisplayServer_method_screen_get_position>` **(** :ref:`int<class_int>` screen=-1 **)** |const| |
  217. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  218. | :ref:`float<class_float>` | :ref:`screen_get_refresh_rate<class_DisplayServer_method_screen_get_refresh_rate>` **(** :ref:`int<class_int>` screen=-1 **)** |const| |
  219. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  220. | :ref:`float<class_float>` | :ref:`screen_get_scale<class_DisplayServer_method_screen_get_scale>` **(** :ref:`int<class_int>` screen=-1 **)** |const| |
  221. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  222. | :ref:`Vector2i<class_Vector2i>` | :ref:`screen_get_size<class_DisplayServer_method_screen_get_size>` **(** :ref:`int<class_int>` screen=-1 **)** |const| |
  223. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  224. | :ref:`Rect2i<class_Rect2i>` | :ref:`screen_get_usable_rect<class_DisplayServer_method_screen_get_usable_rect>` **(** :ref:`int<class_int>` screen=-1 **)** |const| |
  225. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  226. | :ref:`bool<class_bool>` | :ref:`screen_is_kept_on<class_DisplayServer_method_screen_is_kept_on>` **(** **)** |const| |
  227. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  228. | void | :ref:`screen_set_keep_on<class_DisplayServer_method_screen_set_keep_on>` **(** :ref:`bool<class_bool>` enable **)** |
  229. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  230. | void | :ref:`screen_set_orientation<class_DisplayServer_method_screen_set_orientation>` **(** :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` orientation, :ref:`int<class_int>` screen=-1 **)** |
  231. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  232. | void | :ref:`set_icon<class_DisplayServer_method_set_icon>` **(** :ref:`Image<class_Image>` image **)** |
  233. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  234. | void | :ref:`set_native_icon<class_DisplayServer_method_set_native_icon>` **(** :ref:`String<class_String>` filename **)** |
  235. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  236. | :ref:`String<class_String>` | :ref:`tablet_get_current_driver<class_DisplayServer_method_tablet_get_current_driver>` **(** **)** |const| |
  237. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  238. | :ref:`int<class_int>` | :ref:`tablet_get_driver_count<class_DisplayServer_method_tablet_get_driver_count>` **(** **)** |const| |
  239. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  240. | :ref:`String<class_String>` | :ref:`tablet_get_driver_name<class_DisplayServer_method_tablet_get_driver_name>` **(** :ref:`int<class_int>` idx **)** |const| |
  241. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  242. | void | :ref:`tablet_set_current_driver<class_DisplayServer_method_tablet_set_current_driver>` **(** :ref:`String<class_String>` name **)** |
  243. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  244. | :ref:`Dictionary[]<class_Dictionary>` | :ref:`tts_get_voices<class_DisplayServer_method_tts_get_voices>` **(** **)** |const| |
  245. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  246. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`tts_get_voices_for_language<class_DisplayServer_method_tts_get_voices_for_language>` **(** :ref:`String<class_String>` language **)** |const| |
  247. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  248. | :ref:`bool<class_bool>` | :ref:`tts_is_paused<class_DisplayServer_method_tts_is_paused>` **(** **)** |const| |
  249. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  250. | :ref:`bool<class_bool>` | :ref:`tts_is_speaking<class_DisplayServer_method_tts_is_speaking>` **(** **)** |const| |
  251. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  252. | void | :ref:`tts_pause<class_DisplayServer_method_tts_pause>` **(** **)** |
  253. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  254. | void | :ref:`tts_resume<class_DisplayServer_method_tts_resume>` **(** **)** |
  255. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  256. | void | :ref:`tts_set_utterance_callback<class_DisplayServer_method_tts_set_utterance_callback>` **(** :ref:`TTSUtteranceEvent<enum_DisplayServer_TTSUtteranceEvent>` event, :ref:`Callable<class_Callable>` callable **)** |
  257. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  258. | 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 **)** |
  259. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  260. | void | :ref:`tts_stop<class_DisplayServer_method_tts_stop>` **(** **)** |
  261. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  262. | :ref:`int<class_int>` | :ref:`virtual_keyboard_get_height<class_DisplayServer_method_virtual_keyboard_get_height>` **(** **)** |const| |
  263. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  264. | void | :ref:`virtual_keyboard_hide<class_DisplayServer_method_virtual_keyboard_hide>` **(** **)** |
  265. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  266. | 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:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` type=0, :ref:`int<class_int>` max_length=-1, :ref:`int<class_int>` cursor_start=-1, :ref:`int<class_int>` cursor_end=-1 **)** |
  267. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  268. | void | :ref:`warp_mouse<class_DisplayServer_method_warp_mouse>` **(** :ref:`Vector2i<class_Vector2i>` position **)** |
  269. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  270. | :ref:`bool<class_bool>` | :ref:`window_can_draw<class_DisplayServer_method_window_can_draw>` **(** :ref:`int<class_int>` window_id=0 **)** |const| |
  271. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  272. | :ref:`int<class_int>` | :ref:`window_get_active_popup<class_DisplayServer_method_window_get_active_popup>` **(** **)** |const| |
  273. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  274. | :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| |
  275. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  276. | :ref:`int<class_int>` | :ref:`window_get_current_screen<class_DisplayServer_method_window_get_current_screen>` **(** :ref:`int<class_int>` window_id=0 **)** |const| |
  277. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  278. | :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| |
  279. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  280. | :ref:`Vector2i<class_Vector2i>` | :ref:`window_get_max_size<class_DisplayServer_method_window_get_max_size>` **(** :ref:`int<class_int>` window_id=0 **)** |const| |
  281. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  282. | :ref:`Vector2i<class_Vector2i>` | :ref:`window_get_min_size<class_DisplayServer_method_window_get_min_size>` **(** :ref:`int<class_int>` window_id=0 **)** |const| |
  283. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  284. | :ref:`WindowMode<enum_DisplayServer_WindowMode>` | :ref:`window_get_mode<class_DisplayServer_method_window_get_mode>` **(** :ref:`int<class_int>` window_id=0 **)** |const| |
  285. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  286. | :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| |
  287. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  288. | :ref:`Rect2i<class_Rect2i>` | :ref:`window_get_popup_safe_rect<class_DisplayServer_method_window_get_popup_safe_rect>` **(** :ref:`int<class_int>` window **)** |const| |
  289. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  290. | :ref:`Vector2i<class_Vector2i>` | :ref:`window_get_position<class_DisplayServer_method_window_get_position>` **(** :ref:`int<class_int>` window_id=0 **)** |const| |
  291. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  292. | :ref:`Vector2i<class_Vector2i>` | :ref:`window_get_position_with_decorations<class_DisplayServer_method_window_get_position_with_decorations>` **(** :ref:`int<class_int>` window_id=0 **)** |const| |
  293. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  294. | :ref:`Vector3i<class_Vector3i>` | :ref:`window_get_safe_title_margins<class_DisplayServer_method_window_get_safe_title_margins>` **(** :ref:`int<class_int>` window_id=0 **)** |const| |
  295. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  296. | :ref:`Vector2i<class_Vector2i>` | :ref:`window_get_size<class_DisplayServer_method_window_get_size>` **(** :ref:`int<class_int>` window_id=0 **)** |const| |
  297. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  298. | :ref:`Vector2i<class_Vector2i>` | :ref:`window_get_size_with_decorations<class_DisplayServer_method_window_get_size_with_decorations>` **(** :ref:`int<class_int>` window_id=0 **)** |const| |
  299. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  300. | :ref:`Vector2i<class_Vector2i>` | :ref:`window_get_title_size<class_DisplayServer_method_window_get_title_size>` **(** :ref:`String<class_String>` title, :ref:`int<class_int>` window_id=0 **)** |const| |
  301. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  302. | :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| |
  303. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  304. | :ref:`bool<class_bool>` | :ref:`window_is_focused<class_DisplayServer_method_window_is_focused>` **(** :ref:`int<class_int>` window_id=0 **)** |const| |
  305. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  306. | :ref:`bool<class_bool>` | :ref:`window_is_maximize_allowed<class_DisplayServer_method_window_is_maximize_allowed>` **(** :ref:`int<class_int>` window_id=0 **)** |const| |
  307. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  308. | :ref:`bool<class_bool>` | :ref:`window_maximize_on_title_dbl_click<class_DisplayServer_method_window_maximize_on_title_dbl_click>` **(** **)** |const| |
  309. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  310. | :ref:`bool<class_bool>` | :ref:`window_minimize_on_title_dbl_click<class_DisplayServer_method_window_minimize_on_title_dbl_click>` **(** **)** |const| |
  311. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  312. | void | :ref:`window_move_to_foreground<class_DisplayServer_method_window_move_to_foreground>` **(** :ref:`int<class_int>` window_id=0 **)** |
  313. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  314. | void | :ref:`window_request_attention<class_DisplayServer_method_window_request_attention>` **(** :ref:`int<class_int>` window_id=0 **)** |
  315. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  316. | 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 **)** |
  317. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  318. | 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 **)** |
  319. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  320. | void | :ref:`window_set_exclusive<class_DisplayServer_method_window_set_exclusive>` **(** :ref:`int<class_int>` window_id, :ref:`bool<class_bool>` exclusive **)** |
  321. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  322. | 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 **)** |
  323. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  324. | 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 **)** |
  325. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  326. | 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 **)** |
  327. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  328. | 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 **)** |
  329. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  330. | 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 **)** |
  331. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  332. | 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 **)** |
  333. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  334. | 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 **)** |
  335. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  336. | void | :ref:`window_set_mode<class_DisplayServer_method_window_set_mode>` **(** :ref:`WindowMode<enum_DisplayServer_WindowMode>` mode, :ref:`int<class_int>` window_id=0 **)** |
  337. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  338. | 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 **)** |
  339. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  340. | 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 **)** |
  341. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  342. | void | :ref:`window_set_position<class_DisplayServer_method_window_set_position>` **(** :ref:`Vector2i<class_Vector2i>` position, :ref:`int<class_int>` window_id=0 **)** |
  343. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  344. | 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 **)** |
  345. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  346. | void | :ref:`window_set_size<class_DisplayServer_method_window_set_size>` **(** :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` window_id=0 **)** |
  347. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  348. | void | :ref:`window_set_title<class_DisplayServer_method_window_set_title>` **(** :ref:`String<class_String>` title, :ref:`int<class_int>` window_id=0 **)** |
  349. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  350. | void | :ref:`window_set_transient<class_DisplayServer_method_window_set_transient>` **(** :ref:`int<class_int>` window_id, :ref:`int<class_int>` parent_window_id **)** |
  351. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  352. | 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 **)** |
  353. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  354. | void | :ref:`window_set_window_buttons_offset<class_DisplayServer_method_window_set_window_buttons_offset>` **(** :ref:`Vector2i<class_Vector2i>` offset, :ref:`int<class_int>` window_id=0 **)** |
  355. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  356. | 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 **)** |
  357. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  358. .. rst-class:: classref-section-separator
  359. ----
  360. .. rst-class:: classref-descriptions-group
  361. Enumerations
  362. ------------
  363. .. _enum_DisplayServer_Feature:
  364. .. rst-class:: classref-enumeration
  365. enum **Feature**:
  366. .. _class_DisplayServer_constant_FEATURE_GLOBAL_MENU:
  367. .. rst-class:: classref-enumeration-constant
  368. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_GLOBAL_MENU** = ``0``
  369. Display server supports global menu. This allows the application to display its menu items in the operating system's top bar. **macOS**
  370. .. _class_DisplayServer_constant_FEATURE_SUBWINDOWS:
  371. .. rst-class:: classref-enumeration-constant
  372. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_SUBWINDOWS** = ``1``
  373. Display server supports multiple windows that can be moved outside of the main window. **Windows, macOS, Linux (X11)**
  374. .. _class_DisplayServer_constant_FEATURE_TOUCHSCREEN:
  375. .. rst-class:: classref-enumeration-constant
  376. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_TOUCHSCREEN** = ``2``
  377. Display server supports touchscreen input. **Windows, Linux (X11), Android, iOS, Web**
  378. .. _class_DisplayServer_constant_FEATURE_MOUSE:
  379. .. rst-class:: classref-enumeration-constant
  380. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_MOUSE** = ``3``
  381. Display server supports mouse input. **Windows, macOS, Linux (X11), Android, Web**
  382. .. _class_DisplayServer_constant_FEATURE_MOUSE_WARP:
  383. .. rst-class:: classref-enumeration-constant
  384. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_MOUSE_WARP** = ``4``
  385. Display server supports warping mouse coordinates to keep the mouse cursor constrained within an area, but looping when one of the edges is reached. **Windows, macOS, Linux (X11)**
  386. .. _class_DisplayServer_constant_FEATURE_CLIPBOARD:
  387. .. rst-class:: classref-enumeration-constant
  388. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_CLIPBOARD** = ``5``
  389. Display server supports setting and getting clipboard data. See also :ref:`FEATURE_CLIPBOARD_PRIMARY<class_DisplayServer_constant_FEATURE_CLIPBOARD_PRIMARY>`. **Windows, macOS, Linux (X11), Android, iOS, Web**
  390. .. _class_DisplayServer_constant_FEATURE_VIRTUAL_KEYBOARD:
  391. .. rst-class:: classref-enumeration-constant
  392. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_VIRTUAL_KEYBOARD** = ``6``
  393. Display server supports popping up a virtual keyboard when requested to input text without a physical keyboard. **Android, iOS, Web**
  394. .. _class_DisplayServer_constant_FEATURE_CURSOR_SHAPE:
  395. .. rst-class:: classref-enumeration-constant
  396. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_CURSOR_SHAPE** = ``7``
  397. Display server supports setting the mouse cursor shape to be different from the default. **Windows, macOS, Linux (X11), Android, Web**
  398. .. _class_DisplayServer_constant_FEATURE_CUSTOM_CURSOR_SHAPE:
  399. .. rst-class:: classref-enumeration-constant
  400. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_CUSTOM_CURSOR_SHAPE** = ``8``
  401. Display server supports setting the mouse cursor shape to a custom image. **Windows, macOS, Linux (X11), Web**
  402. .. _class_DisplayServer_constant_FEATURE_NATIVE_DIALOG:
  403. .. rst-class:: classref-enumeration-constant
  404. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_NATIVE_DIALOG** = ``9``
  405. Display server supports spawning dialogs using the operating system's native look-and-feel. **Windows, macOS, Linux (X11)**
  406. .. _class_DisplayServer_constant_FEATURE_IME:
  407. .. rst-class:: classref-enumeration-constant
  408. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_IME** = ``10``
  409. Display server supports `Input Method Editor <https://en.wikipedia.org/wiki/Input_method>`__, which is commonly used for inputting Chinese/Japanese/Korean text. This is handled by the operating system, rather than by Godot. **Windows, macOS, Linux (X11)**
  410. .. _class_DisplayServer_constant_FEATURE_WINDOW_TRANSPARENCY:
  411. .. rst-class:: classref-enumeration-constant
  412. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_WINDOW_TRANSPARENCY** = ``11``
  413. Display server supports windows can use per-pixel transparency to make windows behind them partially or fully visible. **Windows, macOS, Linux (X11)**
  414. .. _class_DisplayServer_constant_FEATURE_HIDPI:
  415. .. rst-class:: classref-enumeration-constant
  416. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_HIDPI** = ``12``
  417. Display server supports querying the operating system's display scale factor. This allows for *reliable* automatic hiDPI display detection, as opposed to guessing based on the screen resolution and reported display DPI (which can be unreliable due to broken monitor EDID). **Windows, macOS**
  418. .. _class_DisplayServer_constant_FEATURE_ICON:
  419. .. rst-class:: classref-enumeration-constant
  420. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_ICON** = ``13``
  421. Display server supports changing the window icon (usually displayed in the top-left corner). **Windows, macOS, Linux (X11)**
  422. .. _class_DisplayServer_constant_FEATURE_NATIVE_ICON:
  423. .. rst-class:: classref-enumeration-constant
  424. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_NATIVE_ICON** = ``14``
  425. Display server supports changing the window icon (usually displayed in the top-left corner). **Windows, macOS**
  426. .. _class_DisplayServer_constant_FEATURE_ORIENTATION:
  427. .. rst-class:: classref-enumeration-constant
  428. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_ORIENTATION** = ``15``
  429. Display server supports changing the screen orientation. **Android, iOS**
  430. .. _class_DisplayServer_constant_FEATURE_SWAP_BUFFERS:
  431. .. rst-class:: classref-enumeration-constant
  432. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_SWAP_BUFFERS** = ``16``
  433. Display server supports V-Sync status can be changed from the default (which is forced to be enabled platforms not supporting this feature). **Windows, macOS, Linux (X11)**
  434. .. _class_DisplayServer_constant_FEATURE_CLIPBOARD_PRIMARY:
  435. .. rst-class:: classref-enumeration-constant
  436. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_CLIPBOARD_PRIMARY** = ``18``
  437. Display server supports Primary clipboard can be used. This is a different clipboard from :ref:`FEATURE_CLIPBOARD<class_DisplayServer_constant_FEATURE_CLIPBOARD>`. **Linux (X11)**
  438. .. _class_DisplayServer_constant_FEATURE_TEXT_TO_SPEECH:
  439. .. rst-class:: classref-enumeration-constant
  440. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_TEXT_TO_SPEECH** = ``19``
  441. Display server supports text-to-speech. See ``tts_*`` methods. **Windows, macOS, Linux (X11), Android, iOS, Web**
  442. .. _class_DisplayServer_constant_FEATURE_EXTEND_TO_TITLE:
  443. .. rst-class:: classref-enumeration-constant
  444. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_EXTEND_TO_TITLE** = ``20``
  445. Display server supports expanding window content to the title. See :ref:`WINDOW_FLAG_EXTEND_TO_TITLE<class_DisplayServer_constant_WINDOW_FLAG_EXTEND_TO_TITLE>`. **macOS**
  446. .. _class_DisplayServer_constant_FEATURE_SCREEN_CAPTURE:
  447. .. rst-class:: classref-enumeration-constant
  448. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_SCREEN_CAPTURE** = ``21``
  449. Display server supports reading screen pixels. See :ref:`screen_get_pixel<class_DisplayServer_method_screen_get_pixel>`.
  450. .. rst-class:: classref-item-separator
  451. ----
  452. .. _enum_DisplayServer_MouseMode:
  453. .. rst-class:: classref-enumeration
  454. enum **MouseMode**:
  455. .. _class_DisplayServer_constant_MOUSE_MODE_VISIBLE:
  456. .. rst-class:: classref-enumeration-constant
  457. :ref:`MouseMode<enum_DisplayServer_MouseMode>` **MOUSE_MODE_VISIBLE** = ``0``
  458. Makes the mouse cursor visible if it is hidden.
  459. .. _class_DisplayServer_constant_MOUSE_MODE_HIDDEN:
  460. .. rst-class:: classref-enumeration-constant
  461. :ref:`MouseMode<enum_DisplayServer_MouseMode>` **MOUSE_MODE_HIDDEN** = ``1``
  462. Makes the mouse cursor hidden if it is visible.
  463. .. _class_DisplayServer_constant_MOUSE_MODE_CAPTURED:
  464. .. rst-class:: classref-enumeration-constant
  465. :ref:`MouseMode<enum_DisplayServer_MouseMode>` **MOUSE_MODE_CAPTURED** = ``2``
  466. Captures the mouse. The mouse will be hidden and its position locked at the center of the window manager's window.
  467. \ **Note:** If you want to process the mouse's movement in this mode, you need to use :ref:`InputEventMouseMotion.relative<class_InputEventMouseMotion_property_relative>`.
  468. .. _class_DisplayServer_constant_MOUSE_MODE_CONFINED:
  469. .. rst-class:: classref-enumeration-constant
  470. :ref:`MouseMode<enum_DisplayServer_MouseMode>` **MOUSE_MODE_CONFINED** = ``3``
  471. Confines the mouse cursor to the game window, and make it visible.
  472. .. _class_DisplayServer_constant_MOUSE_MODE_CONFINED_HIDDEN:
  473. .. rst-class:: classref-enumeration-constant
  474. :ref:`MouseMode<enum_DisplayServer_MouseMode>` **MOUSE_MODE_CONFINED_HIDDEN** = ``4``
  475. Confines the mouse cursor to the game window, and make it hidden.
  476. .. rst-class:: classref-item-separator
  477. ----
  478. .. _enum_DisplayServer_ScreenOrientation:
  479. .. rst-class:: classref-enumeration
  480. enum **ScreenOrientation**:
  481. .. _class_DisplayServer_constant_SCREEN_LANDSCAPE:
  482. .. rst-class:: classref-enumeration-constant
  483. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_LANDSCAPE** = ``0``
  484. Default landscape orientation.
  485. .. _class_DisplayServer_constant_SCREEN_PORTRAIT:
  486. .. rst-class:: classref-enumeration-constant
  487. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_PORTRAIT** = ``1``
  488. Default portrait orientation.
  489. .. _class_DisplayServer_constant_SCREEN_REVERSE_LANDSCAPE:
  490. .. rst-class:: classref-enumeration-constant
  491. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_REVERSE_LANDSCAPE** = ``2``
  492. Reverse landscape orientation (upside down).
  493. .. _class_DisplayServer_constant_SCREEN_REVERSE_PORTRAIT:
  494. .. rst-class:: classref-enumeration-constant
  495. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_REVERSE_PORTRAIT** = ``3``
  496. Reverse portrait orientation (upside down).
  497. .. _class_DisplayServer_constant_SCREEN_SENSOR_LANDSCAPE:
  498. .. rst-class:: classref-enumeration-constant
  499. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_SENSOR_LANDSCAPE** = ``4``
  500. Automatic landscape orientation (default or reverse depending on sensor).
  501. .. _class_DisplayServer_constant_SCREEN_SENSOR_PORTRAIT:
  502. .. rst-class:: classref-enumeration-constant
  503. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_SENSOR_PORTRAIT** = ``5``
  504. Automatic portrait orientation (default or reverse depending on sensor).
  505. .. _class_DisplayServer_constant_SCREEN_SENSOR:
  506. .. rst-class:: classref-enumeration-constant
  507. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_SENSOR** = ``6``
  508. Automatic landscape or portrait orientation (default or reverse depending on sensor).
  509. .. rst-class:: classref-item-separator
  510. ----
  511. .. _enum_DisplayServer_VirtualKeyboardType:
  512. .. rst-class:: classref-enumeration
  513. enum **VirtualKeyboardType**:
  514. .. _class_DisplayServer_constant_KEYBOARD_TYPE_DEFAULT:
  515. .. rst-class:: classref-enumeration-constant
  516. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_DEFAULT** = ``0``
  517. Default text virtual keyboard.
  518. .. _class_DisplayServer_constant_KEYBOARD_TYPE_MULTILINE:
  519. .. rst-class:: classref-enumeration-constant
  520. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_MULTILINE** = ``1``
  521. Multiline virtual keyboard.
  522. .. _class_DisplayServer_constant_KEYBOARD_TYPE_NUMBER:
  523. .. rst-class:: classref-enumeration-constant
  524. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_NUMBER** = ``2``
  525. Virtual number keypad, useful for PIN entry.
  526. .. _class_DisplayServer_constant_KEYBOARD_TYPE_NUMBER_DECIMAL:
  527. .. rst-class:: classref-enumeration-constant
  528. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_NUMBER_DECIMAL** = ``3``
  529. Virtual number keypad, useful for entering fractional numbers.
  530. .. _class_DisplayServer_constant_KEYBOARD_TYPE_PHONE:
  531. .. rst-class:: classref-enumeration-constant
  532. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_PHONE** = ``4``
  533. Virtual phone number keypad.
  534. .. _class_DisplayServer_constant_KEYBOARD_TYPE_EMAIL_ADDRESS:
  535. .. rst-class:: classref-enumeration-constant
  536. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_EMAIL_ADDRESS** = ``5``
  537. Virtual keyboard with additional keys to assist with typing email addresses.
  538. .. _class_DisplayServer_constant_KEYBOARD_TYPE_PASSWORD:
  539. .. rst-class:: classref-enumeration-constant
  540. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_PASSWORD** = ``6``
  541. Virtual keyboard for entering a password. On most platforms, this should disable autocomplete and autocapitalization.
  542. \ **Note:** This is not supported on Web. Instead, this behaves identically to :ref:`KEYBOARD_TYPE_DEFAULT<class_DisplayServer_constant_KEYBOARD_TYPE_DEFAULT>`.
  543. .. _class_DisplayServer_constant_KEYBOARD_TYPE_URL:
  544. .. rst-class:: classref-enumeration-constant
  545. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_URL** = ``7``
  546. Virtual keyboard with additional keys to assist with typing URLs.
  547. .. rst-class:: classref-item-separator
  548. ----
  549. .. _enum_DisplayServer_CursorShape:
  550. .. rst-class:: classref-enumeration
  551. enum **CursorShape**:
  552. .. _class_DisplayServer_constant_CURSOR_ARROW:
  553. .. rst-class:: classref-enumeration-constant
  554. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_ARROW** = ``0``
  555. Arrow cursor shape. This is the default when not pointing anything that overrides the mouse cursor, such as a :ref:`LineEdit<class_LineEdit>` or :ref:`TextEdit<class_TextEdit>`.
  556. .. _class_DisplayServer_constant_CURSOR_IBEAM:
  557. .. rst-class:: classref-enumeration-constant
  558. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_IBEAM** = ``1``
  559. I-beam cursor shape. This is used by default when hovering a control that accepts text input, such as :ref:`LineEdit<class_LineEdit>` or :ref:`TextEdit<class_TextEdit>`.
  560. .. _class_DisplayServer_constant_CURSOR_POINTING_HAND:
  561. .. rst-class:: classref-enumeration-constant
  562. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_POINTING_HAND** = ``2``
  563. Pointing hand cursor shape. This is used by default when hovering a :ref:`LinkButton<class_LinkButton>` or a URL tag in a :ref:`RichTextLabel<class_RichTextLabel>`.
  564. .. _class_DisplayServer_constant_CURSOR_CROSS:
  565. .. rst-class:: classref-enumeration-constant
  566. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_CROSS** = ``3``
  567. Crosshair cursor. This is intended to be displayed when the user needs precise aim over an element, such as a rectangle selection tool or a color picker.
  568. .. _class_DisplayServer_constant_CURSOR_WAIT:
  569. .. rst-class:: classref-enumeration-constant
  570. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_WAIT** = ``4``
  571. Wait cursor. On most cursor themes, this displays a spinning icon *besides* the arrow. Intended to be used for non-blocking operations (when the user can do something else at the moment). See also :ref:`CURSOR_BUSY<class_DisplayServer_constant_CURSOR_BUSY>`.
  572. .. _class_DisplayServer_constant_CURSOR_BUSY:
  573. .. rst-class:: classref-enumeration-constant
  574. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_BUSY** = ``5``
  575. Wait cursor. On most cursor themes, this *replaces* the arrow with a spinning icon. Intended to be used for blocking operations (when the user can't do anything else at the moment). See also :ref:`CURSOR_WAIT<class_DisplayServer_constant_CURSOR_WAIT>`.
  576. .. _class_DisplayServer_constant_CURSOR_DRAG:
  577. .. rst-class:: classref-enumeration-constant
  578. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_DRAG** = ``6``
  579. Dragging hand cursor. This is displayed during drag-and-drop operations. See also :ref:`CURSOR_CAN_DROP<class_DisplayServer_constant_CURSOR_CAN_DROP>`.
  580. .. _class_DisplayServer_constant_CURSOR_CAN_DROP:
  581. .. rst-class:: classref-enumeration-constant
  582. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_CAN_DROP** = ``7``
  583. "Can drop" cursor. This is displayed during drag-and-drop operations if hovering over a :ref:`Control<class_Control>` that can accept the drag-and-drop event. On most cursor themes, this displays a dragging hand with an arrow symbol besides it. See also :ref:`CURSOR_DRAG<class_DisplayServer_constant_CURSOR_DRAG>`.
  584. .. _class_DisplayServer_constant_CURSOR_FORBIDDEN:
  585. .. rst-class:: classref-enumeration-constant
  586. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_FORBIDDEN** = ``8``
  587. Forbidden cursor. This is displayed during drag-and-drop operations if the hovered :ref:`Control<class_Control>` can't accept the drag-and-drop event.
  588. .. _class_DisplayServer_constant_CURSOR_VSIZE:
  589. .. rst-class:: classref-enumeration-constant
  590. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_VSIZE** = ``9``
  591. Vertical resize cursor. Intended to be displayed when the hovered :ref:`Control<class_Control>` can be vertically resized using the mouse. See also :ref:`CURSOR_VSPLIT<class_DisplayServer_constant_CURSOR_VSPLIT>`.
  592. .. _class_DisplayServer_constant_CURSOR_HSIZE:
  593. .. rst-class:: classref-enumeration-constant
  594. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_HSIZE** = ``10``
  595. Horizontal resize cursor. Intended to be displayed when the hovered :ref:`Control<class_Control>` can be horizontally resized using the mouse. See also :ref:`CURSOR_HSPLIT<class_DisplayServer_constant_CURSOR_HSPLIT>`.
  596. .. _class_DisplayServer_constant_CURSOR_BDIAGSIZE:
  597. .. rst-class:: classref-enumeration-constant
  598. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_BDIAGSIZE** = ``11``
  599. Secondary diagonal resize cursor (top-right/bottom-left). Intended to be displayed when the hovered :ref:`Control<class_Control>` can be resized on both axes at once using the mouse.
  600. .. _class_DisplayServer_constant_CURSOR_FDIAGSIZE:
  601. .. rst-class:: classref-enumeration-constant
  602. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_FDIAGSIZE** = ``12``
  603. Main diagonal resize cursor (top-left/bottom-right). Intended to be displayed when the hovered :ref:`Control<class_Control>` can be resized on both axes at once using the mouse.
  604. .. _class_DisplayServer_constant_CURSOR_MOVE:
  605. .. rst-class:: classref-enumeration-constant
  606. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_MOVE** = ``13``
  607. Move cursor. Intended to be displayed when the hovered :ref:`Control<class_Control>` can be moved using the mouse.
  608. .. _class_DisplayServer_constant_CURSOR_VSPLIT:
  609. .. rst-class:: classref-enumeration-constant
  610. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_VSPLIT** = ``14``
  611. Vertical split cursor. This is displayed when hovering a :ref:`Control<class_Control>` with splits that can be vertically resized using the mouse, such as :ref:`VSplitContainer<class_VSplitContainer>`. On some cursor themes, this cursor may have the same appearance as :ref:`CURSOR_VSIZE<class_DisplayServer_constant_CURSOR_VSIZE>`.
  612. .. _class_DisplayServer_constant_CURSOR_HSPLIT:
  613. .. rst-class:: classref-enumeration-constant
  614. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_HSPLIT** = ``15``
  615. Horizontal split cursor. This is displayed when hovering a :ref:`Control<class_Control>` with splits that can be horizontally resized using the mouse, such as :ref:`HSplitContainer<class_HSplitContainer>`. On some cursor themes, this cursor may have the same appearance as :ref:`CURSOR_HSIZE<class_DisplayServer_constant_CURSOR_HSIZE>`.
  616. .. _class_DisplayServer_constant_CURSOR_HELP:
  617. .. rst-class:: classref-enumeration-constant
  618. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_HELP** = ``16``
  619. Help cursor. On most cursor themes, this displays a question mark icon instead of the mouse cursor. Intended to be used when the user has requested help on the next element that will be clicked.
  620. .. _class_DisplayServer_constant_CURSOR_MAX:
  621. .. rst-class:: classref-enumeration-constant
  622. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_MAX** = ``17``
  623. Represents the size of the :ref:`CursorShape<enum_DisplayServer_CursorShape>` enum.
  624. .. rst-class:: classref-item-separator
  625. ----
  626. .. _enum_DisplayServer_FileDialogMode:
  627. .. rst-class:: classref-enumeration
  628. enum **FileDialogMode**:
  629. .. _class_DisplayServer_constant_FILE_DIALOG_MODE_OPEN_FILE:
  630. .. rst-class:: classref-enumeration-constant
  631. :ref:`FileDialogMode<enum_DisplayServer_FileDialogMode>` **FILE_DIALOG_MODE_OPEN_FILE** = ``0``
  632. The native file dialog allows selecting one, and only one file.
  633. .. _class_DisplayServer_constant_FILE_DIALOG_MODE_OPEN_FILES:
  634. .. rst-class:: classref-enumeration-constant
  635. :ref:`FileDialogMode<enum_DisplayServer_FileDialogMode>` **FILE_DIALOG_MODE_OPEN_FILES** = ``1``
  636. The native file dialog allows selecting multiple files.
  637. .. _class_DisplayServer_constant_FILE_DIALOG_MODE_OPEN_DIR:
  638. .. rst-class:: classref-enumeration-constant
  639. :ref:`FileDialogMode<enum_DisplayServer_FileDialogMode>` **FILE_DIALOG_MODE_OPEN_DIR** = ``2``
  640. The native file dialog only allows selecting a directory, disallowing the selection of any file.
  641. .. _class_DisplayServer_constant_FILE_DIALOG_MODE_OPEN_ANY:
  642. .. rst-class:: classref-enumeration-constant
  643. :ref:`FileDialogMode<enum_DisplayServer_FileDialogMode>` **FILE_DIALOG_MODE_OPEN_ANY** = ``3``
  644. The native file dialog allows selecting one file or directory.
  645. .. _class_DisplayServer_constant_FILE_DIALOG_MODE_SAVE_FILE:
  646. .. rst-class:: classref-enumeration-constant
  647. :ref:`FileDialogMode<enum_DisplayServer_FileDialogMode>` **FILE_DIALOG_MODE_SAVE_FILE** = ``4``
  648. The native file dialog will warn when a file exists.
  649. .. rst-class:: classref-item-separator
  650. ----
  651. .. _enum_DisplayServer_WindowMode:
  652. .. rst-class:: classref-enumeration
  653. enum **WindowMode**:
  654. .. _class_DisplayServer_constant_WINDOW_MODE_WINDOWED:
  655. .. rst-class:: classref-enumeration-constant
  656. :ref:`WindowMode<enum_DisplayServer_WindowMode>` **WINDOW_MODE_WINDOWED** = ``0``
  657. Windowed mode, i.e. :ref:`Window<class_Window>` doesn't occupy the whole screen (unless set to the size of the screen).
  658. .. _class_DisplayServer_constant_WINDOW_MODE_MINIMIZED:
  659. .. rst-class:: classref-enumeration-constant
  660. :ref:`WindowMode<enum_DisplayServer_WindowMode>` **WINDOW_MODE_MINIMIZED** = ``1``
  661. Minimized window mode, i.e. :ref:`Window<class_Window>` is not visible and available on window manager's window list. Normally happens when the minimize button is pressed.
  662. .. _class_DisplayServer_constant_WINDOW_MODE_MAXIMIZED:
  663. .. rst-class:: classref-enumeration-constant
  664. :ref:`WindowMode<enum_DisplayServer_WindowMode>` **WINDOW_MODE_MAXIMIZED** = ``2``
  665. Maximized window mode, i.e. :ref:`Window<class_Window>` will occupy whole screen area except task bar and still display its borders. Normally happens when the maximize button is pressed.
  666. .. _class_DisplayServer_constant_WINDOW_MODE_FULLSCREEN:
  667. .. rst-class:: classref-enumeration-constant
  668. :ref:`WindowMode<enum_DisplayServer_WindowMode>` **WINDOW_MODE_FULLSCREEN** = ``3``
  669. Full screen mode with full multi-window support.
  670. Full screen window covers the entire display area of a screen and has no decorations. The display's video mode is not changed.
  671. \ **On Windows:** Multi-window full-screen mode has a 1px border of the :ref:`ProjectSettings.rendering/environment/defaults/default_clear_color<class_ProjectSettings_property_rendering/environment/defaults/default_clear_color>` color.
  672. \ **On macOS:** A new desktop is used to display the running project.
  673. \ **Note:** Regardless of the platform, enabling full screen 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 full screen mode.
  674. .. _class_DisplayServer_constant_WINDOW_MODE_EXCLUSIVE_FULLSCREEN:
  675. .. rst-class:: classref-enumeration-constant
  676. :ref:`WindowMode<enum_DisplayServer_WindowMode>` **WINDOW_MODE_EXCLUSIVE_FULLSCREEN** = ``4``
  677. A single window full screen mode. This mode has less overhead, but only one window can be open on a given screen at a time (opening a child window or application switching will trigger a full screen transition).
  678. Full screen window covers the entire display area of a screen and has no border or decorations. The display's video mode is not changed.
  679. \ **On Windows:** Depending on video driver, full screen transition might cause screens to go black for a moment.
  680. \ **On macOS:** A new desktop is used to display the running project. Exclusive full screen mode prevents Dock and Menu from showing up when the mouse pointer is hovering the edge of the screen.
  681. \ **On Linux (X11):** Exclusive full screen mode bypasses compositor.
  682. \ **Note:** Regardless of the platform, enabling full screen 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 full screen mode.
  683. .. rst-class:: classref-item-separator
  684. ----
  685. .. _enum_DisplayServer_WindowFlags:
  686. .. rst-class:: classref-enumeration
  687. enum **WindowFlags**:
  688. .. _class_DisplayServer_constant_WINDOW_FLAG_RESIZE_DISABLED:
  689. .. rst-class:: classref-enumeration-constant
  690. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_RESIZE_DISABLED** = ``0``
  691. The window can't be resized 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.
  692. .. _class_DisplayServer_constant_WINDOW_FLAG_BORDERLESS:
  693. .. rst-class:: classref-enumeration-constant
  694. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_BORDERLESS** = ``1``
  695. The window do not have native title bar and other decorations. This flag is ignored for full-screen windows.
  696. .. _class_DisplayServer_constant_WINDOW_FLAG_ALWAYS_ON_TOP:
  697. .. rst-class:: classref-enumeration-constant
  698. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_ALWAYS_ON_TOP** = ``2``
  699. The window is floating on top of all other windows. This flag is ignored for full-screen windows.
  700. .. _class_DisplayServer_constant_WINDOW_FLAG_TRANSPARENT:
  701. .. rst-class:: classref-enumeration-constant
  702. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_TRANSPARENT** = ``3``
  703. The window background can be transparent.
  704. \ **Note:** This flag has no effect if :ref:`ProjectSettings.display/window/per_pixel_transparency/allowed<class_ProjectSettings_property_display/window/per_pixel_transparency/allowed>` is set to ``false``.
  705. \ **Note:** Transparency support is implemented on Linux (X11), macOS and Windows, but availability might vary depending on GPU driver, display manager, and compositor capabilities.
  706. .. _class_DisplayServer_constant_WINDOW_FLAG_NO_FOCUS:
  707. .. rst-class:: classref-enumeration-constant
  708. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_NO_FOCUS** = ``4``
  709. The window can't be focused. No-focus window will ignore all input, except mouse clicks.
  710. .. _class_DisplayServer_constant_WINDOW_FLAG_POPUP:
  711. .. rst-class:: classref-enumeration-constant
  712. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_POPUP** = ``5``
  713. Window is part of menu or :ref:`OptionButton<class_OptionButton>` dropdown. This flag can't be changed when the 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 transient parent set (see :ref:`window_set_transient<class_DisplayServer_method_window_set_transient>`).
  714. .. _class_DisplayServer_constant_WINDOW_FLAG_EXTEND_TO_TITLE:
  715. .. rst-class:: classref-enumeration-constant
  716. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_EXTEND_TO_TITLE** = ``6``
  717. Window content is expanded to the full size of the window. Unlike borderless window, the frame is left intact and can be used to resize the window, title bar is transparent, but have minimize/maximize/close buttons.
  718. Use :ref:`window_set_window_buttons_offset<class_DisplayServer_method_window_set_window_buttons_offset>` to adjust minimize/maximize/close buttons offset.
  719. Use :ref:`window_get_safe_title_margins<class_DisplayServer_method_window_get_safe_title_margins>` to determine area under the title bar that is not covered by decorations.
  720. \ **Note:** This flag is implemented only on macOS.
  721. .. _class_DisplayServer_constant_WINDOW_FLAG_MOUSE_PASSTHROUGH:
  722. .. rst-class:: classref-enumeration-constant
  723. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_MOUSE_PASSTHROUGH** = ``7``
  724. All mouse events are passed to the underlying window of the same application.
  725. .. _class_DisplayServer_constant_WINDOW_FLAG_MAX:
  726. .. rst-class:: classref-enumeration-constant
  727. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_MAX** = ``8``
  728. Max value of the :ref:`WindowFlags<enum_DisplayServer_WindowFlags>`.
  729. .. rst-class:: classref-item-separator
  730. ----
  731. .. _enum_DisplayServer_WindowEvent:
  732. .. rst-class:: classref-enumeration
  733. enum **WindowEvent**:
  734. .. _class_DisplayServer_constant_WINDOW_EVENT_MOUSE_ENTER:
  735. .. rst-class:: classref-enumeration-constant
  736. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_MOUSE_ENTER** = ``0``
  737. Sent when the mouse pointer enters the window.
  738. .. _class_DisplayServer_constant_WINDOW_EVENT_MOUSE_EXIT:
  739. .. rst-class:: classref-enumeration-constant
  740. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_MOUSE_EXIT** = ``1``
  741. Sent when the mouse pointer exits the window.
  742. .. _class_DisplayServer_constant_WINDOW_EVENT_FOCUS_IN:
  743. .. rst-class:: classref-enumeration-constant
  744. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_FOCUS_IN** = ``2``
  745. Sent when the window grabs focus.
  746. .. _class_DisplayServer_constant_WINDOW_EVENT_FOCUS_OUT:
  747. .. rst-class:: classref-enumeration-constant
  748. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_FOCUS_OUT** = ``3``
  749. Sent when the window loses focus.
  750. .. _class_DisplayServer_constant_WINDOW_EVENT_CLOSE_REQUEST:
  751. .. rst-class:: classref-enumeration-constant
  752. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_CLOSE_REQUEST** = ``4``
  753. Sent when the user has attempted to close the window (e.g. close button is pressed).
  754. .. _class_DisplayServer_constant_WINDOW_EVENT_GO_BACK_REQUEST:
  755. .. rst-class:: classref-enumeration-constant
  756. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_GO_BACK_REQUEST** = ``5``
  757. Sent when the device "Back" button is pressed.
  758. \ **Note:** This event is implemented only on Android.
  759. .. _class_DisplayServer_constant_WINDOW_EVENT_DPI_CHANGE:
  760. .. rst-class:: classref-enumeration-constant
  761. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_DPI_CHANGE** = ``6``
  762. Sent when the window is moved to the display with different DPI, or display DPI is changed.
  763. \ **Note:** This flag is implemented only on macOS.
  764. .. _class_DisplayServer_constant_WINDOW_EVENT_TITLEBAR_CHANGE:
  765. .. rst-class:: classref-enumeration-constant
  766. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_TITLEBAR_CHANGE** = ``7``
  767. Sent when the window title bar decoration is changed (e.g. :ref:`WINDOW_FLAG_EXTEND_TO_TITLE<class_DisplayServer_constant_WINDOW_FLAG_EXTEND_TO_TITLE>` is set or window entered/exited full screen mode).
  768. \ **Note:** This flag is implemented only on macOS.
  769. .. rst-class:: classref-item-separator
  770. ----
  771. .. _enum_DisplayServer_VSyncMode:
  772. .. rst-class:: classref-enumeration
  773. enum **VSyncMode**:
  774. .. _class_DisplayServer_constant_VSYNC_DISABLED:
  775. .. rst-class:: classref-enumeration-constant
  776. :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` **VSYNC_DISABLED** = ``0``
  777. No vertical synchronization, which means the engine will display frames as fast as possible (tearing may be visible). Framerate is unlimited (regardless of :ref:`Engine.max_fps<class_Engine_property_max_fps>`).
  778. .. _class_DisplayServer_constant_VSYNC_ENABLED:
  779. .. rst-class:: classref-enumeration-constant
  780. :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` **VSYNC_ENABLED** = ``1``
  781. Default vertical synchronization mode, the image is displayed only on vertical blanking intervals (no tearing is visible). Framerate is limited by the monitor refresh rate (regardless of :ref:`Engine.max_fps<class_Engine_property_max_fps>`).
  782. .. _class_DisplayServer_constant_VSYNC_ADAPTIVE:
  783. .. rst-class:: classref-enumeration-constant
  784. :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` **VSYNC_ADAPTIVE** = ``2``
  785. 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. Framerate is limited by the monitor refresh rate (regardless of :ref:`Engine.max_fps<class_Engine_property_max_fps>`). Behaves like :ref:`VSYNC_ENABLED<class_DisplayServer_constant_VSYNC_ENABLED>` when using the Compatibility rendering method.
  786. .. _class_DisplayServer_constant_VSYNC_MAILBOX:
  787. .. rst-class:: classref-enumeration-constant
  788. :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` **VSYNC_MAILBOX** = ``3``
  789. Displays the most recent image in the queue on vertical blanking intervals, while rendering to the other images (no tearing is visible). Framerate is unlimited (regardless of :ref:`Engine.max_fps<class_Engine_property_max_fps>`).
  790. Although not guaranteed, the images can be rendered as fast as possible, which may reduce input lag (also called "Fast" V-Sync mode). :ref:`VSYNC_MAILBOX<class_DisplayServer_constant_VSYNC_MAILBOX>` works best when at least twice as many frames as the display refresh rate are rendered. Behaves like :ref:`VSYNC_ENABLED<class_DisplayServer_constant_VSYNC_ENABLED>` when using the Compatibility rendering method.
  791. .. rst-class:: classref-item-separator
  792. ----
  793. .. _enum_DisplayServer_HandleType:
  794. .. rst-class:: classref-enumeration
  795. enum **HandleType**:
  796. .. _class_DisplayServer_constant_DISPLAY_HANDLE:
  797. .. rst-class:: classref-enumeration-constant
  798. :ref:`HandleType<enum_DisplayServer_HandleType>` **DISPLAY_HANDLE** = ``0``
  799. Display handle:
  800. - Linux (X11): ``X11::Display*`` for the display.
  801. - Android: ``EGLDisplay`` for the display.
  802. .. _class_DisplayServer_constant_WINDOW_HANDLE:
  803. .. rst-class:: classref-enumeration-constant
  804. :ref:`HandleType<enum_DisplayServer_HandleType>` **WINDOW_HANDLE** = ``1``
  805. Window handle:
  806. - Windows: ``HWND`` for the window.
  807. - Linux (X11): ``X11::Window*`` for the window.
  808. - macOS: ``NSWindow*`` for the window.
  809. - iOS: ``UIViewController*`` for the view controller.
  810. - Android: ``jObject`` for the activity.
  811. .. _class_DisplayServer_constant_WINDOW_VIEW:
  812. .. rst-class:: classref-enumeration-constant
  813. :ref:`HandleType<enum_DisplayServer_HandleType>` **WINDOW_VIEW** = ``2``
  814. Window view:
  815. - Windows: ``HDC`` for the window (only with the GL Compatibility renderer).
  816. - macOS: ``NSView*`` for the window main view.
  817. - iOS: ``UIView*`` for the window main view.
  818. .. _class_DisplayServer_constant_OPENGL_CONTEXT:
  819. .. rst-class:: classref-enumeration-constant
  820. :ref:`HandleType<enum_DisplayServer_HandleType>` **OPENGL_CONTEXT** = ``3``
  821. OpenGL context (only with the GL Compatibility renderer):
  822. - Windows: ``HGLRC`` for the window (native GL), or ``EGLContext`` for the window (ANGLE).
  823. - Linux: ``GLXContext*`` for the window.
  824. - macOS: ``NSOpenGLContext*`` for the window (native GL), or ``EGLContext`` for the window (ANGLE).
  825. - Android: ``EGLContext`` for the window.
  826. .. rst-class:: classref-item-separator
  827. ----
  828. .. _enum_DisplayServer_TTSUtteranceEvent:
  829. .. rst-class:: classref-enumeration
  830. enum **TTSUtteranceEvent**:
  831. .. _class_DisplayServer_constant_TTS_UTTERANCE_STARTED:
  832. .. rst-class:: classref-enumeration-constant
  833. :ref:`TTSUtteranceEvent<enum_DisplayServer_TTSUtteranceEvent>` **TTS_UTTERANCE_STARTED** = ``0``
  834. Utterance has begun to be spoken.
  835. .. _class_DisplayServer_constant_TTS_UTTERANCE_ENDED:
  836. .. rst-class:: classref-enumeration-constant
  837. :ref:`TTSUtteranceEvent<enum_DisplayServer_TTSUtteranceEvent>` **TTS_UTTERANCE_ENDED** = ``1``
  838. Utterance was successfully finished.
  839. .. _class_DisplayServer_constant_TTS_UTTERANCE_CANCELED:
  840. .. rst-class:: classref-enumeration-constant
  841. :ref:`TTSUtteranceEvent<enum_DisplayServer_TTSUtteranceEvent>` **TTS_UTTERANCE_CANCELED** = ``2``
  842. Utterance was canceled, or TTS service was unable to process it.
  843. .. _class_DisplayServer_constant_TTS_UTTERANCE_BOUNDARY:
  844. .. rst-class:: classref-enumeration-constant
  845. :ref:`TTSUtteranceEvent<enum_DisplayServer_TTSUtteranceEvent>` **TTS_UTTERANCE_BOUNDARY** = ``3``
  846. Utterance reached a word or sentence boundary.
  847. .. rst-class:: classref-section-separator
  848. ----
  849. .. rst-class:: classref-descriptions-group
  850. Constants
  851. ---------
  852. .. _class_DisplayServer_constant_SCREEN_WITH_MOUSE_FOCUS:
  853. .. rst-class:: classref-constant
  854. **SCREEN_WITH_MOUSE_FOCUS** = ``-4``
  855. Represents the screen containing the mouse pointer.
  856. .. _class_DisplayServer_constant_SCREEN_WITH_KEYBOARD_FOCUS:
  857. .. rst-class:: classref-constant
  858. **SCREEN_WITH_KEYBOARD_FOCUS** = ``-3``
  859. Represents the screen containing the window with the keyboard focus.
  860. .. _class_DisplayServer_constant_SCREEN_PRIMARY:
  861. .. rst-class:: classref-constant
  862. **SCREEN_PRIMARY** = ``-2``
  863. Represents the primary screen.
  864. .. _class_DisplayServer_constant_SCREEN_OF_MAIN_WINDOW:
  865. .. rst-class:: classref-constant
  866. **SCREEN_OF_MAIN_WINDOW** = ``-1``
  867. Represents the screen where the main window is located. This is usually the default value in functions that allow specifying one of several screens.
  868. .. _class_DisplayServer_constant_MAIN_WINDOW_ID:
  869. .. rst-class:: classref-constant
  870. **MAIN_WINDOW_ID** = ``0``
  871. The ID of the main window spawned by the engine, which can be passed to methods expecting a ``window_id``.
  872. .. _class_DisplayServer_constant_INVALID_WINDOW_ID:
  873. .. rst-class:: classref-constant
  874. **INVALID_WINDOW_ID** = ``-1``
  875. The ID that refers to a nonexistent window. This is returned by some **DisplayServer** methods if no window matches the requested result.
  876. .. rst-class:: classref-section-separator
  877. ----
  878. .. rst-class:: classref-descriptions-group
  879. Method Descriptions
  880. -------------------
  881. .. _class_DisplayServer_method_clipboard_get:
  882. .. rst-class:: classref-method
  883. :ref:`String<class_String>` **clipboard_get** **(** **)** |const|
  884. Returns the user's clipboard as a string if possible.
  885. .. rst-class:: classref-item-separator
  886. ----
  887. .. _class_DisplayServer_method_clipboard_get_image:
  888. .. rst-class:: classref-method
  889. :ref:`Image<class_Image>` **clipboard_get_image** **(** **)** |const|
  890. Returns the user's clipboard as an image if possible.
  891. .. rst-class:: classref-item-separator
  892. ----
  893. .. _class_DisplayServer_method_clipboard_get_primary:
  894. .. rst-class:: classref-method
  895. :ref:`String<class_String>` **clipboard_get_primary** **(** **)** |const|
  896. Returns the user's `primary <https://unix.stackexchange.com/questions/139191/whats-the-difference-between-primary-selection-and-clipboard-buffer>`__ clipboard as a string if possible. This is the clipboard that is set when the user selects text in any application, rather than when pressing :kbd:`Ctrl + C`. The clipboard data can then be pasted by clicking the middle mouse button in any application that supports the primary clipboard mechanism.
  897. \ **Note:** This method is only implemented on Linux (X11).
  898. .. rst-class:: classref-item-separator
  899. ----
  900. .. _class_DisplayServer_method_clipboard_has:
  901. .. rst-class:: classref-method
  902. :ref:`bool<class_bool>` **clipboard_has** **(** **)** |const|
  903. Returns ``true`` if there is a text content on the user's clipboard.
  904. .. rst-class:: classref-item-separator
  905. ----
  906. .. _class_DisplayServer_method_clipboard_has_image:
  907. .. rst-class:: classref-method
  908. :ref:`bool<class_bool>` **clipboard_has_image** **(** **)** |const|
  909. Returns ``true`` if there is an image content on the user's clipboard.
  910. .. rst-class:: classref-item-separator
  911. ----
  912. .. _class_DisplayServer_method_clipboard_set:
  913. .. rst-class:: classref-method
  914. void **clipboard_set** **(** :ref:`String<class_String>` clipboard **)**
  915. Sets the user's clipboard content to the given string.
  916. .. rst-class:: classref-item-separator
  917. ----
  918. .. _class_DisplayServer_method_clipboard_set_primary:
  919. .. rst-class:: classref-method
  920. void **clipboard_set_primary** **(** :ref:`String<class_String>` clipboard_primary **)**
  921. Sets the user's `primary <https://unix.stackexchange.com/questions/139191/whats-the-difference-between-primary-selection-and-clipboard-buffer>`__ clipboard content to the given string. This is the clipboard that is set when the user selects text in any application, rather than when pressing :kbd:`Ctrl + C`. The clipboard data can then be pasted by clicking the middle mouse button in any application that supports the primary clipboard mechanism.
  922. \ **Note:** This method is only implemented on Linux (X11).
  923. .. rst-class:: classref-item-separator
  924. ----
  925. .. _class_DisplayServer_method_cursor_get_shape:
  926. .. rst-class:: classref-method
  927. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **cursor_get_shape** **(** **)** |const|
  928. Returns the default mouse cursor shape set by :ref:`cursor_set_shape<class_DisplayServer_method_cursor_set_shape>`.
  929. .. rst-class:: classref-item-separator
  930. ----
  931. .. _class_DisplayServer_method_cursor_set_custom_image:
  932. .. rst-class:: classref-method
  933. 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) **)**
  934. Sets a custom mouse cursor image for the defined ``shape``. This means the user's operating system and mouse cursor theme will no longer influence the mouse cursor's appearance. The image must be ``256x256`` or smaller for correct appearance. ``hotspot`` can optionally be set to define the area where the cursor will click. By default, ``hotspot`` is set to ``Vector2(0, 0)``, which is the top-left corner of the image. See also :ref:`cursor_set_shape<class_DisplayServer_method_cursor_set_shape>`.
  935. .. rst-class:: classref-item-separator
  936. ----
  937. .. _class_DisplayServer_method_cursor_set_shape:
  938. .. rst-class:: classref-method
  939. void **cursor_set_shape** **(** :ref:`CursorShape<enum_DisplayServer_CursorShape>` shape **)**
  940. Sets the default mouse cursor shape. The cursor's appearance will vary depending on the user's operating system and mouse cursor theme. See also :ref:`cursor_get_shape<class_DisplayServer_method_cursor_get_shape>` and :ref:`cursor_set_custom_image<class_DisplayServer_method_cursor_set_custom_image>`.
  941. .. rst-class:: classref-item-separator
  942. ----
  943. .. _class_DisplayServer_method_dialog_input_text:
  944. .. rst-class:: classref-method
  945. :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 **)**
  946. Shows a text input dialog which uses the operating system's native look-and-feel. ``callback`` will be called with a :ref:`String<class_String>` argument equal to the text field's contents when the dialog is closed for any reason.
  947. \ **Note:** This method is implemented only on macOS.
  948. .. rst-class:: classref-item-separator
  949. ----
  950. .. _class_DisplayServer_method_dialog_show:
  951. .. rst-class:: classref-method
  952. :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 **)**
  953. Shows a text dialog which uses the operating system's native look-and-feel. ``callback`` will be called when the dialog is closed for any reason.
  954. \ **Note:** This method is implemented only on macOS.
  955. .. rst-class:: classref-item-separator
  956. ----
  957. .. _class_DisplayServer_method_enable_for_stealing_focus:
  958. .. rst-class:: classref-method
  959. void **enable_for_stealing_focus** **(** :ref:`int<class_int>` process_id **)**
  960. Allows the ``process_id`` PID to steal focus from this window. In other words, this disables the operating system's focus stealing protection for the specified PID.
  961. \ **Note:** This method is implemented only on Windows.
  962. .. rst-class:: classref-item-separator
  963. ----
  964. .. _class_DisplayServer_method_file_dialog_show:
  965. .. rst-class:: classref-method
  966. :ref:`Error<enum_@GlobalScope_Error>` **file_dialog_show** **(** :ref:`String<class_String>` title, :ref:`String<class_String>` current_directory, :ref:`String<class_String>` filename, :ref:`bool<class_bool>` show_hidden, :ref:`FileDialogMode<enum_DisplayServer_FileDialogMode>` mode, :ref:`PackedStringArray<class_PackedStringArray>` filters, :ref:`Callable<class_Callable>` callback **)**
  967. Displays OS native dialog for selecting files or directories in the file system.
  968. Callbacks have the following arguments: ``bool status, PackedStringArray selected_paths, int selected_filter_index``.
  969. \ **Note:** This method is implemented if the display server has the :ref:`FEATURE_NATIVE_DIALOG<class_DisplayServer_constant_FEATURE_NATIVE_DIALOG>` feature.
  970. \ **Note:** This method is implemented on Linux, Windows and macOS.
  971. \ **Note:** ``current_directory`` might be ignored.
  972. \ **Note:** On Linux, ``show_hidden`` is ignored.
  973. \ **Note:** On macOS, native file dialogs have no title.
  974. \ **Note:** On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. Use :ref:`OS.get_granted_permissions<class_OS_method_get_granted_permissions>` to get a list of saved bookmarks.
  975. .. rst-class:: classref-item-separator
  976. ----
  977. .. _class_DisplayServer_method_force_process_and_drop_events:
  978. .. rst-class:: classref-method
  979. void **force_process_and_drop_events** **(** **)**
  980. Forces window manager processing while ignoring all :ref:`InputEvent<class_InputEvent>`\ s. See also :ref:`process_events<class_DisplayServer_method_process_events>`.
  981. \ **Note:** This method is implemented on Windows and macOS.
  982. .. rst-class:: classref-item-separator
  983. ----
  984. .. _class_DisplayServer_method_get_accent_color:
  985. .. rst-class:: classref-method
  986. :ref:`Color<class_Color>` **get_accent_color** **(** **)** |const|
  987. Returns OS theme accent color. Returns ``Color(0, 0, 0, 0)``, if accent color is unknown.
  988. \ **Note:** This method is implemented on macOS and Windows.
  989. .. rst-class:: classref-item-separator
  990. ----
  991. .. _class_DisplayServer_method_get_display_cutouts:
  992. .. rst-class:: classref-method
  993. :ref:`Rect2[]<class_Rect2>` **get_display_cutouts** **(** **)** |const|
  994. 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>`.
  995. \ **Note:** Currently only implemented on Android. Other platforms will return an empty array even if they do have display cutouts or notches.
  996. .. rst-class:: classref-item-separator
  997. ----
  998. .. _class_DisplayServer_method_get_display_safe_area:
  999. .. rst-class:: classref-method
  1000. :ref:`Rect2i<class_Rect2i>` **get_display_safe_area** **(** **)** |const|
  1001. 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>`.
  1002. .. rst-class:: classref-item-separator
  1003. ----
  1004. .. _class_DisplayServer_method_get_keyboard_focus_screen:
  1005. .. rst-class:: classref-method
  1006. :ref:`int<class_int>` **get_keyboard_focus_screen** **(** **)** |const|
  1007. Returns the index of the screen containing the window with the keyboard focus, or the primary screen if there's no focused window.
  1008. .. rst-class:: classref-item-separator
  1009. ----
  1010. .. _class_DisplayServer_method_get_name:
  1011. .. rst-class:: classref-method
  1012. :ref:`String<class_String>` **get_name** **(** **)** |const|
  1013. Returns the name of the **DisplayServer** currently in use. Most operating systems only have a single **DisplayServer**, but Linux has access to more than one **DisplayServer** (although only X11 is currently implemented in Godot).
  1014. The names of built-in display servers are ``Windows``, ``macOS``, ``X11`` (Linux), ``Android``, ``iOS``, ``web`` (HTML5) and ``headless`` (when started with the ``--headless`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`).
  1015. .. rst-class:: classref-item-separator
  1016. ----
  1017. .. _class_DisplayServer_method_get_primary_screen:
  1018. .. rst-class:: classref-method
  1019. :ref:`int<class_int>` **get_primary_screen** **(** **)** |const|
  1020. Returns index of the primary screen.
  1021. .. rst-class:: classref-item-separator
  1022. ----
  1023. .. _class_DisplayServer_method_get_screen_count:
  1024. .. rst-class:: classref-method
  1025. :ref:`int<class_int>` **get_screen_count** **(** **)** |const|
  1026. Returns the number of displays available.
  1027. .. rst-class:: classref-item-separator
  1028. ----
  1029. .. _class_DisplayServer_method_get_screen_from_rect:
  1030. .. rst-class:: classref-method
  1031. :ref:`int<class_int>` **get_screen_from_rect** **(** :ref:`Rect2<class_Rect2>` rect **)** |const|
  1032. Returns index of the screen which contains specified rectangle.
  1033. .. rst-class:: classref-item-separator
  1034. ----
  1035. .. _class_DisplayServer_method_get_swap_cancel_ok:
  1036. .. rst-class:: classref-method
  1037. :ref:`bool<class_bool>` **get_swap_cancel_ok** **(** **)**
  1038. Returns ``true`` if positions of **OK** and **Cancel** buttons are swapped in dialogs. This is enabled by default on Windows to follow interface conventions, and be toggled by changing :ref:`ProjectSettings.gui/common/swap_cancel_ok<class_ProjectSettings_property_gui/common/swap_cancel_ok>`.
  1039. \ **Note:** This doesn't affect native dialogs such as the ones spawned by :ref:`dialog_show<class_DisplayServer_method_dialog_show>`.
  1040. .. rst-class:: classref-item-separator
  1041. ----
  1042. .. _class_DisplayServer_method_get_window_at_screen_position:
  1043. .. rst-class:: classref-method
  1044. :ref:`int<class_int>` **get_window_at_screen_position** **(** :ref:`Vector2i<class_Vector2i>` position **)** |const|
  1045. Returns the ID of the window at the specified screen ``position`` (in pixels). On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin may be located outside any display like this:
  1046. ::
  1047. * (0, 0) +-------+
  1048. | |
  1049. +-------------+ | |
  1050. | | | |
  1051. | | | |
  1052. +-------------+ +-------+
  1053. .. rst-class:: classref-item-separator
  1054. ----
  1055. .. _class_DisplayServer_method_get_window_list:
  1056. .. rst-class:: classref-method
  1057. :ref:`PackedInt32Array<class_PackedInt32Array>` **get_window_list** **(** **)** |const|
  1058. Returns the list of Godot window IDs belonging to this process.
  1059. \ **Note:** Native dialogs are not included in this list.
  1060. .. rst-class:: classref-item-separator
  1061. ----
  1062. .. _class_DisplayServer_method_global_menu_add_check_item:
  1063. .. rst-class:: classref-method
  1064. :ref:`int<class_int>` **global_menu_add_check_item** **(** :ref:`String<class_String>` menu_root, :ref:`String<class_String>` label, :ref:`Callable<class_Callable>` callback=Callable(), :ref:`Callable<class_Callable>` key_callback=Callable(), :ref:`Variant<class_Variant>` tag=null, :ref:`Key<enum_@GlobalScope_Key>` accelerator=0, :ref:`int<class_int>` index=-1 **)**
  1065. Adds a new checkable item with text ``label`` to the global menu with ID ``menu_root``.
  1066. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1067. An ``accelerator`` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The ``accelerator`` is generally a combination of :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>`\ s and :ref:`Key<enum_@GlobalScope_Key>`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`).
  1068. \ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``.
  1069. \ **Note:** This method is implemented only on macOS.
  1070. \ **Supported system menu IDs:**\
  1071. ::
  1072. "_main" - Main menu (macOS).
  1073. "_dock" - Dock popup menu (macOS).
  1074. .. rst-class:: classref-item-separator
  1075. ----
  1076. .. _class_DisplayServer_method_global_menu_add_icon_check_item:
  1077. .. rst-class:: classref-method
  1078. :ref:`int<class_int>` **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=Callable(), :ref:`Callable<class_Callable>` key_callback=Callable(), :ref:`Variant<class_Variant>` tag=null, :ref:`Key<enum_@GlobalScope_Key>` accelerator=0, :ref:`int<class_int>` index=-1 **)**
  1079. Adds a new checkable item with text ``label`` and icon ``icon`` to the global menu with ID ``menu_root``.
  1080. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1081. An ``accelerator`` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The ``accelerator`` is generally a combination of :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>`\ s and :ref:`Key<enum_@GlobalScope_Key>`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`).
  1082. \ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``.
  1083. \ **Note:** This method is implemented only on macOS.
  1084. \ **Supported system menu IDs:**\
  1085. ::
  1086. "_main" - Main menu (macOS).
  1087. "_dock" - Dock popup menu (macOS).
  1088. .. rst-class:: classref-item-separator
  1089. ----
  1090. .. _class_DisplayServer_method_global_menu_add_icon_item:
  1091. .. rst-class:: classref-method
  1092. :ref:`int<class_int>` **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=Callable(), :ref:`Callable<class_Callable>` key_callback=Callable(), :ref:`Variant<class_Variant>` tag=null, :ref:`Key<enum_@GlobalScope_Key>` accelerator=0, :ref:`int<class_int>` index=-1 **)**
  1093. Adds a new item with text ``label`` and icon ``icon`` to the global menu with ID ``menu_root``.
  1094. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1095. An ``accelerator`` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The ``accelerator`` is generally a combination of :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>`\ s and :ref:`Key<enum_@GlobalScope_Key>`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`).
  1096. \ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``.
  1097. \ **Note:** This method is implemented only on macOS.
  1098. \ **Supported system menu IDs:**\
  1099. ::
  1100. "_main" - Main menu (macOS).
  1101. "_dock" - Dock popup menu (macOS).
  1102. .. rst-class:: classref-item-separator
  1103. ----
  1104. .. _class_DisplayServer_method_global_menu_add_icon_radio_check_item:
  1105. .. rst-class:: classref-method
  1106. :ref:`int<class_int>` **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=Callable(), :ref:`Callable<class_Callable>` key_callback=Callable(), :ref:`Variant<class_Variant>` tag=null, :ref:`Key<enum_@GlobalScope_Key>` accelerator=0, :ref:`int<class_int>` index=-1 **)**
  1107. Adds a new radio-checkable item with text ``label`` and icon ``icon`` to the global menu with ID ``menu_root``.
  1108. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1109. An ``accelerator`` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The ``accelerator`` is generally a combination of :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>`\ s and :ref:`Key<enum_@GlobalScope_Key>`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`).
  1110. \ **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.
  1111. \ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``.
  1112. \ **Note:** This method is implemented only on macOS.
  1113. \ **Supported system menu IDs:**\
  1114. ::
  1115. "_main" - Main menu (macOS).
  1116. "_dock" - Dock popup menu (macOS).
  1117. .. rst-class:: classref-item-separator
  1118. ----
  1119. .. _class_DisplayServer_method_global_menu_add_item:
  1120. .. rst-class:: classref-method
  1121. :ref:`int<class_int>` **global_menu_add_item** **(** :ref:`String<class_String>` menu_root, :ref:`String<class_String>` label, :ref:`Callable<class_Callable>` callback=Callable(), :ref:`Callable<class_Callable>` key_callback=Callable(), :ref:`Variant<class_Variant>` tag=null, :ref:`Key<enum_@GlobalScope_Key>` accelerator=0, :ref:`int<class_int>` index=-1 **)**
  1122. Adds a new item with text ``label`` to the global menu with ID ``menu_root``.
  1123. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1124. An ``accelerator`` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The ``accelerator`` is generally a combination of :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>`\ s and :ref:`Key<enum_@GlobalScope_Key>`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`).
  1125. \ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``.
  1126. \ **Note:** This method is implemented only on macOS.
  1127. \ **Supported system menu IDs:**\
  1128. ::
  1129. "_main" - Main menu (macOS).
  1130. "_dock" - Dock popup menu (macOS).
  1131. .. rst-class:: classref-item-separator
  1132. ----
  1133. .. _class_DisplayServer_method_global_menu_add_multistate_item:
  1134. .. rst-class:: classref-method
  1135. :ref:`int<class_int>` **global_menu_add_multistate_item** **(** :ref:`String<class_String>` menu_root, :ref:`String<class_String>` label, :ref:`int<class_int>` max_states, :ref:`int<class_int>` default_state, :ref:`Callable<class_Callable>` callback=Callable(), :ref:`Callable<class_Callable>` key_callback=Callable(), :ref:`Variant<class_Variant>` tag=null, :ref:`Key<enum_@GlobalScope_Key>` accelerator=0, :ref:`int<class_int>` index=-1 **)**
  1136. Adds a new item with text ``label`` to the global menu with ID ``menu_root``.
  1137. 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``.
  1138. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1139. An ``accelerator`` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The ``accelerator`` is generally a combination of :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>`\ s and :ref:`Key<enum_@GlobalScope_Key>`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`).
  1140. \ **Note:** By default, there's no indication of the current item state, it should be changed manually.
  1141. \ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``.
  1142. \ **Note:** This method is implemented only on macOS.
  1143. \ **Supported system menu IDs:**\
  1144. ::
  1145. "_main" - Main menu (macOS).
  1146. "_dock" - Dock popup menu (macOS).
  1147. .. rst-class:: classref-item-separator
  1148. ----
  1149. .. _class_DisplayServer_method_global_menu_add_radio_check_item:
  1150. .. rst-class:: classref-method
  1151. :ref:`int<class_int>` **global_menu_add_radio_check_item** **(** :ref:`String<class_String>` menu_root, :ref:`String<class_String>` label, :ref:`Callable<class_Callable>` callback=Callable(), :ref:`Callable<class_Callable>` key_callback=Callable(), :ref:`Variant<class_Variant>` tag=null, :ref:`Key<enum_@GlobalScope_Key>` accelerator=0, :ref:`int<class_int>` index=-1 **)**
  1152. Adds a new radio-checkable item with text ``label`` to the global menu with ID ``menu_root``.
  1153. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1154. An ``accelerator`` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The ``accelerator`` is generally a combination of :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>`\ s and :ref:`Key<enum_@GlobalScope_Key>`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`).
  1155. \ **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.
  1156. \ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``.
  1157. \ **Note:** This method is implemented only on macOS.
  1158. \ **Supported system menu IDs:**\
  1159. ::
  1160. "_main" - Main menu (macOS).
  1161. "_dock" - Dock popup menu (macOS).
  1162. .. rst-class:: classref-item-separator
  1163. ----
  1164. .. _class_DisplayServer_method_global_menu_add_separator:
  1165. .. rst-class:: classref-method
  1166. :ref:`int<class_int>` **global_menu_add_separator** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` index=-1 **)**
  1167. Adds a separator between items to the global menu with ID ``menu_root``. Separators also occupy an index.
  1168. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1169. \ **Note:** This method is implemented only on macOS.
  1170. \ **Supported system menu IDs:**\
  1171. ::
  1172. "_main" - Main menu (macOS).
  1173. "_dock" - Dock popup menu (macOS).
  1174. .. rst-class:: classref-item-separator
  1175. ----
  1176. .. _class_DisplayServer_method_global_menu_add_submenu_item:
  1177. .. rst-class:: classref-method
  1178. :ref:`int<class_int>` **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 **)**
  1179. 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.
  1180. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1181. \ **Note:** This method is implemented only on macOS.
  1182. \ **Supported system menu IDs:**\
  1183. ::
  1184. "_main" - Main menu (macOS).
  1185. "_dock" - Dock popup menu (macOS).
  1186. .. rst-class:: classref-item-separator
  1187. ----
  1188. .. _class_DisplayServer_method_global_menu_clear:
  1189. .. rst-class:: classref-method
  1190. void **global_menu_clear** **(** :ref:`String<class_String>` menu_root **)**
  1191. Removes all items from the global menu with ID ``menu_root``.
  1192. \ **Note:** This method is implemented only on macOS.
  1193. \ **Supported system menu IDs:**\
  1194. ::
  1195. "_main" - Main menu (macOS).
  1196. "_dock" - Dock popup menu (macOS).
  1197. .. rst-class:: classref-item-separator
  1198. ----
  1199. .. _class_DisplayServer_method_global_menu_get_item_accelerator:
  1200. .. rst-class:: classref-method
  1201. :ref:`Key<enum_@GlobalScope_Key>` **global_menu_get_item_accelerator** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const|
  1202. 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.
  1203. \ **Note:** This method is implemented only on macOS.
  1204. .. rst-class:: classref-item-separator
  1205. ----
  1206. .. _class_DisplayServer_method_global_menu_get_item_callback:
  1207. .. rst-class:: classref-method
  1208. :ref:`Callable<class_Callable>` **global_menu_get_item_callback** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const|
  1209. Returns the callback of the item at index ``idx``.
  1210. \ **Note:** This method is implemented only on macOS.
  1211. .. rst-class:: classref-item-separator
  1212. ----
  1213. .. _class_DisplayServer_method_global_menu_get_item_count:
  1214. .. rst-class:: classref-method
  1215. :ref:`int<class_int>` **global_menu_get_item_count** **(** :ref:`String<class_String>` menu_root **)** |const|
  1216. Returns number of items in the global menu with ID ``menu_root``.
  1217. \ **Note:** This method is implemented only on macOS.
  1218. .. rst-class:: classref-item-separator
  1219. ----
  1220. .. _class_DisplayServer_method_global_menu_get_item_icon:
  1221. .. rst-class:: classref-method
  1222. :ref:`Texture2D<class_Texture2D>` **global_menu_get_item_icon** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const|
  1223. Returns the icon of the item at index ``idx``.
  1224. \ **Note:** This method is implemented only on macOS.
  1225. .. rst-class:: classref-item-separator
  1226. ----
  1227. .. _class_DisplayServer_method_global_menu_get_item_indentation_level:
  1228. .. rst-class:: classref-method
  1229. :ref:`int<class_int>` **global_menu_get_item_indentation_level** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const|
  1230. Returns the horizontal offset of the item at the given ``idx``.
  1231. \ **Note:** This method is implemented only on macOS.
  1232. .. rst-class:: classref-item-separator
  1233. ----
  1234. .. _class_DisplayServer_method_global_menu_get_item_index_from_tag:
  1235. .. rst-class:: classref-method
  1236. :ref:`int<class_int>` **global_menu_get_item_index_from_tag** **(** :ref:`String<class_String>` menu_root, :ref:`Variant<class_Variant>` tag **)** |const|
  1237. 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.
  1238. \ **Note:** This method is implemented only on macOS.
  1239. .. rst-class:: classref-item-separator
  1240. ----
  1241. .. _class_DisplayServer_method_global_menu_get_item_index_from_text:
  1242. .. rst-class:: classref-method
  1243. :ref:`int<class_int>` **global_menu_get_item_index_from_text** **(** :ref:`String<class_String>` menu_root, :ref:`String<class_String>` text **)** |const|
  1244. 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.
  1245. \ **Note:** This method is implemented only on macOS.
  1246. .. rst-class:: classref-item-separator
  1247. ----
  1248. .. _class_DisplayServer_method_global_menu_get_item_key_callback:
  1249. .. rst-class:: classref-method
  1250. :ref:`Callable<class_Callable>` **global_menu_get_item_key_callback** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const|
  1251. Returns the callback of the item accelerator at index ``idx``.
  1252. \ **Note:** This method is implemented only on macOS.
  1253. .. rst-class:: classref-item-separator
  1254. ----
  1255. .. _class_DisplayServer_method_global_menu_get_item_max_states:
  1256. .. rst-class:: classref-method
  1257. :ref:`int<class_int>` **global_menu_get_item_max_states** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const|
  1258. Returns number of states of a multistate item. See :ref:`global_menu_add_multistate_item<class_DisplayServer_method_global_menu_add_multistate_item>` for details.
  1259. \ **Note:** This method is implemented only on macOS.
  1260. .. rst-class:: classref-item-separator
  1261. ----
  1262. .. _class_DisplayServer_method_global_menu_get_item_state:
  1263. .. rst-class:: classref-method
  1264. :ref:`int<class_int>` **global_menu_get_item_state** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const|
  1265. Returns the state of a multistate item. See :ref:`global_menu_add_multistate_item<class_DisplayServer_method_global_menu_add_multistate_item>` for details.
  1266. \ **Note:** This method is implemented only on macOS.
  1267. .. rst-class:: classref-item-separator
  1268. ----
  1269. .. _class_DisplayServer_method_global_menu_get_item_submenu:
  1270. .. rst-class:: classref-method
  1271. :ref:`String<class_String>` **global_menu_get_item_submenu** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const|
  1272. 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.
  1273. \ **Note:** This method is implemented only on macOS.
  1274. .. rst-class:: classref-item-separator
  1275. ----
  1276. .. _class_DisplayServer_method_global_menu_get_item_tag:
  1277. .. rst-class:: classref-method
  1278. :ref:`Variant<class_Variant>` **global_menu_get_item_tag** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const|
  1279. 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.
  1280. \ **Note:** This method is implemented only on macOS.
  1281. .. rst-class:: classref-item-separator
  1282. ----
  1283. .. _class_DisplayServer_method_global_menu_get_item_text:
  1284. .. rst-class:: classref-method
  1285. :ref:`String<class_String>` **global_menu_get_item_text** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const|
  1286. Returns the text of the item at index ``idx``.
  1287. \ **Note:** This method is implemented only on macOS.
  1288. .. rst-class:: classref-item-separator
  1289. ----
  1290. .. _class_DisplayServer_method_global_menu_get_item_tooltip:
  1291. .. rst-class:: classref-method
  1292. :ref:`String<class_String>` **global_menu_get_item_tooltip** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const|
  1293. Returns the tooltip associated with the specified index ``idx``.
  1294. \ **Note:** This method is implemented only on macOS.
  1295. .. rst-class:: classref-item-separator
  1296. ----
  1297. .. _class_DisplayServer_method_global_menu_is_item_checkable:
  1298. .. rst-class:: classref-method
  1299. :ref:`bool<class_bool>` **global_menu_is_item_checkable** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const|
  1300. Returns ``true`` if the item at index ``idx`` is checkable in some way, i.e. if it has a checkbox or radio button.
  1301. \ **Note:** This method is implemented only on macOS.
  1302. .. rst-class:: classref-item-separator
  1303. ----
  1304. .. _class_DisplayServer_method_global_menu_is_item_checked:
  1305. .. rst-class:: classref-method
  1306. :ref:`bool<class_bool>` **global_menu_is_item_checked** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const|
  1307. Returns ``true`` if the item at index ``idx`` is checked.
  1308. \ **Note:** This method is implemented only on macOS.
  1309. .. rst-class:: classref-item-separator
  1310. ----
  1311. .. _class_DisplayServer_method_global_menu_is_item_disabled:
  1312. .. rst-class:: classref-method
  1313. :ref:`bool<class_bool>` **global_menu_is_item_disabled** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const|
  1314. Returns ``true`` if the item at index ``idx`` is disabled. When it is disabled it can't be selected, or its action invoked.
  1315. See :ref:`global_menu_set_item_disabled<class_DisplayServer_method_global_menu_set_item_disabled>` for more info on how to disable an item.
  1316. \ **Note:** This method is implemented only on macOS.
  1317. .. rst-class:: classref-item-separator
  1318. ----
  1319. .. _class_DisplayServer_method_global_menu_is_item_hidden:
  1320. .. rst-class:: classref-method
  1321. :ref:`bool<class_bool>` **global_menu_is_item_hidden** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const|
  1322. Returns ``true`` if the item at index ``idx`` is hidden.
  1323. See :ref:`global_menu_set_item_hidden<class_DisplayServer_method_global_menu_set_item_hidden>` for more info on how to hide an item.
  1324. \ **Note:** This method is implemented only on macOS.
  1325. .. rst-class:: classref-item-separator
  1326. ----
  1327. .. _class_DisplayServer_method_global_menu_is_item_radio_checkable:
  1328. .. rst-class:: classref-method
  1329. :ref:`bool<class_bool>` **global_menu_is_item_radio_checkable** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const|
  1330. Returns ``true`` if the item at index ``idx`` has radio button-style checkability.
  1331. \ **Note:** This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups.
  1332. \ **Note:** This method is implemented only on macOS.
  1333. .. rst-class:: classref-item-separator
  1334. ----
  1335. .. _class_DisplayServer_method_global_menu_remove_item:
  1336. .. rst-class:: classref-method
  1337. void **global_menu_remove_item** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)**
  1338. Removes the item at index ``idx`` from the global menu ``menu_root``.
  1339. \ **Note:** The indices of items after the removed item will be shifted by one.
  1340. \ **Note:** This method is implemented only on macOS.
  1341. .. rst-class:: classref-item-separator
  1342. ----
  1343. .. _class_DisplayServer_method_global_menu_set_item_accelerator:
  1344. .. rst-class:: classref-method
  1345. void **global_menu_set_item_accelerator** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`Key<enum_@GlobalScope_Key>` keycode **)**
  1346. Sets the accelerator of the item at index ``idx``. ``keycode`` can be a single :ref:`Key<enum_@GlobalScope_Key>`, or a combination of :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>`\ s and :ref:`Key<enum_@GlobalScope_Key>`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`).
  1347. \ **Note:** This method is implemented only on macOS.
  1348. .. rst-class:: classref-item-separator
  1349. ----
  1350. .. _class_DisplayServer_method_global_menu_set_item_callback:
  1351. .. rst-class:: classref-method
  1352. void **global_menu_set_item_callback** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`Callable<class_Callable>` callback **)**
  1353. Sets the callback of the item at index ``idx``. Callback is emitted when an item is pressed.
  1354. \ **Note:** The ``callback`` Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the ``tag`` parameter when the menu item was created.
  1355. \ **Note:** This method is implemented only on macOS.
  1356. .. rst-class:: classref-item-separator
  1357. ----
  1358. .. _class_DisplayServer_method_global_menu_set_item_checkable:
  1359. .. rst-class:: classref-method
  1360. void **global_menu_set_item_checkable** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`bool<class_bool>` checkable **)**
  1361. Sets whether the item at index ``idx`` has a checkbox. If ``false``, sets the type of the item to plain text.
  1362. \ **Note:** This method is implemented only on macOS.
  1363. .. rst-class:: classref-item-separator
  1364. ----
  1365. .. _class_DisplayServer_method_global_menu_set_item_checked:
  1366. .. rst-class:: classref-method
  1367. void **global_menu_set_item_checked** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`bool<class_bool>` checked **)**
  1368. Sets the checkstate status of the item at index ``idx``.
  1369. \ **Note:** This method is implemented only on macOS.
  1370. .. rst-class:: classref-item-separator
  1371. ----
  1372. .. _class_DisplayServer_method_global_menu_set_item_disabled:
  1373. .. rst-class:: classref-method
  1374. void **global_menu_set_item_disabled** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`bool<class_bool>` disabled **)**
  1375. Enables/disables the item at index ``idx``. When it is disabled, it can't be selected and its action can't be invoked.
  1376. \ **Note:** This method is implemented only on macOS.
  1377. .. rst-class:: classref-item-separator
  1378. ----
  1379. .. _class_DisplayServer_method_global_menu_set_item_hidden:
  1380. .. rst-class:: classref-method
  1381. void **global_menu_set_item_hidden** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`bool<class_bool>` hidden **)**
  1382. Hides/shows the item at index ``idx``. When it is hidden, an item does not appear in a menu and its action cannot be invoked.
  1383. \ **Note:** This method is implemented only on macOS.
  1384. .. rst-class:: classref-item-separator
  1385. ----
  1386. .. _class_DisplayServer_method_global_menu_set_item_hover_callbacks:
  1387. .. rst-class:: classref-method
  1388. void **global_menu_set_item_hover_callbacks** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`Callable<class_Callable>` callback **)**
  1389. Sets the callback of the item at index ``idx``. The callback is emitted when an item is hovered.
  1390. \ **Note:** The ``callback`` Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the ``tag`` parameter when the menu item was created.
  1391. \ **Note:** This method is implemented only on macOS.
  1392. .. rst-class:: classref-item-separator
  1393. ----
  1394. .. _class_DisplayServer_method_global_menu_set_item_icon:
  1395. .. rst-class:: classref-method
  1396. void **global_menu_set_item_icon** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`Texture2D<class_Texture2D>` icon **)**
  1397. Replaces the :ref:`Texture2D<class_Texture2D>` icon of the specified ``idx``.
  1398. \ **Note:** This method is implemented only on macOS.
  1399. \ **Note:** This method is not supported by macOS "_dock" menu items.
  1400. .. rst-class:: classref-item-separator
  1401. ----
  1402. .. _class_DisplayServer_method_global_menu_set_item_indentation_level:
  1403. .. rst-class:: classref-method
  1404. void **global_menu_set_item_indentation_level** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`int<class_int>` level **)**
  1405. Sets the horizontal offset of the item at the given ``idx``.
  1406. \ **Note:** This method is implemented only on macOS.
  1407. .. rst-class:: classref-item-separator
  1408. ----
  1409. .. _class_DisplayServer_method_global_menu_set_item_key_callback:
  1410. .. rst-class:: classref-method
  1411. void **global_menu_set_item_key_callback** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`Callable<class_Callable>` key_callback **)**
  1412. Sets the callback of the item at index ``idx``. Callback is emitted when its accelerator is activated.
  1413. \ **Note:** The ``key_callback`` Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the ``tag`` parameter when the menu item was created.
  1414. \ **Note:** This method is implemented only on macOS.
  1415. .. rst-class:: classref-item-separator
  1416. ----
  1417. .. _class_DisplayServer_method_global_menu_set_item_max_states:
  1418. .. rst-class:: classref-method
  1419. void **global_menu_set_item_max_states** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`int<class_int>` max_states **)**
  1420. Sets number of state of a multistate item. See :ref:`global_menu_add_multistate_item<class_DisplayServer_method_global_menu_add_multistate_item>` for details.
  1421. \ **Note:** This method is implemented only on macOS.
  1422. .. rst-class:: classref-item-separator
  1423. ----
  1424. .. _class_DisplayServer_method_global_menu_set_item_radio_checkable:
  1425. .. rst-class:: classref-method
  1426. void **global_menu_set_item_radio_checkable** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`bool<class_bool>` checkable **)**
  1427. 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.
  1428. \ **Note:** This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups.
  1429. \ **Note:** This method is implemented only on macOS.
  1430. .. rst-class:: classref-item-separator
  1431. ----
  1432. .. _class_DisplayServer_method_global_menu_set_item_state:
  1433. .. rst-class:: classref-method
  1434. void **global_menu_set_item_state** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`int<class_int>` state **)**
  1435. Sets the state of a multistate item. See :ref:`global_menu_add_multistate_item<class_DisplayServer_method_global_menu_add_multistate_item>` for details.
  1436. \ **Note:** This method is implemented only on macOS.
  1437. .. rst-class:: classref-item-separator
  1438. ----
  1439. .. _class_DisplayServer_method_global_menu_set_item_submenu:
  1440. .. rst-class:: classref-method
  1441. void **global_menu_set_item_submenu** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`String<class_String>` submenu **)**
  1442. 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.
  1443. \ **Note:** This method is implemented only on macOS.
  1444. .. rst-class:: classref-item-separator
  1445. ----
  1446. .. _class_DisplayServer_method_global_menu_set_item_tag:
  1447. .. rst-class:: classref-method
  1448. void **global_menu_set_item_tag** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`Variant<class_Variant>` tag **)**
  1449. 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.
  1450. \ **Note:** This method is implemented only on macOS.
  1451. .. rst-class:: classref-item-separator
  1452. ----
  1453. .. _class_DisplayServer_method_global_menu_set_item_text:
  1454. .. rst-class:: classref-method
  1455. void **global_menu_set_item_text** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`String<class_String>` text **)**
  1456. Sets the text of the item at index ``idx``.
  1457. \ **Note:** This method is implemented only on macOS.
  1458. .. rst-class:: classref-item-separator
  1459. ----
  1460. .. _class_DisplayServer_method_global_menu_set_item_tooltip:
  1461. .. rst-class:: classref-method
  1462. void **global_menu_set_item_tooltip** **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx, :ref:`String<class_String>` tooltip **)**
  1463. Sets the :ref:`String<class_String>` tooltip of the item at the specified index ``idx``.
  1464. \ **Note:** This method is implemented only on macOS.
  1465. .. rst-class:: classref-item-separator
  1466. ----
  1467. .. _class_DisplayServer_method_global_menu_set_popup_callbacks:
  1468. .. rst-class:: classref-method
  1469. void **global_menu_set_popup_callbacks** **(** :ref:`String<class_String>` menu_root, :ref:`Callable<class_Callable>` open_callback, :ref:`Callable<class_Callable>` close_callback **)**
  1470. Registers callables to emit when the menu is respectively about to show or closed.
  1471. .. rst-class:: classref-item-separator
  1472. ----
  1473. .. _class_DisplayServer_method_has_feature:
  1474. .. rst-class:: classref-method
  1475. :ref:`bool<class_bool>` **has_feature** **(** :ref:`Feature<enum_DisplayServer_Feature>` feature **)** |const|
  1476. Returns ``true`` if the specified ``feature`` is supported by the current **DisplayServer**, ``false`` otherwise.
  1477. .. rst-class:: classref-item-separator
  1478. ----
  1479. .. _class_DisplayServer_method_ime_get_selection:
  1480. .. rst-class:: classref-method
  1481. :ref:`Vector2i<class_Vector2i>` **ime_get_selection** **(** **)** |const|
  1482. Returns the text selection in the `Input Method Editor <https://en.wikipedia.org/wiki/Input_method>`__ composition string, with the :ref:`Vector2i<class_Vector2i>`'s ``x`` component being the caret position and ``y`` being the length of the selection.
  1483. \ **Note:** This method is implemented only on macOS.
  1484. .. rst-class:: classref-item-separator
  1485. ----
  1486. .. _class_DisplayServer_method_ime_get_text:
  1487. .. rst-class:: classref-method
  1488. :ref:`String<class_String>` **ime_get_text** **(** **)** |const|
  1489. Returns the composition string contained within the `Input Method Editor <https://en.wikipedia.org/wiki/Input_method>`__ window.
  1490. \ **Note:** This method is implemented only on macOS.
  1491. .. rst-class:: classref-item-separator
  1492. ----
  1493. .. _class_DisplayServer_method_is_dark_mode:
  1494. .. rst-class:: classref-method
  1495. :ref:`bool<class_bool>` **is_dark_mode** **(** **)** |const|
  1496. Returns ``true`` if OS is using dark mode.
  1497. \ **Note:** This method is implemented on Android, iOS, macOS, Windows, and Linux (X11).
  1498. .. rst-class:: classref-item-separator
  1499. ----
  1500. .. _class_DisplayServer_method_is_dark_mode_supported:
  1501. .. rst-class:: classref-method
  1502. :ref:`bool<class_bool>` **is_dark_mode_supported** **(** **)** |const|
  1503. Returns ``true`` if OS supports dark mode.
  1504. \ **Note:** This method is implemented on Android, iOS, macOS, Windows, and Linux (X11).
  1505. .. rst-class:: classref-item-separator
  1506. ----
  1507. .. _class_DisplayServer_method_is_touchscreen_available:
  1508. .. rst-class:: classref-method
  1509. :ref:`bool<class_bool>` **is_touchscreen_available** **(** **)** |const|
  1510. Returns ``true`` if touch events are available (Android or iOS), the capability is detected on the Web platform or if :ref:`ProjectSettings.input_devices/pointing/emulate_touch_from_mouse<class_ProjectSettings_property_input_devices/pointing/emulate_touch_from_mouse>` is ``true``.
  1511. .. rst-class:: classref-item-separator
  1512. ----
  1513. .. _class_DisplayServer_method_keyboard_get_current_layout:
  1514. .. rst-class:: classref-method
  1515. :ref:`int<class_int>` **keyboard_get_current_layout** **(** **)** |const|
  1516. Returns active keyboard layout index.
  1517. \ **Note:** This method is implemented on Linux (X11), macOS and Windows.
  1518. .. rst-class:: classref-item-separator
  1519. ----
  1520. .. _class_DisplayServer_method_keyboard_get_keycode_from_physical:
  1521. .. rst-class:: classref-method
  1522. :ref:`Key<enum_@GlobalScope_Key>` **keyboard_get_keycode_from_physical** **(** :ref:`Key<enum_@GlobalScope_Key>` keycode **)** |const|
  1523. Converts a physical (US QWERTY) ``keycode`` to one in the active keyboard layout.
  1524. \ **Note:** This method is implemented on Linux (X11), macOS and Windows.
  1525. .. rst-class:: classref-item-separator
  1526. ----
  1527. .. _class_DisplayServer_method_keyboard_get_label_from_physical:
  1528. .. rst-class:: classref-method
  1529. :ref:`Key<enum_@GlobalScope_Key>` **keyboard_get_label_from_physical** **(** :ref:`Key<enum_@GlobalScope_Key>` keycode **)** |const|
  1530. Converts a physical (US QWERTY) ``keycode`` to localized label printed on the key in the active keyboard layout.
  1531. \ **Note:** This method is implemented on Linux (X11), macOS and Windows.
  1532. .. rst-class:: classref-item-separator
  1533. ----
  1534. .. _class_DisplayServer_method_keyboard_get_layout_count:
  1535. .. rst-class:: classref-method
  1536. :ref:`int<class_int>` **keyboard_get_layout_count** **(** **)** |const|
  1537. Returns the number of keyboard layouts.
  1538. \ **Note:** This method is implemented on Linux (X11), macOS and Windows.
  1539. .. rst-class:: classref-item-separator
  1540. ----
  1541. .. _class_DisplayServer_method_keyboard_get_layout_language:
  1542. .. rst-class:: classref-method
  1543. :ref:`String<class_String>` **keyboard_get_layout_language** **(** :ref:`int<class_int>` index **)** |const|
  1544. Returns the ISO-639/BCP-47 language code of the keyboard layout at position ``index``.
  1545. \ **Note:** This method is implemented on Linux (X11), macOS and Windows.
  1546. .. rst-class:: classref-item-separator
  1547. ----
  1548. .. _class_DisplayServer_method_keyboard_get_layout_name:
  1549. .. rst-class:: classref-method
  1550. :ref:`String<class_String>` **keyboard_get_layout_name** **(** :ref:`int<class_int>` index **)** |const|
  1551. Returns the localized name of the keyboard layout at position ``index``.
  1552. \ **Note:** This method is implemented on Linux (X11), macOS and Windows.
  1553. .. rst-class:: classref-item-separator
  1554. ----
  1555. .. _class_DisplayServer_method_keyboard_set_current_layout:
  1556. .. rst-class:: classref-method
  1557. void **keyboard_set_current_layout** **(** :ref:`int<class_int>` index **)**
  1558. Sets the active keyboard layout.
  1559. \ **Note:** This method is implemented on Linux (X11), macOS and Windows.
  1560. .. rst-class:: classref-item-separator
  1561. ----
  1562. .. _class_DisplayServer_method_mouse_get_button_state:
  1563. .. rst-class:: classref-method
  1564. |bitfield|\<:ref:`MouseButtonMask<enum_@GlobalScope_MouseButtonMask>`\> **mouse_get_button_state** **(** **)** |const|
  1565. Returns the current state of mouse buttons (whether each button is pressed) as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. Equivalent to :ref:`Input.get_mouse_button_mask<class_Input_method_get_mouse_button_mask>`.
  1566. .. rst-class:: classref-item-separator
  1567. ----
  1568. .. _class_DisplayServer_method_mouse_get_mode:
  1569. .. rst-class:: classref-method
  1570. :ref:`MouseMode<enum_DisplayServer_MouseMode>` **mouse_get_mode** **(** **)** |const|
  1571. Returns the current mouse mode. See also :ref:`mouse_set_mode<class_DisplayServer_method_mouse_set_mode>`.
  1572. .. rst-class:: classref-item-separator
  1573. ----
  1574. .. _class_DisplayServer_method_mouse_get_position:
  1575. .. rst-class:: classref-method
  1576. :ref:`Vector2i<class_Vector2i>` **mouse_get_position** **(** **)** |const|
  1577. Returns the mouse cursor's current position in screen coordinates.
  1578. .. rst-class:: classref-item-separator
  1579. ----
  1580. .. _class_DisplayServer_method_mouse_set_mode:
  1581. .. rst-class:: classref-method
  1582. void **mouse_set_mode** **(** :ref:`MouseMode<enum_DisplayServer_MouseMode>` mouse_mode **)**
  1583. Sets the current mouse mode. See also :ref:`mouse_get_mode<class_DisplayServer_method_mouse_get_mode>`.
  1584. .. rst-class:: classref-item-separator
  1585. ----
  1586. .. _class_DisplayServer_method_process_events:
  1587. .. rst-class:: classref-method
  1588. void **process_events** **(** **)**
  1589. Perform window manager processing, including input flushing. See also :ref:`force_process_and_drop_events<class_DisplayServer_method_force_process_and_drop_events>`, :ref:`Input.flush_buffered_events<class_Input_method_flush_buffered_events>` and :ref:`Input.use_accumulated_input<class_Input_property_use_accumulated_input>`.
  1590. .. rst-class:: classref-item-separator
  1591. ----
  1592. .. _class_DisplayServer_method_screen_get_dpi:
  1593. .. rst-class:: classref-method
  1594. :ref:`int<class_int>` **screen_get_dpi** **(** :ref:`int<class_int>` screen=-1 **)** |const|
  1595. Returns the dots per inch density 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.
  1596. \ **Note:** On macOS, returned value is inaccurate if fractional display scaling mode is used.
  1597. \ **Note:** On Android devices, the actual screen densities are grouped into six generalized densities:
  1598. ::
  1599. ldpi - 120 dpi
  1600. mdpi - 160 dpi
  1601. hdpi - 240 dpi
  1602. xhdpi - 320 dpi
  1603. xxhdpi - 480 dpi
  1604. xxxhdpi - 640 dpi
  1605. \ **Note:** This method is implemented on Android, Linux (X11), macOS and Windows. Returns ``72`` on unsupported platforms.
  1606. .. rst-class:: classref-item-separator
  1607. ----
  1608. .. _class_DisplayServer_method_screen_get_image:
  1609. .. rst-class:: classref-method
  1610. :ref:`Image<class_Image>` **screen_get_image** **(** :ref:`int<class_int>` screen=-1 **)** |const|
  1611. Returns screenshot of the ``screen``.
  1612. \ **Note:** This method is implemented on Linux (X11), macOS, and Windows.
  1613. \ **Note:** On macOS, this method requires "Screen Recording" permission, if permission is not granted it will return desktop wallpaper color.
  1614. .. rst-class:: classref-item-separator
  1615. ----
  1616. .. _class_DisplayServer_method_screen_get_max_scale:
  1617. .. rst-class:: classref-method
  1618. :ref:`float<class_float>` **screen_get_max_scale** **(** **)** |const|
  1619. Returns the greatest scale factor of all screens.
  1620. \ **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.
  1621. \ **Note:** This method is implemented only on macOS.
  1622. .. rst-class:: classref-item-separator
  1623. ----
  1624. .. _class_DisplayServer_method_screen_get_orientation:
  1625. .. rst-class:: classref-method
  1626. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **screen_get_orientation** **(** :ref:`int<class_int>` screen=-1 **)** |const|
  1627. Returns the ``screen``'s current orientation. See also :ref:`screen_set_orientation<class_DisplayServer_method_screen_set_orientation>`.
  1628. \ **Note:** This method is implemented on Android and iOS.
  1629. .. rst-class:: classref-item-separator
  1630. ----
  1631. .. _class_DisplayServer_method_screen_get_pixel:
  1632. .. rst-class:: classref-method
  1633. :ref:`Color<class_Color>` **screen_get_pixel** **(** :ref:`Vector2i<class_Vector2i>` position **)** |const|
  1634. Returns color of the display pixel at the ``position``.
  1635. \ **Note:** This method is implemented on Linux (X11), macOS, and Windows.
  1636. \ **Note:** On macOS, this method requires "Screen Recording" permission, if permission is not granted it will return desktop wallpaper color.
  1637. .. rst-class:: classref-item-separator
  1638. ----
  1639. .. _class_DisplayServer_method_screen_get_position:
  1640. .. rst-class:: classref-method
  1641. :ref:`Vector2i<class_Vector2i>` **screen_get_position** **(** :ref:`int<class_int>` screen=-1 **)** |const|
  1642. Returns the screen's top-left corner position in pixels. On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin may be located outside any display like this:
  1643. ::
  1644. * (0, 0) +-------+
  1645. | |
  1646. +-------------+ | |
  1647. | | | |
  1648. | | | |
  1649. +-------------+ +-------+
  1650. See also :ref:`screen_get_size<class_DisplayServer_method_screen_get_size>`.
  1651. .. rst-class:: classref-item-separator
  1652. ----
  1653. .. _class_DisplayServer_method_screen_get_refresh_rate:
  1654. .. rst-class:: classref-method
  1655. :ref:`float<class_float>` **screen_get_refresh_rate** **(** :ref:`int<class_int>` screen=-1 **)** |const|
  1656. 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.
  1657. \ **Note:** Returns ``-1.0`` if the DisplayServer fails to find the refresh rate for the specified screen. On Web, :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.
  1658. To fallback to a default refresh rate if the method fails, try:
  1659. ::
  1660. var refresh_rate = DisplayServer.screen_get_refresh_rate()
  1661. if refresh_rate < 0:
  1662. refresh_rate = 60.0
  1663. .. rst-class:: classref-item-separator
  1664. ----
  1665. .. _class_DisplayServer_method_screen_get_scale:
  1666. .. rst-class:: classref-method
  1667. :ref:`float<class_float>` **screen_get_scale** **(** :ref:`int<class_int>` screen=-1 **)** |const|
  1668. Returns the scale factor of the specified screen by index.
  1669. \ **Note:** On macOS returned value is ``2.0`` for hiDPI (Retina) screen, and ``1.0`` for all other cases.
  1670. \ **Note:** This method is implemented only on macOS.
  1671. .. rst-class:: classref-item-separator
  1672. ----
  1673. .. _class_DisplayServer_method_screen_get_size:
  1674. .. rst-class:: classref-method
  1675. :ref:`Vector2i<class_Vector2i>` **screen_get_size** **(** :ref:`int<class_int>` screen=-1 **)** |const|
  1676. Returns the screen's size in pixels. See also :ref:`screen_get_position<class_DisplayServer_method_screen_get_position>` and :ref:`screen_get_usable_rect<class_DisplayServer_method_screen_get_usable_rect>`.
  1677. .. rst-class:: classref-item-separator
  1678. ----
  1679. .. _class_DisplayServer_method_screen_get_usable_rect:
  1680. .. rst-class:: classref-method
  1681. :ref:`Rect2i<class_Rect2i>` **screen_get_usable_rect** **(** :ref:`int<class_int>` screen=-1 **)** |const|
  1682. Returns the portion of the screen that is not obstructed by a status bar in pixels. See also :ref:`screen_get_size<class_DisplayServer_method_screen_get_size>`.
  1683. .. rst-class:: classref-item-separator
  1684. ----
  1685. .. _class_DisplayServer_method_screen_is_kept_on:
  1686. .. rst-class:: classref-method
  1687. :ref:`bool<class_bool>` **screen_is_kept_on** **(** **)** |const|
  1688. Returns ``true`` if the screen should never be turned off by the operating system's power-saving measures. See also :ref:`screen_set_keep_on<class_DisplayServer_method_screen_set_keep_on>`.
  1689. .. rst-class:: classref-item-separator
  1690. ----
  1691. .. _class_DisplayServer_method_screen_set_keep_on:
  1692. .. rst-class:: classref-method
  1693. void **screen_set_keep_on** **(** :ref:`bool<class_bool>` enable **)**
  1694. Sets whether the screen should never be turned off by the operating system's power-saving measures. See also :ref:`screen_is_kept_on<class_DisplayServer_method_screen_is_kept_on>`.
  1695. .. rst-class:: classref-item-separator
  1696. ----
  1697. .. _class_DisplayServer_method_screen_set_orientation:
  1698. .. rst-class:: classref-method
  1699. void **screen_set_orientation** **(** :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` orientation, :ref:`int<class_int>` screen=-1 **)**
  1700. Sets the ``screen``'s ``orientation``. See also :ref:`screen_get_orientation<class_DisplayServer_method_screen_get_orientation>`.
  1701. \ **Note:** On iOS, this method has no effect if :ref:`ProjectSettings.display/window/handheld/orientation<class_ProjectSettings_property_display/window/handheld/orientation>` is not set to :ref:`SCREEN_SENSOR<class_DisplayServer_constant_SCREEN_SENSOR>`.
  1702. .. rst-class:: classref-item-separator
  1703. ----
  1704. .. _class_DisplayServer_method_set_icon:
  1705. .. rst-class:: classref-method
  1706. void **set_icon** **(** :ref:`Image<class_Image>` image **)**
  1707. Sets the window icon (usually displayed in the top-left corner) with an :ref:`Image<class_Image>`. To use icons in the operating system's native format, use :ref:`set_native_icon<class_DisplayServer_method_set_native_icon>` instead.
  1708. .. rst-class:: classref-item-separator
  1709. ----
  1710. .. _class_DisplayServer_method_set_native_icon:
  1711. .. rst-class:: classref-method
  1712. void **set_native_icon** **(** :ref:`String<class_String>` filename **)**
  1713. Sets the window icon (usually displayed in the top-left corner) in the operating system's *native* format. The file at ``filename`` must be in ``.ico`` format on Windows or ``.icns`` on macOS. By using specially crafted ``.ico`` or ``.icns`` icons, :ref:`set_native_icon<class_DisplayServer_method_set_native_icon>` allows specifying different icons depending on the size the icon is displayed at. This size is determined by the operating system and user preferences (including the display scale factor). To use icons in other formats, use :ref:`set_icon<class_DisplayServer_method_set_icon>` instead.
  1714. .. rst-class:: classref-item-separator
  1715. ----
  1716. .. _class_DisplayServer_method_tablet_get_current_driver:
  1717. .. rst-class:: classref-method
  1718. :ref:`String<class_String>` **tablet_get_current_driver** **(** **)** |const|
  1719. Returns current active tablet driver name.
  1720. \ **Note:** This method is implemented only on Windows.
  1721. .. rst-class:: classref-item-separator
  1722. ----
  1723. .. _class_DisplayServer_method_tablet_get_driver_count:
  1724. .. rst-class:: classref-method
  1725. :ref:`int<class_int>` **tablet_get_driver_count** **(** **)** |const|
  1726. Returns the total number of available tablet drivers.
  1727. \ **Note:** This method is implemented only on Windows.
  1728. .. rst-class:: classref-item-separator
  1729. ----
  1730. .. _class_DisplayServer_method_tablet_get_driver_name:
  1731. .. rst-class:: classref-method
  1732. :ref:`String<class_String>` **tablet_get_driver_name** **(** :ref:`int<class_int>` idx **)** |const|
  1733. Returns the tablet driver name for the given index.
  1734. \ **Note:** This method is implemented only on Windows.
  1735. .. rst-class:: classref-item-separator
  1736. ----
  1737. .. _class_DisplayServer_method_tablet_set_current_driver:
  1738. .. rst-class:: classref-method
  1739. void **tablet_set_current_driver** **(** :ref:`String<class_String>` name **)**
  1740. Set active tablet driver name.
  1741. \ **Note:** This method is implemented only on Windows.
  1742. .. rst-class:: classref-item-separator
  1743. ----
  1744. .. _class_DisplayServer_method_tts_get_voices:
  1745. .. rst-class:: classref-method
  1746. :ref:`Dictionary[]<class_Dictionary>` **tts_get_voices** **(** **)** |const|
  1747. Returns an :ref:`Array<class_Array>` of voice information dictionaries.
  1748. Each :ref:`Dictionary<class_Dictionary>` contains two :ref:`String<class_String>` entries:
  1749. - ``name`` is voice name.
  1750. - ``id`` is voice identifier.
  1751. - ``language`` is language code in ``lang_Variant`` format. The ``lang`` part is a 2 or 3-letter code based on the ISO-639 standard, in lowercase. The ``Variant`` part is an engine-dependent string describing country, region or/and dialect.
  1752. Note that Godot depends on system libraries for text-to-speech functionality. These libraries are installed by default on Windows and macOS, but not on all Linux distributions. If they are not present, this method will return an empty list. This applies to both Godot users on Linux, as well as end-users on Linux running Godot games that use text-to-speech.
  1753. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
  1754. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  1755. .. rst-class:: classref-item-separator
  1756. ----
  1757. .. _class_DisplayServer_method_tts_get_voices_for_language:
  1758. .. rst-class:: classref-method
  1759. :ref:`PackedStringArray<class_PackedStringArray>` **tts_get_voices_for_language** **(** :ref:`String<class_String>` language **)** |const|
  1760. Returns an :ref:`PackedStringArray<class_PackedStringArray>` of voice identifiers for the ``language``.
  1761. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
  1762. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  1763. .. rst-class:: classref-item-separator
  1764. ----
  1765. .. _class_DisplayServer_method_tts_is_paused:
  1766. .. rst-class:: classref-method
  1767. :ref:`bool<class_bool>` **tts_is_paused** **(** **)** |const|
  1768. Returns ``true`` if the synthesizer is in a paused state.
  1769. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
  1770. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  1771. .. rst-class:: classref-item-separator
  1772. ----
  1773. .. _class_DisplayServer_method_tts_is_speaking:
  1774. .. rst-class:: classref-method
  1775. :ref:`bool<class_bool>` **tts_is_speaking** **(** **)** |const|
  1776. Returns ``true`` if the synthesizer is generating speech, or have utterance waiting in the queue.
  1777. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
  1778. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  1779. .. rst-class:: classref-item-separator
  1780. ----
  1781. .. _class_DisplayServer_method_tts_pause:
  1782. .. rst-class:: classref-method
  1783. void **tts_pause** **(** **)**
  1784. Puts the synthesizer into a paused state.
  1785. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
  1786. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  1787. .. rst-class:: classref-item-separator
  1788. ----
  1789. .. _class_DisplayServer_method_tts_resume:
  1790. .. rst-class:: classref-method
  1791. void **tts_resume** **(** **)**
  1792. Resumes the synthesizer if it was paused.
  1793. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
  1794. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  1795. .. rst-class:: classref-item-separator
  1796. ----
  1797. .. _class_DisplayServer_method_tts_set_utterance_callback:
  1798. .. rst-class:: classref-method
  1799. void **tts_set_utterance_callback** **(** :ref:`TTSUtteranceEvent<enum_DisplayServer_TTSUtteranceEvent>` event, :ref:`Callable<class_Callable>` callable **)**
  1800. Adds a callback, which is called when the utterance has started, finished, canceled or reached a text boundary.
  1801. - :ref:`TTS_UTTERANCE_STARTED<class_DisplayServer_constant_TTS_UTTERANCE_STARTED>`, :ref:`TTS_UTTERANCE_ENDED<class_DisplayServer_constant_TTS_UTTERANCE_ENDED>`, and :ref:`TTS_UTTERANCE_CANCELED<class_DisplayServer_constant_TTS_UTTERANCE_CANCELED>` callable's method should take one :ref:`int<class_int>` parameter, the utterance ID.
  1802. - :ref:`TTS_UTTERANCE_BOUNDARY<class_DisplayServer_constant_TTS_UTTERANCE_BOUNDARY>` callable's method should take two :ref:`int<class_int>` parameters, the index of the character and the utterance ID.
  1803. \ **Note:** The granularity of the boundary callbacks is engine dependent.
  1804. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
  1805. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  1806. .. rst-class:: classref-item-separator
  1807. ----
  1808. .. _class_DisplayServer_method_tts_speak:
  1809. .. rst-class:: classref-method
  1810. 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 **)**
  1811. Adds an utterance to the queue. If ``interrupt`` is ``true``, the queue is cleared first.
  1812. - ``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>`.
  1813. - ``volume`` ranges from ``0`` (lowest) to ``100`` (highest).
  1814. - ``pitch`` ranges from ``0.0`` (lowest) to ``2.0`` (highest), ``1.0`` is default pitch for the current voice.
  1815. - ``rate`` ranges from ``0.1`` (lowest) to ``10.0`` (highest), ``1.0`` is a normal speaking rate. Other values act as a percentage relative.
  1816. - ``utterance_id`` is passed as a parameter to the callback functions.
  1817. \ **Note:** On Windows and Linux (X11), 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>`.
  1818. \ **Note:** The granularity of pitch, rate, and volume is engine and voice dependent. Values may be truncated.
  1819. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
  1820. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  1821. .. rst-class:: classref-item-separator
  1822. ----
  1823. .. _class_DisplayServer_method_tts_stop:
  1824. .. rst-class:: classref-method
  1825. void **tts_stop** **(** **)**
  1826. Stops synthesis in progress and removes all utterances from the queue.
  1827. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
  1828. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  1829. .. rst-class:: classref-item-separator
  1830. ----
  1831. .. _class_DisplayServer_method_virtual_keyboard_get_height:
  1832. .. rst-class:: classref-method
  1833. :ref:`int<class_int>` **virtual_keyboard_get_height** **(** **)** |const|
  1834. Returns the on-screen keyboard's height in pixels. Returns 0 if there is no keyboard or if it is currently hidden.
  1835. .. rst-class:: classref-item-separator
  1836. ----
  1837. .. _class_DisplayServer_method_virtual_keyboard_hide:
  1838. .. rst-class:: classref-method
  1839. void **virtual_keyboard_hide** **(** **)**
  1840. Hides the virtual keyboard if it is shown, does nothing otherwise.
  1841. .. rst-class:: classref-item-separator
  1842. ----
  1843. .. _class_DisplayServer_method_virtual_keyboard_show:
  1844. .. rst-class:: classref-method
  1845. void **virtual_keyboard_show** **(** :ref:`String<class_String>` existing_text, :ref:`Rect2<class_Rect2>` position=Rect2(0, 0, 0, 0), :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` type=0, :ref:`int<class_int>` max_length=-1, :ref:`int<class_int>` cursor_start=-1, :ref:`int<class_int>` cursor_end=-1 **)**
  1846. Shows the virtual keyboard if the platform has one.
  1847. \ ``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).
  1848. \ ``position`` parameter is the screen space :ref:`Rect2<class_Rect2>` of the edited text.
  1849. \ ``type`` parameter allows configuring which type of virtual keyboard to show.
  1850. \ ``max_length`` limits the number of characters that can be entered if different from ``-1``.
  1851. \ ``cursor_start`` can optionally define the current text cursor position if ``cursor_end`` is not set.
  1852. \ ``cursor_start`` and ``cursor_end`` can optionally define the current text selection.
  1853. \ **Note:** This method is implemented on Android, iOS and Web.
  1854. .. rst-class:: classref-item-separator
  1855. ----
  1856. .. _class_DisplayServer_method_warp_mouse:
  1857. .. rst-class:: classref-method
  1858. void **warp_mouse** **(** :ref:`Vector2i<class_Vector2i>` position **)**
  1859. 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.
  1860. \ **Note:** :ref:`warp_mouse<class_DisplayServer_method_warp_mouse>` is only supported on Windows, macOS and Linux. It has no effect on Android, iOS and Web.
  1861. .. rst-class:: classref-item-separator
  1862. ----
  1863. .. _class_DisplayServer_method_window_can_draw:
  1864. .. rst-class:: classref-method
  1865. :ref:`bool<class_bool>` **window_can_draw** **(** :ref:`int<class_int>` window_id=0 **)** |const|
  1866. Returns ``true`` if anything can be drawn in the window specified by ``window_id``, ``false`` otherwise. Using the ``--disable-render-loop`` command line argument or a headless build will return ``false``.
  1867. .. rst-class:: classref-item-separator
  1868. ----
  1869. .. _class_DisplayServer_method_window_get_active_popup:
  1870. .. rst-class:: classref-method
  1871. :ref:`int<class_int>` **window_get_active_popup** **(** **)** |const|
  1872. Returns ID of the active popup window, or :ref:`INVALID_WINDOW_ID<class_DisplayServer_constant_INVALID_WINDOW_ID>` if there is none.
  1873. .. rst-class:: classref-item-separator
  1874. ----
  1875. .. _class_DisplayServer_method_window_get_attached_instance_id:
  1876. .. rst-class:: classref-method
  1877. :ref:`int<class_int>` **window_get_attached_instance_id** **(** :ref:`int<class_int>` window_id=0 **)** |const|
  1878. Returns the :ref:`Object.get_instance_id<class_Object_method_get_instance_id>` of the :ref:`Window<class_Window>` the ``window_id`` is attached to.
  1879. .. rst-class:: classref-item-separator
  1880. ----
  1881. .. _class_DisplayServer_method_window_get_current_screen:
  1882. .. rst-class:: classref-method
  1883. :ref:`int<class_int>` **window_get_current_screen** **(** :ref:`int<class_int>` window_id=0 **)** |const|
  1884. Returns the screen the window specified by ``window_id`` is currently positioned on. If the screen overlaps multiple displays, the screen where the window's center is located is returned. See also :ref:`window_set_current_screen<class_DisplayServer_method_window_set_current_screen>`.
  1885. .. rst-class:: classref-item-separator
  1886. ----
  1887. .. _class_DisplayServer_method_window_get_flag:
  1888. .. rst-class:: classref-method
  1889. :ref:`bool<class_bool>` **window_get_flag** **(** :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` flag, :ref:`int<class_int>` window_id=0 **)** |const|
  1890. Returns the current value of the given window's ``flag``.
  1891. .. rst-class:: classref-item-separator
  1892. ----
  1893. .. _class_DisplayServer_method_window_get_max_size:
  1894. .. rst-class:: classref-method
  1895. :ref:`Vector2i<class_Vector2i>` **window_get_max_size** **(** :ref:`int<class_int>` window_id=0 **)** |const|
  1896. Returns the window's maximum size (in pixels). See also :ref:`window_set_max_size<class_DisplayServer_method_window_set_max_size>`.
  1897. .. rst-class:: classref-item-separator
  1898. ----
  1899. .. _class_DisplayServer_method_window_get_min_size:
  1900. .. rst-class:: classref-method
  1901. :ref:`Vector2i<class_Vector2i>` **window_get_min_size** **(** :ref:`int<class_int>` window_id=0 **)** |const|
  1902. Returns the window's minimum size (in pixels). See also :ref:`window_set_min_size<class_DisplayServer_method_window_set_min_size>`.
  1903. .. rst-class:: classref-item-separator
  1904. ----
  1905. .. _class_DisplayServer_method_window_get_mode:
  1906. .. rst-class:: classref-method
  1907. :ref:`WindowMode<enum_DisplayServer_WindowMode>` **window_get_mode** **(** :ref:`int<class_int>` window_id=0 **)** |const|
  1908. Returns the mode of the given window.
  1909. .. rst-class:: classref-item-separator
  1910. ----
  1911. .. _class_DisplayServer_method_window_get_native_handle:
  1912. .. rst-class:: classref-method
  1913. :ref:`int<class_int>` **window_get_native_handle** **(** :ref:`HandleType<enum_DisplayServer_HandleType>` handle_type, :ref:`int<class_int>` window_id=0 **)** |const|
  1914. Returns internal structure pointers for use in plugins.
  1915. \ **Note:** This method is implemented on Android, Linux (X11), macOS and Windows.
  1916. .. rst-class:: classref-item-separator
  1917. ----
  1918. .. _class_DisplayServer_method_window_get_popup_safe_rect:
  1919. .. rst-class:: classref-method
  1920. :ref:`Rect2i<class_Rect2i>` **window_get_popup_safe_rect** **(** :ref:`int<class_int>` window **)** |const|
  1921. Returns the bounding box of control, or menu item that was used to open the popup window, in the screen coordinate system.
  1922. .. rst-class:: classref-item-separator
  1923. ----
  1924. .. _class_DisplayServer_method_window_get_position:
  1925. .. rst-class:: classref-method
  1926. :ref:`Vector2i<class_Vector2i>` **window_get_position** **(** :ref:`int<class_int>` window_id=0 **)** |const|
  1927. Returns the position of the client area of the given window on the screen.
  1928. .. rst-class:: classref-item-separator
  1929. ----
  1930. .. _class_DisplayServer_method_window_get_position_with_decorations:
  1931. .. rst-class:: classref-method
  1932. :ref:`Vector2i<class_Vector2i>` **window_get_position_with_decorations** **(** :ref:`int<class_int>` window_id=0 **)** |const|
  1933. Returns the position of the given window on the screen including the borders drawn by the operating system. See also :ref:`window_get_position<class_DisplayServer_method_window_get_position>`.
  1934. .. rst-class:: classref-item-separator
  1935. ----
  1936. .. _class_DisplayServer_method_window_get_safe_title_margins:
  1937. .. rst-class:: classref-method
  1938. :ref:`Vector3i<class_Vector3i>` **window_get_safe_title_margins** **(** :ref:`int<class_int>` window_id=0 **)** |const|
  1939. Returns left margins (``x``), right margins (``y``) and height (``z``) of the title that are safe to use (contains no buttons or other elements) when :ref:`WINDOW_FLAG_EXTEND_TO_TITLE<class_DisplayServer_constant_WINDOW_FLAG_EXTEND_TO_TITLE>` flag is set.
  1940. .. rst-class:: classref-item-separator
  1941. ----
  1942. .. _class_DisplayServer_method_window_get_size:
  1943. .. rst-class:: classref-method
  1944. :ref:`Vector2i<class_Vector2i>` **window_get_size** **(** :ref:`int<class_int>` window_id=0 **)** |const|
  1945. Returns the size of the window specified by ``window_id`` (in pixels), excluding the borders drawn by the operating system. This is also called the "client area". See also :ref:`window_get_size_with_decorations<class_DisplayServer_method_window_get_size_with_decorations>`, :ref:`window_set_size<class_DisplayServer_method_window_set_size>` and :ref:`window_get_position<class_DisplayServer_method_window_get_position>`.
  1946. .. rst-class:: classref-item-separator
  1947. ----
  1948. .. _class_DisplayServer_method_window_get_size_with_decorations:
  1949. .. rst-class:: classref-method
  1950. :ref:`Vector2i<class_Vector2i>` **window_get_size_with_decorations** **(** :ref:`int<class_int>` window_id=0 **)** |const|
  1951. Returns the size of the window specified by ``window_id`` (in pixels), including the borders drawn by the operating system. See also :ref:`window_get_size<class_DisplayServer_method_window_get_size>`.
  1952. .. rst-class:: classref-item-separator
  1953. ----
  1954. .. _class_DisplayServer_method_window_get_title_size:
  1955. .. rst-class:: classref-method
  1956. :ref:`Vector2i<class_Vector2i>` **window_get_title_size** **(** :ref:`String<class_String>` title, :ref:`int<class_int>` window_id=0 **)** |const|
  1957. Returns the estimated window title bar size (including text and window buttons) for the window specified by ``window_id`` (in pixels). This method does not change the window title.
  1958. \ **Note:** This method is implemented on macOS and Windows.
  1959. .. rst-class:: classref-item-separator
  1960. ----
  1961. .. _class_DisplayServer_method_window_get_vsync_mode:
  1962. .. rst-class:: classref-method
  1963. :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` **window_get_vsync_mode** **(** :ref:`int<class_int>` window_id=0 **)** |const|
  1964. Returns the V-Sync mode of the given window.
  1965. .. rst-class:: classref-item-separator
  1966. ----
  1967. .. _class_DisplayServer_method_window_is_focused:
  1968. .. rst-class:: classref-method
  1969. :ref:`bool<class_bool>` **window_is_focused** **(** :ref:`int<class_int>` window_id=0 **)** |const|
  1970. Returns ``true`` if the window specified by ``window_id`` is focused.
  1971. .. rst-class:: classref-item-separator
  1972. ----
  1973. .. _class_DisplayServer_method_window_is_maximize_allowed:
  1974. .. rst-class:: classref-method
  1975. :ref:`bool<class_bool>` **window_is_maximize_allowed** **(** :ref:`int<class_int>` window_id=0 **)** |const|
  1976. Returns ``true`` if the given window can be maximized (the maximize button is enabled).
  1977. .. rst-class:: classref-item-separator
  1978. ----
  1979. .. _class_DisplayServer_method_window_maximize_on_title_dbl_click:
  1980. .. rst-class:: classref-method
  1981. :ref:`bool<class_bool>` **window_maximize_on_title_dbl_click** **(** **)** |const|
  1982. Returns ``true``, if double-click on a window title should maximize it.
  1983. \ **Note:** This method is implemented only on macOS.
  1984. .. rst-class:: classref-item-separator
  1985. ----
  1986. .. _class_DisplayServer_method_window_minimize_on_title_dbl_click:
  1987. .. rst-class:: classref-method
  1988. :ref:`bool<class_bool>` **window_minimize_on_title_dbl_click** **(** **)** |const|
  1989. Returns ``true``, if double-click on a window title should minimize it.
  1990. \ **Note:** This method is implemented only on macOS.
  1991. .. rst-class:: classref-item-separator
  1992. ----
  1993. .. _class_DisplayServer_method_window_move_to_foreground:
  1994. .. rst-class:: classref-method
  1995. void **window_move_to_foreground** **(** :ref:`int<class_int>` window_id=0 **)**
  1996. Moves the window specified by ``window_id`` to the foreground, so that it is visible over other windows.
  1997. .. rst-class:: classref-item-separator
  1998. ----
  1999. .. _class_DisplayServer_method_window_request_attention:
  2000. .. rst-class:: classref-method
  2001. void **window_request_attention** **(** :ref:`int<class_int>` window_id=0 **)**
  2002. Makes the window specified by ``window_id`` request attention, which is materialized by the window title and taskbar entry blinking until the window is focused. This usually has no visible effect if the window is currently focused. The exact behavior varies depending on the operating system.
  2003. .. rst-class:: classref-item-separator
  2004. ----
  2005. .. _class_DisplayServer_method_window_set_current_screen:
  2006. .. rst-class:: classref-method
  2007. void **window_set_current_screen** **(** :ref:`int<class_int>` screen, :ref:`int<class_int>` window_id=0 **)**
  2008. Moves the window specified by ``window_id`` to the specified ``screen``. See also :ref:`window_get_current_screen<class_DisplayServer_method_window_get_current_screen>`.
  2009. .. rst-class:: classref-item-separator
  2010. ----
  2011. .. _class_DisplayServer_method_window_set_drop_files_callback:
  2012. .. rst-class:: classref-method
  2013. void **window_set_drop_files_callback** **(** :ref:`Callable<class_Callable>` callback, :ref:`int<class_int>` window_id=0 **)**
  2014. Sets the ``callback`` that should be called when files are dropped from the operating system's file manager to the window specified by ``window_id``.
  2015. \ **Warning:** Advanced users only! Adding such a callback to a :ref:`Window<class_Window>` node will override its default implementation, which can introduce bugs.
  2016. \ **Note:** This method is implemented on Windows, macOS, Linux (X11) and Web.
  2017. .. rst-class:: classref-item-separator
  2018. ----
  2019. .. _class_DisplayServer_method_window_set_exclusive:
  2020. .. rst-class:: classref-method
  2021. void **window_set_exclusive** **(** :ref:`int<class_int>` window_id, :ref:`bool<class_bool>` exclusive **)**
  2022. 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.
  2023. \ **Note:** On macOS, exclusive windows are confined to the same space (virtual desktop or screen) as the parent window.
  2024. \ **Note:** This method is implemented on macOS and Windows.
  2025. .. rst-class:: classref-item-separator
  2026. ----
  2027. .. _class_DisplayServer_method_window_set_flag:
  2028. .. rst-class:: classref-method
  2029. void **window_set_flag** **(** :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` flag, :ref:`bool<class_bool>` enabled, :ref:`int<class_int>` window_id=0 **)**
  2030. Enables or disables the given window's given ``flag``. See :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` for possible values and their behavior.
  2031. .. rst-class:: classref-item-separator
  2032. ----
  2033. .. _class_DisplayServer_method_window_set_ime_active:
  2034. .. rst-class:: classref-method
  2035. void **window_set_ime_active** **(** :ref:`bool<class_bool>` active, :ref:`int<class_int>` window_id=0 **)**
  2036. Sets whether `Input Method Editor <https://en.wikipedia.org/wiki/Input_method>`__ should be enabled for the window specified by ``window_id``. See also :ref:`window_set_ime_position<class_DisplayServer_method_window_set_ime_position>`.
  2037. .. rst-class:: classref-item-separator
  2038. ----
  2039. .. _class_DisplayServer_method_window_set_ime_position:
  2040. .. rst-class:: classref-method
  2041. void **window_set_ime_position** **(** :ref:`Vector2i<class_Vector2i>` position, :ref:`int<class_int>` window_id=0 **)**
  2042. Sets the position of the `Input Method Editor <https://en.wikipedia.org/wiki/Input_method>`__ popup for the specified ``window_id``. Only effective if :ref:`window_set_ime_active<class_DisplayServer_method_window_set_ime_active>` was set to ``true`` for the specified ``window_id``.
  2043. .. rst-class:: classref-item-separator
  2044. ----
  2045. .. _class_DisplayServer_method_window_set_input_event_callback:
  2046. .. rst-class:: classref-method
  2047. void **window_set_input_event_callback** **(** :ref:`Callable<class_Callable>` callback, :ref:`int<class_int>` window_id=0 **)**
  2048. Sets the ``callback`` that should be called when any :ref:`InputEvent<class_InputEvent>` is sent to the window specified by ``window_id``.
  2049. \ **Warning:** Advanced users only! Adding such a callback to a :ref:`Window<class_Window>` node will override its default implementation, which can introduce bugs.
  2050. .. rst-class:: classref-item-separator
  2051. ----
  2052. .. _class_DisplayServer_method_window_set_input_text_callback:
  2053. .. rst-class:: classref-method
  2054. void **window_set_input_text_callback** **(** :ref:`Callable<class_Callable>` callback, :ref:`int<class_int>` window_id=0 **)**
  2055. Sets the ``callback`` that should be called when text is entered using the virtual keyboard to the window specified by ``window_id``.
  2056. \ **Warning:** Advanced users only! Adding such a callback to a :ref:`Window<class_Window>` node will override its default implementation, which can introduce bugs.
  2057. .. rst-class:: classref-item-separator
  2058. ----
  2059. .. _class_DisplayServer_method_window_set_max_size:
  2060. .. rst-class:: classref-method
  2061. void **window_set_max_size** **(** :ref:`Vector2i<class_Vector2i>` max_size, :ref:`int<class_int>` window_id=0 **)**
  2062. Sets the maximum size of the window specified by ``window_id`` in pixels. Normally, the user will not be able to drag the window to make it smaller than the specified size. See also :ref:`window_get_max_size<class_DisplayServer_method_window_get_max_size>`.
  2063. \ **Note:** It's recommended to change this value using :ref:`Window.max_size<class_Window_property_max_size>` instead.
  2064. \ **Note:** Using third-party tools, it is possible for users to disable window geometry restrictions and therefore bypass this limit.
  2065. .. rst-class:: classref-item-separator
  2066. ----
  2067. .. _class_DisplayServer_method_window_set_min_size:
  2068. .. rst-class:: classref-method
  2069. void **window_set_min_size** **(** :ref:`Vector2i<class_Vector2i>` min_size, :ref:`int<class_int>` window_id=0 **)**
  2070. Sets the minimum size for the given window to ``min_size`` (in pixels). Normally, the user will not be able to drag the window to make it larger than the specified size. See also :ref:`window_get_min_size<class_DisplayServer_method_window_get_min_size>`.
  2071. \ **Note:** It's recommended to change this value using :ref:`Window.min_size<class_Window_property_min_size>` instead.
  2072. \ **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.
  2073. \ **Note:** Using third-party tools, it is possible for users to disable window geometry restrictions and therefore bypass this limit.
  2074. .. rst-class:: classref-item-separator
  2075. ----
  2076. .. _class_DisplayServer_method_window_set_mode:
  2077. .. rst-class:: classref-method
  2078. void **window_set_mode** **(** :ref:`WindowMode<enum_DisplayServer_WindowMode>` mode, :ref:`int<class_int>` window_id=0 **)**
  2079. Sets window mode for the given window to ``mode``. See :ref:`WindowMode<enum_DisplayServer_WindowMode>` for possible values and how each mode behaves.
  2080. \ **Note:** Setting the window to full screen forcibly sets the borderless flag to ``true``, so make sure to set it back to ``false`` when not wanted.
  2081. .. rst-class:: classref-item-separator
  2082. ----
  2083. .. _class_DisplayServer_method_window_set_mouse_passthrough:
  2084. .. rst-class:: classref-method
  2085. void **window_set_mouse_passthrough** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` region, :ref:`int<class_int>` window_id=0 **)**
  2086. Sets a polygonal region of the window which accepts mouse events. Mouse events outside the region will be passed through.
  2087. Passing an empty array will disable passthrough support (all mouse events will be intercepted by the window, which is the default behavior).
  2088. .. tabs::
  2089. .. code-tab:: gdscript
  2090. # Set region, using Path2D node.
  2091. DisplayServer.window_set_mouse_passthrough($Path2D.curve.get_baked_points())
  2092. # Set region, using Polygon2D node.
  2093. DisplayServer.window_set_mouse_passthrough($Polygon2D.polygon)
  2094. # Reset region to default.
  2095. DisplayServer.window_set_mouse_passthrough([])
  2096. .. code-tab:: csharp
  2097. // Set region, using Path2D node.
  2098. DisplayServer.WindowSetMousePassthrough(GetNode<Path2D>("Path2D").Curve.GetBakedPoints());
  2099. // Set region, using Polygon2D node.
  2100. DisplayServer.WindowSetMousePassthrough(GetNode<Polygon2D>("Polygon2D").Polygon);
  2101. // Reset region to default.
  2102. DisplayServer.WindowSetMousePassthrough(new Vector2[] {});
  2103. \ **Note:** On Windows, the portion of a window that lies outside the region is not drawn, while on Linux (X11) and macOS it is.
  2104. \ **Note:** This method is implemented on Linux (X11), macOS and Windows.
  2105. .. rst-class:: classref-item-separator
  2106. ----
  2107. .. _class_DisplayServer_method_window_set_popup_safe_rect:
  2108. .. rst-class:: classref-method
  2109. void **window_set_popup_safe_rect** **(** :ref:`int<class_int>` window, :ref:`Rect2i<class_Rect2i>` rect **)**
  2110. 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.
  2111. .. rst-class:: classref-item-separator
  2112. ----
  2113. .. _class_DisplayServer_method_window_set_position:
  2114. .. rst-class:: classref-method
  2115. void **window_set_position** **(** :ref:`Vector2i<class_Vector2i>` position, :ref:`int<class_int>` window_id=0 **)**
  2116. Sets the position of the given window to ``position``. On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin may be located outside any display like this:
  2117. ::
  2118. * (0, 0) +-------+
  2119. | |
  2120. +-------------+ | |
  2121. | | | |
  2122. | | | |
  2123. +-------------+ +-------+
  2124. See also :ref:`window_get_position<class_DisplayServer_method_window_get_position>` and :ref:`window_set_size<class_DisplayServer_method_window_set_size>`.
  2125. \ **Note:** It's recommended to change this value using :ref:`Window.position<class_Window_property_position>` instead.
  2126. .. rst-class:: classref-item-separator
  2127. ----
  2128. .. _class_DisplayServer_method_window_set_rect_changed_callback:
  2129. .. rst-class:: classref-method
  2130. void **window_set_rect_changed_callback** **(** :ref:`Callable<class_Callable>` callback, :ref:`int<class_int>` window_id=0 **)**
  2131. Sets the ``callback`` that will be called when the window specified by ``window_id`` is moved or resized.
  2132. \ **Warning:** Advanced users only! Adding such a callback to a :ref:`Window<class_Window>` node will override its default implementation, which can introduce bugs.
  2133. .. rst-class:: classref-item-separator
  2134. ----
  2135. .. _class_DisplayServer_method_window_set_size:
  2136. .. rst-class:: classref-method
  2137. void **window_set_size** **(** :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` window_id=0 **)**
  2138. Sets the size of the given window to ``size`` (in pixels). See also :ref:`window_get_size<class_DisplayServer_method_window_get_size>` and :ref:`window_get_position<class_DisplayServer_method_window_get_position>`.
  2139. \ **Note:** It's recommended to change this value using :ref:`Window.size<class_Window_property_size>` instead.
  2140. .. rst-class:: classref-item-separator
  2141. ----
  2142. .. _class_DisplayServer_method_window_set_title:
  2143. .. rst-class:: classref-method
  2144. void **window_set_title** **(** :ref:`String<class_String>` title, :ref:`int<class_int>` window_id=0 **)**
  2145. Sets the title of the given window to ``title``.
  2146. \ **Note:** It's recommended to change this value using :ref:`Window.title<class_Window_property_title>` instead.
  2147. \ **Note:** Avoid changing the window title every frame, as this can cause performance issues on certain window managers. Try to change the window title only a few times per second at most.
  2148. .. rst-class:: classref-item-separator
  2149. ----
  2150. .. _class_DisplayServer_method_window_set_transient:
  2151. .. rst-class:: classref-method
  2152. void **window_set_transient** **(** :ref:`int<class_int>` window_id, :ref:`int<class_int>` parent_window_id **)**
  2153. Sets window transient parent. Transient window is will be destroyed with its transient parent and will return focus to their parent when closed. The transient window is displayed on top of a non-exclusive full-screen parent window. Transient windows can't enter full-screen mode.
  2154. \ **Note:** It's recommended to change this value using :ref:`Window.transient<class_Window_property_transient>` instead.
  2155. \ **Note:** The behavior might be different depending on the platform.
  2156. .. rst-class:: classref-item-separator
  2157. ----
  2158. .. _class_DisplayServer_method_window_set_vsync_mode:
  2159. .. rst-class:: classref-method
  2160. void **window_set_vsync_mode** **(** :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` vsync_mode, :ref:`int<class_int>` window_id=0 **)**
  2161. Sets the V-Sync mode of the given window. See also :ref:`ProjectSettings.display/window/vsync/vsync_mode<class_ProjectSettings_property_display/window/vsync/vsync_mode>`.
  2162. See :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` for possible values and how they affect the behavior of your application.
  2163. 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.
  2164. \ **Note:** V-Sync modes other than :ref:`VSYNC_ENABLED<class_DisplayServer_constant_VSYNC_ENABLED>` are only supported in the Forward+ and Mobile rendering methods, not Compatibility.
  2165. .. rst-class:: classref-item-separator
  2166. ----
  2167. .. _class_DisplayServer_method_window_set_window_buttons_offset:
  2168. .. rst-class:: classref-method
  2169. void **window_set_window_buttons_offset** **(** :ref:`Vector2i<class_Vector2i>` offset, :ref:`int<class_int>` window_id=0 **)**
  2170. When :ref:`WINDOW_FLAG_EXTEND_TO_TITLE<class_DisplayServer_constant_WINDOW_FLAG_EXTEND_TO_TITLE>` flag is set, set offset to the center of the first titlebar button.
  2171. \ **Note:** This flag is implemented only on macOS.
  2172. .. rst-class:: classref-item-separator
  2173. ----
  2174. .. _class_DisplayServer_method_window_set_window_event_callback:
  2175. .. rst-class:: classref-method
  2176. void **window_set_window_event_callback** **(** :ref:`Callable<class_Callable>` callback, :ref:`int<class_int>` window_id=0 **)**
  2177. Sets the ``callback`` that will be called when an event occurs in the window specified by ``window_id``.
  2178. \ **Warning:** Advanced users only! Adding such a callback to a :ref:`Window<class_Window>` node will override its default implementation, which can introduce bugs.
  2179. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  2180. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  2181. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  2182. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  2183. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  2184. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  2185. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`