class_displayserver.rst 391 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459
  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.3/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/4.3/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>`\ (\ clipboard\: :ref:`String<class_String>`\ ) |
  33. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | |void| | :ref:`clipboard_set_primary<class_DisplayServer_method_clipboard_set_primary>`\ (\ clipboard_primary\: :ref:`String<class_String>`\ ) |
  35. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | :ref:`int<class_int>` | :ref:`create_status_indicator<class_DisplayServer_method_create_status_indicator>`\ (\ icon\: :ref:`Texture2D<class_Texture2D>`, tooltip\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>`\ ) |
  37. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | :ref:`CursorShape<enum_DisplayServer_CursorShape>` | :ref:`cursor_get_shape<class_DisplayServer_method_cursor_get_shape>`\ (\ ) |const| |
  39. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | |void| | :ref:`cursor_set_custom_image<class_DisplayServer_method_cursor_set_custom_image>`\ (\ cursor\: :ref:`Resource<class_Resource>`, shape\: :ref:`CursorShape<enum_DisplayServer_CursorShape>` = 0, hotspot\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) |
  41. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | |void| | :ref:`cursor_set_shape<class_DisplayServer_method_cursor_set_shape>`\ (\ shape\: :ref:`CursorShape<enum_DisplayServer_CursorShape>`\ ) |
  43. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | |void| | :ref:`delete_status_indicator<class_DisplayServer_method_delete_status_indicator>`\ (\ id\: :ref:`int<class_int>`\ ) |
  45. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`dialog_input_text<class_DisplayServer_method_dialog_input_text>`\ (\ title\: :ref:`String<class_String>`, description\: :ref:`String<class_String>`, existing_text\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>`\ ) |
  47. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`dialog_show<class_DisplayServer_method_dialog_show>`\ (\ title\: :ref:`String<class_String>`, description\: :ref:`String<class_String>`, buttons\: :ref:`PackedStringArray<class_PackedStringArray>`, callback\: :ref:`Callable<class_Callable>`\ ) |
  49. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | |void| | :ref:`enable_for_stealing_focus<class_DisplayServer_method_enable_for_stealing_focus>`\ (\ process_id\: :ref:`int<class_int>`\ ) |
  51. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`file_dialog_show<class_DisplayServer_method_file_dialog_show>`\ (\ title\: :ref:`String<class_String>`, current_directory\: :ref:`String<class_String>`, filename\: :ref:`String<class_String>`, show_hidden\: :ref:`bool<class_bool>`, mode\: :ref:`FileDialogMode<enum_DisplayServer_FileDialogMode>`, filters\: :ref:`PackedStringArray<class_PackedStringArray>`, callback\: :ref:`Callable<class_Callable>`\ ) |
  53. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`file_dialog_with_options_show<class_DisplayServer_method_file_dialog_with_options_show>`\ (\ title\: :ref:`String<class_String>`, current_directory\: :ref:`String<class_String>`, root\: :ref:`String<class_String>`, filename\: :ref:`String<class_String>`, show_hidden\: :ref:`bool<class_bool>`, mode\: :ref:`FileDialogMode<enum_DisplayServer_FileDialogMode>`, filters\: :ref:`PackedStringArray<class_PackedStringArray>`, options\: :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\], callback\: :ref:`Callable<class_Callable>`\ ) |
  55. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | |void| | :ref:`force_process_and_drop_events<class_DisplayServer_method_force_process_and_drop_events>`\ (\ ) |
  57. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | :ref:`Color<class_Color>` | :ref:`get_accent_color<class_DisplayServer_method_get_accent_color>`\ (\ ) |const| |
  59. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | :ref:`Color<class_Color>` | :ref:`get_base_color<class_DisplayServer_method_get_base_color>`\ (\ ) |const| |
  61. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | :ref:`Array<class_Array>`\[:ref:`Rect2<class_Rect2>`\] | :ref:`get_display_cutouts<class_DisplayServer_method_get_display_cutouts>`\ (\ ) |const| |
  63. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | :ref:`Rect2i<class_Rect2i>` | :ref:`get_display_safe_area<class_DisplayServer_method_get_display_safe_area>`\ (\ ) |const| |
  65. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | :ref:`int<class_int>` | :ref:`get_keyboard_focus_screen<class_DisplayServer_method_get_keyboard_focus_screen>`\ (\ ) |const| |
  67. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | :ref:`String<class_String>` | :ref:`get_name<class_DisplayServer_method_get_name>`\ (\ ) |const| |
  69. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | :ref:`int<class_int>` | :ref:`get_primary_screen<class_DisplayServer_method_get_primary_screen>`\ (\ ) |const| |
  71. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | :ref:`int<class_int>` | :ref:`get_screen_count<class_DisplayServer_method_get_screen_count>`\ (\ ) |const| |
  73. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | :ref:`int<class_int>` | :ref:`get_screen_from_rect<class_DisplayServer_method_get_screen_from_rect>`\ (\ rect\: :ref:`Rect2<class_Rect2>`\ ) |const| |
  75. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | :ref:`bool<class_bool>` | :ref:`get_swap_cancel_ok<class_DisplayServer_method_get_swap_cancel_ok>`\ (\ ) |
  77. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | :ref:`int<class_int>` | :ref:`get_window_at_screen_position<class_DisplayServer_method_get_window_at_screen_position>`\ (\ position\: :ref:`Vector2i<class_Vector2i>`\ ) |const| |
  79. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_window_list<class_DisplayServer_method_get_window_list>`\ (\ ) |const| |
  81. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | :ref:`int<class_int>` | :ref:`global_menu_add_check_item<class_DisplayServer_method_global_menu_add_check_item>`\ (\ menu_root\: :ref:`String<class_String>`, label\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) |
  83. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | :ref:`int<class_int>` | :ref:`global_menu_add_icon_check_item<class_DisplayServer_method_global_menu_add_icon_check_item>`\ (\ menu_root\: :ref:`String<class_String>`, icon\: :ref:`Texture2D<class_Texture2D>`, label\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) |
  85. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  86. | :ref:`int<class_int>` | :ref:`global_menu_add_icon_item<class_DisplayServer_method_global_menu_add_icon_item>`\ (\ menu_root\: :ref:`String<class_String>`, icon\: :ref:`Texture2D<class_Texture2D>`, label\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) |
  87. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  88. | :ref:`int<class_int>` | :ref:`global_menu_add_icon_radio_check_item<class_DisplayServer_method_global_menu_add_icon_radio_check_item>`\ (\ menu_root\: :ref:`String<class_String>`, icon\: :ref:`Texture2D<class_Texture2D>`, label\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) |
  89. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  90. | :ref:`int<class_int>` | :ref:`global_menu_add_item<class_DisplayServer_method_global_menu_add_item>`\ (\ menu_root\: :ref:`String<class_String>`, label\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) |
  91. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  92. | :ref:`int<class_int>` | :ref:`global_menu_add_multistate_item<class_DisplayServer_method_global_menu_add_multistate_item>`\ (\ menu_root\: :ref:`String<class_String>`, label\: :ref:`String<class_String>`, max_states\: :ref:`int<class_int>`, default_state\: :ref:`int<class_int>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) |
  93. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  94. | :ref:`int<class_int>` | :ref:`global_menu_add_radio_check_item<class_DisplayServer_method_global_menu_add_radio_check_item>`\ (\ menu_root\: :ref:`String<class_String>`, label\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) |
  95. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  96. | :ref:`int<class_int>` | :ref:`global_menu_add_separator<class_DisplayServer_method_global_menu_add_separator>`\ (\ menu_root\: :ref:`String<class_String>`, index\: :ref:`int<class_int>` = -1\ ) |
  97. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  98. | :ref:`int<class_int>` | :ref:`global_menu_add_submenu_item<class_DisplayServer_method_global_menu_add_submenu_item>`\ (\ menu_root\: :ref:`String<class_String>`, label\: :ref:`String<class_String>`, submenu\: :ref:`String<class_String>`, index\: :ref:`int<class_int>` = -1\ ) |
  99. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  100. | |void| | :ref:`global_menu_clear<class_DisplayServer_method_global_menu_clear>`\ (\ menu_root\: :ref:`String<class_String>`\ ) |
  101. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  102. | :ref:`Key<enum_@GlobalScope_Key>` | :ref:`global_menu_get_item_accelerator<class_DisplayServer_method_global_menu_get_item_accelerator>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| |
  103. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  104. | :ref:`Callable<class_Callable>` | :ref:`global_menu_get_item_callback<class_DisplayServer_method_global_menu_get_item_callback>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| |
  105. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  106. | :ref:`int<class_int>` | :ref:`global_menu_get_item_count<class_DisplayServer_method_global_menu_get_item_count>`\ (\ menu_root\: :ref:`String<class_String>`\ ) |const| |
  107. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  108. | :ref:`Texture2D<class_Texture2D>` | :ref:`global_menu_get_item_icon<class_DisplayServer_method_global_menu_get_item_icon>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| |
  109. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  110. | :ref:`int<class_int>` | :ref:`global_menu_get_item_indentation_level<class_DisplayServer_method_global_menu_get_item_indentation_level>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| |
  111. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  112. | :ref:`int<class_int>` | :ref:`global_menu_get_item_index_from_tag<class_DisplayServer_method_global_menu_get_item_index_from_tag>`\ (\ menu_root\: :ref:`String<class_String>`, tag\: :ref:`Variant<class_Variant>`\ ) |const| |
  113. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  114. | :ref:`int<class_int>` | :ref:`global_menu_get_item_index_from_text<class_DisplayServer_method_global_menu_get_item_index_from_text>`\ (\ menu_root\: :ref:`String<class_String>`, text\: :ref:`String<class_String>`\ ) |const| |
  115. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  116. | :ref:`Callable<class_Callable>` | :ref:`global_menu_get_item_key_callback<class_DisplayServer_method_global_menu_get_item_key_callback>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| |
  117. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  118. | :ref:`int<class_int>` | :ref:`global_menu_get_item_max_states<class_DisplayServer_method_global_menu_get_item_max_states>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| |
  119. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  120. | :ref:`int<class_int>` | :ref:`global_menu_get_item_state<class_DisplayServer_method_global_menu_get_item_state>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| |
  121. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  122. | :ref:`String<class_String>` | :ref:`global_menu_get_item_submenu<class_DisplayServer_method_global_menu_get_item_submenu>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| |
  123. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  124. | :ref:`Variant<class_Variant>` | :ref:`global_menu_get_item_tag<class_DisplayServer_method_global_menu_get_item_tag>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| |
  125. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  126. | :ref:`String<class_String>` | :ref:`global_menu_get_item_text<class_DisplayServer_method_global_menu_get_item_text>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| |
  127. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  128. | :ref:`String<class_String>` | :ref:`global_menu_get_item_tooltip<class_DisplayServer_method_global_menu_get_item_tooltip>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| |
  129. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  130. | :ref:`Dictionary<class_Dictionary>` | :ref:`global_menu_get_system_menu_roots<class_DisplayServer_method_global_menu_get_system_menu_roots>`\ (\ ) |const| |
  131. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  132. | :ref:`bool<class_bool>` | :ref:`global_menu_is_item_checkable<class_DisplayServer_method_global_menu_is_item_checkable>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| |
  133. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  134. | :ref:`bool<class_bool>` | :ref:`global_menu_is_item_checked<class_DisplayServer_method_global_menu_is_item_checked>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| |
  135. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  136. | :ref:`bool<class_bool>` | :ref:`global_menu_is_item_disabled<class_DisplayServer_method_global_menu_is_item_disabled>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| |
  137. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  138. | :ref:`bool<class_bool>` | :ref:`global_menu_is_item_hidden<class_DisplayServer_method_global_menu_is_item_hidden>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| |
  139. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  140. | :ref:`bool<class_bool>` | :ref:`global_menu_is_item_radio_checkable<class_DisplayServer_method_global_menu_is_item_radio_checkable>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| |
  141. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  142. | |void| | :ref:`global_menu_remove_item<class_DisplayServer_method_global_menu_remove_item>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |
  143. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  144. | |void| | :ref:`global_menu_set_item_accelerator<class_DisplayServer_method_global_menu_set_item_accelerator>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, keycode\: :ref:`Key<enum_@GlobalScope_Key>`\ ) |
  145. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  146. | |void| | :ref:`global_menu_set_item_callback<class_DisplayServer_method_global_menu_set_item_callback>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, callback\: :ref:`Callable<class_Callable>`\ ) |
  147. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  148. | |void| | :ref:`global_menu_set_item_checkable<class_DisplayServer_method_global_menu_set_item_checkable>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, checkable\: :ref:`bool<class_bool>`\ ) |
  149. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  150. | |void| | :ref:`global_menu_set_item_checked<class_DisplayServer_method_global_menu_set_item_checked>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, checked\: :ref:`bool<class_bool>`\ ) |
  151. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  152. | |void| | :ref:`global_menu_set_item_disabled<class_DisplayServer_method_global_menu_set_item_disabled>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) |
  153. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  154. | |void| | :ref:`global_menu_set_item_hidden<class_DisplayServer_method_global_menu_set_item_hidden>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, hidden\: :ref:`bool<class_bool>`\ ) |
  155. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  156. | |void| | :ref:`global_menu_set_item_hover_callbacks<class_DisplayServer_method_global_menu_set_item_hover_callbacks>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, callback\: :ref:`Callable<class_Callable>`\ ) |
  157. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  158. | |void| | :ref:`global_menu_set_item_icon<class_DisplayServer_method_global_menu_set_item_icon>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) |
  159. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  160. | |void| | :ref:`global_menu_set_item_indentation_level<class_DisplayServer_method_global_menu_set_item_indentation_level>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, level\: :ref:`int<class_int>`\ ) |
  161. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  162. | |void| | :ref:`global_menu_set_item_key_callback<class_DisplayServer_method_global_menu_set_item_key_callback>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, key_callback\: :ref:`Callable<class_Callable>`\ ) |
  163. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  164. | |void| | :ref:`global_menu_set_item_max_states<class_DisplayServer_method_global_menu_set_item_max_states>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, max_states\: :ref:`int<class_int>`\ ) |
  165. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  166. | |void| | :ref:`global_menu_set_item_radio_checkable<class_DisplayServer_method_global_menu_set_item_radio_checkable>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, checkable\: :ref:`bool<class_bool>`\ ) |
  167. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  168. | |void| | :ref:`global_menu_set_item_state<class_DisplayServer_method_global_menu_set_item_state>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, state\: :ref:`int<class_int>`\ ) |
  169. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  170. | |void| | :ref:`global_menu_set_item_submenu<class_DisplayServer_method_global_menu_set_item_submenu>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, submenu\: :ref:`String<class_String>`\ ) |
  171. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  172. | |void| | :ref:`global_menu_set_item_tag<class_DisplayServer_method_global_menu_set_item_tag>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, tag\: :ref:`Variant<class_Variant>`\ ) |
  173. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  174. | |void| | :ref:`global_menu_set_item_text<class_DisplayServer_method_global_menu_set_item_text>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) |
  175. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  176. | |void| | :ref:`global_menu_set_item_tooltip<class_DisplayServer_method_global_menu_set_item_tooltip>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) |
  177. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  178. | |void| | :ref:`global_menu_set_popup_callbacks<class_DisplayServer_method_global_menu_set_popup_callbacks>`\ (\ menu_root\: :ref:`String<class_String>`, open_callback\: :ref:`Callable<class_Callable>`, close_callback\: :ref:`Callable<class_Callable>`\ ) |
  179. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  180. | :ref:`bool<class_bool>` | :ref:`has_additional_outputs<class_DisplayServer_method_has_additional_outputs>`\ (\ ) |const| |
  181. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  182. | :ref:`bool<class_bool>` | :ref:`has_feature<class_DisplayServer_method_has_feature>`\ (\ feature\: :ref:`Feature<enum_DisplayServer_Feature>`\ ) |const| |
  183. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  184. | |void| | :ref:`help_set_search_callbacks<class_DisplayServer_method_help_set_search_callbacks>`\ (\ search_callback\: :ref:`Callable<class_Callable>`, action_callback\: :ref:`Callable<class_Callable>`\ ) |
  185. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  186. | :ref:`Vector2i<class_Vector2i>` | :ref:`ime_get_selection<class_DisplayServer_method_ime_get_selection>`\ (\ ) |const| |
  187. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  188. | :ref:`String<class_String>` | :ref:`ime_get_text<class_DisplayServer_method_ime_get_text>`\ (\ ) |const| |
  189. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  190. | :ref:`bool<class_bool>` | :ref:`is_dark_mode<class_DisplayServer_method_is_dark_mode>`\ (\ ) |const| |
  191. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  192. | :ref:`bool<class_bool>` | :ref:`is_dark_mode_supported<class_DisplayServer_method_is_dark_mode_supported>`\ (\ ) |const| |
  193. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  194. | :ref:`bool<class_bool>` | :ref:`is_touchscreen_available<class_DisplayServer_method_is_touchscreen_available>`\ (\ ) |const| |
  195. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  196. | :ref:`bool<class_bool>` | :ref:`is_window_transparency_available<class_DisplayServer_method_is_window_transparency_available>`\ (\ ) |const| |
  197. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  198. | :ref:`int<class_int>` | :ref:`keyboard_get_current_layout<class_DisplayServer_method_keyboard_get_current_layout>`\ (\ ) |const| |
  199. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  200. | :ref:`Key<enum_@GlobalScope_Key>` | :ref:`keyboard_get_keycode_from_physical<class_DisplayServer_method_keyboard_get_keycode_from_physical>`\ (\ keycode\: :ref:`Key<enum_@GlobalScope_Key>`\ ) |const| |
  201. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  202. | :ref:`Key<enum_@GlobalScope_Key>` | :ref:`keyboard_get_label_from_physical<class_DisplayServer_method_keyboard_get_label_from_physical>`\ (\ keycode\: :ref:`Key<enum_@GlobalScope_Key>`\ ) |const| |
  203. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  204. | :ref:`int<class_int>` | :ref:`keyboard_get_layout_count<class_DisplayServer_method_keyboard_get_layout_count>`\ (\ ) |const| |
  205. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  206. | :ref:`String<class_String>` | :ref:`keyboard_get_layout_language<class_DisplayServer_method_keyboard_get_layout_language>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
  207. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  208. | :ref:`String<class_String>` | :ref:`keyboard_get_layout_name<class_DisplayServer_method_keyboard_get_layout_name>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
  209. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  210. | |void| | :ref:`keyboard_set_current_layout<class_DisplayServer_method_keyboard_set_current_layout>`\ (\ index\: :ref:`int<class_int>`\ ) |
  211. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  212. | |bitfield|\[:ref:`MouseButtonMask<enum_@GlobalScope_MouseButtonMask>`\] | :ref:`mouse_get_button_state<class_DisplayServer_method_mouse_get_button_state>`\ (\ ) |const| |
  213. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  214. | :ref:`MouseMode<enum_DisplayServer_MouseMode>` | :ref:`mouse_get_mode<class_DisplayServer_method_mouse_get_mode>`\ (\ ) |const| |
  215. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  216. | :ref:`Vector2i<class_Vector2i>` | :ref:`mouse_get_position<class_DisplayServer_method_mouse_get_position>`\ (\ ) |const| |
  217. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  218. | |void| | :ref:`mouse_set_mode<class_DisplayServer_method_mouse_set_mode>`\ (\ mouse_mode\: :ref:`MouseMode<enum_DisplayServer_MouseMode>`\ ) |
  219. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  220. | |void| | :ref:`process_events<class_DisplayServer_method_process_events>`\ (\ ) |
  221. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  222. | |void| | :ref:`register_additional_output<class_DisplayServer_method_register_additional_output>`\ (\ object\: :ref:`Object<class_Object>`\ ) |
  223. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  224. | :ref:`int<class_int>` | :ref:`screen_get_dpi<class_DisplayServer_method_screen_get_dpi>`\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| |
  225. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  226. | :ref:`Image<class_Image>` | :ref:`screen_get_image<class_DisplayServer_method_screen_get_image>`\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| |
  227. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  228. | :ref:`float<class_float>` | :ref:`screen_get_max_scale<class_DisplayServer_method_screen_get_max_scale>`\ (\ ) |const| |
  229. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  230. | :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` | :ref:`screen_get_orientation<class_DisplayServer_method_screen_get_orientation>`\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| |
  231. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  232. | :ref:`Color<class_Color>` | :ref:`screen_get_pixel<class_DisplayServer_method_screen_get_pixel>`\ (\ position\: :ref:`Vector2i<class_Vector2i>`\ ) |const| |
  233. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  234. | :ref:`Vector2i<class_Vector2i>` | :ref:`screen_get_position<class_DisplayServer_method_screen_get_position>`\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| |
  235. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  236. | :ref:`float<class_float>` | :ref:`screen_get_refresh_rate<class_DisplayServer_method_screen_get_refresh_rate>`\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| |
  237. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  238. | :ref:`float<class_float>` | :ref:`screen_get_scale<class_DisplayServer_method_screen_get_scale>`\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| |
  239. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  240. | :ref:`Vector2i<class_Vector2i>` | :ref:`screen_get_size<class_DisplayServer_method_screen_get_size>`\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| |
  241. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  242. | :ref:`Rect2i<class_Rect2i>` | :ref:`screen_get_usable_rect<class_DisplayServer_method_screen_get_usable_rect>`\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| |
  243. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  244. | :ref:`bool<class_bool>` | :ref:`screen_is_kept_on<class_DisplayServer_method_screen_is_kept_on>`\ (\ ) |const| |
  245. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  246. | |void| | :ref:`screen_set_keep_on<class_DisplayServer_method_screen_set_keep_on>`\ (\ enable\: :ref:`bool<class_bool>`\ ) |
  247. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  248. | |void| | :ref:`screen_set_orientation<class_DisplayServer_method_screen_set_orientation>`\ (\ orientation\: :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>`, screen\: :ref:`int<class_int>` = -1\ ) |
  249. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  250. | |void| | :ref:`set_icon<class_DisplayServer_method_set_icon>`\ (\ image\: :ref:`Image<class_Image>`\ ) |
  251. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  252. | |void| | :ref:`set_native_icon<class_DisplayServer_method_set_native_icon>`\ (\ filename\: :ref:`String<class_String>`\ ) |
  253. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  254. | |void| | :ref:`set_system_theme_change_callback<class_DisplayServer_method_set_system_theme_change_callback>`\ (\ callable\: :ref:`Callable<class_Callable>`\ ) |
  255. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  256. | :ref:`Rect2<class_Rect2>` | :ref:`status_indicator_get_rect<class_DisplayServer_method_status_indicator_get_rect>`\ (\ id\: :ref:`int<class_int>`\ ) |const| |
  257. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  258. | |void| | :ref:`status_indicator_set_callback<class_DisplayServer_method_status_indicator_set_callback>`\ (\ id\: :ref:`int<class_int>`, callback\: :ref:`Callable<class_Callable>`\ ) |
  259. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  260. | |void| | :ref:`status_indicator_set_icon<class_DisplayServer_method_status_indicator_set_icon>`\ (\ id\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) |
  261. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  262. | |void| | :ref:`status_indicator_set_menu<class_DisplayServer_method_status_indicator_set_menu>`\ (\ id\: :ref:`int<class_int>`, menu_rid\: :ref:`RID<class_RID>`\ ) |
  263. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  264. | |void| | :ref:`status_indicator_set_tooltip<class_DisplayServer_method_status_indicator_set_tooltip>`\ (\ id\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) |
  265. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  266. | :ref:`String<class_String>` | :ref:`tablet_get_current_driver<class_DisplayServer_method_tablet_get_current_driver>`\ (\ ) |const| |
  267. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  268. | :ref:`int<class_int>` | :ref:`tablet_get_driver_count<class_DisplayServer_method_tablet_get_driver_count>`\ (\ ) |const| |
  269. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  270. | :ref:`String<class_String>` | :ref:`tablet_get_driver_name<class_DisplayServer_method_tablet_get_driver_name>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  271. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  272. | |void| | :ref:`tablet_set_current_driver<class_DisplayServer_method_tablet_set_current_driver>`\ (\ name\: :ref:`String<class_String>`\ ) |
  273. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  274. | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`tts_get_voices<class_DisplayServer_method_tts_get_voices>`\ (\ ) |const| |
  275. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  276. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`tts_get_voices_for_language<class_DisplayServer_method_tts_get_voices_for_language>`\ (\ language\: :ref:`String<class_String>`\ ) |const| |
  277. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  278. | :ref:`bool<class_bool>` | :ref:`tts_is_paused<class_DisplayServer_method_tts_is_paused>`\ (\ ) |const| |
  279. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  280. | :ref:`bool<class_bool>` | :ref:`tts_is_speaking<class_DisplayServer_method_tts_is_speaking>`\ (\ ) |const| |
  281. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  282. | |void| | :ref:`tts_pause<class_DisplayServer_method_tts_pause>`\ (\ ) |
  283. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  284. | |void| | :ref:`tts_resume<class_DisplayServer_method_tts_resume>`\ (\ ) |
  285. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  286. | |void| | :ref:`tts_set_utterance_callback<class_DisplayServer_method_tts_set_utterance_callback>`\ (\ event\: :ref:`TTSUtteranceEvent<enum_DisplayServer_TTSUtteranceEvent>`, callable\: :ref:`Callable<class_Callable>`\ ) |
  287. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  288. | |void| | :ref:`tts_speak<class_DisplayServer_method_tts_speak>`\ (\ text\: :ref:`String<class_String>`, voice\: :ref:`String<class_String>`, volume\: :ref:`int<class_int>` = 50, pitch\: :ref:`float<class_float>` = 1.0, rate\: :ref:`float<class_float>` = 1.0, utterance_id\: :ref:`int<class_int>` = 0, interrupt\: :ref:`bool<class_bool>` = false\ ) |
  289. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  290. | |void| | :ref:`tts_stop<class_DisplayServer_method_tts_stop>`\ (\ ) |
  291. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  292. | |void| | :ref:`unregister_additional_output<class_DisplayServer_method_unregister_additional_output>`\ (\ object\: :ref:`Object<class_Object>`\ ) |
  293. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  294. | :ref:`int<class_int>` | :ref:`virtual_keyboard_get_height<class_DisplayServer_method_virtual_keyboard_get_height>`\ (\ ) |const| |
  295. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  296. | |void| | :ref:`virtual_keyboard_hide<class_DisplayServer_method_virtual_keyboard_hide>`\ (\ ) |
  297. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  298. | |void| | :ref:`virtual_keyboard_show<class_DisplayServer_method_virtual_keyboard_show>`\ (\ existing_text\: :ref:`String<class_String>`, position\: :ref:`Rect2<class_Rect2>` = Rect2(0, 0, 0, 0), type\: :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` = 0, max_length\: :ref:`int<class_int>` = -1, cursor_start\: :ref:`int<class_int>` = -1, cursor_end\: :ref:`int<class_int>` = -1\ ) |
  299. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  300. | |void| | :ref:`warp_mouse<class_DisplayServer_method_warp_mouse>`\ (\ position\: :ref:`Vector2i<class_Vector2i>`\ ) |
  301. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  302. | :ref:`bool<class_bool>` | :ref:`window_can_draw<class_DisplayServer_method_window_can_draw>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  303. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  304. | :ref:`int<class_int>` | :ref:`window_get_active_popup<class_DisplayServer_method_window_get_active_popup>`\ (\ ) |const| |
  305. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  306. | :ref:`int<class_int>` | :ref:`window_get_attached_instance_id<class_DisplayServer_method_window_get_attached_instance_id>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  307. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  308. | :ref:`int<class_int>` | :ref:`window_get_current_screen<class_DisplayServer_method_window_get_current_screen>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  309. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  310. | :ref:`bool<class_bool>` | :ref:`window_get_flag<class_DisplayServer_method_window_get_flag>`\ (\ flag\: :ref:`WindowFlags<enum_DisplayServer_WindowFlags>`, window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  311. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  312. | :ref:`Vector2i<class_Vector2i>` | :ref:`window_get_max_size<class_DisplayServer_method_window_get_max_size>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  313. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  314. | :ref:`Vector2i<class_Vector2i>` | :ref:`window_get_min_size<class_DisplayServer_method_window_get_min_size>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  315. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  316. | :ref:`WindowMode<enum_DisplayServer_WindowMode>` | :ref:`window_get_mode<class_DisplayServer_method_window_get_mode>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  317. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  318. | :ref:`int<class_int>` | :ref:`window_get_native_handle<class_DisplayServer_method_window_get_native_handle>`\ (\ handle_type\: :ref:`HandleType<enum_DisplayServer_HandleType>`, window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  319. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  320. | :ref:`Rect2i<class_Rect2i>` | :ref:`window_get_popup_safe_rect<class_DisplayServer_method_window_get_popup_safe_rect>`\ (\ window\: :ref:`int<class_int>`\ ) |const| |
  321. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  322. | :ref:`Vector2i<class_Vector2i>` | :ref:`window_get_position<class_DisplayServer_method_window_get_position>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  323. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  324. | :ref:`Vector2i<class_Vector2i>` | :ref:`window_get_position_with_decorations<class_DisplayServer_method_window_get_position_with_decorations>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  325. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  326. | :ref:`Vector3i<class_Vector3i>` | :ref:`window_get_safe_title_margins<class_DisplayServer_method_window_get_safe_title_margins>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  327. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  328. | :ref:`Vector2i<class_Vector2i>` | :ref:`window_get_size<class_DisplayServer_method_window_get_size>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  329. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  330. | :ref:`Vector2i<class_Vector2i>` | :ref:`window_get_size_with_decorations<class_DisplayServer_method_window_get_size_with_decorations>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  331. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  332. | :ref:`Vector2i<class_Vector2i>` | :ref:`window_get_title_size<class_DisplayServer_method_window_get_title_size>`\ (\ title\: :ref:`String<class_String>`, window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  333. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  334. | :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` | :ref:`window_get_vsync_mode<class_DisplayServer_method_window_get_vsync_mode>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  335. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  336. | :ref:`bool<class_bool>` | :ref:`window_is_focused<class_DisplayServer_method_window_is_focused>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  337. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  338. | :ref:`bool<class_bool>` | :ref:`window_is_maximize_allowed<class_DisplayServer_method_window_is_maximize_allowed>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  339. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  340. | :ref:`bool<class_bool>` | :ref:`window_maximize_on_title_dbl_click<class_DisplayServer_method_window_maximize_on_title_dbl_click>`\ (\ ) |const| |
  341. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  342. | :ref:`bool<class_bool>` | :ref:`window_minimize_on_title_dbl_click<class_DisplayServer_method_window_minimize_on_title_dbl_click>`\ (\ ) |const| |
  343. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  344. | |void| | :ref:`window_move_to_foreground<class_DisplayServer_method_window_move_to_foreground>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |
  345. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  346. | |void| | :ref:`window_request_attention<class_DisplayServer_method_window_request_attention>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |
  347. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  348. | |void| | :ref:`window_set_current_screen<class_DisplayServer_method_window_set_current_screen>`\ (\ screen\: :ref:`int<class_int>`, window_id\: :ref:`int<class_int>` = 0\ ) |
  349. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  350. | |void| | :ref:`window_set_drop_files_callback<class_DisplayServer_method_window_set_drop_files_callback>`\ (\ callback\: :ref:`Callable<class_Callable>`, window_id\: :ref:`int<class_int>` = 0\ ) |
  351. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  352. | |void| | :ref:`window_set_exclusive<class_DisplayServer_method_window_set_exclusive>`\ (\ window_id\: :ref:`int<class_int>`, exclusive\: :ref:`bool<class_bool>`\ ) |
  353. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  354. | |void| | :ref:`window_set_flag<class_DisplayServer_method_window_set_flag>`\ (\ flag\: :ref:`WindowFlags<enum_DisplayServer_WindowFlags>`, enabled\: :ref:`bool<class_bool>`, window_id\: :ref:`int<class_int>` = 0\ ) |
  355. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  356. | |void| | :ref:`window_set_ime_active<class_DisplayServer_method_window_set_ime_active>`\ (\ active\: :ref:`bool<class_bool>`, window_id\: :ref:`int<class_int>` = 0\ ) |
  357. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  358. | |void| | :ref:`window_set_ime_position<class_DisplayServer_method_window_set_ime_position>`\ (\ position\: :ref:`Vector2i<class_Vector2i>`, window_id\: :ref:`int<class_int>` = 0\ ) |
  359. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  360. | |void| | :ref:`window_set_input_event_callback<class_DisplayServer_method_window_set_input_event_callback>`\ (\ callback\: :ref:`Callable<class_Callable>`, window_id\: :ref:`int<class_int>` = 0\ ) |
  361. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  362. | |void| | :ref:`window_set_input_text_callback<class_DisplayServer_method_window_set_input_text_callback>`\ (\ callback\: :ref:`Callable<class_Callable>`, window_id\: :ref:`int<class_int>` = 0\ ) |
  363. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  364. | |void| | :ref:`window_set_max_size<class_DisplayServer_method_window_set_max_size>`\ (\ max_size\: :ref:`Vector2i<class_Vector2i>`, window_id\: :ref:`int<class_int>` = 0\ ) |
  365. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  366. | |void| | :ref:`window_set_min_size<class_DisplayServer_method_window_set_min_size>`\ (\ min_size\: :ref:`Vector2i<class_Vector2i>`, window_id\: :ref:`int<class_int>` = 0\ ) |
  367. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  368. | |void| | :ref:`window_set_mode<class_DisplayServer_method_window_set_mode>`\ (\ mode\: :ref:`WindowMode<enum_DisplayServer_WindowMode>`, window_id\: :ref:`int<class_int>` = 0\ ) |
  369. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  370. | |void| | :ref:`window_set_mouse_passthrough<class_DisplayServer_method_window_set_mouse_passthrough>`\ (\ region\: :ref:`PackedVector2Array<class_PackedVector2Array>`, window_id\: :ref:`int<class_int>` = 0\ ) |
  371. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  372. | |void| | :ref:`window_set_popup_safe_rect<class_DisplayServer_method_window_set_popup_safe_rect>`\ (\ window\: :ref:`int<class_int>`, rect\: :ref:`Rect2i<class_Rect2i>`\ ) |
  373. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  374. | |void| | :ref:`window_set_position<class_DisplayServer_method_window_set_position>`\ (\ position\: :ref:`Vector2i<class_Vector2i>`, window_id\: :ref:`int<class_int>` = 0\ ) |
  375. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  376. | |void| | :ref:`window_set_rect_changed_callback<class_DisplayServer_method_window_set_rect_changed_callback>`\ (\ callback\: :ref:`Callable<class_Callable>`, window_id\: :ref:`int<class_int>` = 0\ ) |
  377. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  378. | |void| | :ref:`window_set_size<class_DisplayServer_method_window_set_size>`\ (\ size\: :ref:`Vector2i<class_Vector2i>`, window_id\: :ref:`int<class_int>` = 0\ ) |
  379. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  380. | |void| | :ref:`window_set_title<class_DisplayServer_method_window_set_title>`\ (\ title\: :ref:`String<class_String>`, window_id\: :ref:`int<class_int>` = 0\ ) |
  381. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  382. | |void| | :ref:`window_set_transient<class_DisplayServer_method_window_set_transient>`\ (\ window_id\: :ref:`int<class_int>`, parent_window_id\: :ref:`int<class_int>`\ ) |
  383. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  384. | |void| | :ref:`window_set_vsync_mode<class_DisplayServer_method_window_set_vsync_mode>`\ (\ vsync_mode\: :ref:`VSyncMode<enum_DisplayServer_VSyncMode>`, window_id\: :ref:`int<class_int>` = 0\ ) |
  385. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  386. | |void| | :ref:`window_set_window_buttons_offset<class_DisplayServer_method_window_set_window_buttons_offset>`\ (\ offset\: :ref:`Vector2i<class_Vector2i>`, window_id\: :ref:`int<class_int>` = 0\ ) |
  387. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  388. | |void| | :ref:`window_set_window_event_callback<class_DisplayServer_method_window_set_window_event_callback>`\ (\ callback\: :ref:`Callable<class_Callable>`, window_id\: :ref:`int<class_int>` = 0\ ) |
  389. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  390. .. rst-class:: classref-section-separator
  391. ----
  392. .. rst-class:: classref-descriptions-group
  393. Enumerations
  394. ------------
  395. .. _enum_DisplayServer_Feature:
  396. .. rst-class:: classref-enumeration
  397. enum **Feature**: :ref:`๐Ÿ”—<enum_DisplayServer_Feature>`
  398. .. _class_DisplayServer_constant_FEATURE_GLOBAL_MENU:
  399. .. rst-class:: classref-enumeration-constant
  400. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_GLOBAL_MENU** = ``0``
  401. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  402. Display server supports global menu. This allows the application to display its menu items in the operating system's top bar. **macOS**
  403. .. _class_DisplayServer_constant_FEATURE_SUBWINDOWS:
  404. .. rst-class:: classref-enumeration-constant
  405. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_SUBWINDOWS** = ``1``
  406. Display server supports multiple windows that can be moved outside of the main window. **Windows, macOS, Linux (X11)**
  407. .. _class_DisplayServer_constant_FEATURE_TOUCHSCREEN:
  408. .. rst-class:: classref-enumeration-constant
  409. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_TOUCHSCREEN** = ``2``
  410. Display server supports touchscreen input. **Windows, Linux (X11), Android, iOS, Web**
  411. .. _class_DisplayServer_constant_FEATURE_MOUSE:
  412. .. rst-class:: classref-enumeration-constant
  413. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_MOUSE** = ``3``
  414. Display server supports mouse input. **Windows, macOS, Linux (X11/Wayland), Android, Web**
  415. .. _class_DisplayServer_constant_FEATURE_MOUSE_WARP:
  416. .. rst-class:: classref-enumeration-constant
  417. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_MOUSE_WARP** = ``4``
  418. 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/Wayland)**
  419. .. _class_DisplayServer_constant_FEATURE_CLIPBOARD:
  420. .. rst-class:: classref-enumeration-constant
  421. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_CLIPBOARD** = ``5``
  422. Display server supports setting and getting clipboard data. See also :ref:`FEATURE_CLIPBOARD_PRIMARY<class_DisplayServer_constant_FEATURE_CLIPBOARD_PRIMARY>`. **Windows, macOS, Linux (X11/Wayland), Android, iOS, Web**
  423. .. _class_DisplayServer_constant_FEATURE_VIRTUAL_KEYBOARD:
  424. .. rst-class:: classref-enumeration-constant
  425. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_VIRTUAL_KEYBOARD** = ``6``
  426. Display server supports popping up a virtual keyboard when requested to input text without a physical keyboard. **Android, iOS, Web**
  427. .. _class_DisplayServer_constant_FEATURE_CURSOR_SHAPE:
  428. .. rst-class:: classref-enumeration-constant
  429. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_CURSOR_SHAPE** = ``7``
  430. Display server supports setting the mouse cursor shape to be different from the default. **Windows, macOS, Linux (X11/Wayland), Android, Web**
  431. .. _class_DisplayServer_constant_FEATURE_CUSTOM_CURSOR_SHAPE:
  432. .. rst-class:: classref-enumeration-constant
  433. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_CUSTOM_CURSOR_SHAPE** = ``8``
  434. Display server supports setting the mouse cursor shape to a custom image. **Windows, macOS, Linux (X11/Wayland), Web**
  435. .. _class_DisplayServer_constant_FEATURE_NATIVE_DIALOG:
  436. .. rst-class:: classref-enumeration-constant
  437. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_NATIVE_DIALOG** = ``9``
  438. Display server supports spawning text dialogs using the operating system's native look-and-feel. See :ref:`dialog_show<class_DisplayServer_method_dialog_show>`. **Windows, macOS**
  439. .. _class_DisplayServer_constant_FEATURE_IME:
  440. .. rst-class:: classref-enumeration-constant
  441. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_IME** = ``10``
  442. 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)**
  443. .. _class_DisplayServer_constant_FEATURE_WINDOW_TRANSPARENCY:
  444. .. rst-class:: classref-enumeration-constant
  445. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_WINDOW_TRANSPARENCY** = ``11``
  446. Display server supports windows can use per-pixel transparency to make windows behind them partially or fully visible. **Windows, macOS, Linux (X11/Wayland)**
  447. .. _class_DisplayServer_constant_FEATURE_HIDPI:
  448. .. rst-class:: classref-enumeration-constant
  449. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_HIDPI** = ``12``
  450. 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, Linux (Wayland), macOS**
  451. .. _class_DisplayServer_constant_FEATURE_ICON:
  452. .. rst-class:: classref-enumeration-constant
  453. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_ICON** = ``13``
  454. Display server supports changing the window icon (usually displayed in the top-left corner). **Windows, macOS, Linux (X11)**
  455. .. _class_DisplayServer_constant_FEATURE_NATIVE_ICON:
  456. .. rst-class:: classref-enumeration-constant
  457. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_NATIVE_ICON** = ``14``
  458. Display server supports changing the window icon (usually displayed in the top-left corner). **Windows, macOS**
  459. .. _class_DisplayServer_constant_FEATURE_ORIENTATION:
  460. .. rst-class:: classref-enumeration-constant
  461. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_ORIENTATION** = ``15``
  462. Display server supports changing the screen orientation. **Android, iOS**
  463. .. _class_DisplayServer_constant_FEATURE_SWAP_BUFFERS:
  464. .. rst-class:: classref-enumeration-constant
  465. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_SWAP_BUFFERS** = ``16``
  466. 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/Wayland)**
  467. .. _class_DisplayServer_constant_FEATURE_CLIPBOARD_PRIMARY:
  468. .. rst-class:: classref-enumeration-constant
  469. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_CLIPBOARD_PRIMARY** = ``18``
  470. Display server supports Primary clipboard can be used. This is a different clipboard from :ref:`FEATURE_CLIPBOARD<class_DisplayServer_constant_FEATURE_CLIPBOARD>`. **Linux (X11/Wayland)**
  471. .. _class_DisplayServer_constant_FEATURE_TEXT_TO_SPEECH:
  472. .. rst-class:: classref-enumeration-constant
  473. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_TEXT_TO_SPEECH** = ``19``
  474. Display server supports text-to-speech. See ``tts_*`` methods. **Windows, macOS, Linux (X11/Wayland), Android, iOS, Web**
  475. .. _class_DisplayServer_constant_FEATURE_EXTEND_TO_TITLE:
  476. .. rst-class:: classref-enumeration-constant
  477. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_EXTEND_TO_TITLE** = ``20``
  478. 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**
  479. .. _class_DisplayServer_constant_FEATURE_SCREEN_CAPTURE:
  480. .. rst-class:: classref-enumeration-constant
  481. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_SCREEN_CAPTURE** = ``21``
  482. Display server supports reading screen pixels. See :ref:`screen_get_pixel<class_DisplayServer_method_screen_get_pixel>`.
  483. .. _class_DisplayServer_constant_FEATURE_STATUS_INDICATOR:
  484. .. rst-class:: classref-enumeration-constant
  485. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_STATUS_INDICATOR** = ``22``
  486. Display server supports application status indicators.
  487. .. _class_DisplayServer_constant_FEATURE_NATIVE_HELP:
  488. .. rst-class:: classref-enumeration-constant
  489. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_NATIVE_HELP** = ``23``
  490. Display server supports native help system search callbacks. See :ref:`help_set_search_callbacks<class_DisplayServer_method_help_set_search_callbacks>`.
  491. .. _class_DisplayServer_constant_FEATURE_NATIVE_DIALOG_INPUT:
  492. .. rst-class:: classref-enumeration-constant
  493. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_NATIVE_DIALOG_INPUT** = ``24``
  494. Display server supports spawning text input dialogs using the operating system's native look-and-feel. See :ref:`dialog_input_text<class_DisplayServer_method_dialog_input_text>`. **Windows, macOS**
  495. .. _class_DisplayServer_constant_FEATURE_NATIVE_DIALOG_FILE:
  496. .. rst-class:: classref-enumeration-constant
  497. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_NATIVE_DIALOG_FILE** = ``25``
  498. Display server supports spawning dialogs for selecting files or directories using the operating system's native look-and-feel. See :ref:`file_dialog_show<class_DisplayServer_method_file_dialog_show>` and :ref:`file_dialog_with_options_show<class_DisplayServer_method_file_dialog_with_options_show>`. **Windows, macOS, Linux (X11/Wayland)**
  499. .. rst-class:: classref-item-separator
  500. ----
  501. .. _enum_DisplayServer_MouseMode:
  502. .. rst-class:: classref-enumeration
  503. enum **MouseMode**: :ref:`๐Ÿ”—<enum_DisplayServer_MouseMode>`
  504. .. _class_DisplayServer_constant_MOUSE_MODE_VISIBLE:
  505. .. rst-class:: classref-enumeration-constant
  506. :ref:`MouseMode<enum_DisplayServer_MouseMode>` **MOUSE_MODE_VISIBLE** = ``0``
  507. Makes the mouse cursor visible if it is hidden.
  508. .. _class_DisplayServer_constant_MOUSE_MODE_HIDDEN:
  509. .. rst-class:: classref-enumeration-constant
  510. :ref:`MouseMode<enum_DisplayServer_MouseMode>` **MOUSE_MODE_HIDDEN** = ``1``
  511. Makes the mouse cursor hidden if it is visible.
  512. .. _class_DisplayServer_constant_MOUSE_MODE_CAPTURED:
  513. .. rst-class:: classref-enumeration-constant
  514. :ref:`MouseMode<enum_DisplayServer_MouseMode>` **MOUSE_MODE_CAPTURED** = ``2``
  515. Captures the mouse. The mouse will be hidden and its position locked at the center of the window manager's window.
  516. \ **Note:** If you want to process the mouse's movement in this mode, you need to use :ref:`InputEventMouseMotion.relative<class_InputEventMouseMotion_property_relative>`.
  517. .. _class_DisplayServer_constant_MOUSE_MODE_CONFINED:
  518. .. rst-class:: classref-enumeration-constant
  519. :ref:`MouseMode<enum_DisplayServer_MouseMode>` **MOUSE_MODE_CONFINED** = ``3``
  520. Confines the mouse cursor to the game window, and make it visible.
  521. .. _class_DisplayServer_constant_MOUSE_MODE_CONFINED_HIDDEN:
  522. .. rst-class:: classref-enumeration-constant
  523. :ref:`MouseMode<enum_DisplayServer_MouseMode>` **MOUSE_MODE_CONFINED_HIDDEN** = ``4``
  524. Confines the mouse cursor to the game window, and make it hidden.
  525. .. rst-class:: classref-item-separator
  526. ----
  527. .. _enum_DisplayServer_ScreenOrientation:
  528. .. rst-class:: classref-enumeration
  529. enum **ScreenOrientation**: :ref:`๐Ÿ”—<enum_DisplayServer_ScreenOrientation>`
  530. .. _class_DisplayServer_constant_SCREEN_LANDSCAPE:
  531. .. rst-class:: classref-enumeration-constant
  532. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_LANDSCAPE** = ``0``
  533. Default landscape orientation.
  534. .. _class_DisplayServer_constant_SCREEN_PORTRAIT:
  535. .. rst-class:: classref-enumeration-constant
  536. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_PORTRAIT** = ``1``
  537. Default portrait orientation.
  538. .. _class_DisplayServer_constant_SCREEN_REVERSE_LANDSCAPE:
  539. .. rst-class:: classref-enumeration-constant
  540. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_REVERSE_LANDSCAPE** = ``2``
  541. Reverse landscape orientation (upside down).
  542. .. _class_DisplayServer_constant_SCREEN_REVERSE_PORTRAIT:
  543. .. rst-class:: classref-enumeration-constant
  544. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_REVERSE_PORTRAIT** = ``3``
  545. Reverse portrait orientation (upside down).
  546. .. _class_DisplayServer_constant_SCREEN_SENSOR_LANDSCAPE:
  547. .. rst-class:: classref-enumeration-constant
  548. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_SENSOR_LANDSCAPE** = ``4``
  549. Automatic landscape orientation (default or reverse depending on sensor).
  550. .. _class_DisplayServer_constant_SCREEN_SENSOR_PORTRAIT:
  551. .. rst-class:: classref-enumeration-constant
  552. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_SENSOR_PORTRAIT** = ``5``
  553. Automatic portrait orientation (default or reverse depending on sensor).
  554. .. _class_DisplayServer_constant_SCREEN_SENSOR:
  555. .. rst-class:: classref-enumeration-constant
  556. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_SENSOR** = ``6``
  557. Automatic landscape or portrait orientation (default or reverse depending on sensor).
  558. .. rst-class:: classref-item-separator
  559. ----
  560. .. _enum_DisplayServer_VirtualKeyboardType:
  561. .. rst-class:: classref-enumeration
  562. enum **VirtualKeyboardType**: :ref:`๐Ÿ”—<enum_DisplayServer_VirtualKeyboardType>`
  563. .. _class_DisplayServer_constant_KEYBOARD_TYPE_DEFAULT:
  564. .. rst-class:: classref-enumeration-constant
  565. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_DEFAULT** = ``0``
  566. Default text virtual keyboard.
  567. .. _class_DisplayServer_constant_KEYBOARD_TYPE_MULTILINE:
  568. .. rst-class:: classref-enumeration-constant
  569. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_MULTILINE** = ``1``
  570. Multiline virtual keyboard.
  571. .. _class_DisplayServer_constant_KEYBOARD_TYPE_NUMBER:
  572. .. rst-class:: classref-enumeration-constant
  573. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_NUMBER** = ``2``
  574. Virtual number keypad, useful for PIN entry.
  575. .. _class_DisplayServer_constant_KEYBOARD_TYPE_NUMBER_DECIMAL:
  576. .. rst-class:: classref-enumeration-constant
  577. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_NUMBER_DECIMAL** = ``3``
  578. Virtual number keypad, useful for entering fractional numbers.
  579. .. _class_DisplayServer_constant_KEYBOARD_TYPE_PHONE:
  580. .. rst-class:: classref-enumeration-constant
  581. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_PHONE** = ``4``
  582. Virtual phone number keypad.
  583. .. _class_DisplayServer_constant_KEYBOARD_TYPE_EMAIL_ADDRESS:
  584. .. rst-class:: classref-enumeration-constant
  585. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_EMAIL_ADDRESS** = ``5``
  586. Virtual keyboard with additional keys to assist with typing email addresses.
  587. .. _class_DisplayServer_constant_KEYBOARD_TYPE_PASSWORD:
  588. .. rst-class:: classref-enumeration-constant
  589. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_PASSWORD** = ``6``
  590. Virtual keyboard for entering a password. On most platforms, this should disable autocomplete and autocapitalization.
  591. \ **Note:** This is not supported on Web. Instead, this behaves identically to :ref:`KEYBOARD_TYPE_DEFAULT<class_DisplayServer_constant_KEYBOARD_TYPE_DEFAULT>`.
  592. .. _class_DisplayServer_constant_KEYBOARD_TYPE_URL:
  593. .. rst-class:: classref-enumeration-constant
  594. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_URL** = ``7``
  595. Virtual keyboard with additional keys to assist with typing URLs.
  596. .. rst-class:: classref-item-separator
  597. ----
  598. .. _enum_DisplayServer_CursorShape:
  599. .. rst-class:: classref-enumeration
  600. enum **CursorShape**: :ref:`๐Ÿ”—<enum_DisplayServer_CursorShape>`
  601. .. _class_DisplayServer_constant_CURSOR_ARROW:
  602. .. rst-class:: classref-enumeration-constant
  603. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_ARROW** = ``0``
  604. 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>`.
  605. .. _class_DisplayServer_constant_CURSOR_IBEAM:
  606. .. rst-class:: classref-enumeration-constant
  607. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_IBEAM** = ``1``
  608. 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>`.
  609. .. _class_DisplayServer_constant_CURSOR_POINTING_HAND:
  610. .. rst-class:: classref-enumeration-constant
  611. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_POINTING_HAND** = ``2``
  612. 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>`.
  613. .. _class_DisplayServer_constant_CURSOR_CROSS:
  614. .. rst-class:: classref-enumeration-constant
  615. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_CROSS** = ``3``
  616. 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.
  617. .. _class_DisplayServer_constant_CURSOR_WAIT:
  618. .. rst-class:: classref-enumeration-constant
  619. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_WAIT** = ``4``
  620. 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>`.
  621. .. _class_DisplayServer_constant_CURSOR_BUSY:
  622. .. rst-class:: classref-enumeration-constant
  623. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_BUSY** = ``5``
  624. 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>`.
  625. .. _class_DisplayServer_constant_CURSOR_DRAG:
  626. .. rst-class:: classref-enumeration-constant
  627. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_DRAG** = ``6``
  628. Dragging hand cursor. This is displayed during drag-and-drop operations. See also :ref:`CURSOR_CAN_DROP<class_DisplayServer_constant_CURSOR_CAN_DROP>`.
  629. .. _class_DisplayServer_constant_CURSOR_CAN_DROP:
  630. .. rst-class:: classref-enumeration-constant
  631. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_CAN_DROP** = ``7``
  632. "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>`.
  633. .. _class_DisplayServer_constant_CURSOR_FORBIDDEN:
  634. .. rst-class:: classref-enumeration-constant
  635. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_FORBIDDEN** = ``8``
  636. 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.
  637. .. _class_DisplayServer_constant_CURSOR_VSIZE:
  638. .. rst-class:: classref-enumeration-constant
  639. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_VSIZE** = ``9``
  640. 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>`.
  641. .. _class_DisplayServer_constant_CURSOR_HSIZE:
  642. .. rst-class:: classref-enumeration-constant
  643. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_HSIZE** = ``10``
  644. 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>`.
  645. .. _class_DisplayServer_constant_CURSOR_BDIAGSIZE:
  646. .. rst-class:: classref-enumeration-constant
  647. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_BDIAGSIZE** = ``11``
  648. 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.
  649. .. _class_DisplayServer_constant_CURSOR_FDIAGSIZE:
  650. .. rst-class:: classref-enumeration-constant
  651. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_FDIAGSIZE** = ``12``
  652. 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.
  653. .. _class_DisplayServer_constant_CURSOR_MOVE:
  654. .. rst-class:: classref-enumeration-constant
  655. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_MOVE** = ``13``
  656. Move cursor. Intended to be displayed when the hovered :ref:`Control<class_Control>` can be moved using the mouse.
  657. .. _class_DisplayServer_constant_CURSOR_VSPLIT:
  658. .. rst-class:: classref-enumeration-constant
  659. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_VSPLIT** = ``14``
  660. 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>`.
  661. .. _class_DisplayServer_constant_CURSOR_HSPLIT:
  662. .. rst-class:: classref-enumeration-constant
  663. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_HSPLIT** = ``15``
  664. 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>`.
  665. .. _class_DisplayServer_constant_CURSOR_HELP:
  666. .. rst-class:: classref-enumeration-constant
  667. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_HELP** = ``16``
  668. 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.
  669. .. _class_DisplayServer_constant_CURSOR_MAX:
  670. .. rst-class:: classref-enumeration-constant
  671. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_MAX** = ``17``
  672. Represents the size of the :ref:`CursorShape<enum_DisplayServer_CursorShape>` enum.
  673. .. rst-class:: classref-item-separator
  674. ----
  675. .. _enum_DisplayServer_FileDialogMode:
  676. .. rst-class:: classref-enumeration
  677. enum **FileDialogMode**: :ref:`๐Ÿ”—<enum_DisplayServer_FileDialogMode>`
  678. .. _class_DisplayServer_constant_FILE_DIALOG_MODE_OPEN_FILE:
  679. .. rst-class:: classref-enumeration-constant
  680. :ref:`FileDialogMode<enum_DisplayServer_FileDialogMode>` **FILE_DIALOG_MODE_OPEN_FILE** = ``0``
  681. The native file dialog allows selecting one, and only one file.
  682. .. _class_DisplayServer_constant_FILE_DIALOG_MODE_OPEN_FILES:
  683. .. rst-class:: classref-enumeration-constant
  684. :ref:`FileDialogMode<enum_DisplayServer_FileDialogMode>` **FILE_DIALOG_MODE_OPEN_FILES** = ``1``
  685. The native file dialog allows selecting multiple files.
  686. .. _class_DisplayServer_constant_FILE_DIALOG_MODE_OPEN_DIR:
  687. .. rst-class:: classref-enumeration-constant
  688. :ref:`FileDialogMode<enum_DisplayServer_FileDialogMode>` **FILE_DIALOG_MODE_OPEN_DIR** = ``2``
  689. The native file dialog only allows selecting a directory, disallowing the selection of any file.
  690. .. _class_DisplayServer_constant_FILE_DIALOG_MODE_OPEN_ANY:
  691. .. rst-class:: classref-enumeration-constant
  692. :ref:`FileDialogMode<enum_DisplayServer_FileDialogMode>` **FILE_DIALOG_MODE_OPEN_ANY** = ``3``
  693. The native file dialog allows selecting one file or directory.
  694. .. _class_DisplayServer_constant_FILE_DIALOG_MODE_SAVE_FILE:
  695. .. rst-class:: classref-enumeration-constant
  696. :ref:`FileDialogMode<enum_DisplayServer_FileDialogMode>` **FILE_DIALOG_MODE_SAVE_FILE** = ``4``
  697. The native file dialog will warn when a file exists.
  698. .. rst-class:: classref-item-separator
  699. ----
  700. .. _enum_DisplayServer_WindowMode:
  701. .. rst-class:: classref-enumeration
  702. enum **WindowMode**: :ref:`๐Ÿ”—<enum_DisplayServer_WindowMode>`
  703. .. _class_DisplayServer_constant_WINDOW_MODE_WINDOWED:
  704. .. rst-class:: classref-enumeration-constant
  705. :ref:`WindowMode<enum_DisplayServer_WindowMode>` **WINDOW_MODE_WINDOWED** = ``0``
  706. Windowed mode, i.e. :ref:`Window<class_Window>` doesn't occupy the whole screen (unless set to the size of the screen).
  707. .. _class_DisplayServer_constant_WINDOW_MODE_MINIMIZED:
  708. .. rst-class:: classref-enumeration-constant
  709. :ref:`WindowMode<enum_DisplayServer_WindowMode>` **WINDOW_MODE_MINIMIZED** = ``1``
  710. 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.
  711. .. _class_DisplayServer_constant_WINDOW_MODE_MAXIMIZED:
  712. .. rst-class:: classref-enumeration-constant
  713. :ref:`WindowMode<enum_DisplayServer_WindowMode>` **WINDOW_MODE_MAXIMIZED** = ``2``
  714. 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.
  715. .. _class_DisplayServer_constant_WINDOW_MODE_FULLSCREEN:
  716. .. rst-class:: classref-enumeration-constant
  717. :ref:`WindowMode<enum_DisplayServer_WindowMode>` **WINDOW_MODE_FULLSCREEN** = ``3``
  718. Full screen mode with full multi-window support.
  719. Full screen window covers the entire display area of a screen and has no decorations. The display's video mode is not changed.
  720. \ **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.
  721. \ **On macOS:** A new desktop is used to display the running project.
  722. \ **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.
  723. .. _class_DisplayServer_constant_WINDOW_MODE_EXCLUSIVE_FULLSCREEN:
  724. .. rst-class:: classref-enumeration-constant
  725. :ref:`WindowMode<enum_DisplayServer_WindowMode>` **WINDOW_MODE_EXCLUSIVE_FULLSCREEN** = ``4``
  726. 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).
  727. 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.
  728. \ **On Windows:** Depending on video driver, full screen transition might cause screens to go black for a moment.
  729. \ **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.
  730. \ **On Linux (X11):** Exclusive full screen mode bypasses compositor.
  731. \ **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.
  732. .. rst-class:: classref-item-separator
  733. ----
  734. .. _enum_DisplayServer_WindowFlags:
  735. .. rst-class:: classref-enumeration
  736. enum **WindowFlags**: :ref:`๐Ÿ”—<enum_DisplayServer_WindowFlags>`
  737. .. _class_DisplayServer_constant_WINDOW_FLAG_RESIZE_DISABLED:
  738. .. rst-class:: classref-enumeration-constant
  739. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_RESIZE_DISABLED** = ``0``
  740. 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.
  741. .. _class_DisplayServer_constant_WINDOW_FLAG_BORDERLESS:
  742. .. rst-class:: classref-enumeration-constant
  743. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_BORDERLESS** = ``1``
  744. The window do not have native title bar and other decorations. This flag is ignored for full-screen windows.
  745. .. _class_DisplayServer_constant_WINDOW_FLAG_ALWAYS_ON_TOP:
  746. .. rst-class:: classref-enumeration-constant
  747. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_ALWAYS_ON_TOP** = ``2``
  748. The window is floating on top of all other windows. This flag is ignored for full-screen windows.
  749. .. _class_DisplayServer_constant_WINDOW_FLAG_TRANSPARENT:
  750. .. rst-class:: classref-enumeration-constant
  751. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_TRANSPARENT** = ``3``
  752. The window background can be transparent.
  753. \ **Note:** This flag has no effect if :ref:`is_window_transparency_available<class_DisplayServer_method_is_window_transparency_available>` returns ``false``.
  754. \ **Note:** Transparency support is implemented on Linux (X11/Wayland), macOS, and Windows, but availability might vary depending on GPU driver, display manager, and compositor capabilities.
  755. .. _class_DisplayServer_constant_WINDOW_FLAG_NO_FOCUS:
  756. .. rst-class:: classref-enumeration-constant
  757. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_NO_FOCUS** = ``4``
  758. The window can't be focused. No-focus window will ignore all input, except mouse clicks.
  759. .. _class_DisplayServer_constant_WINDOW_FLAG_POPUP:
  760. .. rst-class:: classref-enumeration-constant
  761. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_POPUP** = ``5``
  762. 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>`).
  763. .. _class_DisplayServer_constant_WINDOW_FLAG_EXTEND_TO_TITLE:
  764. .. rst-class:: classref-enumeration-constant
  765. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_EXTEND_TO_TITLE** = ``6``
  766. 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.
  767. Use :ref:`window_set_window_buttons_offset<class_DisplayServer_method_window_set_window_buttons_offset>` to adjust minimize/maximize/close buttons offset.
  768. 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.
  769. \ **Note:** This flag is implemented only on macOS.
  770. .. _class_DisplayServer_constant_WINDOW_FLAG_MOUSE_PASSTHROUGH:
  771. .. rst-class:: classref-enumeration-constant
  772. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_MOUSE_PASSTHROUGH** = ``7``
  773. All mouse events are passed to the underlying window of the same application.
  774. .. _class_DisplayServer_constant_WINDOW_FLAG_MAX:
  775. .. rst-class:: classref-enumeration-constant
  776. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_MAX** = ``8``
  777. Max value of the :ref:`WindowFlags<enum_DisplayServer_WindowFlags>`.
  778. .. rst-class:: classref-item-separator
  779. ----
  780. .. _enum_DisplayServer_WindowEvent:
  781. .. rst-class:: classref-enumeration
  782. enum **WindowEvent**: :ref:`๐Ÿ”—<enum_DisplayServer_WindowEvent>`
  783. .. _class_DisplayServer_constant_WINDOW_EVENT_MOUSE_ENTER:
  784. .. rst-class:: classref-enumeration-constant
  785. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_MOUSE_ENTER** = ``0``
  786. Sent when the mouse pointer enters the window.
  787. .. _class_DisplayServer_constant_WINDOW_EVENT_MOUSE_EXIT:
  788. .. rst-class:: classref-enumeration-constant
  789. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_MOUSE_EXIT** = ``1``
  790. Sent when the mouse pointer exits the window.
  791. .. _class_DisplayServer_constant_WINDOW_EVENT_FOCUS_IN:
  792. .. rst-class:: classref-enumeration-constant
  793. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_FOCUS_IN** = ``2``
  794. Sent when the window grabs focus.
  795. .. _class_DisplayServer_constant_WINDOW_EVENT_FOCUS_OUT:
  796. .. rst-class:: classref-enumeration-constant
  797. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_FOCUS_OUT** = ``3``
  798. Sent when the window loses focus.
  799. .. _class_DisplayServer_constant_WINDOW_EVENT_CLOSE_REQUEST:
  800. .. rst-class:: classref-enumeration-constant
  801. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_CLOSE_REQUEST** = ``4``
  802. Sent when the user has attempted to close the window (e.g. close button is pressed).
  803. .. _class_DisplayServer_constant_WINDOW_EVENT_GO_BACK_REQUEST:
  804. .. rst-class:: classref-enumeration-constant
  805. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_GO_BACK_REQUEST** = ``5``
  806. Sent when the device "Back" button is pressed.
  807. \ **Note:** This event is implemented only on Android.
  808. .. _class_DisplayServer_constant_WINDOW_EVENT_DPI_CHANGE:
  809. .. rst-class:: classref-enumeration-constant
  810. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_DPI_CHANGE** = ``6``
  811. Sent when the window is moved to the display with different DPI, or display DPI is changed.
  812. \ **Note:** This flag is implemented only on macOS.
  813. .. _class_DisplayServer_constant_WINDOW_EVENT_TITLEBAR_CHANGE:
  814. .. rst-class:: classref-enumeration-constant
  815. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_TITLEBAR_CHANGE** = ``7``
  816. 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).
  817. \ **Note:** This flag is implemented only on macOS.
  818. .. rst-class:: classref-item-separator
  819. ----
  820. .. _enum_DisplayServer_VSyncMode:
  821. .. rst-class:: classref-enumeration
  822. enum **VSyncMode**: :ref:`๐Ÿ”—<enum_DisplayServer_VSyncMode>`
  823. .. _class_DisplayServer_constant_VSYNC_DISABLED:
  824. .. rst-class:: classref-enumeration-constant
  825. :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` **VSYNC_DISABLED** = ``0``
  826. 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>`).
  827. .. _class_DisplayServer_constant_VSYNC_ENABLED:
  828. .. rst-class:: classref-enumeration-constant
  829. :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` **VSYNC_ENABLED** = ``1``
  830. 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>`).
  831. .. _class_DisplayServer_constant_VSYNC_ADAPTIVE:
  832. .. rst-class:: classref-enumeration-constant
  833. :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` **VSYNC_ADAPTIVE** = ``2``
  834. 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.
  835. .. _class_DisplayServer_constant_VSYNC_MAILBOX:
  836. .. rst-class:: classref-enumeration-constant
  837. :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` **VSYNC_MAILBOX** = ``3``
  838. 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>`).
  839. 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.
  840. .. rst-class:: classref-item-separator
  841. ----
  842. .. _enum_DisplayServer_HandleType:
  843. .. rst-class:: classref-enumeration
  844. enum **HandleType**: :ref:`๐Ÿ”—<enum_DisplayServer_HandleType>`
  845. .. _class_DisplayServer_constant_DISPLAY_HANDLE:
  846. .. rst-class:: classref-enumeration-constant
  847. :ref:`HandleType<enum_DisplayServer_HandleType>` **DISPLAY_HANDLE** = ``0``
  848. Display handle:
  849. - Linux (X11): ``X11::Display*`` for the display.
  850. - Android: ``EGLDisplay`` for the display.
  851. .. _class_DisplayServer_constant_WINDOW_HANDLE:
  852. .. rst-class:: classref-enumeration-constant
  853. :ref:`HandleType<enum_DisplayServer_HandleType>` **WINDOW_HANDLE** = ``1``
  854. Window handle:
  855. - Windows: ``HWND`` for the window.
  856. - Linux (X11): ``X11::Window*`` for the window.
  857. - macOS: ``NSWindow*`` for the window.
  858. - iOS: ``UIViewController*`` for the view controller.
  859. - Android: ``jObject`` for the activity.
  860. .. _class_DisplayServer_constant_WINDOW_VIEW:
  861. .. rst-class:: classref-enumeration-constant
  862. :ref:`HandleType<enum_DisplayServer_HandleType>` **WINDOW_VIEW** = ``2``
  863. Window view:
  864. - Windows: ``HDC`` for the window (only with the GL Compatibility renderer).
  865. - macOS: ``NSView*`` for the window main view.
  866. - iOS: ``UIView*`` for the window main view.
  867. .. _class_DisplayServer_constant_OPENGL_CONTEXT:
  868. .. rst-class:: classref-enumeration-constant
  869. :ref:`HandleType<enum_DisplayServer_HandleType>` **OPENGL_CONTEXT** = ``3``
  870. OpenGL context (only with the GL Compatibility renderer):
  871. - Windows: ``HGLRC`` for the window (native GL), or ``EGLContext`` for the window (ANGLE).
  872. - Linux (X11): ``GLXContext*`` for the window.
  873. - macOS: ``NSOpenGLContext*`` for the window (native GL), or ``EGLContext`` for the window (ANGLE).
  874. - Android: ``EGLContext`` for the window.
  875. .. rst-class:: classref-item-separator
  876. ----
  877. .. _enum_DisplayServer_TTSUtteranceEvent:
  878. .. rst-class:: classref-enumeration
  879. enum **TTSUtteranceEvent**: :ref:`๐Ÿ”—<enum_DisplayServer_TTSUtteranceEvent>`
  880. .. _class_DisplayServer_constant_TTS_UTTERANCE_STARTED:
  881. .. rst-class:: classref-enumeration-constant
  882. :ref:`TTSUtteranceEvent<enum_DisplayServer_TTSUtteranceEvent>` **TTS_UTTERANCE_STARTED** = ``0``
  883. Utterance has begun to be spoken.
  884. .. _class_DisplayServer_constant_TTS_UTTERANCE_ENDED:
  885. .. rst-class:: classref-enumeration-constant
  886. :ref:`TTSUtteranceEvent<enum_DisplayServer_TTSUtteranceEvent>` **TTS_UTTERANCE_ENDED** = ``1``
  887. Utterance was successfully finished.
  888. .. _class_DisplayServer_constant_TTS_UTTERANCE_CANCELED:
  889. .. rst-class:: classref-enumeration-constant
  890. :ref:`TTSUtteranceEvent<enum_DisplayServer_TTSUtteranceEvent>` **TTS_UTTERANCE_CANCELED** = ``2``
  891. Utterance was canceled, or TTS service was unable to process it.
  892. .. _class_DisplayServer_constant_TTS_UTTERANCE_BOUNDARY:
  893. .. rst-class:: classref-enumeration-constant
  894. :ref:`TTSUtteranceEvent<enum_DisplayServer_TTSUtteranceEvent>` **TTS_UTTERANCE_BOUNDARY** = ``3``
  895. Utterance reached a word or sentence boundary.
  896. .. rst-class:: classref-section-separator
  897. ----
  898. .. rst-class:: classref-descriptions-group
  899. Constants
  900. ---------
  901. .. _class_DisplayServer_constant_SCREEN_WITH_MOUSE_FOCUS:
  902. .. rst-class:: classref-constant
  903. **SCREEN_WITH_MOUSE_FOCUS** = ``-4`` :ref:`๐Ÿ”—<class_DisplayServer_constant_SCREEN_WITH_MOUSE_FOCUS>`
  904. Represents the screen containing the mouse pointer.
  905. \ **Note:** On Linux (Wayland), this constant always represents the screen at index ``0``.
  906. .. _class_DisplayServer_constant_SCREEN_WITH_KEYBOARD_FOCUS:
  907. .. rst-class:: classref-constant
  908. **SCREEN_WITH_KEYBOARD_FOCUS** = ``-3`` :ref:`๐Ÿ”—<class_DisplayServer_constant_SCREEN_WITH_KEYBOARD_FOCUS>`
  909. Represents the screen containing the window with the keyboard focus.
  910. \ **Note:** On Linux (Wayland), this constant always represents the screen at index ``0``.
  911. .. _class_DisplayServer_constant_SCREEN_PRIMARY:
  912. .. rst-class:: classref-constant
  913. **SCREEN_PRIMARY** = ``-2`` :ref:`๐Ÿ”—<class_DisplayServer_constant_SCREEN_PRIMARY>`
  914. Represents the primary screen.
  915. \ **Note:** On Linux (Wayland), this constant always represents the screen at index ``0``.
  916. .. _class_DisplayServer_constant_SCREEN_OF_MAIN_WINDOW:
  917. .. rst-class:: classref-constant
  918. **SCREEN_OF_MAIN_WINDOW** = ``-1`` :ref:`๐Ÿ”—<class_DisplayServer_constant_SCREEN_OF_MAIN_WINDOW>`
  919. Represents the screen where the main window is located. This is usually the default value in functions that allow specifying one of several screens.
  920. \ **Note:** On Linux (Wayland), this constant always represents the screen at index ``0``.
  921. .. _class_DisplayServer_constant_MAIN_WINDOW_ID:
  922. .. rst-class:: classref-constant
  923. **MAIN_WINDOW_ID** = ``0`` :ref:`๐Ÿ”—<class_DisplayServer_constant_MAIN_WINDOW_ID>`
  924. The ID of the main window spawned by the engine, which can be passed to methods expecting a ``window_id``.
  925. .. _class_DisplayServer_constant_INVALID_WINDOW_ID:
  926. .. rst-class:: classref-constant
  927. **INVALID_WINDOW_ID** = ``-1`` :ref:`๐Ÿ”—<class_DisplayServer_constant_INVALID_WINDOW_ID>`
  928. The ID that refers to a nonexistent window. This is returned by some **DisplayServer** methods if no window matches the requested result.
  929. .. _class_DisplayServer_constant_INVALID_INDICATOR_ID:
  930. .. rst-class:: classref-constant
  931. **INVALID_INDICATOR_ID** = ``-1`` :ref:`๐Ÿ”—<class_DisplayServer_constant_INVALID_INDICATOR_ID>`
  932. The ID that refers to a nonexistent application status indicator.
  933. .. rst-class:: classref-section-separator
  934. ----
  935. .. rst-class:: classref-descriptions-group
  936. Method Descriptions
  937. -------------------
  938. .. _class_DisplayServer_method_clipboard_get:
  939. .. rst-class:: classref-method
  940. :ref:`String<class_String>` **clipboard_get**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_clipboard_get>`
  941. Returns the user's clipboard as a string if possible.
  942. .. rst-class:: classref-item-separator
  943. ----
  944. .. _class_DisplayServer_method_clipboard_get_image:
  945. .. rst-class:: classref-method
  946. :ref:`Image<class_Image>` **clipboard_get_image**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_clipboard_get_image>`
  947. Returns the user's clipboard as an image if possible.
  948. \ **Note:** This method uses the copied pixel data, e.g. from a image editing software or a web browser, not an image file copied from file explorer.
  949. .. rst-class:: classref-item-separator
  950. ----
  951. .. _class_DisplayServer_method_clipboard_get_primary:
  952. .. rst-class:: classref-method
  953. :ref:`String<class_String>` **clipboard_get_primary**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_clipboard_get_primary>`
  954. 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.
  955. \ **Note:** This method is only implemented on Linux (X11/Wayland).
  956. .. rst-class:: classref-item-separator
  957. ----
  958. .. _class_DisplayServer_method_clipboard_has:
  959. .. rst-class:: classref-method
  960. :ref:`bool<class_bool>` **clipboard_has**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_clipboard_has>`
  961. Returns ``true`` if there is a text content on the user's clipboard.
  962. .. rst-class:: classref-item-separator
  963. ----
  964. .. _class_DisplayServer_method_clipboard_has_image:
  965. .. rst-class:: classref-method
  966. :ref:`bool<class_bool>` **clipboard_has_image**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_clipboard_has_image>`
  967. Returns ``true`` if there is an image content on the user's clipboard.
  968. .. rst-class:: classref-item-separator
  969. ----
  970. .. _class_DisplayServer_method_clipboard_set:
  971. .. rst-class:: classref-method
  972. |void| **clipboard_set**\ (\ clipboard\: :ref:`String<class_String>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_clipboard_set>`
  973. Sets the user's clipboard content to the given string.
  974. .. rst-class:: classref-item-separator
  975. ----
  976. .. _class_DisplayServer_method_clipboard_set_primary:
  977. .. rst-class:: classref-method
  978. |void| **clipboard_set_primary**\ (\ clipboard_primary\: :ref:`String<class_String>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_clipboard_set_primary>`
  979. 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.
  980. \ **Note:** This method is only implemented on Linux (X11/Wayland).
  981. .. rst-class:: classref-item-separator
  982. ----
  983. .. _class_DisplayServer_method_create_status_indicator:
  984. .. rst-class:: classref-method
  985. :ref:`int<class_int>` **create_status_indicator**\ (\ icon\: :ref:`Texture2D<class_Texture2D>`, tooltip\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_create_status_indicator>`
  986. Creates a new application status indicator with the specified icon, tooltip, and activation callback.
  987. \ ``callback`` should take two arguments: the pressed mouse button (one of the :ref:`MouseButton<enum_@GlobalScope_MouseButton>` constants) and the click position in screen coordinates (a :ref:`Vector2i<class_Vector2i>`).
  988. .. rst-class:: classref-item-separator
  989. ----
  990. .. _class_DisplayServer_method_cursor_get_shape:
  991. .. rst-class:: classref-method
  992. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **cursor_get_shape**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_cursor_get_shape>`
  993. Returns the default mouse cursor shape set by :ref:`cursor_set_shape<class_DisplayServer_method_cursor_set_shape>`.
  994. .. rst-class:: classref-item-separator
  995. ----
  996. .. _class_DisplayServer_method_cursor_set_custom_image:
  997. .. rst-class:: classref-method
  998. |void| **cursor_set_custom_image**\ (\ cursor\: :ref:`Resource<class_Resource>`, shape\: :ref:`CursorShape<enum_DisplayServer_CursorShape>` = 0, hotspot\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_cursor_set_custom_image>`
  999. Sets a custom mouse cursor image for the given ``shape``. This means the user's operating system and mouse cursor theme will no longer influence the mouse cursor's appearance.
  1000. \ ``cursor`` can be either a :ref:`Texture2D<class_Texture2D>` or an :ref:`Image<class_Image>`, and it should not be larger than 256ร—256 to display correctly. Optionally, ``hotspot`` can be set to offset the image's position relative to the click point. By default, ``hotspot`` is set to the top-left corner of the image. See also :ref:`cursor_set_shape<class_DisplayServer_method_cursor_set_shape>`.
  1001. .. rst-class:: classref-item-separator
  1002. ----
  1003. .. _class_DisplayServer_method_cursor_set_shape:
  1004. .. rst-class:: classref-method
  1005. |void| **cursor_set_shape**\ (\ shape\: :ref:`CursorShape<enum_DisplayServer_CursorShape>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_cursor_set_shape>`
  1006. 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>`.
  1007. .. rst-class:: classref-item-separator
  1008. ----
  1009. .. _class_DisplayServer_method_delete_status_indicator:
  1010. .. rst-class:: classref-method
  1011. |void| **delete_status_indicator**\ (\ id\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_delete_status_indicator>`
  1012. Removes the application status indicator.
  1013. .. rst-class:: classref-item-separator
  1014. ----
  1015. .. _class_DisplayServer_method_dialog_input_text:
  1016. .. rst-class:: classref-method
  1017. :ref:`Error<enum_@GlobalScope_Error>` **dialog_input_text**\ (\ title\: :ref:`String<class_String>`, description\: :ref:`String<class_String>`, existing_text\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_dialog_input_text>`
  1018. Shows a text input dialog which uses the operating system's native look-and-feel. ``callback`` should accept a single :ref:`String<class_String>` parameter which contains the text field's contents.
  1019. \ **Note:** This method is implemented if the display server has the :ref:`FEATURE_NATIVE_DIALOG_INPUT<class_DisplayServer_constant_FEATURE_NATIVE_DIALOG_INPUT>` feature. Supported platforms include macOS and Windows.
  1020. .. rst-class:: classref-item-separator
  1021. ----
  1022. .. _class_DisplayServer_method_dialog_show:
  1023. .. rst-class:: classref-method
  1024. :ref:`Error<enum_@GlobalScope_Error>` **dialog_show**\ (\ title\: :ref:`String<class_String>`, description\: :ref:`String<class_String>`, buttons\: :ref:`PackedStringArray<class_PackedStringArray>`, callback\: :ref:`Callable<class_Callable>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_dialog_show>`
  1025. Shows a text dialog which uses the operating system's native look-and-feel. ``callback`` should accept a single :ref:`int<class_int>` parameter which corresponds to the index of the pressed button.
  1026. \ **Note:** This method is implemented if the display server has the :ref:`FEATURE_NATIVE_DIALOG<class_DisplayServer_constant_FEATURE_NATIVE_DIALOG>` feature. Supported platforms include macOS and Windows.
  1027. .. rst-class:: classref-item-separator
  1028. ----
  1029. .. _class_DisplayServer_method_enable_for_stealing_focus:
  1030. .. rst-class:: classref-method
  1031. |void| **enable_for_stealing_focus**\ (\ process_id\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_enable_for_stealing_focus>`
  1032. 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.
  1033. \ **Note:** This method is implemented only on Windows.
  1034. .. rst-class:: classref-item-separator
  1035. ----
  1036. .. _class_DisplayServer_method_file_dialog_show:
  1037. .. rst-class:: classref-method
  1038. :ref:`Error<enum_@GlobalScope_Error>` **file_dialog_show**\ (\ title\: :ref:`String<class_String>`, current_directory\: :ref:`String<class_String>`, filename\: :ref:`String<class_String>`, show_hidden\: :ref:`bool<class_bool>`, mode\: :ref:`FileDialogMode<enum_DisplayServer_FileDialogMode>`, filters\: :ref:`PackedStringArray<class_PackedStringArray>`, callback\: :ref:`Callable<class_Callable>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_file_dialog_show>`
  1039. Displays OS native dialog for selecting files or directories in the file system.
  1040. Each filter string in the ``filters`` array should be formatted like this: ``*.txt,*.doc;Text Files``. The description text of the filter is optional and can be omitted. See also :ref:`FileDialog.filters<class_FileDialog_property_filters>`.
  1041. Callbacks have the following arguments: ``status: bool, selected_paths: PackedStringArray, selected_filter_index: int``.
  1042. \ **Note:** This method is implemented if the display server has the :ref:`FEATURE_NATIVE_DIALOG_FILE<class_DisplayServer_constant_FEATURE_NATIVE_DIALOG_FILE>` feature. Supported platforms include Linux (X11/Wayland), Windows, and macOS.
  1043. \ **Note:** ``current_directory`` might be ignored.
  1044. \ **Note:** On Linux, ``show_hidden`` is ignored.
  1045. \ **Note:** On macOS, native file dialogs have no title.
  1046. \ **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.
  1047. .. rst-class:: classref-item-separator
  1048. ----
  1049. .. _class_DisplayServer_method_file_dialog_with_options_show:
  1050. .. rst-class:: classref-method
  1051. :ref:`Error<enum_@GlobalScope_Error>` **file_dialog_with_options_show**\ (\ title\: :ref:`String<class_String>`, current_directory\: :ref:`String<class_String>`, root\: :ref:`String<class_String>`, filename\: :ref:`String<class_String>`, show_hidden\: :ref:`bool<class_bool>`, mode\: :ref:`FileDialogMode<enum_DisplayServer_FileDialogMode>`, filters\: :ref:`PackedStringArray<class_PackedStringArray>`, options\: :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\], callback\: :ref:`Callable<class_Callable>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_file_dialog_with_options_show>`
  1052. Displays OS native dialog for selecting files or directories in the file system with additional user selectable options.
  1053. Each filter string in the ``filters`` array should be formatted like this: ``*.txt,*.doc;Text Files``. The description text of the filter is optional and can be omitted. See also :ref:`FileDialog.filters<class_FileDialog_property_filters>`.
  1054. \ ``options`` is array of :ref:`Dictionary<class_Dictionary>`\ s with the following keys:
  1055. - ``"name"`` - option's name :ref:`String<class_String>`.
  1056. - ``"values"`` - :ref:`PackedStringArray<class_PackedStringArray>` of values. If empty, boolean option (check box) is used.
  1057. - ``"default"`` - default selected option index (:ref:`int<class_int>`) or default boolean value (:ref:`bool<class_bool>`).
  1058. Callbacks have the following arguments: ``status: bool, selected_paths: PackedStringArray, selected_filter_index: int, selected_option: Dictionary``.
  1059. \ **Note:** This method is implemented if the display server has the :ref:`FEATURE_NATIVE_DIALOG_FILE<class_DisplayServer_constant_FEATURE_NATIVE_DIALOG_FILE>` feature. Supported platforms include Linux (X11/Wayland), Windows, and macOS.
  1060. \ **Note:** ``current_directory`` might be ignored.
  1061. \ **Note:** On Linux (X11), ``show_hidden`` is ignored.
  1062. \ **Note:** On macOS, native file dialogs have no title.
  1063. \ **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.
  1064. .. rst-class:: classref-item-separator
  1065. ----
  1066. .. _class_DisplayServer_method_force_process_and_drop_events:
  1067. .. rst-class:: classref-method
  1068. |void| **force_process_and_drop_events**\ (\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_force_process_and_drop_events>`
  1069. Forces window manager processing while ignoring all :ref:`InputEvent<class_InputEvent>`\ s. See also :ref:`process_events<class_DisplayServer_method_process_events>`.
  1070. \ **Note:** This method is implemented on Windows and macOS.
  1071. .. rst-class:: classref-item-separator
  1072. ----
  1073. .. _class_DisplayServer_method_get_accent_color:
  1074. .. rst-class:: classref-method
  1075. :ref:`Color<class_Color>` **get_accent_color**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_get_accent_color>`
  1076. Returns OS theme accent color. Returns ``Color(0, 0, 0, 0)``, if accent color is unknown.
  1077. \ **Note:** This method is implemented on macOS and Windows.
  1078. .. rst-class:: classref-item-separator
  1079. ----
  1080. .. _class_DisplayServer_method_get_base_color:
  1081. .. rst-class:: classref-method
  1082. :ref:`Color<class_Color>` **get_base_color**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_get_base_color>`
  1083. Returns the OS theme base color (default control background). Returns ``Color(0, 0, 0, 0)`` if the base color is unknown.
  1084. \ **Note:** This method is implemented on macOS and Windows.
  1085. .. rst-class:: classref-item-separator
  1086. ----
  1087. .. _class_DisplayServer_method_get_display_cutouts:
  1088. .. rst-class:: classref-method
  1089. :ref:`Array<class_Array>`\[:ref:`Rect2<class_Rect2>`\] **get_display_cutouts**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_get_display_cutouts>`
  1090. 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>`.
  1091. \ **Note:** Currently only implemented on Android. Other platforms will return an empty array even if they do have display cutouts or notches.
  1092. .. rst-class:: classref-item-separator
  1093. ----
  1094. .. _class_DisplayServer_method_get_display_safe_area:
  1095. .. rst-class:: classref-method
  1096. :ref:`Rect2i<class_Rect2i>` **get_display_safe_area**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_get_display_safe_area>`
  1097. 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>`.
  1098. .. rst-class:: classref-item-separator
  1099. ----
  1100. .. _class_DisplayServer_method_get_keyboard_focus_screen:
  1101. .. rst-class:: classref-method
  1102. :ref:`int<class_int>` **get_keyboard_focus_screen**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_get_keyboard_focus_screen>`
  1103. Returns the index of the screen containing the window with the keyboard focus, or the primary screen if there's no focused window.
  1104. .. rst-class:: classref-item-separator
  1105. ----
  1106. .. _class_DisplayServer_method_get_name:
  1107. .. rst-class:: classref-method
  1108. :ref:`String<class_String>` **get_name**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_get_name>`
  1109. 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** (currently X11 and Wayland).
  1110. The names of built-in display servers are ``Windows``, ``macOS``, ``X11`` (Linux), ``Wayland`` (Linux), ``Android``, ``iOS``, ``web`` (HTML5), and ``headless`` (when started with the ``--headless`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`).
  1111. .. rst-class:: classref-item-separator
  1112. ----
  1113. .. _class_DisplayServer_method_get_primary_screen:
  1114. .. rst-class:: classref-method
  1115. :ref:`int<class_int>` **get_primary_screen**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_get_primary_screen>`
  1116. Returns index of the primary screen.
  1117. .. rst-class:: classref-item-separator
  1118. ----
  1119. .. _class_DisplayServer_method_get_screen_count:
  1120. .. rst-class:: classref-method
  1121. :ref:`int<class_int>` **get_screen_count**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_get_screen_count>`
  1122. Returns the number of displays available.
  1123. .. rst-class:: classref-item-separator
  1124. ----
  1125. .. _class_DisplayServer_method_get_screen_from_rect:
  1126. .. rst-class:: classref-method
  1127. :ref:`int<class_int>` **get_screen_from_rect**\ (\ rect\: :ref:`Rect2<class_Rect2>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_get_screen_from_rect>`
  1128. Returns index of the screen which contains specified rectangle.
  1129. .. rst-class:: classref-item-separator
  1130. ----
  1131. .. _class_DisplayServer_method_get_swap_cancel_ok:
  1132. .. rst-class:: classref-method
  1133. :ref:`bool<class_bool>` **get_swap_cancel_ok**\ (\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_get_swap_cancel_ok>`
  1134. 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>`.
  1135. \ **Note:** This doesn't affect native dialogs such as the ones spawned by :ref:`dialog_show<class_DisplayServer_method_dialog_show>`.
  1136. .. rst-class:: classref-item-separator
  1137. ----
  1138. .. _class_DisplayServer_method_get_window_at_screen_position:
  1139. .. rst-class:: classref-method
  1140. :ref:`int<class_int>` **get_window_at_screen_position**\ (\ position\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_get_window_at_screen_position>`
  1141. 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:
  1142. .. code:: text
  1143. * (0, 0) +-------+
  1144. | |
  1145. +-------------+ | |
  1146. | | | |
  1147. | | | |
  1148. +-------------+ +-------+
  1149. .. rst-class:: classref-item-separator
  1150. ----
  1151. .. _class_DisplayServer_method_get_window_list:
  1152. .. rst-class:: classref-method
  1153. :ref:`PackedInt32Array<class_PackedInt32Array>` **get_window_list**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_get_window_list>`
  1154. Returns the list of Godot window IDs belonging to this process.
  1155. \ **Note:** Native dialogs are not included in this list.
  1156. .. rst-class:: classref-item-separator
  1157. ----
  1158. .. _class_DisplayServer_method_global_menu_add_check_item:
  1159. .. rst-class:: classref-method
  1160. :ref:`int<class_int>` **global_menu_add_check_item**\ (\ menu_root\: :ref:`String<class_String>`, label\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_add_check_item>`
  1161. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1162. Adds a new checkable item with text ``label`` to the global menu with ID ``menu_root``.
  1163. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1164. 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`).
  1165. \ **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``.
  1166. \ **Note:** This method is implemented only on macOS.
  1167. \ **Supported system menu IDs:**\
  1168. .. code:: text
  1169. "_main" - Main menu (macOS).
  1170. "_dock" - Dock popup menu (macOS).
  1171. "_apple" - Apple menu (macOS, custom items added before "Services").
  1172. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1173. "_help" - Help menu (macOS).
  1174. .. rst-class:: classref-item-separator
  1175. ----
  1176. .. _class_DisplayServer_method_global_menu_add_icon_check_item:
  1177. .. rst-class:: classref-method
  1178. :ref:`int<class_int>` **global_menu_add_icon_check_item**\ (\ menu_root\: :ref:`String<class_String>`, icon\: :ref:`Texture2D<class_Texture2D>`, label\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_add_icon_check_item>`
  1179. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1180. Adds a new checkable item with text ``label`` and icon ``icon`` to the global menu with ID ``menu_root``.
  1181. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1182. 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`).
  1183. \ **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``.
  1184. \ **Note:** This method is implemented only on macOS.
  1185. \ **Supported system menu IDs:**\
  1186. .. code:: text
  1187. "_main" - Main menu (macOS).
  1188. "_dock" - Dock popup menu (macOS).
  1189. "_apple" - Apple menu (macOS, custom items added before "Services").
  1190. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1191. "_help" - Help menu (macOS).
  1192. .. rst-class:: classref-item-separator
  1193. ----
  1194. .. _class_DisplayServer_method_global_menu_add_icon_item:
  1195. .. rst-class:: classref-method
  1196. :ref:`int<class_int>` **global_menu_add_icon_item**\ (\ menu_root\: :ref:`String<class_String>`, icon\: :ref:`Texture2D<class_Texture2D>`, label\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_add_icon_item>`
  1197. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1198. Adds a new item with text ``label`` and icon ``icon`` to the global menu with ID ``menu_root``.
  1199. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1200. 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`).
  1201. \ **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``.
  1202. \ **Note:** This method is implemented only on macOS.
  1203. \ **Supported system menu IDs:**\
  1204. .. code:: text
  1205. "_main" - Main menu (macOS).
  1206. "_dock" - Dock popup menu (macOS).
  1207. "_apple" - Apple menu (macOS, custom items added before "Services").
  1208. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1209. "_help" - Help menu (macOS).
  1210. .. rst-class:: classref-item-separator
  1211. ----
  1212. .. _class_DisplayServer_method_global_menu_add_icon_radio_check_item:
  1213. .. rst-class:: classref-method
  1214. :ref:`int<class_int>` **global_menu_add_icon_radio_check_item**\ (\ menu_root\: :ref:`String<class_String>`, icon\: :ref:`Texture2D<class_Texture2D>`, label\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_add_icon_radio_check_item>`
  1215. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1216. Adds a new radio-checkable item with text ``label`` and icon ``icon`` to the global menu with ID ``menu_root``.
  1217. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1218. 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`).
  1219. \ **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.
  1220. \ **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``.
  1221. \ **Note:** This method is implemented only on macOS.
  1222. \ **Supported system menu IDs:**\
  1223. .. code:: text
  1224. "_main" - Main menu (macOS).
  1225. "_dock" - Dock popup menu (macOS).
  1226. "_apple" - Apple menu (macOS, custom items added before "Services").
  1227. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1228. "_help" - Help menu (macOS).
  1229. .. rst-class:: classref-item-separator
  1230. ----
  1231. .. _class_DisplayServer_method_global_menu_add_item:
  1232. .. rst-class:: classref-method
  1233. :ref:`int<class_int>` **global_menu_add_item**\ (\ menu_root\: :ref:`String<class_String>`, label\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_add_item>`
  1234. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1235. Adds a new item with text ``label`` to the global menu with ID ``menu_root``.
  1236. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1237. 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`).
  1238. \ **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``.
  1239. \ **Note:** This method is implemented only on macOS.
  1240. \ **Supported system menu IDs:**\
  1241. .. code:: text
  1242. "_main" - Main menu (macOS).
  1243. "_dock" - Dock popup menu (macOS).
  1244. "_apple" - Apple menu (macOS, custom items added before "Services").
  1245. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1246. "_help" - Help menu (macOS).
  1247. .. rst-class:: classref-item-separator
  1248. ----
  1249. .. _class_DisplayServer_method_global_menu_add_multistate_item:
  1250. .. rst-class:: classref-method
  1251. :ref:`int<class_int>` **global_menu_add_multistate_item**\ (\ menu_root\: :ref:`String<class_String>`, label\: :ref:`String<class_String>`, max_states\: :ref:`int<class_int>`, default_state\: :ref:`int<class_int>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_add_multistate_item>`
  1252. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1253. Adds a new item with text ``label`` to the global menu with ID ``menu_root``.
  1254. 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``.
  1255. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1256. 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`).
  1257. \ **Note:** By default, there's no indication of the current item state, it should be changed manually.
  1258. \ **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``.
  1259. \ **Note:** This method is implemented only on macOS.
  1260. \ **Supported system menu IDs:**\
  1261. .. code:: text
  1262. "_main" - Main menu (macOS).
  1263. "_dock" - Dock popup menu (macOS).
  1264. "_apple" - Apple menu (macOS, custom items added before "Services").
  1265. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1266. "_help" - Help menu (macOS).
  1267. .. rst-class:: classref-item-separator
  1268. ----
  1269. .. _class_DisplayServer_method_global_menu_add_radio_check_item:
  1270. .. rst-class:: classref-method
  1271. :ref:`int<class_int>` **global_menu_add_radio_check_item**\ (\ menu_root\: :ref:`String<class_String>`, label\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_add_radio_check_item>`
  1272. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1273. Adds a new radio-checkable item with text ``label`` to the global menu with ID ``menu_root``.
  1274. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1275. 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`).
  1276. \ **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.
  1277. \ **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``.
  1278. \ **Note:** This method is implemented only on macOS.
  1279. \ **Supported system menu IDs:**\
  1280. .. code:: text
  1281. "_main" - Main menu (macOS).
  1282. "_dock" - Dock popup menu (macOS).
  1283. "_apple" - Apple menu (macOS, custom items added before "Services").
  1284. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1285. "_help" - Help menu (macOS).
  1286. .. rst-class:: classref-item-separator
  1287. ----
  1288. .. _class_DisplayServer_method_global_menu_add_separator:
  1289. .. rst-class:: classref-method
  1290. :ref:`int<class_int>` **global_menu_add_separator**\ (\ menu_root\: :ref:`String<class_String>`, index\: :ref:`int<class_int>` = -1\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_add_separator>`
  1291. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1292. Adds a separator between items to the global menu with ID ``menu_root``. Separators also occupy an index.
  1293. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1294. \ **Note:** This method is implemented only on macOS.
  1295. \ **Supported system menu IDs:**\
  1296. .. code:: text
  1297. "_main" - Main menu (macOS).
  1298. "_dock" - Dock popup menu (macOS).
  1299. "_apple" - Apple menu (macOS, custom items added before "Services").
  1300. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1301. "_help" - Help menu (macOS).
  1302. .. rst-class:: classref-item-separator
  1303. ----
  1304. .. _class_DisplayServer_method_global_menu_add_submenu_item:
  1305. .. rst-class:: classref-method
  1306. :ref:`int<class_int>` **global_menu_add_submenu_item**\ (\ menu_root\: :ref:`String<class_String>`, label\: :ref:`String<class_String>`, submenu\: :ref:`String<class_String>`, index\: :ref:`int<class_int>` = -1\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_add_submenu_item>`
  1307. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1308. 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.
  1309. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1310. \ **Note:** This method is implemented only on macOS.
  1311. \ **Supported system menu IDs:**\
  1312. .. code:: text
  1313. "_main" - Main menu (macOS).
  1314. "_dock" - Dock popup menu (macOS).
  1315. "_apple" - Apple menu (macOS, custom items added before "Services").
  1316. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1317. "_help" - Help menu (macOS).
  1318. .. rst-class:: classref-item-separator
  1319. ----
  1320. .. _class_DisplayServer_method_global_menu_clear:
  1321. .. rst-class:: classref-method
  1322. |void| **global_menu_clear**\ (\ menu_root\: :ref:`String<class_String>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_clear>`
  1323. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1324. Removes all items from the global menu with ID ``menu_root``.
  1325. \ **Note:** This method is implemented only on macOS.
  1326. \ **Supported system menu IDs:**\
  1327. .. code:: text
  1328. "_main" - Main menu (macOS).
  1329. "_dock" - Dock popup menu (macOS).
  1330. "_apple" - Apple menu (macOS, custom items added before "Services").
  1331. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1332. "_help" - Help menu (macOS).
  1333. .. rst-class:: classref-item-separator
  1334. ----
  1335. .. _class_DisplayServer_method_global_menu_get_item_accelerator:
  1336. .. rst-class:: classref-method
  1337. :ref:`Key<enum_@GlobalScope_Key>` **global_menu_get_item_accelerator**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_get_item_accelerator>`
  1338. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1339. 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.
  1340. \ **Note:** This method is implemented only on macOS.
  1341. .. rst-class:: classref-item-separator
  1342. ----
  1343. .. _class_DisplayServer_method_global_menu_get_item_callback:
  1344. .. rst-class:: classref-method
  1345. :ref:`Callable<class_Callable>` **global_menu_get_item_callback**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_get_item_callback>`
  1346. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1347. Returns the callback of the item at index ``idx``.
  1348. \ **Note:** This method is implemented only on macOS.
  1349. .. rst-class:: classref-item-separator
  1350. ----
  1351. .. _class_DisplayServer_method_global_menu_get_item_count:
  1352. .. rst-class:: classref-method
  1353. :ref:`int<class_int>` **global_menu_get_item_count**\ (\ menu_root\: :ref:`String<class_String>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_get_item_count>`
  1354. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1355. Returns number of items in the global menu with ID ``menu_root``.
  1356. \ **Note:** This method is implemented only on macOS.
  1357. .. rst-class:: classref-item-separator
  1358. ----
  1359. .. _class_DisplayServer_method_global_menu_get_item_icon:
  1360. .. rst-class:: classref-method
  1361. :ref:`Texture2D<class_Texture2D>` **global_menu_get_item_icon**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_get_item_icon>`
  1362. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1363. Returns the icon of the item at index ``idx``.
  1364. \ **Note:** This method is implemented only on macOS.
  1365. .. rst-class:: classref-item-separator
  1366. ----
  1367. .. _class_DisplayServer_method_global_menu_get_item_indentation_level:
  1368. .. rst-class:: classref-method
  1369. :ref:`int<class_int>` **global_menu_get_item_indentation_level**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_get_item_indentation_level>`
  1370. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1371. Returns the horizontal offset of the item at the given ``idx``.
  1372. \ **Note:** This method is implemented only on macOS.
  1373. .. rst-class:: classref-item-separator
  1374. ----
  1375. .. _class_DisplayServer_method_global_menu_get_item_index_from_tag:
  1376. .. rst-class:: classref-method
  1377. :ref:`int<class_int>` **global_menu_get_item_index_from_tag**\ (\ menu_root\: :ref:`String<class_String>`, tag\: :ref:`Variant<class_Variant>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_get_item_index_from_tag>`
  1378. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1379. Returns the index of the item with the specified ``tag``. Indices are automatically assigned to each item by the engine, and cannot be set manually.
  1380. \ **Note:** This method is implemented only on macOS.
  1381. .. rst-class:: classref-item-separator
  1382. ----
  1383. .. _class_DisplayServer_method_global_menu_get_item_index_from_text:
  1384. .. rst-class:: classref-method
  1385. :ref:`int<class_int>` **global_menu_get_item_index_from_text**\ (\ menu_root\: :ref:`String<class_String>`, text\: :ref:`String<class_String>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_get_item_index_from_text>`
  1386. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1387. Returns the index of the item with the specified ``text``. Indices are automatically assigned to each item by the engine, and cannot be set manually.
  1388. \ **Note:** This method is implemented only on macOS.
  1389. .. rst-class:: classref-item-separator
  1390. ----
  1391. .. _class_DisplayServer_method_global_menu_get_item_key_callback:
  1392. .. rst-class:: classref-method
  1393. :ref:`Callable<class_Callable>` **global_menu_get_item_key_callback**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_get_item_key_callback>`
  1394. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1395. Returns the callback of the item accelerator at index ``idx``.
  1396. \ **Note:** This method is implemented only on macOS.
  1397. .. rst-class:: classref-item-separator
  1398. ----
  1399. .. _class_DisplayServer_method_global_menu_get_item_max_states:
  1400. .. rst-class:: classref-method
  1401. :ref:`int<class_int>` **global_menu_get_item_max_states**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_get_item_max_states>`
  1402. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1403. 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.
  1404. \ **Note:** This method is implemented only on macOS.
  1405. .. rst-class:: classref-item-separator
  1406. ----
  1407. .. _class_DisplayServer_method_global_menu_get_item_state:
  1408. .. rst-class:: classref-method
  1409. :ref:`int<class_int>` **global_menu_get_item_state**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_get_item_state>`
  1410. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1411. Returns the state of a multistate item. See :ref:`global_menu_add_multistate_item<class_DisplayServer_method_global_menu_add_multistate_item>` for details.
  1412. \ **Note:** This method is implemented only on macOS.
  1413. .. rst-class:: classref-item-separator
  1414. ----
  1415. .. _class_DisplayServer_method_global_menu_get_item_submenu:
  1416. .. rst-class:: classref-method
  1417. :ref:`String<class_String>` **global_menu_get_item_submenu**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_get_item_submenu>`
  1418. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1419. 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.
  1420. \ **Note:** This method is implemented only on macOS.
  1421. .. rst-class:: classref-item-separator
  1422. ----
  1423. .. _class_DisplayServer_method_global_menu_get_item_tag:
  1424. .. rst-class:: classref-method
  1425. :ref:`Variant<class_Variant>` **global_menu_get_item_tag**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_get_item_tag>`
  1426. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1427. 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.
  1428. \ **Note:** This method is implemented only on macOS.
  1429. .. rst-class:: classref-item-separator
  1430. ----
  1431. .. _class_DisplayServer_method_global_menu_get_item_text:
  1432. .. rst-class:: classref-method
  1433. :ref:`String<class_String>` **global_menu_get_item_text**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_get_item_text>`
  1434. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1435. Returns the text of the item at index ``idx``.
  1436. \ **Note:** This method is implemented only on macOS.
  1437. .. rst-class:: classref-item-separator
  1438. ----
  1439. .. _class_DisplayServer_method_global_menu_get_item_tooltip:
  1440. .. rst-class:: classref-method
  1441. :ref:`String<class_String>` **global_menu_get_item_tooltip**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_get_item_tooltip>`
  1442. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1443. Returns the tooltip associated with the specified index ``idx``.
  1444. \ **Note:** This method is implemented only on macOS.
  1445. .. rst-class:: classref-item-separator
  1446. ----
  1447. .. _class_DisplayServer_method_global_menu_get_system_menu_roots:
  1448. .. rst-class:: classref-method
  1449. :ref:`Dictionary<class_Dictionary>` **global_menu_get_system_menu_roots**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_get_system_menu_roots>`
  1450. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1451. Returns Dictionary of supported system menu IDs and names.
  1452. \ **Note:** This method is implemented only on macOS.
  1453. .. rst-class:: classref-item-separator
  1454. ----
  1455. .. _class_DisplayServer_method_global_menu_is_item_checkable:
  1456. .. rst-class:: classref-method
  1457. :ref:`bool<class_bool>` **global_menu_is_item_checkable**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_is_item_checkable>`
  1458. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1459. Returns ``true`` if the item at index ``idx`` is checkable in some way, i.e. if it has a checkbox or radio button.
  1460. \ **Note:** This method is implemented only on macOS.
  1461. .. rst-class:: classref-item-separator
  1462. ----
  1463. .. _class_DisplayServer_method_global_menu_is_item_checked:
  1464. .. rst-class:: classref-method
  1465. :ref:`bool<class_bool>` **global_menu_is_item_checked**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_is_item_checked>`
  1466. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1467. Returns ``true`` if the item at index ``idx`` is checked.
  1468. \ **Note:** This method is implemented only on macOS.
  1469. .. rst-class:: classref-item-separator
  1470. ----
  1471. .. _class_DisplayServer_method_global_menu_is_item_disabled:
  1472. .. rst-class:: classref-method
  1473. :ref:`bool<class_bool>` **global_menu_is_item_disabled**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_is_item_disabled>`
  1474. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1475. Returns ``true`` if the item at index ``idx`` is disabled. When it is disabled it can't be selected, or its action invoked.
  1476. See :ref:`global_menu_set_item_disabled<class_DisplayServer_method_global_menu_set_item_disabled>` for more info on how to disable an item.
  1477. \ **Note:** This method is implemented only on macOS.
  1478. .. rst-class:: classref-item-separator
  1479. ----
  1480. .. _class_DisplayServer_method_global_menu_is_item_hidden:
  1481. .. rst-class:: classref-method
  1482. :ref:`bool<class_bool>` **global_menu_is_item_hidden**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_is_item_hidden>`
  1483. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1484. Returns ``true`` if the item at index ``idx`` is hidden.
  1485. See :ref:`global_menu_set_item_hidden<class_DisplayServer_method_global_menu_set_item_hidden>` for more info on how to hide an item.
  1486. \ **Note:** This method is implemented only on macOS.
  1487. .. rst-class:: classref-item-separator
  1488. ----
  1489. .. _class_DisplayServer_method_global_menu_is_item_radio_checkable:
  1490. .. rst-class:: classref-method
  1491. :ref:`bool<class_bool>` **global_menu_is_item_radio_checkable**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_is_item_radio_checkable>`
  1492. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1493. Returns ``true`` if the item at index ``idx`` has radio button-style checkability.
  1494. \ **Note:** This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups.
  1495. \ **Note:** This method is implemented only on macOS.
  1496. .. rst-class:: classref-item-separator
  1497. ----
  1498. .. _class_DisplayServer_method_global_menu_remove_item:
  1499. .. rst-class:: classref-method
  1500. |void| **global_menu_remove_item**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_remove_item>`
  1501. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1502. Removes the item at index ``idx`` from the global menu ``menu_root``.
  1503. \ **Note:** The indices of items after the removed item will be shifted by one.
  1504. \ **Note:** This method is implemented only on macOS.
  1505. .. rst-class:: classref-item-separator
  1506. ----
  1507. .. _class_DisplayServer_method_global_menu_set_item_accelerator:
  1508. .. rst-class:: classref-method
  1509. |void| **global_menu_set_item_accelerator**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, keycode\: :ref:`Key<enum_@GlobalScope_Key>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_set_item_accelerator>`
  1510. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1511. 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`).
  1512. \ **Note:** This method is implemented only on macOS.
  1513. .. rst-class:: classref-item-separator
  1514. ----
  1515. .. _class_DisplayServer_method_global_menu_set_item_callback:
  1516. .. rst-class:: classref-method
  1517. |void| **global_menu_set_item_callback**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, callback\: :ref:`Callable<class_Callable>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_set_item_callback>`
  1518. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1519. Sets the callback of the item at index ``idx``. Callback is emitted when an item is pressed.
  1520. \ **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.
  1521. \ **Note:** This method is implemented only on macOS.
  1522. .. rst-class:: classref-item-separator
  1523. ----
  1524. .. _class_DisplayServer_method_global_menu_set_item_checkable:
  1525. .. rst-class:: classref-method
  1526. |void| **global_menu_set_item_checkable**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, checkable\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_set_item_checkable>`
  1527. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1528. Sets whether the item at index ``idx`` has a checkbox. If ``false``, sets the type of the item to plain text.
  1529. \ **Note:** This method is implemented only on macOS.
  1530. .. rst-class:: classref-item-separator
  1531. ----
  1532. .. _class_DisplayServer_method_global_menu_set_item_checked:
  1533. .. rst-class:: classref-method
  1534. |void| **global_menu_set_item_checked**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, checked\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_set_item_checked>`
  1535. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1536. Sets the checkstate status of the item at index ``idx``.
  1537. \ **Note:** This method is implemented only on macOS.
  1538. .. rst-class:: classref-item-separator
  1539. ----
  1540. .. _class_DisplayServer_method_global_menu_set_item_disabled:
  1541. .. rst-class:: classref-method
  1542. |void| **global_menu_set_item_disabled**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_set_item_disabled>`
  1543. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1544. Enables/disables the item at index ``idx``. When it is disabled, it can't be selected and its action can't be invoked.
  1545. \ **Note:** This method is implemented only on macOS.
  1546. .. rst-class:: classref-item-separator
  1547. ----
  1548. .. _class_DisplayServer_method_global_menu_set_item_hidden:
  1549. .. rst-class:: classref-method
  1550. |void| **global_menu_set_item_hidden**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, hidden\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_set_item_hidden>`
  1551. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1552. 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.
  1553. \ **Note:** This method is implemented only on macOS.
  1554. .. rst-class:: classref-item-separator
  1555. ----
  1556. .. _class_DisplayServer_method_global_menu_set_item_hover_callbacks:
  1557. .. rst-class:: classref-method
  1558. |void| **global_menu_set_item_hover_callbacks**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, callback\: :ref:`Callable<class_Callable>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_set_item_hover_callbacks>`
  1559. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1560. Sets the callback of the item at index ``idx``. The callback is emitted when an item is hovered.
  1561. \ **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.
  1562. \ **Note:** This method is implemented only on macOS.
  1563. .. rst-class:: classref-item-separator
  1564. ----
  1565. .. _class_DisplayServer_method_global_menu_set_item_icon:
  1566. .. rst-class:: classref-method
  1567. |void| **global_menu_set_item_icon**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_set_item_icon>`
  1568. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1569. Replaces the :ref:`Texture2D<class_Texture2D>` icon of the specified ``idx``.
  1570. \ **Note:** This method is implemented only on macOS.
  1571. \ **Note:** This method is not supported by macOS "_dock" menu items.
  1572. .. rst-class:: classref-item-separator
  1573. ----
  1574. .. _class_DisplayServer_method_global_menu_set_item_indentation_level:
  1575. .. rst-class:: classref-method
  1576. |void| **global_menu_set_item_indentation_level**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, level\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_set_item_indentation_level>`
  1577. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1578. Sets the horizontal offset of the item at the given ``idx``.
  1579. \ **Note:** This method is implemented only on macOS.
  1580. .. rst-class:: classref-item-separator
  1581. ----
  1582. .. _class_DisplayServer_method_global_menu_set_item_key_callback:
  1583. .. rst-class:: classref-method
  1584. |void| **global_menu_set_item_key_callback**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, key_callback\: :ref:`Callable<class_Callable>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_set_item_key_callback>`
  1585. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1586. Sets the callback of the item at index ``idx``. Callback is emitted when its accelerator is activated.
  1587. \ **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.
  1588. \ **Note:** This method is implemented only on macOS.
  1589. .. rst-class:: classref-item-separator
  1590. ----
  1591. .. _class_DisplayServer_method_global_menu_set_item_max_states:
  1592. .. rst-class:: classref-method
  1593. |void| **global_menu_set_item_max_states**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, max_states\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_set_item_max_states>`
  1594. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1595. 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.
  1596. \ **Note:** This method is implemented only on macOS.
  1597. .. rst-class:: classref-item-separator
  1598. ----
  1599. .. _class_DisplayServer_method_global_menu_set_item_radio_checkable:
  1600. .. rst-class:: classref-method
  1601. |void| **global_menu_set_item_radio_checkable**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, checkable\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_set_item_radio_checkable>`
  1602. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1603. 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.
  1604. \ **Note:** This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups.
  1605. \ **Note:** This method is implemented only on macOS.
  1606. .. rst-class:: classref-item-separator
  1607. ----
  1608. .. _class_DisplayServer_method_global_menu_set_item_state:
  1609. .. rst-class:: classref-method
  1610. |void| **global_menu_set_item_state**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, state\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_set_item_state>`
  1611. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1612. Sets the state of a multistate item. See :ref:`global_menu_add_multistate_item<class_DisplayServer_method_global_menu_add_multistate_item>` for details.
  1613. \ **Note:** This method is implemented only on macOS.
  1614. .. rst-class:: classref-item-separator
  1615. ----
  1616. .. _class_DisplayServer_method_global_menu_set_item_submenu:
  1617. .. rst-class:: classref-method
  1618. |void| **global_menu_set_item_submenu**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, submenu\: :ref:`String<class_String>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_set_item_submenu>`
  1619. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1620. 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.
  1621. \ **Note:** This method is implemented only on macOS.
  1622. .. rst-class:: classref-item-separator
  1623. ----
  1624. .. _class_DisplayServer_method_global_menu_set_item_tag:
  1625. .. rst-class:: classref-method
  1626. |void| **global_menu_set_item_tag**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, tag\: :ref:`Variant<class_Variant>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_set_item_tag>`
  1627. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1628. 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.
  1629. \ **Note:** This method is implemented only on macOS.
  1630. .. rst-class:: classref-item-separator
  1631. ----
  1632. .. _class_DisplayServer_method_global_menu_set_item_text:
  1633. .. rst-class:: classref-method
  1634. |void| **global_menu_set_item_text**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_set_item_text>`
  1635. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1636. Sets the text of the item at index ``idx``.
  1637. \ **Note:** This method is implemented only on macOS.
  1638. .. rst-class:: classref-item-separator
  1639. ----
  1640. .. _class_DisplayServer_method_global_menu_set_item_tooltip:
  1641. .. rst-class:: classref-method
  1642. |void| **global_menu_set_item_tooltip**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_set_item_tooltip>`
  1643. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1644. Sets the :ref:`String<class_String>` tooltip of the item at the specified index ``idx``.
  1645. \ **Note:** This method is implemented only on macOS.
  1646. .. rst-class:: classref-item-separator
  1647. ----
  1648. .. _class_DisplayServer_method_global_menu_set_popup_callbacks:
  1649. .. rst-class:: classref-method
  1650. |void| **global_menu_set_popup_callbacks**\ (\ menu_root\: :ref:`String<class_String>`, open_callback\: :ref:`Callable<class_Callable>`, close_callback\: :ref:`Callable<class_Callable>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_set_popup_callbacks>`
  1651. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1652. Registers callables to emit when the menu is respectively about to show or closed. Callback methods should have zero arguments.
  1653. .. rst-class:: classref-item-separator
  1654. ----
  1655. .. _class_DisplayServer_method_has_additional_outputs:
  1656. .. rst-class:: classref-method
  1657. :ref:`bool<class_bool>` **has_additional_outputs**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_has_additional_outputs>`
  1658. Returns ``true`` if any additional outputs have been registered via :ref:`register_additional_output<class_DisplayServer_method_register_additional_output>`.
  1659. .. rst-class:: classref-item-separator
  1660. ----
  1661. .. _class_DisplayServer_method_has_feature:
  1662. .. rst-class:: classref-method
  1663. :ref:`bool<class_bool>` **has_feature**\ (\ feature\: :ref:`Feature<enum_DisplayServer_Feature>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_has_feature>`
  1664. Returns ``true`` if the specified ``feature`` is supported by the current **DisplayServer**, ``false`` otherwise.
  1665. .. rst-class:: classref-item-separator
  1666. ----
  1667. .. _class_DisplayServer_method_help_set_search_callbacks:
  1668. .. rst-class:: classref-method
  1669. |void| **help_set_search_callbacks**\ (\ search_callback\: :ref:`Callable<class_Callable>`, action_callback\: :ref:`Callable<class_Callable>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_help_set_search_callbacks>`
  1670. Sets native help system search callbacks.
  1671. \ ``search_callback`` has the following arguments: ``String search_string, int result_limit`` and return a :ref:`Dictionary<class_Dictionary>` with "key, display name" pairs for the search results. Called when the user enters search terms in the ``Help`` menu.
  1672. \ ``action_callback`` has the following arguments: ``String key``. Called when the user selects a search result in the ``Help`` menu.
  1673. \ **Note:** This method is implemented only on macOS.
  1674. .. rst-class:: classref-item-separator
  1675. ----
  1676. .. _class_DisplayServer_method_ime_get_selection:
  1677. .. rst-class:: classref-method
  1678. :ref:`Vector2i<class_Vector2i>` **ime_get_selection**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_ime_get_selection>`
  1679. 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.
  1680. \ **Note:** This method is implemented only on macOS.
  1681. .. rst-class:: classref-item-separator
  1682. ----
  1683. .. _class_DisplayServer_method_ime_get_text:
  1684. .. rst-class:: classref-method
  1685. :ref:`String<class_String>` **ime_get_text**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_ime_get_text>`
  1686. Returns the composition string contained within the `Input Method Editor <https://en.wikipedia.org/wiki/Input_method>`__ window.
  1687. \ **Note:** This method is implemented only on macOS.
  1688. .. rst-class:: classref-item-separator
  1689. ----
  1690. .. _class_DisplayServer_method_is_dark_mode:
  1691. .. rst-class:: classref-method
  1692. :ref:`bool<class_bool>` **is_dark_mode**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_is_dark_mode>`
  1693. Returns ``true`` if OS is using dark mode.
  1694. \ **Note:** This method is implemented on Android, iOS, macOS, Windows, and Linux (X11/Wayland).
  1695. .. rst-class:: classref-item-separator
  1696. ----
  1697. .. _class_DisplayServer_method_is_dark_mode_supported:
  1698. .. rst-class:: classref-method
  1699. :ref:`bool<class_bool>` **is_dark_mode_supported**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_is_dark_mode_supported>`
  1700. Returns ``true`` if OS supports dark mode.
  1701. \ **Note:** This method is implemented on Android, iOS, macOS, Windows, and Linux (X11/Wayland).
  1702. .. rst-class:: classref-item-separator
  1703. ----
  1704. .. _class_DisplayServer_method_is_touchscreen_available:
  1705. .. rst-class:: classref-method
  1706. :ref:`bool<class_bool>` **is_touchscreen_available**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_is_touchscreen_available>`
  1707. 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``.
  1708. .. rst-class:: classref-item-separator
  1709. ----
  1710. .. _class_DisplayServer_method_is_window_transparency_available:
  1711. .. rst-class:: classref-method
  1712. :ref:`bool<class_bool>` **is_window_transparency_available**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_is_window_transparency_available>`
  1713. Returns ``true`` if the window background can be made transparent. This method returns ``false`` if :ref:`ProjectSettings.display/window/per_pixel_transparency/allowed<class_ProjectSettings_property_display/window/per_pixel_transparency/allowed>` is set to ``false``, or if transparency is not supported by the renderer or OS compositor.
  1714. .. rst-class:: classref-item-separator
  1715. ----
  1716. .. _class_DisplayServer_method_keyboard_get_current_layout:
  1717. .. rst-class:: classref-method
  1718. :ref:`int<class_int>` **keyboard_get_current_layout**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_keyboard_get_current_layout>`
  1719. Returns active keyboard layout index.
  1720. \ **Note:** This method is implemented on Linux (X11/Wayland), macOS, and Windows.
  1721. .. rst-class:: classref-item-separator
  1722. ----
  1723. .. _class_DisplayServer_method_keyboard_get_keycode_from_physical:
  1724. .. rst-class:: classref-method
  1725. :ref:`Key<enum_@GlobalScope_Key>` **keyboard_get_keycode_from_physical**\ (\ keycode\: :ref:`Key<enum_@GlobalScope_Key>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_keyboard_get_keycode_from_physical>`
  1726. Converts a physical (US QWERTY) ``keycode`` to one in the active keyboard layout.
  1727. \ **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows.
  1728. .. rst-class:: classref-item-separator
  1729. ----
  1730. .. _class_DisplayServer_method_keyboard_get_label_from_physical:
  1731. .. rst-class:: classref-method
  1732. :ref:`Key<enum_@GlobalScope_Key>` **keyboard_get_label_from_physical**\ (\ keycode\: :ref:`Key<enum_@GlobalScope_Key>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_keyboard_get_label_from_physical>`
  1733. Converts a physical (US QWERTY) ``keycode`` to localized label printed on the key in the active keyboard layout.
  1734. \ **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows.
  1735. .. rst-class:: classref-item-separator
  1736. ----
  1737. .. _class_DisplayServer_method_keyboard_get_layout_count:
  1738. .. rst-class:: classref-method
  1739. :ref:`int<class_int>` **keyboard_get_layout_count**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_keyboard_get_layout_count>`
  1740. Returns the number of keyboard layouts.
  1741. \ **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows.
  1742. .. rst-class:: classref-item-separator
  1743. ----
  1744. .. _class_DisplayServer_method_keyboard_get_layout_language:
  1745. .. rst-class:: classref-method
  1746. :ref:`String<class_String>` **keyboard_get_layout_language**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_keyboard_get_layout_language>`
  1747. Returns the ISO-639/BCP-47 language code of the keyboard layout at position ``index``.
  1748. \ **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows.
  1749. .. rst-class:: classref-item-separator
  1750. ----
  1751. .. _class_DisplayServer_method_keyboard_get_layout_name:
  1752. .. rst-class:: classref-method
  1753. :ref:`String<class_String>` **keyboard_get_layout_name**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_keyboard_get_layout_name>`
  1754. Returns the localized name of the keyboard layout at position ``index``.
  1755. \ **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows.
  1756. .. rst-class:: classref-item-separator
  1757. ----
  1758. .. _class_DisplayServer_method_keyboard_set_current_layout:
  1759. .. rst-class:: classref-method
  1760. |void| **keyboard_set_current_layout**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_keyboard_set_current_layout>`
  1761. Sets the active keyboard layout.
  1762. \ **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows.
  1763. .. rst-class:: classref-item-separator
  1764. ----
  1765. .. _class_DisplayServer_method_mouse_get_button_state:
  1766. .. rst-class:: classref-method
  1767. |bitfield|\[:ref:`MouseButtonMask<enum_@GlobalScope_MouseButtonMask>`\] **mouse_get_button_state**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_mouse_get_button_state>`
  1768. 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>`.
  1769. .. rst-class:: classref-item-separator
  1770. ----
  1771. .. _class_DisplayServer_method_mouse_get_mode:
  1772. .. rst-class:: classref-method
  1773. :ref:`MouseMode<enum_DisplayServer_MouseMode>` **mouse_get_mode**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_mouse_get_mode>`
  1774. Returns the current mouse mode. See also :ref:`mouse_set_mode<class_DisplayServer_method_mouse_set_mode>`.
  1775. .. rst-class:: classref-item-separator
  1776. ----
  1777. .. _class_DisplayServer_method_mouse_get_position:
  1778. .. rst-class:: classref-method
  1779. :ref:`Vector2i<class_Vector2i>` **mouse_get_position**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_mouse_get_position>`
  1780. Returns the mouse cursor's current position in screen coordinates.
  1781. .. rst-class:: classref-item-separator
  1782. ----
  1783. .. _class_DisplayServer_method_mouse_set_mode:
  1784. .. rst-class:: classref-method
  1785. |void| **mouse_set_mode**\ (\ mouse_mode\: :ref:`MouseMode<enum_DisplayServer_MouseMode>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_mouse_set_mode>`
  1786. Sets the current mouse mode. See also :ref:`mouse_get_mode<class_DisplayServer_method_mouse_get_mode>`.
  1787. .. rst-class:: classref-item-separator
  1788. ----
  1789. .. _class_DisplayServer_method_process_events:
  1790. .. rst-class:: classref-method
  1791. |void| **process_events**\ (\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_process_events>`
  1792. 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>`.
  1793. .. rst-class:: classref-item-separator
  1794. ----
  1795. .. _class_DisplayServer_method_register_additional_output:
  1796. .. rst-class:: classref-method
  1797. |void| **register_additional_output**\ (\ object\: :ref:`Object<class_Object>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_register_additional_output>`
  1798. Registers an :ref:`Object<class_Object>` which represents an additional output that will be rendered too, beyond normal windows. The :ref:`Object<class_Object>` is only used as an identifier, which can be later passed to :ref:`unregister_additional_output<class_DisplayServer_method_unregister_additional_output>`.
  1799. This can be used to prevent Godot from skipping rendering when no normal windows are visible.
  1800. .. rst-class:: classref-item-separator
  1801. ----
  1802. .. _class_DisplayServer_method_screen_get_dpi:
  1803. .. rst-class:: classref-method
  1804. :ref:`int<class_int>` **screen_get_dpi**\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_screen_get_dpi>`
  1805. 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.
  1806. \ **Note:** On macOS, returned value is inaccurate if fractional display scaling mode is used.
  1807. \ **Note:** On Android devices, the actual screen densities are grouped into six generalized densities:
  1808. .. code:: text
  1809. ldpi - 120 dpi
  1810. mdpi - 160 dpi
  1811. hdpi - 240 dpi
  1812. xhdpi - 320 dpi
  1813. xxhdpi - 480 dpi
  1814. xxxhdpi - 640 dpi
  1815. \ **Note:** This method is implemented on Android, Linux (X11/Wayland), macOS and Windows. Returns ``72`` on unsupported platforms.
  1816. .. rst-class:: classref-item-separator
  1817. ----
  1818. .. _class_DisplayServer_method_screen_get_image:
  1819. .. rst-class:: classref-method
  1820. :ref:`Image<class_Image>` **screen_get_image**\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_screen_get_image>`
  1821. Returns screenshot of the ``screen``.
  1822. \ **Note:** This method is implemented on Linux (X11), macOS, and Windows.
  1823. \ **Note:** On macOS, this method requires "Screen Recording" permission, if permission is not granted it will return desktop wallpaper color.
  1824. .. rst-class:: classref-item-separator
  1825. ----
  1826. .. _class_DisplayServer_method_screen_get_max_scale:
  1827. .. rst-class:: classref-method
  1828. :ref:`float<class_float>` **screen_get_max_scale**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_screen_get_max_scale>`
  1829. Returns the greatest scale factor of all screens.
  1830. \ **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.
  1831. \ **Note:** This method is implemented only on macOS.
  1832. .. rst-class:: classref-item-separator
  1833. ----
  1834. .. _class_DisplayServer_method_screen_get_orientation:
  1835. .. rst-class:: classref-method
  1836. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **screen_get_orientation**\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_screen_get_orientation>`
  1837. Returns the ``screen``'s current orientation. See also :ref:`screen_set_orientation<class_DisplayServer_method_screen_set_orientation>`.
  1838. \ **Note:** This method is implemented on Android and iOS.
  1839. .. rst-class:: classref-item-separator
  1840. ----
  1841. .. _class_DisplayServer_method_screen_get_pixel:
  1842. .. rst-class:: classref-method
  1843. :ref:`Color<class_Color>` **screen_get_pixel**\ (\ position\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_screen_get_pixel>`
  1844. Returns color of the display pixel at the ``position``.
  1845. \ **Note:** This method is implemented on Linux (X11), macOS, and Windows.
  1846. \ **Note:** On macOS, this method requires "Screen Recording" permission, if permission is not granted it will return desktop wallpaper color.
  1847. .. rst-class:: classref-item-separator
  1848. ----
  1849. .. _class_DisplayServer_method_screen_get_position:
  1850. .. rst-class:: classref-method
  1851. :ref:`Vector2i<class_Vector2i>` **screen_get_position**\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_screen_get_position>`
  1852. 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:
  1853. .. code:: text
  1854. * (0, 0) +-------+
  1855. | |
  1856. +-------------+ | |
  1857. | | | |
  1858. | | | |
  1859. +-------------+ +-------+
  1860. See also :ref:`screen_get_size<class_DisplayServer_method_screen_get_size>`.
  1861. \ **Note:** On Linux (Wayland) this method always returns ``(0, 0)``.
  1862. .. rst-class:: classref-item-separator
  1863. ----
  1864. .. _class_DisplayServer_method_screen_get_refresh_rate:
  1865. .. rst-class:: classref-method
  1866. :ref:`float<class_float>` **screen_get_refresh_rate**\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_screen_get_refresh_rate>`
  1867. 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.
  1868. \ **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.
  1869. To fallback to a default refresh rate if the method fails, try:
  1870. ::
  1871. var refresh_rate = DisplayServer.screen_get_refresh_rate()
  1872. if refresh_rate < 0:
  1873. refresh_rate = 60.0
  1874. .. rst-class:: classref-item-separator
  1875. ----
  1876. .. _class_DisplayServer_method_screen_get_scale:
  1877. .. rst-class:: classref-method
  1878. :ref:`float<class_float>` **screen_get_scale**\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_screen_get_scale>`
  1879. Returns the scale factor of the specified screen by index.
  1880. \ **Note:** On macOS, the returned value is ``2.0`` for hiDPI (Retina) screens, and ``1.0`` for all other cases.
  1881. \ **Note:** On Linux (Wayland), the returned value is accurate only when ``screen`` is :ref:`SCREEN_OF_MAIN_WINDOW<class_DisplayServer_constant_SCREEN_OF_MAIN_WINDOW>`. Due to API limitations, passing a direct index will return a rounded-up integer, if the screen has a fractional scale (e.g. ``1.25`` would get rounded up to ``2.0``).
  1882. \ **Note:** This method is implemented only on macOS and Linux (Wayland).
  1883. .. rst-class:: classref-item-separator
  1884. ----
  1885. .. _class_DisplayServer_method_screen_get_size:
  1886. .. rst-class:: classref-method
  1887. :ref:`Vector2i<class_Vector2i>` **screen_get_size**\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_screen_get_size>`
  1888. 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>`.
  1889. .. rst-class:: classref-item-separator
  1890. ----
  1891. .. _class_DisplayServer_method_screen_get_usable_rect:
  1892. .. rst-class:: classref-method
  1893. :ref:`Rect2i<class_Rect2i>` **screen_get_usable_rect**\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_screen_get_usable_rect>`
  1894. 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>`.
  1895. .. rst-class:: classref-item-separator
  1896. ----
  1897. .. _class_DisplayServer_method_screen_is_kept_on:
  1898. .. rst-class:: classref-method
  1899. :ref:`bool<class_bool>` **screen_is_kept_on**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_screen_is_kept_on>`
  1900. 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>`.
  1901. .. rst-class:: classref-item-separator
  1902. ----
  1903. .. _class_DisplayServer_method_screen_set_keep_on:
  1904. .. rst-class:: classref-method
  1905. |void| **screen_set_keep_on**\ (\ enable\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_screen_set_keep_on>`
  1906. 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>`.
  1907. .. rst-class:: classref-item-separator
  1908. ----
  1909. .. _class_DisplayServer_method_screen_set_orientation:
  1910. .. rst-class:: classref-method
  1911. |void| **screen_set_orientation**\ (\ orientation\: :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>`, screen\: :ref:`int<class_int>` = -1\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_screen_set_orientation>`
  1912. Sets the ``screen``'s ``orientation``. See also :ref:`screen_get_orientation<class_DisplayServer_method_screen_get_orientation>`.
  1913. \ **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>`.
  1914. .. rst-class:: classref-item-separator
  1915. ----
  1916. .. _class_DisplayServer_method_set_icon:
  1917. .. rst-class:: classref-method
  1918. |void| **set_icon**\ (\ image\: :ref:`Image<class_Image>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_set_icon>`
  1919. 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.
  1920. \ **Note:** Requires support for :ref:`FEATURE_ICON<class_DisplayServer_constant_FEATURE_ICON>`.
  1921. .. rst-class:: classref-item-separator
  1922. ----
  1923. .. _class_DisplayServer_method_set_native_icon:
  1924. .. rst-class:: classref-method
  1925. |void| **set_native_icon**\ (\ filename\: :ref:`String<class_String>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_set_native_icon>`
  1926. 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.
  1927. \ **Note:** Requires support for :ref:`FEATURE_NATIVE_ICON<class_DisplayServer_constant_FEATURE_NATIVE_ICON>`.
  1928. .. rst-class:: classref-item-separator
  1929. ----
  1930. .. _class_DisplayServer_method_set_system_theme_change_callback:
  1931. .. rst-class:: classref-method
  1932. |void| **set_system_theme_change_callback**\ (\ callable\: :ref:`Callable<class_Callable>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_set_system_theme_change_callback>`
  1933. Sets the ``callable`` that should be called when system theme settings are changed. Callback method should have zero arguments.
  1934. \ **Note:** This method is implemented on Android, iOS, macOS, Windows, and Linux (X11/Wayland).
  1935. .. rst-class:: classref-item-separator
  1936. ----
  1937. .. _class_DisplayServer_method_status_indicator_get_rect:
  1938. .. rst-class:: classref-method
  1939. :ref:`Rect2<class_Rect2>` **status_indicator_get_rect**\ (\ id\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_status_indicator_get_rect>`
  1940. Returns the rectangle for the given status indicator ``id`` in screen coordinates. If the status indicator is not visible, returns an empty :ref:`Rect2<class_Rect2>`.
  1941. \ **Note:** This method is implemented on macOS and Windows.
  1942. .. rst-class:: classref-item-separator
  1943. ----
  1944. .. _class_DisplayServer_method_status_indicator_set_callback:
  1945. .. rst-class:: classref-method
  1946. |void| **status_indicator_set_callback**\ (\ id\: :ref:`int<class_int>`, callback\: :ref:`Callable<class_Callable>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_status_indicator_set_callback>`
  1947. Sets the application status indicator activation callback. ``callback`` should take two arguments: :ref:`int<class_int>` mouse button index (one of :ref:`MouseButton<enum_@GlobalScope_MouseButton>` values) and :ref:`Vector2i<class_Vector2i>` click position in screen coordinates.
  1948. \ **Note:** This method is implemented on macOS and Windows.
  1949. .. rst-class:: classref-item-separator
  1950. ----
  1951. .. _class_DisplayServer_method_status_indicator_set_icon:
  1952. .. rst-class:: classref-method
  1953. |void| **status_indicator_set_icon**\ (\ id\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_status_indicator_set_icon>`
  1954. Sets the application status indicator icon.
  1955. \ **Note:** This method is implemented on macOS and Windows.
  1956. .. rst-class:: classref-item-separator
  1957. ----
  1958. .. _class_DisplayServer_method_status_indicator_set_menu:
  1959. .. rst-class:: classref-method
  1960. |void| **status_indicator_set_menu**\ (\ id\: :ref:`int<class_int>`, menu_rid\: :ref:`RID<class_RID>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_status_indicator_set_menu>`
  1961. Sets the application status indicator native popup menu.
  1962. \ **Note:** On macOS, the menu is activated by any mouse button. Its activation callback is *not* triggered.
  1963. \ **Note:** On Windows, the menu is activated by the right mouse button, selecting the status icon and pressing :kbd:`Shift + F10`, or the applications key. The menu's activation callback for the other mouse buttons is still triggered.
  1964. \ **Note:** Native popup is only supported if :ref:`NativeMenu<class_NativeMenu>` supports the :ref:`NativeMenu.FEATURE_POPUP_MENU<class_NativeMenu_constant_FEATURE_POPUP_MENU>` feature.
  1965. .. rst-class:: classref-item-separator
  1966. ----
  1967. .. _class_DisplayServer_method_status_indicator_set_tooltip:
  1968. .. rst-class:: classref-method
  1969. |void| **status_indicator_set_tooltip**\ (\ id\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_status_indicator_set_tooltip>`
  1970. Sets the application status indicator tooltip.
  1971. \ **Note:** This method is implemented on macOS and Windows.
  1972. .. rst-class:: classref-item-separator
  1973. ----
  1974. .. _class_DisplayServer_method_tablet_get_current_driver:
  1975. .. rst-class:: classref-method
  1976. :ref:`String<class_String>` **tablet_get_current_driver**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_tablet_get_current_driver>`
  1977. Returns current active tablet driver name.
  1978. \ **Note:** This method is implemented only on Windows.
  1979. .. rst-class:: classref-item-separator
  1980. ----
  1981. .. _class_DisplayServer_method_tablet_get_driver_count:
  1982. .. rst-class:: classref-method
  1983. :ref:`int<class_int>` **tablet_get_driver_count**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_tablet_get_driver_count>`
  1984. Returns the total number of available tablet drivers.
  1985. \ **Note:** This method is implemented only on Windows.
  1986. .. rst-class:: classref-item-separator
  1987. ----
  1988. .. _class_DisplayServer_method_tablet_get_driver_name:
  1989. .. rst-class:: classref-method
  1990. :ref:`String<class_String>` **tablet_get_driver_name**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_tablet_get_driver_name>`
  1991. Returns the tablet driver name for the given index.
  1992. \ **Note:** This method is implemented only on Windows.
  1993. .. rst-class:: classref-item-separator
  1994. ----
  1995. .. _class_DisplayServer_method_tablet_set_current_driver:
  1996. .. rst-class:: classref-method
  1997. |void| **tablet_set_current_driver**\ (\ name\: :ref:`String<class_String>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_tablet_set_current_driver>`
  1998. Set active tablet driver name.
  1999. Supported drivers:
  2000. - ``winink``: Windows Ink API, default (Windows 8.1+ required).
  2001. - ``wintab``: Wacom Wintab API (compatible device driver required).
  2002. - ``dummy``: Dummy driver, tablet input is disabled.
  2003. \ **Note:** This method is implemented only on Windows.
  2004. .. rst-class:: classref-item-separator
  2005. ----
  2006. .. _class_DisplayServer_method_tts_get_voices:
  2007. .. rst-class:: classref-method
  2008. :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **tts_get_voices**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_tts_get_voices>`
  2009. Returns an :ref:`Array<class_Array>` of voice information dictionaries.
  2010. Each :ref:`Dictionary<class_Dictionary>` contains two :ref:`String<class_String>` entries:
  2011. - ``name`` is voice name.
  2012. - ``id`` is voice identifier.
  2013. - ``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.
  2014. 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.
  2015. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
  2016. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  2017. .. rst-class:: classref-item-separator
  2018. ----
  2019. .. _class_DisplayServer_method_tts_get_voices_for_language:
  2020. .. rst-class:: classref-method
  2021. :ref:`PackedStringArray<class_PackedStringArray>` **tts_get_voices_for_language**\ (\ language\: :ref:`String<class_String>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_tts_get_voices_for_language>`
  2022. Returns an :ref:`PackedStringArray<class_PackedStringArray>` of voice identifiers for the ``language``.
  2023. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
  2024. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  2025. .. rst-class:: classref-item-separator
  2026. ----
  2027. .. _class_DisplayServer_method_tts_is_paused:
  2028. .. rst-class:: classref-method
  2029. :ref:`bool<class_bool>` **tts_is_paused**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_tts_is_paused>`
  2030. Returns ``true`` if the synthesizer is in a paused state.
  2031. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
  2032. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  2033. .. rst-class:: classref-item-separator
  2034. ----
  2035. .. _class_DisplayServer_method_tts_is_speaking:
  2036. .. rst-class:: classref-method
  2037. :ref:`bool<class_bool>` **tts_is_speaking**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_tts_is_speaking>`
  2038. Returns ``true`` if the synthesizer is generating speech, or have utterance waiting in the queue.
  2039. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
  2040. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  2041. .. rst-class:: classref-item-separator
  2042. ----
  2043. .. _class_DisplayServer_method_tts_pause:
  2044. .. rst-class:: classref-method
  2045. |void| **tts_pause**\ (\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_tts_pause>`
  2046. Puts the synthesizer into a paused state.
  2047. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
  2048. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  2049. .. rst-class:: classref-item-separator
  2050. ----
  2051. .. _class_DisplayServer_method_tts_resume:
  2052. .. rst-class:: classref-method
  2053. |void| **tts_resume**\ (\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_tts_resume>`
  2054. Resumes the synthesizer if it was paused.
  2055. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
  2056. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  2057. .. rst-class:: classref-item-separator
  2058. ----
  2059. .. _class_DisplayServer_method_tts_set_utterance_callback:
  2060. .. rst-class:: classref-method
  2061. |void| **tts_set_utterance_callback**\ (\ event\: :ref:`TTSUtteranceEvent<enum_DisplayServer_TTSUtteranceEvent>`, callable\: :ref:`Callable<class_Callable>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_tts_set_utterance_callback>`
  2062. Adds a callback, which is called when the utterance has started, finished, canceled or reached a text boundary.
  2063. - :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.
  2064. - :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.
  2065. \ **Note:** The granularity of the boundary callbacks is engine dependent.
  2066. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
  2067. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  2068. .. rst-class:: classref-item-separator
  2069. ----
  2070. .. _class_DisplayServer_method_tts_speak:
  2071. .. rst-class:: classref-method
  2072. |void| **tts_speak**\ (\ text\: :ref:`String<class_String>`, voice\: :ref:`String<class_String>`, volume\: :ref:`int<class_int>` = 50, pitch\: :ref:`float<class_float>` = 1.0, rate\: :ref:`float<class_float>` = 1.0, utterance_id\: :ref:`int<class_int>` = 0, interrupt\: :ref:`bool<class_bool>` = false\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_tts_speak>`
  2073. Adds an utterance to the queue. If ``interrupt`` is ``true``, the queue is cleared first.
  2074. - ``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>`.
  2075. - ``volume`` ranges from ``0`` (lowest) to ``100`` (highest).
  2076. - ``pitch`` ranges from ``0.0`` (lowest) to ``2.0`` (highest), ``1.0`` is default pitch for the current voice.
  2077. - ``rate`` ranges from ``0.1`` (lowest) to ``10.0`` (highest), ``1.0`` is a normal speaking rate. Other values act as a percentage relative.
  2078. - ``utterance_id`` is passed as a parameter to the callback functions.
  2079. \ **Note:** On Windows and Linux (X11/Wayland), 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>`.
  2080. \ **Note:** The granularity of pitch, rate, and volume is engine and voice dependent. Values may be truncated.
  2081. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
  2082. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  2083. .. rst-class:: classref-item-separator
  2084. ----
  2085. .. _class_DisplayServer_method_tts_stop:
  2086. .. rst-class:: classref-method
  2087. |void| **tts_stop**\ (\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_tts_stop>`
  2088. Stops synthesis in progress and removes all utterances from the queue.
  2089. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Linux), macOS, and Windows.
  2090. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  2091. .. rst-class:: classref-item-separator
  2092. ----
  2093. .. _class_DisplayServer_method_unregister_additional_output:
  2094. .. rst-class:: classref-method
  2095. |void| **unregister_additional_output**\ (\ object\: :ref:`Object<class_Object>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_unregister_additional_output>`
  2096. Unregisters an :ref:`Object<class_Object>` representing an additional output, that was registered via :ref:`register_additional_output<class_DisplayServer_method_register_additional_output>`.
  2097. .. rst-class:: classref-item-separator
  2098. ----
  2099. .. _class_DisplayServer_method_virtual_keyboard_get_height:
  2100. .. rst-class:: classref-method
  2101. :ref:`int<class_int>` **virtual_keyboard_get_height**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_virtual_keyboard_get_height>`
  2102. Returns the on-screen keyboard's height in pixels. Returns 0 if there is no keyboard or if it is currently hidden.
  2103. .. rst-class:: classref-item-separator
  2104. ----
  2105. .. _class_DisplayServer_method_virtual_keyboard_hide:
  2106. .. rst-class:: classref-method
  2107. |void| **virtual_keyboard_hide**\ (\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_virtual_keyboard_hide>`
  2108. Hides the virtual keyboard if it is shown, does nothing otherwise.
  2109. .. rst-class:: classref-item-separator
  2110. ----
  2111. .. _class_DisplayServer_method_virtual_keyboard_show:
  2112. .. rst-class:: classref-method
  2113. |void| **virtual_keyboard_show**\ (\ existing_text\: :ref:`String<class_String>`, position\: :ref:`Rect2<class_Rect2>` = Rect2(0, 0, 0, 0), type\: :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` = 0, max_length\: :ref:`int<class_int>` = -1, cursor_start\: :ref:`int<class_int>` = -1, cursor_end\: :ref:`int<class_int>` = -1\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_virtual_keyboard_show>`
  2114. Shows the virtual keyboard if the platform has one.
  2115. \ ``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).
  2116. \ ``position`` parameter is the screen space :ref:`Rect2<class_Rect2>` of the edited text.
  2117. \ ``type`` parameter allows configuring which type of virtual keyboard to show.
  2118. \ ``max_length`` limits the number of characters that can be entered if different from ``-1``.
  2119. \ ``cursor_start`` can optionally define the current text cursor position if ``cursor_end`` is not set.
  2120. \ ``cursor_start`` and ``cursor_end`` can optionally define the current text selection.
  2121. \ **Note:** This method is implemented on Android, iOS and Web.
  2122. .. rst-class:: classref-item-separator
  2123. ----
  2124. .. _class_DisplayServer_method_warp_mouse:
  2125. .. rst-class:: classref-method
  2126. |void| **warp_mouse**\ (\ position\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_warp_mouse>`
  2127. 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.
  2128. \ **Note:** :ref:`warp_mouse<class_DisplayServer_method_warp_mouse>` is only supported on Windows, macOS, and Linux (X11/Wayland). It has no effect on Android, iOS, and Web.
  2129. .. rst-class:: classref-item-separator
  2130. ----
  2131. .. _class_DisplayServer_method_window_can_draw:
  2132. .. rst-class:: classref-method
  2133. :ref:`bool<class_bool>` **window_can_draw**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_window_can_draw>`
  2134. 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``.
  2135. .. rst-class:: classref-item-separator
  2136. ----
  2137. .. _class_DisplayServer_method_window_get_active_popup:
  2138. .. rst-class:: classref-method
  2139. :ref:`int<class_int>` **window_get_active_popup**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_window_get_active_popup>`
  2140. Returns ID of the active popup window, or :ref:`INVALID_WINDOW_ID<class_DisplayServer_constant_INVALID_WINDOW_ID>` if there is none.
  2141. .. rst-class:: classref-item-separator
  2142. ----
  2143. .. _class_DisplayServer_method_window_get_attached_instance_id:
  2144. .. rst-class:: classref-method
  2145. :ref:`int<class_int>` **window_get_attached_instance_id**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_window_get_attached_instance_id>`
  2146. 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.
  2147. .. rst-class:: classref-item-separator
  2148. ----
  2149. .. _class_DisplayServer_method_window_get_current_screen:
  2150. .. rst-class:: classref-method
  2151. :ref:`int<class_int>` **window_get_current_screen**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_window_get_current_screen>`
  2152. 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>`.
  2153. .. rst-class:: classref-item-separator
  2154. ----
  2155. .. _class_DisplayServer_method_window_get_flag:
  2156. .. rst-class:: classref-method
  2157. :ref:`bool<class_bool>` **window_get_flag**\ (\ flag\: :ref:`WindowFlags<enum_DisplayServer_WindowFlags>`, window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_window_get_flag>`
  2158. Returns the current value of the given window's ``flag``.
  2159. .. rst-class:: classref-item-separator
  2160. ----
  2161. .. _class_DisplayServer_method_window_get_max_size:
  2162. .. rst-class:: classref-method
  2163. :ref:`Vector2i<class_Vector2i>` **window_get_max_size**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_window_get_max_size>`
  2164. Returns the window's maximum size (in pixels). See also :ref:`window_set_max_size<class_DisplayServer_method_window_set_max_size>`.
  2165. .. rst-class:: classref-item-separator
  2166. ----
  2167. .. _class_DisplayServer_method_window_get_min_size:
  2168. .. rst-class:: classref-method
  2169. :ref:`Vector2i<class_Vector2i>` **window_get_min_size**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_window_get_min_size>`
  2170. Returns the window's minimum size (in pixels). See also :ref:`window_set_min_size<class_DisplayServer_method_window_set_min_size>`.
  2171. .. rst-class:: classref-item-separator
  2172. ----
  2173. .. _class_DisplayServer_method_window_get_mode:
  2174. .. rst-class:: classref-method
  2175. :ref:`WindowMode<enum_DisplayServer_WindowMode>` **window_get_mode**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_window_get_mode>`
  2176. Returns the mode of the given window.
  2177. .. rst-class:: classref-item-separator
  2178. ----
  2179. .. _class_DisplayServer_method_window_get_native_handle:
  2180. .. rst-class:: classref-method
  2181. :ref:`int<class_int>` **window_get_native_handle**\ (\ handle_type\: :ref:`HandleType<enum_DisplayServer_HandleType>`, window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_window_get_native_handle>`
  2182. Returns internal structure pointers for use in plugins.
  2183. \ **Note:** This method is implemented on Android, Linux (X11/Wayland), macOS, and Windows.
  2184. .. rst-class:: classref-item-separator
  2185. ----
  2186. .. _class_DisplayServer_method_window_get_popup_safe_rect:
  2187. .. rst-class:: classref-method
  2188. :ref:`Rect2i<class_Rect2i>` **window_get_popup_safe_rect**\ (\ window\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_window_get_popup_safe_rect>`
  2189. Returns the bounding box of control, or menu item that was used to open the popup window, in the screen coordinate system.
  2190. .. rst-class:: classref-item-separator
  2191. ----
  2192. .. _class_DisplayServer_method_window_get_position:
  2193. .. rst-class:: classref-method
  2194. :ref:`Vector2i<class_Vector2i>` **window_get_position**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_window_get_position>`
  2195. Returns the position of the client area of the given window on the screen.
  2196. .. rst-class:: classref-item-separator
  2197. ----
  2198. .. _class_DisplayServer_method_window_get_position_with_decorations:
  2199. .. rst-class:: classref-method
  2200. :ref:`Vector2i<class_Vector2i>` **window_get_position_with_decorations**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_window_get_position_with_decorations>`
  2201. 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>`.
  2202. .. rst-class:: classref-item-separator
  2203. ----
  2204. .. _class_DisplayServer_method_window_get_safe_title_margins:
  2205. .. rst-class:: classref-method
  2206. :ref:`Vector3i<class_Vector3i>` **window_get_safe_title_margins**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_window_get_safe_title_margins>`
  2207. 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.
  2208. .. rst-class:: classref-item-separator
  2209. ----
  2210. .. _class_DisplayServer_method_window_get_size:
  2211. .. rst-class:: classref-method
  2212. :ref:`Vector2i<class_Vector2i>` **window_get_size**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_window_get_size>`
  2213. 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>`.
  2214. .. rst-class:: classref-item-separator
  2215. ----
  2216. .. _class_DisplayServer_method_window_get_size_with_decorations:
  2217. .. rst-class:: classref-method
  2218. :ref:`Vector2i<class_Vector2i>` **window_get_size_with_decorations**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_window_get_size_with_decorations>`
  2219. 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>`.
  2220. .. rst-class:: classref-item-separator
  2221. ----
  2222. .. _class_DisplayServer_method_window_get_title_size:
  2223. .. rst-class:: classref-method
  2224. :ref:`Vector2i<class_Vector2i>` **window_get_title_size**\ (\ title\: :ref:`String<class_String>`, window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_window_get_title_size>`
  2225. 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.
  2226. \ **Note:** This method is implemented on macOS and Windows.
  2227. .. rst-class:: classref-item-separator
  2228. ----
  2229. .. _class_DisplayServer_method_window_get_vsync_mode:
  2230. .. rst-class:: classref-method
  2231. :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` **window_get_vsync_mode**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_window_get_vsync_mode>`
  2232. Returns the V-Sync mode of the given window.
  2233. .. rst-class:: classref-item-separator
  2234. ----
  2235. .. _class_DisplayServer_method_window_is_focused:
  2236. .. rst-class:: classref-method
  2237. :ref:`bool<class_bool>` **window_is_focused**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_window_is_focused>`
  2238. Returns ``true`` if the window specified by ``window_id`` is focused.
  2239. .. rst-class:: classref-item-separator
  2240. ----
  2241. .. _class_DisplayServer_method_window_is_maximize_allowed:
  2242. .. rst-class:: classref-method
  2243. :ref:`bool<class_bool>` **window_is_maximize_allowed**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_window_is_maximize_allowed>`
  2244. Returns ``true`` if the given window can be maximized (the maximize button is enabled).
  2245. .. rst-class:: classref-item-separator
  2246. ----
  2247. .. _class_DisplayServer_method_window_maximize_on_title_dbl_click:
  2248. .. rst-class:: classref-method
  2249. :ref:`bool<class_bool>` **window_maximize_on_title_dbl_click**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_window_maximize_on_title_dbl_click>`
  2250. Returns ``true``, if double-click on a window title should maximize it.
  2251. \ **Note:** This method is implemented only on macOS.
  2252. .. rst-class:: classref-item-separator
  2253. ----
  2254. .. _class_DisplayServer_method_window_minimize_on_title_dbl_click:
  2255. .. rst-class:: classref-method
  2256. :ref:`bool<class_bool>` **window_minimize_on_title_dbl_click**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_window_minimize_on_title_dbl_click>`
  2257. Returns ``true``, if double-click on a window title should minimize it.
  2258. \ **Note:** This method is implemented only on macOS.
  2259. .. rst-class:: classref-item-separator
  2260. ----
  2261. .. _class_DisplayServer_method_window_move_to_foreground:
  2262. .. rst-class:: classref-method
  2263. |void| **window_move_to_foreground**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_window_move_to_foreground>`
  2264. Moves the window specified by ``window_id`` to the foreground, so that it is visible over other windows.
  2265. .. rst-class:: classref-item-separator
  2266. ----
  2267. .. _class_DisplayServer_method_window_request_attention:
  2268. .. rst-class:: classref-method
  2269. |void| **window_request_attention**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_window_request_attention>`
  2270. 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.
  2271. .. rst-class:: classref-item-separator
  2272. ----
  2273. .. _class_DisplayServer_method_window_set_current_screen:
  2274. .. rst-class:: classref-method
  2275. |void| **window_set_current_screen**\ (\ screen\: :ref:`int<class_int>`, window_id\: :ref:`int<class_int>` = 0\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_window_set_current_screen>`
  2276. 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>`.
  2277. .. rst-class:: classref-item-separator
  2278. ----
  2279. .. _class_DisplayServer_method_window_set_drop_files_callback:
  2280. .. rst-class:: classref-method
  2281. |void| **window_set_drop_files_callback**\ (\ callback\: :ref:`Callable<class_Callable>`, window_id\: :ref:`int<class_int>` = 0\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_window_set_drop_files_callback>`
  2282. 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``. ``callback`` should take one :ref:`PackedStringArray<class_PackedStringArray>` argument, which is the list of dropped files.
  2283. \ **Warning:** Advanced users only! Adding such a callback to a :ref:`Window<class_Window>` node will override its default implementation, which can introduce bugs.
  2284. \ **Note:** This method is implemented on Windows, macOS, Linux (X11/Wayland), and Web.
  2285. .. rst-class:: classref-item-separator
  2286. ----
  2287. .. _class_DisplayServer_method_window_set_exclusive:
  2288. .. rst-class:: classref-method
  2289. |void| **window_set_exclusive**\ (\ window_id\: :ref:`int<class_int>`, exclusive\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_window_set_exclusive>`
  2290. 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.
  2291. \ **Note:** On macOS, exclusive windows are confined to the same space (virtual desktop or screen) as the parent window.
  2292. \ **Note:** This method is implemented on macOS and Windows.
  2293. .. rst-class:: classref-item-separator
  2294. ----
  2295. .. _class_DisplayServer_method_window_set_flag:
  2296. .. rst-class:: classref-method
  2297. |void| **window_set_flag**\ (\ flag\: :ref:`WindowFlags<enum_DisplayServer_WindowFlags>`, enabled\: :ref:`bool<class_bool>`, window_id\: :ref:`int<class_int>` = 0\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_window_set_flag>`
  2298. Enables or disables the given window's given ``flag``. See :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` for possible values and their behavior.
  2299. .. rst-class:: classref-item-separator
  2300. ----
  2301. .. _class_DisplayServer_method_window_set_ime_active:
  2302. .. rst-class:: classref-method
  2303. |void| **window_set_ime_active**\ (\ active\: :ref:`bool<class_bool>`, window_id\: :ref:`int<class_int>` = 0\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_window_set_ime_active>`
  2304. 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>`.
  2305. .. rst-class:: classref-item-separator
  2306. ----
  2307. .. _class_DisplayServer_method_window_set_ime_position:
  2308. .. rst-class:: classref-method
  2309. |void| **window_set_ime_position**\ (\ position\: :ref:`Vector2i<class_Vector2i>`, window_id\: :ref:`int<class_int>` = 0\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_window_set_ime_position>`
  2310. 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``.
  2311. .. rst-class:: classref-item-separator
  2312. ----
  2313. .. _class_DisplayServer_method_window_set_input_event_callback:
  2314. .. rst-class:: classref-method
  2315. |void| **window_set_input_event_callback**\ (\ callback\: :ref:`Callable<class_Callable>`, window_id\: :ref:`int<class_int>` = 0\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_window_set_input_event_callback>`
  2316. Sets the ``callback`` that should be called when any :ref:`InputEvent<class_InputEvent>` is sent to the window specified by ``window_id``.
  2317. \ **Warning:** Advanced users only! Adding such a callback to a :ref:`Window<class_Window>` node will override its default implementation, which can introduce bugs.
  2318. .. rst-class:: classref-item-separator
  2319. ----
  2320. .. _class_DisplayServer_method_window_set_input_text_callback:
  2321. .. rst-class:: classref-method
  2322. |void| **window_set_input_text_callback**\ (\ callback\: :ref:`Callable<class_Callable>`, window_id\: :ref:`int<class_int>` = 0\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_window_set_input_text_callback>`
  2323. Sets the ``callback`` that should be called when text is entered using the virtual keyboard to the window specified by ``window_id``.
  2324. \ **Warning:** Advanced users only! Adding such a callback to a :ref:`Window<class_Window>` node will override its default implementation, which can introduce bugs.
  2325. .. rst-class:: classref-item-separator
  2326. ----
  2327. .. _class_DisplayServer_method_window_set_max_size:
  2328. .. rst-class:: classref-method
  2329. |void| **window_set_max_size**\ (\ max_size\: :ref:`Vector2i<class_Vector2i>`, window_id\: :ref:`int<class_int>` = 0\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_window_set_max_size>`
  2330. 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 larger than the specified size. See also :ref:`window_get_max_size<class_DisplayServer_method_window_get_max_size>`.
  2331. \ **Note:** It's recommended to change this value using :ref:`Window.max_size<class_Window_property_max_size>` instead.
  2332. \ **Note:** Using third-party tools, it is possible for users to disable window geometry restrictions and therefore bypass this limit.
  2333. .. rst-class:: classref-item-separator
  2334. ----
  2335. .. _class_DisplayServer_method_window_set_min_size:
  2336. .. rst-class:: classref-method
  2337. |void| **window_set_min_size**\ (\ min_size\: :ref:`Vector2i<class_Vector2i>`, window_id\: :ref:`int<class_int>` = 0\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_window_set_min_size>`
  2338. 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 smaller than the specified size. See also :ref:`window_get_min_size<class_DisplayServer_method_window_get_min_size>`.
  2339. \ **Note:** It's recommended to change this value using :ref:`Window.min_size<class_Window_property_min_size>` instead.
  2340. \ **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.
  2341. \ **Note:** Using third-party tools, it is possible for users to disable window geometry restrictions and therefore bypass this limit.
  2342. .. rst-class:: classref-item-separator
  2343. ----
  2344. .. _class_DisplayServer_method_window_set_mode:
  2345. .. rst-class:: classref-method
  2346. |void| **window_set_mode**\ (\ mode\: :ref:`WindowMode<enum_DisplayServer_WindowMode>`, window_id\: :ref:`int<class_int>` = 0\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_window_set_mode>`
  2347. Sets window mode for the given window to ``mode``. See :ref:`WindowMode<enum_DisplayServer_WindowMode>` for possible values and how each mode behaves.
  2348. \ **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.
  2349. .. rst-class:: classref-item-separator
  2350. ----
  2351. .. _class_DisplayServer_method_window_set_mouse_passthrough:
  2352. .. rst-class:: classref-method
  2353. |void| **window_set_mouse_passthrough**\ (\ region\: :ref:`PackedVector2Array<class_PackedVector2Array>`, window_id\: :ref:`int<class_int>` = 0\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_window_set_mouse_passthrough>`
  2354. Sets a polygonal region of the window which accepts mouse events. Mouse events outside the region will be passed through.
  2355. Passing an empty array will disable passthrough support (all mouse events will be intercepted by the window, which is the default behavior).
  2356. .. tabs::
  2357. .. code-tab:: gdscript
  2358. # Set region, using Path2D node.
  2359. DisplayServer.window_set_mouse_passthrough($Path2D.curve.get_baked_points())
  2360. # Set region, using Polygon2D node.
  2361. DisplayServer.window_set_mouse_passthrough($Polygon2D.polygon)
  2362. # Reset region to default.
  2363. DisplayServer.window_set_mouse_passthrough([])
  2364. .. code-tab:: csharp
  2365. // Set region, using Path2D node.
  2366. DisplayServer.WindowSetMousePassthrough(GetNode<Path2D>("Path2D").Curve.GetBakedPoints());
  2367. // Set region, using Polygon2D node.
  2368. DisplayServer.WindowSetMousePassthrough(GetNode<Polygon2D>("Polygon2D").Polygon);
  2369. // Reset region to default.
  2370. DisplayServer.WindowSetMousePassthrough(new Vector2[] {});
  2371. \ **Note:** On Windows, the portion of a window that lies outside the region is not drawn, while on Linux (X11) and macOS it is.
  2372. \ **Note:** This method is implemented on Linux (X11), macOS and Windows.
  2373. .. rst-class:: classref-item-separator
  2374. ----
  2375. .. _class_DisplayServer_method_window_set_popup_safe_rect:
  2376. .. rst-class:: classref-method
  2377. |void| **window_set_popup_safe_rect**\ (\ window\: :ref:`int<class_int>`, rect\: :ref:`Rect2i<class_Rect2i>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_window_set_popup_safe_rect>`
  2378. 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.
  2379. .. rst-class:: classref-item-separator
  2380. ----
  2381. .. _class_DisplayServer_method_window_set_position:
  2382. .. rst-class:: classref-method
  2383. |void| **window_set_position**\ (\ position\: :ref:`Vector2i<class_Vector2i>`, window_id\: :ref:`int<class_int>` = 0\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_window_set_position>`
  2384. 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:
  2385. .. code:: text
  2386. * (0, 0) +-------+
  2387. | |
  2388. +-------------+ | |
  2389. | | | |
  2390. | | | |
  2391. +-------------+ +-------+
  2392. See also :ref:`window_get_position<class_DisplayServer_method_window_get_position>` and :ref:`window_set_size<class_DisplayServer_method_window_set_size>`.
  2393. \ **Note:** It's recommended to change this value using :ref:`Window.position<class_Window_property_position>` instead.
  2394. \ **Note:** On Linux (Wayland): this method is a no-op.
  2395. .. rst-class:: classref-item-separator
  2396. ----
  2397. .. _class_DisplayServer_method_window_set_rect_changed_callback:
  2398. .. rst-class:: classref-method
  2399. |void| **window_set_rect_changed_callback**\ (\ callback\: :ref:`Callable<class_Callable>`, window_id\: :ref:`int<class_int>` = 0\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_window_set_rect_changed_callback>`
  2400. Sets the ``callback`` that will be called when the window specified by ``window_id`` is moved or resized.
  2401. \ **Warning:** Advanced users only! Adding such a callback to a :ref:`Window<class_Window>` node will override its default implementation, which can introduce bugs.
  2402. .. rst-class:: classref-item-separator
  2403. ----
  2404. .. _class_DisplayServer_method_window_set_size:
  2405. .. rst-class:: classref-method
  2406. |void| **window_set_size**\ (\ size\: :ref:`Vector2i<class_Vector2i>`, window_id\: :ref:`int<class_int>` = 0\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_window_set_size>`
  2407. 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>`.
  2408. \ **Note:** It's recommended to change this value using :ref:`Window.size<class_Window_property_size>` instead.
  2409. .. rst-class:: classref-item-separator
  2410. ----
  2411. .. _class_DisplayServer_method_window_set_title:
  2412. .. rst-class:: classref-method
  2413. |void| **window_set_title**\ (\ title\: :ref:`String<class_String>`, window_id\: :ref:`int<class_int>` = 0\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_window_set_title>`
  2414. Sets the title of the given window to ``title``.
  2415. \ **Note:** It's recommended to change this value using :ref:`Window.title<class_Window_property_title>` instead.
  2416. \ **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.
  2417. .. rst-class:: classref-item-separator
  2418. ----
  2419. .. _class_DisplayServer_method_window_set_transient:
  2420. .. rst-class:: classref-method
  2421. |void| **window_set_transient**\ (\ window_id\: :ref:`int<class_int>`, parent_window_id\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_window_set_transient>`
  2422. 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.
  2423. \ **Note:** It's recommended to change this value using :ref:`Window.transient<class_Window_property_transient>` instead.
  2424. \ **Note:** The behavior might be different depending on the platform.
  2425. .. rst-class:: classref-item-separator
  2426. ----
  2427. .. _class_DisplayServer_method_window_set_vsync_mode:
  2428. .. rst-class:: classref-method
  2429. |void| **window_set_vsync_mode**\ (\ vsync_mode\: :ref:`VSyncMode<enum_DisplayServer_VSyncMode>`, window_id\: :ref:`int<class_int>` = 0\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_window_set_vsync_mode>`
  2430. 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>`.
  2431. See :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` for possible values and how they affect the behavior of your application.
  2432. 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.
  2433. \ **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.
  2434. .. rst-class:: classref-item-separator
  2435. ----
  2436. .. _class_DisplayServer_method_window_set_window_buttons_offset:
  2437. .. rst-class:: classref-method
  2438. |void| **window_set_window_buttons_offset**\ (\ offset\: :ref:`Vector2i<class_Vector2i>`, window_id\: :ref:`int<class_int>` = 0\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_window_set_window_buttons_offset>`
  2439. 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.
  2440. \ **Note:** This flag is implemented only on macOS.
  2441. .. rst-class:: classref-item-separator
  2442. ----
  2443. .. _class_DisplayServer_method_window_set_window_event_callback:
  2444. .. rst-class:: classref-method
  2445. |void| **window_set_window_event_callback**\ (\ callback\: :ref:`Callable<class_Callable>`, window_id\: :ref:`int<class_int>` = 0\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_window_set_window_event_callback>`
  2446. Sets the ``callback`` that will be called when an event occurs in the window specified by ``window_id``.
  2447. \ **Warning:** Advanced users only! Adding such a callback to a :ref:`Window<class_Window>` node will override its default implementation, which can introduce bugs.
  2448. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  2449. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  2450. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  2451. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  2452. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  2453. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  2454. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  2455. .. |void| replace:: :abbr:`void (No return value.)`