class_displayserver.rst 409 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/DisplayServer.xml.
  6. .. _class_DisplayServer:
  7. DisplayServer
  8. =============
  9. **Inherits:** :ref:`Object<class_Object>`
  10. 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. | |void| | :ref:`beep<class_DisplayServer_method_beep>`\ (\ ) |const| |
  23. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  24. | :ref:`String<class_String>` | :ref:`clipboard_get<class_DisplayServer_method_clipboard_get>`\ (\ ) |const| |
  25. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  26. | :ref:`Image<class_Image>` | :ref:`clipboard_get_image<class_DisplayServer_method_clipboard_get_image>`\ (\ ) |const| |
  27. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  28. | :ref:`String<class_String>` | :ref:`clipboard_get_primary<class_DisplayServer_method_clipboard_get_primary>`\ (\ ) |const| |
  29. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | :ref:`bool<class_bool>` | :ref:`clipboard_has<class_DisplayServer_method_clipboard_has>`\ (\ ) |const| |
  31. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. | :ref:`bool<class_bool>` | :ref:`clipboard_has_image<class_DisplayServer_method_clipboard_has_image>`\ (\ ) |const| |
  33. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | |void| | :ref:`clipboard_set<class_DisplayServer_method_clipboard_set>`\ (\ clipboard\: :ref:`String<class_String>`\ ) |
  35. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | |void| | :ref:`clipboard_set_primary<class_DisplayServer_method_clipboard_set_primary>`\ (\ clipboard_primary\: :ref:`String<class_String>`\ ) |
  37. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | :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>`\ ) |
  39. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | :ref:`CursorShape<enum_DisplayServer_CursorShape>` | :ref:`cursor_get_shape<class_DisplayServer_method_cursor_get_shape>`\ (\ ) |const| |
  41. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | |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)\ ) |
  43. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | |void| | :ref:`cursor_set_shape<class_DisplayServer_method_cursor_set_shape>`\ (\ shape\: :ref:`CursorShape<enum_DisplayServer_CursorShape>`\ ) |
  45. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | |void| | :ref:`delete_status_indicator<class_DisplayServer_method_delete_status_indicator>`\ (\ id\: :ref:`int<class_int>`\ ) |
  47. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | :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>`\ ) |
  49. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | :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>`\ ) |
  51. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | |void| | :ref:`enable_for_stealing_focus<class_DisplayServer_method_enable_for_stealing_focus>`\ (\ process_id\: :ref:`int<class_int>`\ ) |
  53. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | :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>`\ ) |
  55. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | :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>`\ ) |
  57. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | |void| | :ref:`force_process_and_drop_events<class_DisplayServer_method_force_process_and_drop_events>`\ (\ ) |
  59. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | :ref:`Color<class_Color>` | :ref:`get_accent_color<class_DisplayServer_method_get_accent_color>`\ (\ ) |const| |
  61. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | :ref:`Color<class_Color>` | :ref:`get_base_color<class_DisplayServer_method_get_base_color>`\ (\ ) |const| |
  63. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | :ref:`Array<class_Array>`\[:ref:`Rect2<class_Rect2>`\] | :ref:`get_display_cutouts<class_DisplayServer_method_get_display_cutouts>`\ (\ ) |const| |
  65. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | :ref:`Rect2i<class_Rect2i>` | :ref:`get_display_safe_area<class_DisplayServer_method_get_display_safe_area>`\ (\ ) |const| |
  67. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | :ref:`int<class_int>` | :ref:`get_keyboard_focus_screen<class_DisplayServer_method_get_keyboard_focus_screen>`\ (\ ) |const| |
  69. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | :ref:`String<class_String>` | :ref:`get_name<class_DisplayServer_method_get_name>`\ (\ ) |const| |
  71. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | :ref:`int<class_int>` | :ref:`get_primary_screen<class_DisplayServer_method_get_primary_screen>`\ (\ ) |const| |
  73. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | :ref:`int<class_int>` | :ref:`get_screen_count<class_DisplayServer_method_get_screen_count>`\ (\ ) |const| |
  75. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | :ref:`int<class_int>` | :ref:`get_screen_from_rect<class_DisplayServer_method_get_screen_from_rect>`\ (\ rect\: :ref:`Rect2<class_Rect2>`\ ) |const| |
  77. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | :ref:`bool<class_bool>` | :ref:`get_swap_cancel_ok<class_DisplayServer_method_get_swap_cancel_ok>`\ (\ ) |
  79. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | :ref:`int<class_int>` | :ref:`get_window_at_screen_position<class_DisplayServer_method_get_window_at_screen_position>`\ (\ position\: :ref:`Vector2i<class_Vector2i>`\ ) |const| |
  81. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_window_list<class_DisplayServer_method_get_window_list>`\ (\ ) |const| |
  83. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | :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\ ) |
  85. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  86. | :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\ ) |
  87. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  88. | :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\ ) |
  89. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  90. | :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\ ) |
  91. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  92. | :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\ ) |
  93. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  94. | :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\ ) |
  95. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  96. | :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\ ) |
  97. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  98. | :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\ ) |
  99. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  100. | :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\ ) |
  101. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  102. | |void| | :ref:`global_menu_clear<class_DisplayServer_method_global_menu_clear>`\ (\ menu_root\: :ref:`String<class_String>`\ ) |
  103. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  104. | :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| |
  105. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  106. | :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| |
  107. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  108. | :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| |
  109. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  110. | :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| |
  111. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  112. | :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| |
  113. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  114. | :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| |
  115. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  116. | :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| |
  117. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  118. | :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| |
  119. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  120. | :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| |
  121. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  122. | :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| |
  123. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  124. | :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| |
  125. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  126. | :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| |
  127. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  128. | :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| |
  129. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  130. | :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| |
  131. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  132. | :ref:`Dictionary<class_Dictionary>` | :ref:`global_menu_get_system_menu_roots<class_DisplayServer_method_global_menu_get_system_menu_roots>`\ (\ ) |const| |
  133. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  134. | :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| |
  135. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  136. | :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| |
  137. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  138. | :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| |
  139. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  140. | :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| |
  141. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  142. | :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| |
  143. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  144. | |void| | :ref:`global_menu_remove_item<class_DisplayServer_method_global_menu_remove_item>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |
  145. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  146. | |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>`\ ) |
  147. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  148. | |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>`\ ) |
  149. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  150. | |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>`\ ) |
  151. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  152. | |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>`\ ) |
  153. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  154. | |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>`\ ) |
  155. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  156. | |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>`\ ) |
  157. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  158. | |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>`\ ) |
  159. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  160. | |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>`\ ) |
  161. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  162. | |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>`\ ) |
  163. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  164. | |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>`\ ) |
  165. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  166. | |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>`\ ) |
  167. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  168. | |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>`\ ) |
  169. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  170. | |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>`\ ) |
  171. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  172. | |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>`\ ) |
  173. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  174. | |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>`\ ) |
  175. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  176. | |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>`\ ) |
  177. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  178. | |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>`\ ) |
  179. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  180. | |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>`\ ) |
  181. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  182. | :ref:`bool<class_bool>` | :ref:`has_additional_outputs<class_DisplayServer_method_has_additional_outputs>`\ (\ ) |const| |
  183. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  184. | :ref:`bool<class_bool>` | :ref:`has_feature<class_DisplayServer_method_has_feature>`\ (\ feature\: :ref:`Feature<enum_DisplayServer_Feature>`\ ) |const| |
  185. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  186. | :ref:`bool<class_bool>` | :ref:`has_hardware_keyboard<class_DisplayServer_method_has_hardware_keyboard>`\ (\ ) |const| |
  187. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  188. | |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>`\ ) |
  189. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  190. | :ref:`Vector2i<class_Vector2i>` | :ref:`ime_get_selection<class_DisplayServer_method_ime_get_selection>`\ (\ ) |const| |
  191. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  192. | :ref:`String<class_String>` | :ref:`ime_get_text<class_DisplayServer_method_ime_get_text>`\ (\ ) |const| |
  193. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  194. | :ref:`bool<class_bool>` | :ref:`is_dark_mode<class_DisplayServer_method_is_dark_mode>`\ (\ ) |const| |
  195. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  196. | :ref:`bool<class_bool>` | :ref:`is_dark_mode_supported<class_DisplayServer_method_is_dark_mode_supported>`\ (\ ) |const| |
  197. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  198. | :ref:`bool<class_bool>` | :ref:`is_touchscreen_available<class_DisplayServer_method_is_touchscreen_available>`\ (\ ) |const| |
  199. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  200. | :ref:`bool<class_bool>` | :ref:`is_window_transparency_available<class_DisplayServer_method_is_window_transparency_available>`\ (\ ) |const| |
  201. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  202. | :ref:`int<class_int>` | :ref:`keyboard_get_current_layout<class_DisplayServer_method_keyboard_get_current_layout>`\ (\ ) |const| |
  203. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  204. | :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| |
  205. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  206. | :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| |
  207. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  208. | :ref:`int<class_int>` | :ref:`keyboard_get_layout_count<class_DisplayServer_method_keyboard_get_layout_count>`\ (\ ) |const| |
  209. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  210. | :ref:`String<class_String>` | :ref:`keyboard_get_layout_language<class_DisplayServer_method_keyboard_get_layout_language>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
  211. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  212. | :ref:`String<class_String>` | :ref:`keyboard_get_layout_name<class_DisplayServer_method_keyboard_get_layout_name>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
  213. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  214. | |void| | :ref:`keyboard_set_current_layout<class_DisplayServer_method_keyboard_set_current_layout>`\ (\ index\: :ref:`int<class_int>`\ ) |
  215. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  216. | |bitfield|\[:ref:`MouseButtonMask<enum_@GlobalScope_MouseButtonMask>`\] | :ref:`mouse_get_button_state<class_DisplayServer_method_mouse_get_button_state>`\ (\ ) |const| |
  217. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  218. | :ref:`MouseMode<enum_DisplayServer_MouseMode>` | :ref:`mouse_get_mode<class_DisplayServer_method_mouse_get_mode>`\ (\ ) |const| |
  219. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  220. | :ref:`Vector2i<class_Vector2i>` | :ref:`mouse_get_position<class_DisplayServer_method_mouse_get_position>`\ (\ ) |const| |
  221. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  222. | |void| | :ref:`mouse_set_mode<class_DisplayServer_method_mouse_set_mode>`\ (\ mouse_mode\: :ref:`MouseMode<enum_DisplayServer_MouseMode>`\ ) |
  223. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  224. | |void| | :ref:`process_events<class_DisplayServer_method_process_events>`\ (\ ) |
  225. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  226. | |void| | :ref:`register_additional_output<class_DisplayServer_method_register_additional_output>`\ (\ object\: :ref:`Object<class_Object>`\ ) |
  227. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  228. | :ref:`int<class_int>` | :ref:`screen_get_dpi<class_DisplayServer_method_screen_get_dpi>`\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| |
  229. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  230. | :ref:`Image<class_Image>` | :ref:`screen_get_image<class_DisplayServer_method_screen_get_image>`\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| |
  231. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  232. | :ref:`Image<class_Image>` | :ref:`screen_get_image_rect<class_DisplayServer_method_screen_get_image_rect>`\ (\ rect\: :ref:`Rect2i<class_Rect2i>`\ ) |const| |
  233. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  234. | :ref:`float<class_float>` | :ref:`screen_get_max_scale<class_DisplayServer_method_screen_get_max_scale>`\ (\ ) |const| |
  235. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  236. | :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` | :ref:`screen_get_orientation<class_DisplayServer_method_screen_get_orientation>`\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| |
  237. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  238. | :ref:`Color<class_Color>` | :ref:`screen_get_pixel<class_DisplayServer_method_screen_get_pixel>`\ (\ position\: :ref:`Vector2i<class_Vector2i>`\ ) |const| |
  239. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  240. | :ref:`Vector2i<class_Vector2i>` | :ref:`screen_get_position<class_DisplayServer_method_screen_get_position>`\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| |
  241. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  242. | :ref:`float<class_float>` | :ref:`screen_get_refresh_rate<class_DisplayServer_method_screen_get_refresh_rate>`\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| |
  243. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  244. | :ref:`float<class_float>` | :ref:`screen_get_scale<class_DisplayServer_method_screen_get_scale>`\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| |
  245. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  246. | :ref:`Vector2i<class_Vector2i>` | :ref:`screen_get_size<class_DisplayServer_method_screen_get_size>`\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| |
  247. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  248. | :ref:`Rect2i<class_Rect2i>` | :ref:`screen_get_usable_rect<class_DisplayServer_method_screen_get_usable_rect>`\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| |
  249. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  250. | :ref:`bool<class_bool>` | :ref:`screen_is_kept_on<class_DisplayServer_method_screen_is_kept_on>`\ (\ ) |const| |
  251. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  252. | |void| | :ref:`screen_set_keep_on<class_DisplayServer_method_screen_set_keep_on>`\ (\ enable\: :ref:`bool<class_bool>`\ ) |
  253. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  254. | |void| | :ref:`screen_set_orientation<class_DisplayServer_method_screen_set_orientation>`\ (\ orientation\: :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>`, screen\: :ref:`int<class_int>` = -1\ ) |
  255. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  256. | |void| | :ref:`set_icon<class_DisplayServer_method_set_icon>`\ (\ image\: :ref:`Image<class_Image>`\ ) |
  257. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  258. | |void| | :ref:`set_native_icon<class_DisplayServer_method_set_native_icon>`\ (\ filename\: :ref:`String<class_String>`\ ) |
  259. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  260. | |void| | :ref:`set_system_theme_change_callback<class_DisplayServer_method_set_system_theme_change_callback>`\ (\ callable\: :ref:`Callable<class_Callable>`\ ) |
  261. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  262. | |void| | :ref:`show_emoji_and_symbol_picker<class_DisplayServer_method_show_emoji_and_symbol_picker>`\ (\ ) |const| |
  263. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  264. | :ref:`Rect2<class_Rect2>` | :ref:`status_indicator_get_rect<class_DisplayServer_method_status_indicator_get_rect>`\ (\ id\: :ref:`int<class_int>`\ ) |const| |
  265. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  266. | |void| | :ref:`status_indicator_set_callback<class_DisplayServer_method_status_indicator_set_callback>`\ (\ id\: :ref:`int<class_int>`, callback\: :ref:`Callable<class_Callable>`\ ) |
  267. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  268. | |void| | :ref:`status_indicator_set_icon<class_DisplayServer_method_status_indicator_set_icon>`\ (\ id\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) |
  269. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  270. | |void| | :ref:`status_indicator_set_menu<class_DisplayServer_method_status_indicator_set_menu>`\ (\ id\: :ref:`int<class_int>`, menu_rid\: :ref:`RID<class_RID>`\ ) |
  271. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  272. | |void| | :ref:`status_indicator_set_tooltip<class_DisplayServer_method_status_indicator_set_tooltip>`\ (\ id\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) |
  273. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  274. | :ref:`String<class_String>` | :ref:`tablet_get_current_driver<class_DisplayServer_method_tablet_get_current_driver>`\ (\ ) |const| |
  275. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  276. | :ref:`int<class_int>` | :ref:`tablet_get_driver_count<class_DisplayServer_method_tablet_get_driver_count>`\ (\ ) |const| |
  277. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  278. | :ref:`String<class_String>` | :ref:`tablet_get_driver_name<class_DisplayServer_method_tablet_get_driver_name>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  279. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  280. | |void| | :ref:`tablet_set_current_driver<class_DisplayServer_method_tablet_set_current_driver>`\ (\ name\: :ref:`String<class_String>`\ ) |
  281. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  282. | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`tts_get_voices<class_DisplayServer_method_tts_get_voices>`\ (\ ) |const| |
  283. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  284. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`tts_get_voices_for_language<class_DisplayServer_method_tts_get_voices_for_language>`\ (\ language\: :ref:`String<class_String>`\ ) |const| |
  285. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  286. | :ref:`bool<class_bool>` | :ref:`tts_is_paused<class_DisplayServer_method_tts_is_paused>`\ (\ ) |const| |
  287. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  288. | :ref:`bool<class_bool>` | :ref:`tts_is_speaking<class_DisplayServer_method_tts_is_speaking>`\ (\ ) |const| |
  289. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  290. | |void| | :ref:`tts_pause<class_DisplayServer_method_tts_pause>`\ (\ ) |
  291. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  292. | |void| | :ref:`tts_resume<class_DisplayServer_method_tts_resume>`\ (\ ) |
  293. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  294. | |void| | :ref:`tts_set_utterance_callback<class_DisplayServer_method_tts_set_utterance_callback>`\ (\ event\: :ref:`TTSUtteranceEvent<enum_DisplayServer_TTSUtteranceEvent>`, callable\: :ref:`Callable<class_Callable>`\ ) |
  295. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  296. | |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\ ) |
  297. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  298. | |void| | :ref:`tts_stop<class_DisplayServer_method_tts_stop>`\ (\ ) |
  299. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  300. | |void| | :ref:`unregister_additional_output<class_DisplayServer_method_unregister_additional_output>`\ (\ object\: :ref:`Object<class_Object>`\ ) |
  301. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  302. | :ref:`int<class_int>` | :ref:`virtual_keyboard_get_height<class_DisplayServer_method_virtual_keyboard_get_height>`\ (\ ) |const| |
  303. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  304. | |void| | :ref:`virtual_keyboard_hide<class_DisplayServer_method_virtual_keyboard_hide>`\ (\ ) |
  305. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  306. | |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\ ) |
  307. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  308. | |void| | :ref:`warp_mouse<class_DisplayServer_method_warp_mouse>`\ (\ position\: :ref:`Vector2i<class_Vector2i>`\ ) |
  309. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  310. | :ref:`bool<class_bool>` | :ref:`window_can_draw<class_DisplayServer_method_window_can_draw>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  311. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  312. | :ref:`int<class_int>` | :ref:`window_get_active_popup<class_DisplayServer_method_window_get_active_popup>`\ (\ ) |const| |
  313. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  314. | :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| |
  315. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  316. | :ref:`int<class_int>` | :ref:`window_get_current_screen<class_DisplayServer_method_window_get_current_screen>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  317. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  318. | :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| |
  319. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  320. | :ref:`Vector2i<class_Vector2i>` | :ref:`window_get_max_size<class_DisplayServer_method_window_get_max_size>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  321. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  322. | :ref:`Vector2i<class_Vector2i>` | :ref:`window_get_min_size<class_DisplayServer_method_window_get_min_size>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  323. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  324. | :ref:`WindowMode<enum_DisplayServer_WindowMode>` | :ref:`window_get_mode<class_DisplayServer_method_window_get_mode>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  325. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  326. | :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| |
  327. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  328. | :ref:`Rect2i<class_Rect2i>` | :ref:`window_get_popup_safe_rect<class_DisplayServer_method_window_get_popup_safe_rect>`\ (\ window\: :ref:`int<class_int>`\ ) |const| |
  329. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  330. | :ref:`Vector2i<class_Vector2i>` | :ref:`window_get_position<class_DisplayServer_method_window_get_position>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  331. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  332. | :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| |
  333. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  334. | :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| |
  335. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  336. | :ref:`Vector2i<class_Vector2i>` | :ref:`window_get_size<class_DisplayServer_method_window_get_size>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  337. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  338. | :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| |
  339. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  340. | :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| |
  341. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  342. | :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| |
  343. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  344. | :ref:`bool<class_bool>` | :ref:`window_is_focused<class_DisplayServer_method_window_is_focused>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  345. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  346. | :ref:`bool<class_bool>` | :ref:`window_is_maximize_allowed<class_DisplayServer_method_window_is_maximize_allowed>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  347. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  348. | :ref:`bool<class_bool>` | :ref:`window_maximize_on_title_dbl_click<class_DisplayServer_method_window_maximize_on_title_dbl_click>`\ (\ ) |const| |
  349. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  350. | :ref:`bool<class_bool>` | :ref:`window_minimize_on_title_dbl_click<class_DisplayServer_method_window_minimize_on_title_dbl_click>`\ (\ ) |const| |
  351. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  352. | |void| | :ref:`window_move_to_foreground<class_DisplayServer_method_window_move_to_foreground>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |
  353. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  354. | |void| | :ref:`window_request_attention<class_DisplayServer_method_window_request_attention>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |
  355. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  356. | |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\ ) |
  357. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  358. | |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\ ) |
  359. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  360. | |void| | :ref:`window_set_exclusive<class_DisplayServer_method_window_set_exclusive>`\ (\ window_id\: :ref:`int<class_int>`, exclusive\: :ref:`bool<class_bool>`\ ) |
  361. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  362. | |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\ ) |
  363. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  364. | |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\ ) |
  365. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  366. | |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\ ) |
  367. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  368. | |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\ ) |
  369. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  370. | |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\ ) |
  371. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  372. | |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\ ) |
  373. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  374. | |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\ ) |
  375. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  376. | |void| | :ref:`window_set_mode<class_DisplayServer_method_window_set_mode>`\ (\ mode\: :ref:`WindowMode<enum_DisplayServer_WindowMode>`, window_id\: :ref:`int<class_int>` = 0\ ) |
  377. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  378. | |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\ ) |
  379. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  380. | |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>`\ ) |
  381. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  382. | |void| | :ref:`window_set_position<class_DisplayServer_method_window_set_position>`\ (\ position\: :ref:`Vector2i<class_Vector2i>`, window_id\: :ref:`int<class_int>` = 0\ ) |
  383. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  384. | |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\ ) |
  385. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  386. | |void| | :ref:`window_set_size<class_DisplayServer_method_window_set_size>`\ (\ size\: :ref:`Vector2i<class_Vector2i>`, window_id\: :ref:`int<class_int>` = 0\ ) |
  387. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  388. | |void| | :ref:`window_set_title<class_DisplayServer_method_window_set_title>`\ (\ title\: :ref:`String<class_String>`, window_id\: :ref:`int<class_int>` = 0\ ) |
  389. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  390. | |void| | :ref:`window_set_transient<class_DisplayServer_method_window_set_transient>`\ (\ window_id\: :ref:`int<class_int>`, parent_window_id\: :ref:`int<class_int>`\ ) |
  391. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  392. | |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\ ) |
  393. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  394. | |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\ ) |
  395. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  396. | |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\ ) |
  397. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  398. | |void| | :ref:`window_start_drag<class_DisplayServer_method_window_start_drag>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |
  399. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  400. | |void| | :ref:`window_start_resize<class_DisplayServer_method_window_start_resize>`\ (\ edge\: :ref:`WindowResizeEdge<enum_DisplayServer_WindowResizeEdge>`, window_id\: :ref:`int<class_int>` = 0\ ) |
  401. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  402. .. rst-class:: classref-section-separator
  403. ----
  404. .. rst-class:: classref-descriptions-group
  405. Enumerations
  406. ------------
  407. .. _enum_DisplayServer_Feature:
  408. .. rst-class:: classref-enumeration
  409. enum **Feature**: :ref:`๐Ÿ”—<enum_DisplayServer_Feature>`
  410. .. _class_DisplayServer_constant_FEATURE_GLOBAL_MENU:
  411. .. rst-class:: classref-enumeration-constant
  412. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_GLOBAL_MENU** = ``0``
  413. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  414. Display server supports global menu. This allows the application to display its menu items in the operating system's top bar. **macOS**
  415. .. _class_DisplayServer_constant_FEATURE_SUBWINDOWS:
  416. .. rst-class:: classref-enumeration-constant
  417. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_SUBWINDOWS** = ``1``
  418. Display server supports multiple windows that can be moved outside of the main window. **Windows, macOS, Linux (X11)**
  419. .. _class_DisplayServer_constant_FEATURE_TOUCHSCREEN:
  420. .. rst-class:: classref-enumeration-constant
  421. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_TOUCHSCREEN** = ``2``
  422. Display server supports touchscreen input. **Windows, Linux (X11), Android, iOS, Web**
  423. .. _class_DisplayServer_constant_FEATURE_MOUSE:
  424. .. rst-class:: classref-enumeration-constant
  425. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_MOUSE** = ``3``
  426. Display server supports mouse input. **Windows, macOS, Linux (X11/Wayland), Android, Web**
  427. .. _class_DisplayServer_constant_FEATURE_MOUSE_WARP:
  428. .. rst-class:: classref-enumeration-constant
  429. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_MOUSE_WARP** = ``4``
  430. 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)**
  431. .. _class_DisplayServer_constant_FEATURE_CLIPBOARD:
  432. .. rst-class:: classref-enumeration-constant
  433. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_CLIPBOARD** = ``5``
  434. 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**
  435. .. _class_DisplayServer_constant_FEATURE_VIRTUAL_KEYBOARD:
  436. .. rst-class:: classref-enumeration-constant
  437. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_VIRTUAL_KEYBOARD** = ``6``
  438. Display server supports popping up a virtual keyboard when requested to input text without a physical keyboard. **Android, iOS, Web**
  439. .. _class_DisplayServer_constant_FEATURE_CURSOR_SHAPE:
  440. .. rst-class:: classref-enumeration-constant
  441. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_CURSOR_SHAPE** = ``7``
  442. Display server supports setting the mouse cursor shape to be different from the default. **Windows, macOS, Linux (X11/Wayland), Android, Web**
  443. .. _class_DisplayServer_constant_FEATURE_CUSTOM_CURSOR_SHAPE:
  444. .. rst-class:: classref-enumeration-constant
  445. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_CUSTOM_CURSOR_SHAPE** = ``8``
  446. Display server supports setting the mouse cursor shape to a custom image. **Windows, macOS, Linux (X11/Wayland), Web**
  447. .. _class_DisplayServer_constant_FEATURE_NATIVE_DIALOG:
  448. .. rst-class:: classref-enumeration-constant
  449. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_NATIVE_DIALOG** = ``9``
  450. 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**
  451. .. _class_DisplayServer_constant_FEATURE_IME:
  452. .. rst-class:: classref-enumeration-constant
  453. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_IME** = ``10``
  454. 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)**
  455. .. _class_DisplayServer_constant_FEATURE_WINDOW_TRANSPARENCY:
  456. .. rst-class:: classref-enumeration-constant
  457. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_WINDOW_TRANSPARENCY** = ``11``
  458. Display server supports windows can use per-pixel transparency to make windows behind them partially or fully visible. **Windows, macOS, Linux (X11/Wayland)**
  459. .. _class_DisplayServer_constant_FEATURE_HIDPI:
  460. .. rst-class:: classref-enumeration-constant
  461. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_HIDPI** = ``12``
  462. 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**
  463. .. _class_DisplayServer_constant_FEATURE_ICON:
  464. .. rst-class:: classref-enumeration-constant
  465. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_ICON** = ``13``
  466. Display server supports changing the window icon (usually displayed in the top-left corner). **Windows, macOS, Linux (X11)**
  467. .. _class_DisplayServer_constant_FEATURE_NATIVE_ICON:
  468. .. rst-class:: classref-enumeration-constant
  469. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_NATIVE_ICON** = ``14``
  470. Display server supports changing the window icon (usually displayed in the top-left corner). **Windows, macOS**
  471. .. _class_DisplayServer_constant_FEATURE_ORIENTATION:
  472. .. rst-class:: classref-enumeration-constant
  473. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_ORIENTATION** = ``15``
  474. Display server supports changing the screen orientation. **Android, iOS**
  475. .. _class_DisplayServer_constant_FEATURE_SWAP_BUFFERS:
  476. .. rst-class:: classref-enumeration-constant
  477. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_SWAP_BUFFERS** = ``16``
  478. 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)**
  479. .. _class_DisplayServer_constant_FEATURE_CLIPBOARD_PRIMARY:
  480. .. rst-class:: classref-enumeration-constant
  481. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_CLIPBOARD_PRIMARY** = ``18``
  482. 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)**
  483. .. _class_DisplayServer_constant_FEATURE_TEXT_TO_SPEECH:
  484. .. rst-class:: classref-enumeration-constant
  485. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_TEXT_TO_SPEECH** = ``19``
  486. Display server supports text-to-speech. See ``tts_*`` methods. **Windows, macOS, Linux (X11/Wayland), Android, iOS, Web**
  487. .. _class_DisplayServer_constant_FEATURE_EXTEND_TO_TITLE:
  488. .. rst-class:: classref-enumeration-constant
  489. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_EXTEND_TO_TITLE** = ``20``
  490. 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**
  491. .. _class_DisplayServer_constant_FEATURE_SCREEN_CAPTURE:
  492. .. rst-class:: classref-enumeration-constant
  493. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_SCREEN_CAPTURE** = ``21``
  494. Display server supports reading screen pixels. See :ref:`screen_get_pixel()<class_DisplayServer_method_screen_get_pixel>`.
  495. .. _class_DisplayServer_constant_FEATURE_STATUS_INDICATOR:
  496. .. rst-class:: classref-enumeration-constant
  497. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_STATUS_INDICATOR** = ``22``
  498. Display server supports application status indicators.
  499. .. _class_DisplayServer_constant_FEATURE_NATIVE_HELP:
  500. .. rst-class:: classref-enumeration-constant
  501. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_NATIVE_HELP** = ``23``
  502. Display server supports native help system search callbacks. See :ref:`help_set_search_callbacks()<class_DisplayServer_method_help_set_search_callbacks>`.
  503. .. _class_DisplayServer_constant_FEATURE_NATIVE_DIALOG_INPUT:
  504. .. rst-class:: classref-enumeration-constant
  505. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_NATIVE_DIALOG_INPUT** = ``24``
  506. 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**
  507. .. _class_DisplayServer_constant_FEATURE_NATIVE_DIALOG_FILE:
  508. .. rst-class:: classref-enumeration-constant
  509. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_NATIVE_DIALOG_FILE** = ``25``
  510. 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>`. **Windows, macOS, Linux (X11/Wayland), Android**
  511. .. _class_DisplayServer_constant_FEATURE_NATIVE_DIALOG_FILE_EXTRA:
  512. .. rst-class:: classref-enumeration-constant
  513. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_NATIVE_DIALOG_FILE_EXTRA** = ``26``
  514. The display server supports all features of :ref:`FEATURE_NATIVE_DIALOG_FILE<class_DisplayServer_constant_FEATURE_NATIVE_DIALOG_FILE>`, with the added functionality of Options and native dialog file access to ``res://`` and ``user://`` paths. 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)**
  515. .. _class_DisplayServer_constant_FEATURE_WINDOW_DRAG:
  516. .. rst-class:: classref-enumeration-constant
  517. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_WINDOW_DRAG** = ``27``
  518. The display server supports initiating window drag and resize operations on demand. See :ref:`window_start_drag()<class_DisplayServer_method_window_start_drag>` and :ref:`window_start_resize()<class_DisplayServer_method_window_start_resize>`.
  519. .. _class_DisplayServer_constant_FEATURE_SCREEN_EXCLUDE_FROM_CAPTURE:
  520. .. rst-class:: classref-enumeration-constant
  521. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_SCREEN_EXCLUDE_FROM_CAPTURE** = ``28``
  522. Display server supports :ref:`WINDOW_FLAG_EXCLUDE_FROM_CAPTURE<class_DisplayServer_constant_WINDOW_FLAG_EXCLUDE_FROM_CAPTURE>` window flag.
  523. .. _class_DisplayServer_constant_FEATURE_WINDOW_EMBEDDING:
  524. .. rst-class:: classref-enumeration-constant
  525. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_WINDOW_EMBEDDING** = ``29``
  526. Display server supports embedding a window from another process. **Windows, Linux (X11)**
  527. .. _class_DisplayServer_constant_FEATURE_NATIVE_DIALOG_FILE_MIME:
  528. .. rst-class:: classref-enumeration-constant
  529. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_NATIVE_DIALOG_FILE_MIME** = ``30``
  530. Native file selection dialog supports MIME types as filters.
  531. .. _class_DisplayServer_constant_FEATURE_EMOJI_AND_SYMBOL_PICKER:
  532. .. rst-class:: classref-enumeration-constant
  533. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_EMOJI_AND_SYMBOL_PICKER** = ``31``
  534. Display server supports system emoji and symbol picker. **Windows, macOS**
  535. .. rst-class:: classref-item-separator
  536. ----
  537. .. _enum_DisplayServer_MouseMode:
  538. .. rst-class:: classref-enumeration
  539. enum **MouseMode**: :ref:`๐Ÿ”—<enum_DisplayServer_MouseMode>`
  540. .. _class_DisplayServer_constant_MOUSE_MODE_VISIBLE:
  541. .. rst-class:: classref-enumeration-constant
  542. :ref:`MouseMode<enum_DisplayServer_MouseMode>` **MOUSE_MODE_VISIBLE** = ``0``
  543. Makes the mouse cursor visible if it is hidden.
  544. .. _class_DisplayServer_constant_MOUSE_MODE_HIDDEN:
  545. .. rst-class:: classref-enumeration-constant
  546. :ref:`MouseMode<enum_DisplayServer_MouseMode>` **MOUSE_MODE_HIDDEN** = ``1``
  547. Makes the mouse cursor hidden if it is visible.
  548. .. _class_DisplayServer_constant_MOUSE_MODE_CAPTURED:
  549. .. rst-class:: classref-enumeration-constant
  550. :ref:`MouseMode<enum_DisplayServer_MouseMode>` **MOUSE_MODE_CAPTURED** = ``2``
  551. Captures the mouse. The mouse will be hidden and its position locked at the center of the window manager's window.
  552. \ **Note:** If you want to process the mouse's movement in this mode, you need to use :ref:`InputEventMouseMotion.relative<class_InputEventMouseMotion_property_relative>`.
  553. .. _class_DisplayServer_constant_MOUSE_MODE_CONFINED:
  554. .. rst-class:: classref-enumeration-constant
  555. :ref:`MouseMode<enum_DisplayServer_MouseMode>` **MOUSE_MODE_CONFINED** = ``3``
  556. Confines the mouse cursor to the game window, and make it visible.
  557. .. _class_DisplayServer_constant_MOUSE_MODE_CONFINED_HIDDEN:
  558. .. rst-class:: classref-enumeration-constant
  559. :ref:`MouseMode<enum_DisplayServer_MouseMode>` **MOUSE_MODE_CONFINED_HIDDEN** = ``4``
  560. Confines the mouse cursor to the game window, and make it hidden.
  561. .. _class_DisplayServer_constant_MOUSE_MODE_MAX:
  562. .. rst-class:: classref-enumeration-constant
  563. :ref:`MouseMode<enum_DisplayServer_MouseMode>` **MOUSE_MODE_MAX** = ``5``
  564. Max value of the :ref:`MouseMode<enum_DisplayServer_MouseMode>`.
  565. .. rst-class:: classref-item-separator
  566. ----
  567. .. _enum_DisplayServer_ScreenOrientation:
  568. .. rst-class:: classref-enumeration
  569. enum **ScreenOrientation**: :ref:`๐Ÿ”—<enum_DisplayServer_ScreenOrientation>`
  570. .. _class_DisplayServer_constant_SCREEN_LANDSCAPE:
  571. .. rst-class:: classref-enumeration-constant
  572. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_LANDSCAPE** = ``0``
  573. Default landscape orientation.
  574. .. _class_DisplayServer_constant_SCREEN_PORTRAIT:
  575. .. rst-class:: classref-enumeration-constant
  576. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_PORTRAIT** = ``1``
  577. Default portrait orientation.
  578. .. _class_DisplayServer_constant_SCREEN_REVERSE_LANDSCAPE:
  579. .. rst-class:: classref-enumeration-constant
  580. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_REVERSE_LANDSCAPE** = ``2``
  581. Reverse landscape orientation (upside down).
  582. .. _class_DisplayServer_constant_SCREEN_REVERSE_PORTRAIT:
  583. .. rst-class:: classref-enumeration-constant
  584. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_REVERSE_PORTRAIT** = ``3``
  585. Reverse portrait orientation (upside down).
  586. .. _class_DisplayServer_constant_SCREEN_SENSOR_LANDSCAPE:
  587. .. rst-class:: classref-enumeration-constant
  588. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_SENSOR_LANDSCAPE** = ``4``
  589. Automatic landscape orientation (default or reverse depending on sensor).
  590. .. _class_DisplayServer_constant_SCREEN_SENSOR_PORTRAIT:
  591. .. rst-class:: classref-enumeration-constant
  592. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_SENSOR_PORTRAIT** = ``5``
  593. Automatic portrait orientation (default or reverse depending on sensor).
  594. .. _class_DisplayServer_constant_SCREEN_SENSOR:
  595. .. rst-class:: classref-enumeration-constant
  596. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_SENSOR** = ``6``
  597. Automatic landscape or portrait orientation (default or reverse depending on sensor).
  598. .. rst-class:: classref-item-separator
  599. ----
  600. .. _enum_DisplayServer_VirtualKeyboardType:
  601. .. rst-class:: classref-enumeration
  602. enum **VirtualKeyboardType**: :ref:`๐Ÿ”—<enum_DisplayServer_VirtualKeyboardType>`
  603. .. _class_DisplayServer_constant_KEYBOARD_TYPE_DEFAULT:
  604. .. rst-class:: classref-enumeration-constant
  605. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_DEFAULT** = ``0``
  606. Default text virtual keyboard.
  607. .. _class_DisplayServer_constant_KEYBOARD_TYPE_MULTILINE:
  608. .. rst-class:: classref-enumeration-constant
  609. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_MULTILINE** = ``1``
  610. Multiline virtual keyboard.
  611. .. _class_DisplayServer_constant_KEYBOARD_TYPE_NUMBER:
  612. .. rst-class:: classref-enumeration-constant
  613. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_NUMBER** = ``2``
  614. Virtual number keypad, useful for PIN entry.
  615. .. _class_DisplayServer_constant_KEYBOARD_TYPE_NUMBER_DECIMAL:
  616. .. rst-class:: classref-enumeration-constant
  617. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_NUMBER_DECIMAL** = ``3``
  618. Virtual number keypad, useful for entering fractional numbers.
  619. .. _class_DisplayServer_constant_KEYBOARD_TYPE_PHONE:
  620. .. rst-class:: classref-enumeration-constant
  621. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_PHONE** = ``4``
  622. Virtual phone number keypad.
  623. .. _class_DisplayServer_constant_KEYBOARD_TYPE_EMAIL_ADDRESS:
  624. .. rst-class:: classref-enumeration-constant
  625. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_EMAIL_ADDRESS** = ``5``
  626. Virtual keyboard with additional keys to assist with typing email addresses.
  627. .. _class_DisplayServer_constant_KEYBOARD_TYPE_PASSWORD:
  628. .. rst-class:: classref-enumeration-constant
  629. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_PASSWORD** = ``6``
  630. Virtual keyboard for entering a password. On most platforms, this should disable autocomplete and autocapitalization.
  631. \ **Note:** This is not supported on Web. Instead, this behaves identically to :ref:`KEYBOARD_TYPE_DEFAULT<class_DisplayServer_constant_KEYBOARD_TYPE_DEFAULT>`.
  632. .. _class_DisplayServer_constant_KEYBOARD_TYPE_URL:
  633. .. rst-class:: classref-enumeration-constant
  634. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_URL** = ``7``
  635. Virtual keyboard with additional keys to assist with typing URLs.
  636. .. rst-class:: classref-item-separator
  637. ----
  638. .. _enum_DisplayServer_CursorShape:
  639. .. rst-class:: classref-enumeration
  640. enum **CursorShape**: :ref:`๐Ÿ”—<enum_DisplayServer_CursorShape>`
  641. .. _class_DisplayServer_constant_CURSOR_ARROW:
  642. .. rst-class:: classref-enumeration-constant
  643. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_ARROW** = ``0``
  644. 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>`.
  645. .. _class_DisplayServer_constant_CURSOR_IBEAM:
  646. .. rst-class:: classref-enumeration-constant
  647. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_IBEAM** = ``1``
  648. 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>`.
  649. .. _class_DisplayServer_constant_CURSOR_POINTING_HAND:
  650. .. rst-class:: classref-enumeration-constant
  651. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_POINTING_HAND** = ``2``
  652. 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>`.
  653. .. _class_DisplayServer_constant_CURSOR_CROSS:
  654. .. rst-class:: classref-enumeration-constant
  655. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_CROSS** = ``3``
  656. 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.
  657. .. _class_DisplayServer_constant_CURSOR_WAIT:
  658. .. rst-class:: classref-enumeration-constant
  659. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_WAIT** = ``4``
  660. 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>`.
  661. .. _class_DisplayServer_constant_CURSOR_BUSY:
  662. .. rst-class:: classref-enumeration-constant
  663. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_BUSY** = ``5``
  664. 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>`.
  665. .. _class_DisplayServer_constant_CURSOR_DRAG:
  666. .. rst-class:: classref-enumeration-constant
  667. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_DRAG** = ``6``
  668. Dragging hand cursor. This is displayed during drag-and-drop operations. See also :ref:`CURSOR_CAN_DROP<class_DisplayServer_constant_CURSOR_CAN_DROP>`.
  669. .. _class_DisplayServer_constant_CURSOR_CAN_DROP:
  670. .. rst-class:: classref-enumeration-constant
  671. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_CAN_DROP** = ``7``
  672. "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>`.
  673. .. _class_DisplayServer_constant_CURSOR_FORBIDDEN:
  674. .. rst-class:: classref-enumeration-constant
  675. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_FORBIDDEN** = ``8``
  676. 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.
  677. .. _class_DisplayServer_constant_CURSOR_VSIZE:
  678. .. rst-class:: classref-enumeration-constant
  679. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_VSIZE** = ``9``
  680. 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>`.
  681. .. _class_DisplayServer_constant_CURSOR_HSIZE:
  682. .. rst-class:: classref-enumeration-constant
  683. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_HSIZE** = ``10``
  684. 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>`.
  685. .. _class_DisplayServer_constant_CURSOR_BDIAGSIZE:
  686. .. rst-class:: classref-enumeration-constant
  687. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_BDIAGSIZE** = ``11``
  688. 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.
  689. .. _class_DisplayServer_constant_CURSOR_FDIAGSIZE:
  690. .. rst-class:: classref-enumeration-constant
  691. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_FDIAGSIZE** = ``12``
  692. 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.
  693. .. _class_DisplayServer_constant_CURSOR_MOVE:
  694. .. rst-class:: classref-enumeration-constant
  695. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_MOVE** = ``13``
  696. Move cursor. Intended to be displayed when the hovered :ref:`Control<class_Control>` can be moved using the mouse.
  697. .. _class_DisplayServer_constant_CURSOR_VSPLIT:
  698. .. rst-class:: classref-enumeration-constant
  699. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_VSPLIT** = ``14``
  700. 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>`.
  701. .. _class_DisplayServer_constant_CURSOR_HSPLIT:
  702. .. rst-class:: classref-enumeration-constant
  703. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_HSPLIT** = ``15``
  704. 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>`.
  705. .. _class_DisplayServer_constant_CURSOR_HELP:
  706. .. rst-class:: classref-enumeration-constant
  707. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_HELP** = ``16``
  708. 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.
  709. .. _class_DisplayServer_constant_CURSOR_MAX:
  710. .. rst-class:: classref-enumeration-constant
  711. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_MAX** = ``17``
  712. Represents the size of the :ref:`CursorShape<enum_DisplayServer_CursorShape>` enum.
  713. .. rst-class:: classref-item-separator
  714. ----
  715. .. _enum_DisplayServer_FileDialogMode:
  716. .. rst-class:: classref-enumeration
  717. enum **FileDialogMode**: :ref:`๐Ÿ”—<enum_DisplayServer_FileDialogMode>`
  718. .. _class_DisplayServer_constant_FILE_DIALOG_MODE_OPEN_FILE:
  719. .. rst-class:: classref-enumeration-constant
  720. :ref:`FileDialogMode<enum_DisplayServer_FileDialogMode>` **FILE_DIALOG_MODE_OPEN_FILE** = ``0``
  721. The native file dialog allows selecting one, and only one file.
  722. .. _class_DisplayServer_constant_FILE_DIALOG_MODE_OPEN_FILES:
  723. .. rst-class:: classref-enumeration-constant
  724. :ref:`FileDialogMode<enum_DisplayServer_FileDialogMode>` **FILE_DIALOG_MODE_OPEN_FILES** = ``1``
  725. The native file dialog allows selecting multiple files.
  726. .. _class_DisplayServer_constant_FILE_DIALOG_MODE_OPEN_DIR:
  727. .. rst-class:: classref-enumeration-constant
  728. :ref:`FileDialogMode<enum_DisplayServer_FileDialogMode>` **FILE_DIALOG_MODE_OPEN_DIR** = ``2``
  729. The native file dialog only allows selecting a directory, disallowing the selection of any file.
  730. .. _class_DisplayServer_constant_FILE_DIALOG_MODE_OPEN_ANY:
  731. .. rst-class:: classref-enumeration-constant
  732. :ref:`FileDialogMode<enum_DisplayServer_FileDialogMode>` **FILE_DIALOG_MODE_OPEN_ANY** = ``3``
  733. The native file dialog allows selecting one file or directory.
  734. .. _class_DisplayServer_constant_FILE_DIALOG_MODE_SAVE_FILE:
  735. .. rst-class:: classref-enumeration-constant
  736. :ref:`FileDialogMode<enum_DisplayServer_FileDialogMode>` **FILE_DIALOG_MODE_SAVE_FILE** = ``4``
  737. The native file dialog will warn when a file exists.
  738. .. rst-class:: classref-item-separator
  739. ----
  740. .. _enum_DisplayServer_WindowMode:
  741. .. rst-class:: classref-enumeration
  742. enum **WindowMode**: :ref:`๐Ÿ”—<enum_DisplayServer_WindowMode>`
  743. .. _class_DisplayServer_constant_WINDOW_MODE_WINDOWED:
  744. .. rst-class:: classref-enumeration-constant
  745. :ref:`WindowMode<enum_DisplayServer_WindowMode>` **WINDOW_MODE_WINDOWED** = ``0``
  746. Windowed mode, i.e. :ref:`Window<class_Window>` doesn't occupy the whole screen (unless set to the size of the screen).
  747. .. _class_DisplayServer_constant_WINDOW_MODE_MINIMIZED:
  748. .. rst-class:: classref-enumeration-constant
  749. :ref:`WindowMode<enum_DisplayServer_WindowMode>` **WINDOW_MODE_MINIMIZED** = ``1``
  750. 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.
  751. .. _class_DisplayServer_constant_WINDOW_MODE_MAXIMIZED:
  752. .. rst-class:: classref-enumeration-constant
  753. :ref:`WindowMode<enum_DisplayServer_WindowMode>` **WINDOW_MODE_MAXIMIZED** = ``2``
  754. 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.
  755. .. _class_DisplayServer_constant_WINDOW_MODE_FULLSCREEN:
  756. .. rst-class:: classref-enumeration-constant
  757. :ref:`WindowMode<enum_DisplayServer_WindowMode>` **WINDOW_MODE_FULLSCREEN** = ``3``
  758. Full screen mode with full multi-window support.
  759. Full screen window covers the entire display area of a screen and has no decorations. The display's video mode is not changed.
  760. \ **On Android:** This enables immersive mode.
  761. \ **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.
  762. \ **On macOS:** A new desktop is used to display the running project.
  763. \ **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.
  764. .. _class_DisplayServer_constant_WINDOW_MODE_EXCLUSIVE_FULLSCREEN:
  765. .. rst-class:: classref-enumeration-constant
  766. :ref:`WindowMode<enum_DisplayServer_WindowMode>` **WINDOW_MODE_EXCLUSIVE_FULLSCREEN** = ``4``
  767. 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).
  768. 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.
  769. \ **On Android:** This enables immersive mode.
  770. \ **On Windows:** Depending on video driver, full screen transition might cause screens to go black for a moment.
  771. \ **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.
  772. \ **On Linux (X11):** Exclusive full screen mode bypasses compositor.
  773. \ **On Linux (Wayland):** Equivalent to :ref:`WINDOW_MODE_FULLSCREEN<class_DisplayServer_constant_WINDOW_MODE_FULLSCREEN>`.
  774. \ **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.
  775. .. rst-class:: classref-item-separator
  776. ----
  777. .. _enum_DisplayServer_WindowFlags:
  778. .. rst-class:: classref-enumeration
  779. enum **WindowFlags**: :ref:`๐Ÿ”—<enum_DisplayServer_WindowFlags>`
  780. .. _class_DisplayServer_constant_WINDOW_FLAG_RESIZE_DISABLED:
  781. .. rst-class:: classref-enumeration-constant
  782. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_RESIZE_DISABLED** = ``0``
  783. 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.
  784. .. _class_DisplayServer_constant_WINDOW_FLAG_BORDERLESS:
  785. .. rst-class:: classref-enumeration-constant
  786. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_BORDERLESS** = ``1``
  787. The window do not have native title bar and other decorations. This flag is ignored for full-screen windows.
  788. .. _class_DisplayServer_constant_WINDOW_FLAG_ALWAYS_ON_TOP:
  789. .. rst-class:: classref-enumeration-constant
  790. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_ALWAYS_ON_TOP** = ``2``
  791. The window is floating on top of all other windows. This flag is ignored for full-screen windows.
  792. .. _class_DisplayServer_constant_WINDOW_FLAG_TRANSPARENT:
  793. .. rst-class:: classref-enumeration-constant
  794. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_TRANSPARENT** = ``3``
  795. The window background can be transparent.
  796. \ **Note:** This flag has no effect if :ref:`is_window_transparency_available()<class_DisplayServer_method_is_window_transparency_available>` returns ``false``.
  797. \ **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.
  798. .. _class_DisplayServer_constant_WINDOW_FLAG_NO_FOCUS:
  799. .. rst-class:: classref-enumeration-constant
  800. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_NO_FOCUS** = ``4``
  801. The window can't be focused. No-focus window will ignore all input, except mouse clicks.
  802. .. _class_DisplayServer_constant_WINDOW_FLAG_POPUP:
  803. .. rst-class:: classref-enumeration-constant
  804. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_POPUP** = ``5``
  805. 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>`).
  806. .. _class_DisplayServer_constant_WINDOW_FLAG_EXTEND_TO_TITLE:
  807. .. rst-class:: classref-enumeration-constant
  808. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_EXTEND_TO_TITLE** = ``6``
  809. 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.
  810. Use :ref:`window_set_window_buttons_offset()<class_DisplayServer_method_window_set_window_buttons_offset>` to adjust minimize/maximize/close buttons offset.
  811. 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.
  812. \ **Note:** This flag is implemented only on macOS.
  813. .. _class_DisplayServer_constant_WINDOW_FLAG_MOUSE_PASSTHROUGH:
  814. .. rst-class:: classref-enumeration-constant
  815. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_MOUSE_PASSTHROUGH** = ``7``
  816. All mouse events are passed to the underlying window of the same application.
  817. .. _class_DisplayServer_constant_WINDOW_FLAG_SHARP_CORNERS:
  818. .. rst-class:: classref-enumeration-constant
  819. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_SHARP_CORNERS** = ``8``
  820. Window style is overridden, forcing sharp corners.
  821. \ **Note:** This flag is implemented only on Windows (11).
  822. .. _class_DisplayServer_constant_WINDOW_FLAG_EXCLUDE_FROM_CAPTURE:
  823. .. rst-class:: classref-enumeration-constant
  824. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_EXCLUDE_FROM_CAPTURE** = ``9``
  825. Windows is excluded from screenshots taken by :ref:`screen_get_image()<class_DisplayServer_method_screen_get_image>`, :ref:`screen_get_image_rect()<class_DisplayServer_method_screen_get_image_rect>`, and :ref:`screen_get_pixel()<class_DisplayServer_method_screen_get_pixel>`.
  826. \ **Note:** This flag is implemented on macOS and Windows.
  827. \ **Note:** Setting this flag will **NOT** prevent other apps from capturing an image, it should not be used as a security measure.
  828. .. _class_DisplayServer_constant_WINDOW_FLAG_MAX:
  829. .. rst-class:: classref-enumeration-constant
  830. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_MAX** = ``10``
  831. Max value of the :ref:`WindowFlags<enum_DisplayServer_WindowFlags>`.
  832. .. rst-class:: classref-item-separator
  833. ----
  834. .. _enum_DisplayServer_WindowEvent:
  835. .. rst-class:: classref-enumeration
  836. enum **WindowEvent**: :ref:`๐Ÿ”—<enum_DisplayServer_WindowEvent>`
  837. .. _class_DisplayServer_constant_WINDOW_EVENT_MOUSE_ENTER:
  838. .. rst-class:: classref-enumeration-constant
  839. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_MOUSE_ENTER** = ``0``
  840. Sent when the mouse pointer enters the window.
  841. .. _class_DisplayServer_constant_WINDOW_EVENT_MOUSE_EXIT:
  842. .. rst-class:: classref-enumeration-constant
  843. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_MOUSE_EXIT** = ``1``
  844. Sent when the mouse pointer exits the window.
  845. .. _class_DisplayServer_constant_WINDOW_EVENT_FOCUS_IN:
  846. .. rst-class:: classref-enumeration-constant
  847. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_FOCUS_IN** = ``2``
  848. Sent when the window grabs focus.
  849. .. _class_DisplayServer_constant_WINDOW_EVENT_FOCUS_OUT:
  850. .. rst-class:: classref-enumeration-constant
  851. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_FOCUS_OUT** = ``3``
  852. Sent when the window loses focus.
  853. .. _class_DisplayServer_constant_WINDOW_EVENT_CLOSE_REQUEST:
  854. .. rst-class:: classref-enumeration-constant
  855. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_CLOSE_REQUEST** = ``4``
  856. Sent when the user has attempted to close the window (e.g. close button is pressed).
  857. .. _class_DisplayServer_constant_WINDOW_EVENT_GO_BACK_REQUEST:
  858. .. rst-class:: classref-enumeration-constant
  859. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_GO_BACK_REQUEST** = ``5``
  860. Sent when the device "Back" button is pressed.
  861. \ **Note:** This event is implemented only on Android.
  862. .. _class_DisplayServer_constant_WINDOW_EVENT_DPI_CHANGE:
  863. .. rst-class:: classref-enumeration-constant
  864. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_DPI_CHANGE** = ``6``
  865. Sent when the window is moved to the display with different DPI, or display DPI is changed.
  866. \ **Note:** This flag is implemented only on macOS.
  867. .. _class_DisplayServer_constant_WINDOW_EVENT_TITLEBAR_CHANGE:
  868. .. rst-class:: classref-enumeration-constant
  869. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_TITLEBAR_CHANGE** = ``7``
  870. 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).
  871. \ **Note:** This flag is implemented only on macOS.
  872. .. rst-class:: classref-item-separator
  873. ----
  874. .. _enum_DisplayServer_WindowResizeEdge:
  875. .. rst-class:: classref-enumeration
  876. enum **WindowResizeEdge**: :ref:`๐Ÿ”—<enum_DisplayServer_WindowResizeEdge>`
  877. .. _class_DisplayServer_constant_WINDOW_EDGE_TOP_LEFT:
  878. .. rst-class:: classref-enumeration-constant
  879. :ref:`WindowResizeEdge<enum_DisplayServer_WindowResizeEdge>` **WINDOW_EDGE_TOP_LEFT** = ``0``
  880. Top-left edge of a window.
  881. .. _class_DisplayServer_constant_WINDOW_EDGE_TOP:
  882. .. rst-class:: classref-enumeration-constant
  883. :ref:`WindowResizeEdge<enum_DisplayServer_WindowResizeEdge>` **WINDOW_EDGE_TOP** = ``1``
  884. Top edge of a window.
  885. .. _class_DisplayServer_constant_WINDOW_EDGE_TOP_RIGHT:
  886. .. rst-class:: classref-enumeration-constant
  887. :ref:`WindowResizeEdge<enum_DisplayServer_WindowResizeEdge>` **WINDOW_EDGE_TOP_RIGHT** = ``2``
  888. Top-right edge of a window.
  889. .. _class_DisplayServer_constant_WINDOW_EDGE_LEFT:
  890. .. rst-class:: classref-enumeration-constant
  891. :ref:`WindowResizeEdge<enum_DisplayServer_WindowResizeEdge>` **WINDOW_EDGE_LEFT** = ``3``
  892. Left edge of a window.
  893. .. _class_DisplayServer_constant_WINDOW_EDGE_RIGHT:
  894. .. rst-class:: classref-enumeration-constant
  895. :ref:`WindowResizeEdge<enum_DisplayServer_WindowResizeEdge>` **WINDOW_EDGE_RIGHT** = ``4``
  896. Right edge of a window.
  897. .. _class_DisplayServer_constant_WINDOW_EDGE_BOTTOM_LEFT:
  898. .. rst-class:: classref-enumeration-constant
  899. :ref:`WindowResizeEdge<enum_DisplayServer_WindowResizeEdge>` **WINDOW_EDGE_BOTTOM_LEFT** = ``5``
  900. Bottom-left edge of a window.
  901. .. _class_DisplayServer_constant_WINDOW_EDGE_BOTTOM:
  902. .. rst-class:: classref-enumeration-constant
  903. :ref:`WindowResizeEdge<enum_DisplayServer_WindowResizeEdge>` **WINDOW_EDGE_BOTTOM** = ``6``
  904. Bottom edge of a window.
  905. .. _class_DisplayServer_constant_WINDOW_EDGE_BOTTOM_RIGHT:
  906. .. rst-class:: classref-enumeration-constant
  907. :ref:`WindowResizeEdge<enum_DisplayServer_WindowResizeEdge>` **WINDOW_EDGE_BOTTOM_RIGHT** = ``7``
  908. Bottom-right edge of a window.
  909. .. _class_DisplayServer_constant_WINDOW_EDGE_MAX:
  910. .. rst-class:: classref-enumeration-constant
  911. :ref:`WindowResizeEdge<enum_DisplayServer_WindowResizeEdge>` **WINDOW_EDGE_MAX** = ``8``
  912. Represents the size of the :ref:`WindowResizeEdge<enum_DisplayServer_WindowResizeEdge>` enum.
  913. .. rst-class:: classref-item-separator
  914. ----
  915. .. _enum_DisplayServer_VSyncMode:
  916. .. rst-class:: classref-enumeration
  917. enum **VSyncMode**: :ref:`๐Ÿ”—<enum_DisplayServer_VSyncMode>`
  918. .. _class_DisplayServer_constant_VSYNC_DISABLED:
  919. .. rst-class:: classref-enumeration-constant
  920. :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` **VSYNC_DISABLED** = ``0``
  921. 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>`).
  922. .. _class_DisplayServer_constant_VSYNC_ENABLED:
  923. .. rst-class:: classref-enumeration-constant
  924. :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` **VSYNC_ENABLED** = ``1``
  925. 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>`).
  926. .. _class_DisplayServer_constant_VSYNC_ADAPTIVE:
  927. .. rst-class:: classref-enumeration-constant
  928. :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` **VSYNC_ADAPTIVE** = ``2``
  929. 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.
  930. .. _class_DisplayServer_constant_VSYNC_MAILBOX:
  931. .. rst-class:: classref-enumeration-constant
  932. :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` **VSYNC_MAILBOX** = ``3``
  933. 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>`).
  934. 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.
  935. .. rst-class:: classref-item-separator
  936. ----
  937. .. _enum_DisplayServer_HandleType:
  938. .. rst-class:: classref-enumeration
  939. enum **HandleType**: :ref:`๐Ÿ”—<enum_DisplayServer_HandleType>`
  940. .. _class_DisplayServer_constant_DISPLAY_HANDLE:
  941. .. rst-class:: classref-enumeration-constant
  942. :ref:`HandleType<enum_DisplayServer_HandleType>` **DISPLAY_HANDLE** = ``0``
  943. Display handle:
  944. - Linux (X11): ``X11::Display*`` for the display.
  945. - Linux (Wayland): ``wl_display`` for the display.
  946. - Android: ``EGLDisplay`` for the display.
  947. .. _class_DisplayServer_constant_WINDOW_HANDLE:
  948. .. rst-class:: classref-enumeration-constant
  949. :ref:`HandleType<enum_DisplayServer_HandleType>` **WINDOW_HANDLE** = ``1``
  950. Window handle:
  951. - Windows: ``HWND`` for the window.
  952. - Linux (X11): ``X11::Window*`` for the window.
  953. - Linux (Wayland): ``wl_surface`` for the window.
  954. - macOS: ``NSWindow*`` for the window.
  955. - iOS: ``UIViewController*`` for the view controller.
  956. - Android: ``jObject`` for the activity.
  957. .. _class_DisplayServer_constant_WINDOW_VIEW:
  958. .. rst-class:: classref-enumeration-constant
  959. :ref:`HandleType<enum_DisplayServer_HandleType>` **WINDOW_VIEW** = ``2``
  960. Window view:
  961. - Windows: ``HDC`` for the window (only with the Compatibility renderer).
  962. - macOS: ``NSView*`` for the window main view.
  963. - iOS: ``UIView*`` for the window main view.
  964. .. _class_DisplayServer_constant_OPENGL_CONTEXT:
  965. .. rst-class:: classref-enumeration-constant
  966. :ref:`HandleType<enum_DisplayServer_HandleType>` **OPENGL_CONTEXT** = ``3``
  967. OpenGL context (only with the Compatibility renderer):
  968. - Windows: ``HGLRC`` for the window (native GL), or ``EGLContext`` for the window (ANGLE).
  969. - Linux (X11): ``GLXContext*`` for the window.
  970. - Linux (Wayland): ``EGLContext`` for the window.
  971. - macOS: ``NSOpenGLContext*`` for the window (native GL), or ``EGLContext`` for the window (ANGLE).
  972. - Android: ``EGLContext`` for the window.
  973. .. _class_DisplayServer_constant_EGL_DISPLAY:
  974. .. rst-class:: classref-enumeration-constant
  975. :ref:`HandleType<enum_DisplayServer_HandleType>` **EGL_DISPLAY** = ``4``
  976. - Windows: ``EGLDisplay`` for the window (ANGLE).
  977. - macOS: ``EGLDisplay`` for the window (ANGLE).
  978. - Linux (Wayland): ``EGLDisplay`` for the window.
  979. .. _class_DisplayServer_constant_EGL_CONFIG:
  980. .. rst-class:: classref-enumeration-constant
  981. :ref:`HandleType<enum_DisplayServer_HandleType>` **EGL_CONFIG** = ``5``
  982. - Windows: ``EGLConfig`` for the window (ANGLE).
  983. - macOS: ``EGLConfig`` for the window (ANGLE).
  984. - Linux (Wayland): ``EGLConfig`` for the window.
  985. .. rst-class:: classref-item-separator
  986. ----
  987. .. _enum_DisplayServer_TTSUtteranceEvent:
  988. .. rst-class:: classref-enumeration
  989. enum **TTSUtteranceEvent**: :ref:`๐Ÿ”—<enum_DisplayServer_TTSUtteranceEvent>`
  990. .. _class_DisplayServer_constant_TTS_UTTERANCE_STARTED:
  991. .. rst-class:: classref-enumeration-constant
  992. :ref:`TTSUtteranceEvent<enum_DisplayServer_TTSUtteranceEvent>` **TTS_UTTERANCE_STARTED** = ``0``
  993. Utterance has begun to be spoken.
  994. .. _class_DisplayServer_constant_TTS_UTTERANCE_ENDED:
  995. .. rst-class:: classref-enumeration-constant
  996. :ref:`TTSUtteranceEvent<enum_DisplayServer_TTSUtteranceEvent>` **TTS_UTTERANCE_ENDED** = ``1``
  997. Utterance was successfully finished.
  998. .. _class_DisplayServer_constant_TTS_UTTERANCE_CANCELED:
  999. .. rst-class:: classref-enumeration-constant
  1000. :ref:`TTSUtteranceEvent<enum_DisplayServer_TTSUtteranceEvent>` **TTS_UTTERANCE_CANCELED** = ``2``
  1001. Utterance was canceled, or TTS service was unable to process it.
  1002. .. _class_DisplayServer_constant_TTS_UTTERANCE_BOUNDARY:
  1003. .. rst-class:: classref-enumeration-constant
  1004. :ref:`TTSUtteranceEvent<enum_DisplayServer_TTSUtteranceEvent>` **TTS_UTTERANCE_BOUNDARY** = ``3``
  1005. Utterance reached a word or sentence boundary.
  1006. .. rst-class:: classref-section-separator
  1007. ----
  1008. .. rst-class:: classref-descriptions-group
  1009. Constants
  1010. ---------
  1011. .. _class_DisplayServer_constant_SCREEN_WITH_MOUSE_FOCUS:
  1012. .. rst-class:: classref-constant
  1013. **SCREEN_WITH_MOUSE_FOCUS** = ``-4`` :ref:`๐Ÿ”—<class_DisplayServer_constant_SCREEN_WITH_MOUSE_FOCUS>`
  1014. Represents the screen containing the mouse pointer.
  1015. \ **Note:** On Linux (Wayland), this constant always represents the screen at index ``0``.
  1016. .. _class_DisplayServer_constant_SCREEN_WITH_KEYBOARD_FOCUS:
  1017. .. rst-class:: classref-constant
  1018. **SCREEN_WITH_KEYBOARD_FOCUS** = ``-3`` :ref:`๐Ÿ”—<class_DisplayServer_constant_SCREEN_WITH_KEYBOARD_FOCUS>`
  1019. Represents the screen containing the window with the keyboard focus.
  1020. \ **Note:** On Linux (Wayland), this constant always represents the screen at index ``0``.
  1021. .. _class_DisplayServer_constant_SCREEN_PRIMARY:
  1022. .. rst-class:: classref-constant
  1023. **SCREEN_PRIMARY** = ``-2`` :ref:`๐Ÿ”—<class_DisplayServer_constant_SCREEN_PRIMARY>`
  1024. Represents the primary screen.
  1025. \ **Note:** On Linux (Wayland), this constant always represents the screen at index ``0``.
  1026. .. _class_DisplayServer_constant_SCREEN_OF_MAIN_WINDOW:
  1027. .. rst-class:: classref-constant
  1028. **SCREEN_OF_MAIN_WINDOW** = ``-1`` :ref:`๐Ÿ”—<class_DisplayServer_constant_SCREEN_OF_MAIN_WINDOW>`
  1029. Represents the screen where the main window is located. This is usually the default value in functions that allow specifying one of several screens.
  1030. \ **Note:** On Linux (Wayland), this constant always represents the screen at index ``0``.
  1031. .. _class_DisplayServer_constant_MAIN_WINDOW_ID:
  1032. .. rst-class:: classref-constant
  1033. **MAIN_WINDOW_ID** = ``0`` :ref:`๐Ÿ”—<class_DisplayServer_constant_MAIN_WINDOW_ID>`
  1034. The ID of the main window spawned by the engine, which can be passed to methods expecting a ``window_id``.
  1035. .. _class_DisplayServer_constant_INVALID_WINDOW_ID:
  1036. .. rst-class:: classref-constant
  1037. **INVALID_WINDOW_ID** = ``-1`` :ref:`๐Ÿ”—<class_DisplayServer_constant_INVALID_WINDOW_ID>`
  1038. The ID that refers to a nonexistent window. This is returned by some **DisplayServer** methods if no window matches the requested result.
  1039. .. _class_DisplayServer_constant_INVALID_INDICATOR_ID:
  1040. .. rst-class:: classref-constant
  1041. **INVALID_INDICATOR_ID** = ``-1`` :ref:`๐Ÿ”—<class_DisplayServer_constant_INVALID_INDICATOR_ID>`
  1042. The ID that refers to a nonexistent application status indicator.
  1043. .. rst-class:: classref-section-separator
  1044. ----
  1045. .. rst-class:: classref-descriptions-group
  1046. Method Descriptions
  1047. -------------------
  1048. .. _class_DisplayServer_method_beep:
  1049. .. rst-class:: classref-method
  1050. |void| **beep**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_beep>`
  1051. Plays the beep sound from the operative system, if possible. Because it comes from the OS, the beep sound will be audible even if the application is muted. It may also be disabled for the entire OS by the user.
  1052. \ **Note:** This method is implemented on macOS, Linux (X11/Wayland), and Windows.
  1053. .. rst-class:: classref-item-separator
  1054. ----
  1055. .. _class_DisplayServer_method_clipboard_get:
  1056. .. rst-class:: classref-method
  1057. :ref:`String<class_String>` **clipboard_get**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_clipboard_get>`
  1058. Returns the user's clipboard as a string if possible.
  1059. .. rst-class:: classref-item-separator
  1060. ----
  1061. .. _class_DisplayServer_method_clipboard_get_image:
  1062. .. rst-class:: classref-method
  1063. :ref:`Image<class_Image>` **clipboard_get_image**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_clipboard_get_image>`
  1064. Returns the user's clipboard as an image if possible.
  1065. \ **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.
  1066. .. rst-class:: classref-item-separator
  1067. ----
  1068. .. _class_DisplayServer_method_clipboard_get_primary:
  1069. .. rst-class:: classref-method
  1070. :ref:`String<class_String>` **clipboard_get_primary**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_clipboard_get_primary>`
  1071. 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.
  1072. \ **Note:** This method is only implemented on Linux (X11/Wayland).
  1073. .. rst-class:: classref-item-separator
  1074. ----
  1075. .. _class_DisplayServer_method_clipboard_has:
  1076. .. rst-class:: classref-method
  1077. :ref:`bool<class_bool>` **clipboard_has**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_clipboard_has>`
  1078. Returns ``true`` if there is a text content on the user's clipboard.
  1079. .. rst-class:: classref-item-separator
  1080. ----
  1081. .. _class_DisplayServer_method_clipboard_has_image:
  1082. .. rst-class:: classref-method
  1083. :ref:`bool<class_bool>` **clipboard_has_image**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_clipboard_has_image>`
  1084. Returns ``true`` if there is an image content on the user's clipboard.
  1085. .. rst-class:: classref-item-separator
  1086. ----
  1087. .. _class_DisplayServer_method_clipboard_set:
  1088. .. rst-class:: classref-method
  1089. |void| **clipboard_set**\ (\ clipboard\: :ref:`String<class_String>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_clipboard_set>`
  1090. Sets the user's clipboard content to the given string.
  1091. .. rst-class:: classref-item-separator
  1092. ----
  1093. .. _class_DisplayServer_method_clipboard_set_primary:
  1094. .. rst-class:: classref-method
  1095. |void| **clipboard_set_primary**\ (\ clipboard_primary\: :ref:`String<class_String>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_clipboard_set_primary>`
  1096. 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.
  1097. \ **Note:** This method is only implemented on Linux (X11/Wayland).
  1098. .. rst-class:: classref-item-separator
  1099. ----
  1100. .. _class_DisplayServer_method_create_status_indicator:
  1101. .. rst-class:: classref-method
  1102. :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>`
  1103. Creates a new application status indicator with the specified icon, tooltip, and activation callback.
  1104. \ ``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>`).
  1105. .. rst-class:: classref-item-separator
  1106. ----
  1107. .. _class_DisplayServer_method_cursor_get_shape:
  1108. .. rst-class:: classref-method
  1109. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **cursor_get_shape**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_cursor_get_shape>`
  1110. Returns the default mouse cursor shape set by :ref:`cursor_set_shape()<class_DisplayServer_method_cursor_set_shape>`.
  1111. .. rst-class:: classref-item-separator
  1112. ----
  1113. .. _class_DisplayServer_method_cursor_set_custom_image:
  1114. .. rst-class:: classref-method
  1115. |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>`
  1116. 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.
  1117. \ ``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>`.
  1118. .. rst-class:: classref-item-separator
  1119. ----
  1120. .. _class_DisplayServer_method_cursor_set_shape:
  1121. .. rst-class:: classref-method
  1122. |void| **cursor_set_shape**\ (\ shape\: :ref:`CursorShape<enum_DisplayServer_CursorShape>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_cursor_set_shape>`
  1123. 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>`.
  1124. .. rst-class:: classref-item-separator
  1125. ----
  1126. .. _class_DisplayServer_method_delete_status_indicator:
  1127. .. rst-class:: classref-method
  1128. |void| **delete_status_indicator**\ (\ id\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_delete_status_indicator>`
  1129. Removes the application status indicator.
  1130. .. rst-class:: classref-item-separator
  1131. ----
  1132. .. _class_DisplayServer_method_dialog_input_text:
  1133. .. rst-class:: classref-method
  1134. :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>`
  1135. 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.
  1136. \ **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, Windows, and Android.
  1137. .. rst-class:: classref-item-separator
  1138. ----
  1139. .. _class_DisplayServer_method_dialog_show:
  1140. .. rst-class:: classref-method
  1141. :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>`
  1142. 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.
  1143. \ **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, Windows, and Android.
  1144. .. rst-class:: classref-item-separator
  1145. ----
  1146. .. _class_DisplayServer_method_enable_for_stealing_focus:
  1147. .. rst-class:: classref-method
  1148. |void| **enable_for_stealing_focus**\ (\ process_id\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_enable_for_stealing_focus>`
  1149. 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.
  1150. \ **Note:** This method is implemented only on Windows.
  1151. .. rst-class:: classref-item-separator
  1152. ----
  1153. .. _class_DisplayServer_method_file_dialog_show:
  1154. .. rst-class:: classref-method
  1155. :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>`
  1156. Displays OS native dialog for selecting files or directories in the file system.
  1157. Each filter string in the ``filters`` array should be formatted like this: ``*.png,*.jpg,*.jpeg;Image Files;image/png,image/jpeg``. The description text of the filter is optional and can be omitted. It is recommended to set both file extension and MIME type. See also :ref:`FileDialog.filters<class_FileDialog_property_filters>`.
  1158. Callbacks have the following arguments: ``status: bool, selected_paths: PackedStringArray, selected_filter_index: int``. **On Android,** callback argument ``selected_filter_index`` is always zero.
  1159. \ **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, macOS, and Android.
  1160. \ **Note:** ``current_directory`` might be ignored.
  1161. \ **Note:** Embedded file dialog and Windows file dialog support only file extensions, while Android, Linux, and macOS file dialogs also support MIME types.
  1162. \ **Note:** On Android and Linux, ``show_hidden`` is ignored.
  1163. \ **Note:** On Android and macOS, native file dialogs have no title.
  1164. \ **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.
  1165. .. rst-class:: classref-item-separator
  1166. ----
  1167. .. _class_DisplayServer_method_file_dialog_with_options_show:
  1168. .. rst-class:: classref-method
  1169. :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>`
  1170. Displays OS native dialog for selecting files or directories in the file system with additional user selectable options.
  1171. Each filter string in the ``filters`` array should be formatted like this: ``*.png,*.jpg,*.jpeg;Image Files;image/png,image/jpeg``. The description text of the filter is optional and can be omitted. It is recommended to set both file extension and MIME type. See also :ref:`FileDialog.filters<class_FileDialog_property_filters>`.
  1172. \ ``options`` is array of :ref:`Dictionary<class_Dictionary>`\ s with the following keys:
  1173. - ``"name"`` - option's name :ref:`String<class_String>`.
  1174. - ``"values"`` - :ref:`PackedStringArray<class_PackedStringArray>` of values. If empty, boolean option (check box) is used.
  1175. - ``"default"`` - default selected option index (:ref:`int<class_int>`) or default boolean value (:ref:`bool<class_bool>`).
  1176. Callbacks have the following arguments: ``status: bool, selected_paths: PackedStringArray, selected_filter_index: int, selected_option: Dictionary``.
  1177. \ **Note:** This method is implemented if the display server has the :ref:`FEATURE_NATIVE_DIALOG_FILE_EXTRA<class_DisplayServer_constant_FEATURE_NATIVE_DIALOG_FILE_EXTRA>` feature. Supported platforms include Linux (X11/Wayland), Windows, and macOS.
  1178. \ **Note:** ``current_directory`` might be ignored.
  1179. \ **Note:** Embedded file dialog and Windows file dialog support only file extensions, while Android, Linux, and macOS file dialogs also support MIME types.
  1180. \ **Note:** On Linux (X11), ``show_hidden`` is ignored.
  1181. \ **Note:** On macOS, native file dialogs have no title.
  1182. \ **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.
  1183. .. rst-class:: classref-item-separator
  1184. ----
  1185. .. _class_DisplayServer_method_force_process_and_drop_events:
  1186. .. rst-class:: classref-method
  1187. |void| **force_process_and_drop_events**\ (\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_force_process_and_drop_events>`
  1188. Forces window manager processing while ignoring all :ref:`InputEvent<class_InputEvent>`\ s. See also :ref:`process_events()<class_DisplayServer_method_process_events>`.
  1189. \ **Note:** This method is implemented on Windows and macOS.
  1190. .. rst-class:: classref-item-separator
  1191. ----
  1192. .. _class_DisplayServer_method_get_accent_color:
  1193. .. rst-class:: classref-method
  1194. :ref:`Color<class_Color>` **get_accent_color**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_get_accent_color>`
  1195. Returns OS theme accent color. Returns ``Color(0, 0, 0, 0)``, if accent color is unknown.
  1196. \ **Note:** This method is implemented on macOS, Windows, and Android.
  1197. .. rst-class:: classref-item-separator
  1198. ----
  1199. .. _class_DisplayServer_method_get_base_color:
  1200. .. rst-class:: classref-method
  1201. :ref:`Color<class_Color>` **get_base_color**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_get_base_color>`
  1202. Returns the OS theme base color (default control background). Returns ``Color(0, 0, 0, 0)`` if the base color is unknown.
  1203. \ **Note:** This method is implemented on macOS, Windows, and Android.
  1204. .. rst-class:: classref-item-separator
  1205. ----
  1206. .. _class_DisplayServer_method_get_display_cutouts:
  1207. .. rst-class:: classref-method
  1208. :ref:`Array<class_Array>`\[:ref:`Rect2<class_Rect2>`\] **get_display_cutouts**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_get_display_cutouts>`
  1209. 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>`.
  1210. \ **Note:** Currently only implemented on Android. Other platforms will return an empty array even if they do have display cutouts or notches.
  1211. .. rst-class:: classref-item-separator
  1212. ----
  1213. .. _class_DisplayServer_method_get_display_safe_area:
  1214. .. rst-class:: classref-method
  1215. :ref:`Rect2i<class_Rect2i>` **get_display_safe_area**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_get_display_safe_area>`
  1216. 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>`.
  1217. \ **Note:** Currently only implemented on Android and iOS. On other platforms, ``screen_get_usable_rect(SCREEN_OF_MAIN_WINDOW)`` will be returned as a fallback. See also :ref:`screen_get_usable_rect()<class_DisplayServer_method_screen_get_usable_rect>`.
  1218. .. rst-class:: classref-item-separator
  1219. ----
  1220. .. _class_DisplayServer_method_get_keyboard_focus_screen:
  1221. .. rst-class:: classref-method
  1222. :ref:`int<class_int>` **get_keyboard_focus_screen**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_get_keyboard_focus_screen>`
  1223. Returns the index of the screen containing the window with the keyboard focus, or the primary screen if there's no focused window.
  1224. .. rst-class:: classref-item-separator
  1225. ----
  1226. .. _class_DisplayServer_method_get_name:
  1227. .. rst-class:: classref-method
  1228. :ref:`String<class_String>` **get_name**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_get_name>`
  1229. 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).
  1230. 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>`).
  1231. .. rst-class:: classref-item-separator
  1232. ----
  1233. .. _class_DisplayServer_method_get_primary_screen:
  1234. .. rst-class:: classref-method
  1235. :ref:`int<class_int>` **get_primary_screen**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_get_primary_screen>`
  1236. Returns index of the primary screen.
  1237. .. rst-class:: classref-item-separator
  1238. ----
  1239. .. _class_DisplayServer_method_get_screen_count:
  1240. .. rst-class:: classref-method
  1241. :ref:`int<class_int>` **get_screen_count**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_get_screen_count>`
  1242. Returns the number of displays available.
  1243. .. rst-class:: classref-item-separator
  1244. ----
  1245. .. _class_DisplayServer_method_get_screen_from_rect:
  1246. .. rst-class:: classref-method
  1247. :ref:`int<class_int>` **get_screen_from_rect**\ (\ rect\: :ref:`Rect2<class_Rect2>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_get_screen_from_rect>`
  1248. Returns the index of the screen that overlaps the most with the given rectangle. Returns ``-1`` if the rectangle doesn't overlap with any screen or has no area.
  1249. .. rst-class:: classref-item-separator
  1250. ----
  1251. .. _class_DisplayServer_method_get_swap_cancel_ok:
  1252. .. rst-class:: classref-method
  1253. :ref:`bool<class_bool>` **get_swap_cancel_ok**\ (\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_get_swap_cancel_ok>`
  1254. 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>`.
  1255. \ **Note:** This doesn't affect native dialogs such as the ones spawned by :ref:`dialog_show()<class_DisplayServer_method_dialog_show>`.
  1256. .. rst-class:: classref-item-separator
  1257. ----
  1258. .. _class_DisplayServer_method_get_window_at_screen_position:
  1259. .. rst-class:: classref-method
  1260. :ref:`int<class_int>` **get_window_at_screen_position**\ (\ position\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_get_window_at_screen_position>`
  1261. 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:
  1262. .. code:: text
  1263. * (0, 0) +-------+
  1264. | |
  1265. +-------------+ | |
  1266. | | | |
  1267. | | | |
  1268. +-------------+ +-------+
  1269. .. rst-class:: classref-item-separator
  1270. ----
  1271. .. _class_DisplayServer_method_get_window_list:
  1272. .. rst-class:: classref-method
  1273. :ref:`PackedInt32Array<class_PackedInt32Array>` **get_window_list**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_get_window_list>`
  1274. Returns the list of Godot window IDs belonging to this process.
  1275. \ **Note:** Native dialogs are not included in this list.
  1276. .. rst-class:: classref-item-separator
  1277. ----
  1278. .. _class_DisplayServer_method_global_menu_add_check_item:
  1279. .. rst-class:: classref-method
  1280. :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>`
  1281. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1282. Adds a new checkable item with text ``label`` to the global menu with ID ``menu_root``.
  1283. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1284. 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`).
  1285. \ **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``.
  1286. \ **Note:** This method is implemented only on macOS.
  1287. \ **Supported system menu IDs:**\
  1288. .. code:: text
  1289. "_main" - Main menu (macOS).
  1290. "_dock" - Dock popup menu (macOS).
  1291. "_apple" - Apple menu (macOS, custom items added before "Services").
  1292. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1293. "_help" - Help menu (macOS).
  1294. .. rst-class:: classref-item-separator
  1295. ----
  1296. .. _class_DisplayServer_method_global_menu_add_icon_check_item:
  1297. .. rst-class:: classref-method
  1298. :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>`
  1299. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1300. Adds a new checkable item with text ``label`` and icon ``icon`` to the global menu with ID ``menu_root``.
  1301. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1302. 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`).
  1303. \ **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``.
  1304. \ **Note:** This method is implemented only on macOS.
  1305. \ **Supported system menu IDs:**\
  1306. .. code:: text
  1307. "_main" - Main menu (macOS).
  1308. "_dock" - Dock popup menu (macOS).
  1309. "_apple" - Apple menu (macOS, custom items added before "Services").
  1310. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1311. "_help" - Help menu (macOS).
  1312. .. rst-class:: classref-item-separator
  1313. ----
  1314. .. _class_DisplayServer_method_global_menu_add_icon_item:
  1315. .. rst-class:: classref-method
  1316. :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>`
  1317. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1318. Adds a new item with text ``label`` and icon ``icon`` to the global menu with ID ``menu_root``.
  1319. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1320. 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`).
  1321. \ **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``.
  1322. \ **Note:** This method is implemented only on macOS.
  1323. \ **Supported system menu IDs:**\
  1324. .. code:: text
  1325. "_main" - Main menu (macOS).
  1326. "_dock" - Dock popup menu (macOS).
  1327. "_apple" - Apple menu (macOS, custom items added before "Services").
  1328. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1329. "_help" - Help menu (macOS).
  1330. .. rst-class:: classref-item-separator
  1331. ----
  1332. .. _class_DisplayServer_method_global_menu_add_icon_radio_check_item:
  1333. .. rst-class:: classref-method
  1334. :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>`
  1335. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1336. Adds a new radio-checkable item with text ``label`` and icon ``icon`` to the global menu with ID ``menu_root``.
  1337. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1338. 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`).
  1339. \ **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.
  1340. \ **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``.
  1341. \ **Note:** This method is implemented only on macOS.
  1342. \ **Supported system menu IDs:**\
  1343. .. code:: text
  1344. "_main" - Main menu (macOS).
  1345. "_dock" - Dock popup menu (macOS).
  1346. "_apple" - Apple menu (macOS, custom items added before "Services").
  1347. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1348. "_help" - Help menu (macOS).
  1349. .. rst-class:: classref-item-separator
  1350. ----
  1351. .. _class_DisplayServer_method_global_menu_add_item:
  1352. .. rst-class:: classref-method
  1353. :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>`
  1354. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1355. Adds a new item with text ``label`` to the global menu with ID ``menu_root``.
  1356. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1357. 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`).
  1358. \ **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``.
  1359. \ **Note:** This method is implemented only on macOS.
  1360. \ **Supported system menu IDs:**\
  1361. .. code:: text
  1362. "_main" - Main menu (macOS).
  1363. "_dock" - Dock popup menu (macOS).
  1364. "_apple" - Apple menu (macOS, custom items added before "Services").
  1365. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1366. "_help" - Help menu (macOS).
  1367. .. rst-class:: classref-item-separator
  1368. ----
  1369. .. _class_DisplayServer_method_global_menu_add_multistate_item:
  1370. .. rst-class:: classref-method
  1371. :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>`
  1372. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1373. Adds a new item with text ``label`` to the global menu with ID ``menu_root``.
  1374. 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``.
  1375. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1376. 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`).
  1377. \ **Note:** By default, there's no indication of the current item state, it should be changed manually.
  1378. \ **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``.
  1379. \ **Note:** This method is implemented only on macOS.
  1380. \ **Supported system menu IDs:**\
  1381. .. code:: text
  1382. "_main" - Main menu (macOS).
  1383. "_dock" - Dock popup menu (macOS).
  1384. "_apple" - Apple menu (macOS, custom items added before "Services").
  1385. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1386. "_help" - Help menu (macOS).
  1387. .. rst-class:: classref-item-separator
  1388. ----
  1389. .. _class_DisplayServer_method_global_menu_add_radio_check_item:
  1390. .. rst-class:: classref-method
  1391. :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>`
  1392. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1393. Adds a new radio-checkable item with text ``label`` to the global menu with ID ``menu_root``.
  1394. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1395. 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`).
  1396. \ **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.
  1397. \ **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``.
  1398. \ **Note:** This method is implemented only on macOS.
  1399. \ **Supported system menu IDs:**\
  1400. .. code:: text
  1401. "_main" - Main menu (macOS).
  1402. "_dock" - Dock popup menu (macOS).
  1403. "_apple" - Apple menu (macOS, custom items added before "Services").
  1404. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1405. "_help" - Help menu (macOS).
  1406. .. rst-class:: classref-item-separator
  1407. ----
  1408. .. _class_DisplayServer_method_global_menu_add_separator:
  1409. .. rst-class:: classref-method
  1410. :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>`
  1411. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1412. Adds a separator between items to the global menu with ID ``menu_root``. Separators also occupy an index.
  1413. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1414. \ **Note:** This method is implemented only on macOS.
  1415. \ **Supported system menu IDs:**\
  1416. .. code:: text
  1417. "_main" - Main menu (macOS).
  1418. "_dock" - Dock popup menu (macOS).
  1419. "_apple" - Apple menu (macOS, custom items added before "Services").
  1420. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1421. "_help" - Help menu (macOS).
  1422. .. rst-class:: classref-item-separator
  1423. ----
  1424. .. _class_DisplayServer_method_global_menu_add_submenu_item:
  1425. .. rst-class:: classref-method
  1426. :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>`
  1427. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1428. 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.
  1429. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1430. \ **Note:** This method is implemented only on macOS.
  1431. \ **Supported system menu IDs:**\
  1432. .. code:: text
  1433. "_main" - Main menu (macOS).
  1434. "_dock" - Dock popup menu (macOS).
  1435. "_apple" - Apple menu (macOS, custom items added before "Services").
  1436. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1437. "_help" - Help menu (macOS).
  1438. .. rst-class:: classref-item-separator
  1439. ----
  1440. .. _class_DisplayServer_method_global_menu_clear:
  1441. .. rst-class:: classref-method
  1442. |void| **global_menu_clear**\ (\ menu_root\: :ref:`String<class_String>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_clear>`
  1443. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1444. Removes all items from the global menu with ID ``menu_root``.
  1445. \ **Note:** This method is implemented only on macOS.
  1446. \ **Supported system menu IDs:**\
  1447. .. code:: text
  1448. "_main" - Main menu (macOS).
  1449. "_dock" - Dock popup menu (macOS).
  1450. "_apple" - Apple menu (macOS, custom items added before "Services").
  1451. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1452. "_help" - Help menu (macOS).
  1453. .. rst-class:: classref-item-separator
  1454. ----
  1455. .. _class_DisplayServer_method_global_menu_get_item_accelerator:
  1456. .. rst-class:: classref-method
  1457. :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>`
  1458. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1459. 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.
  1460. \ **Note:** This method is implemented only on macOS.
  1461. .. rst-class:: classref-item-separator
  1462. ----
  1463. .. _class_DisplayServer_method_global_menu_get_item_callback:
  1464. .. rst-class:: classref-method
  1465. :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>`
  1466. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1467. Returns the callback of the item at index ``idx``.
  1468. \ **Note:** This method is implemented only on macOS.
  1469. .. rst-class:: classref-item-separator
  1470. ----
  1471. .. _class_DisplayServer_method_global_menu_get_item_count:
  1472. .. rst-class:: classref-method
  1473. :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>`
  1474. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1475. Returns number of items in the global menu with ID ``menu_root``.
  1476. \ **Note:** This method is implemented only on macOS.
  1477. .. rst-class:: classref-item-separator
  1478. ----
  1479. .. _class_DisplayServer_method_global_menu_get_item_icon:
  1480. .. rst-class:: classref-method
  1481. :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>`
  1482. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1483. Returns the icon of the item at index ``idx``.
  1484. \ **Note:** This method is implemented only on macOS.
  1485. .. rst-class:: classref-item-separator
  1486. ----
  1487. .. _class_DisplayServer_method_global_menu_get_item_indentation_level:
  1488. .. rst-class:: classref-method
  1489. :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>`
  1490. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1491. Returns the horizontal offset of the item at the given ``idx``.
  1492. \ **Note:** This method is implemented only on macOS.
  1493. .. rst-class:: classref-item-separator
  1494. ----
  1495. .. _class_DisplayServer_method_global_menu_get_item_index_from_tag:
  1496. .. rst-class:: classref-method
  1497. :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>`
  1498. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1499. 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.
  1500. \ **Note:** This method is implemented only on macOS.
  1501. .. rst-class:: classref-item-separator
  1502. ----
  1503. .. _class_DisplayServer_method_global_menu_get_item_index_from_text:
  1504. .. rst-class:: classref-method
  1505. :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>`
  1506. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1507. 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.
  1508. \ **Note:** This method is implemented only on macOS.
  1509. .. rst-class:: classref-item-separator
  1510. ----
  1511. .. _class_DisplayServer_method_global_menu_get_item_key_callback:
  1512. .. rst-class:: classref-method
  1513. :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>`
  1514. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1515. Returns the callback of the item accelerator at index ``idx``.
  1516. \ **Note:** This method is implemented only on macOS.
  1517. .. rst-class:: classref-item-separator
  1518. ----
  1519. .. _class_DisplayServer_method_global_menu_get_item_max_states:
  1520. .. rst-class:: classref-method
  1521. :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>`
  1522. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1523. 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.
  1524. \ **Note:** This method is implemented only on macOS.
  1525. .. rst-class:: classref-item-separator
  1526. ----
  1527. .. _class_DisplayServer_method_global_menu_get_item_state:
  1528. .. rst-class:: classref-method
  1529. :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>`
  1530. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1531. Returns the state of a multistate item. See :ref:`global_menu_add_multistate_item()<class_DisplayServer_method_global_menu_add_multistate_item>` for details.
  1532. \ **Note:** This method is implemented only on macOS.
  1533. .. rst-class:: classref-item-separator
  1534. ----
  1535. .. _class_DisplayServer_method_global_menu_get_item_submenu:
  1536. .. rst-class:: classref-method
  1537. :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>`
  1538. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1539. 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.
  1540. \ **Note:** This method is implemented only on macOS.
  1541. .. rst-class:: classref-item-separator
  1542. ----
  1543. .. _class_DisplayServer_method_global_menu_get_item_tag:
  1544. .. rst-class:: classref-method
  1545. :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>`
  1546. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1547. 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.
  1548. \ **Note:** This method is implemented only on macOS.
  1549. .. rst-class:: classref-item-separator
  1550. ----
  1551. .. _class_DisplayServer_method_global_menu_get_item_text:
  1552. .. rst-class:: classref-method
  1553. :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>`
  1554. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1555. Returns the text of the item at index ``idx``.
  1556. \ **Note:** This method is implemented only on macOS.
  1557. .. rst-class:: classref-item-separator
  1558. ----
  1559. .. _class_DisplayServer_method_global_menu_get_item_tooltip:
  1560. .. rst-class:: classref-method
  1561. :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>`
  1562. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1563. Returns the tooltip associated with the specified index ``idx``.
  1564. \ **Note:** This method is implemented only on macOS.
  1565. .. rst-class:: classref-item-separator
  1566. ----
  1567. .. _class_DisplayServer_method_global_menu_get_system_menu_roots:
  1568. .. rst-class:: classref-method
  1569. :ref:`Dictionary<class_Dictionary>` **global_menu_get_system_menu_roots**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_get_system_menu_roots>`
  1570. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1571. Returns Dictionary of supported system menu IDs and names.
  1572. \ **Note:** This method is implemented only on macOS.
  1573. .. rst-class:: classref-item-separator
  1574. ----
  1575. .. _class_DisplayServer_method_global_menu_is_item_checkable:
  1576. .. rst-class:: classref-method
  1577. :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>`
  1578. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1579. Returns ``true`` if the item at index ``idx`` is checkable in some way, i.e. if it has a checkbox or radio button.
  1580. \ **Note:** This method is implemented only on macOS.
  1581. .. rst-class:: classref-item-separator
  1582. ----
  1583. .. _class_DisplayServer_method_global_menu_is_item_checked:
  1584. .. rst-class:: classref-method
  1585. :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>`
  1586. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1587. Returns ``true`` if the item at index ``idx`` is checked.
  1588. \ **Note:** This method is implemented only on macOS.
  1589. .. rst-class:: classref-item-separator
  1590. ----
  1591. .. _class_DisplayServer_method_global_menu_is_item_disabled:
  1592. .. rst-class:: classref-method
  1593. :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>`
  1594. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1595. Returns ``true`` if the item at index ``idx`` is disabled. When it is disabled it can't be selected, or its action invoked.
  1596. See :ref:`global_menu_set_item_disabled()<class_DisplayServer_method_global_menu_set_item_disabled>` for more info on how to disable an item.
  1597. \ **Note:** This method is implemented only on macOS.
  1598. .. rst-class:: classref-item-separator
  1599. ----
  1600. .. _class_DisplayServer_method_global_menu_is_item_hidden:
  1601. .. rst-class:: classref-method
  1602. :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>`
  1603. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1604. Returns ``true`` if the item at index ``idx`` is hidden.
  1605. See :ref:`global_menu_set_item_hidden()<class_DisplayServer_method_global_menu_set_item_hidden>` for more info on how to hide an item.
  1606. \ **Note:** This method is implemented only on macOS.
  1607. .. rst-class:: classref-item-separator
  1608. ----
  1609. .. _class_DisplayServer_method_global_menu_is_item_radio_checkable:
  1610. .. rst-class:: classref-method
  1611. :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>`
  1612. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1613. Returns ``true`` if the item at index ``idx`` has radio button-style checkability.
  1614. \ **Note:** This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups.
  1615. \ **Note:** This method is implemented only on macOS.
  1616. .. rst-class:: classref-item-separator
  1617. ----
  1618. .. _class_DisplayServer_method_global_menu_remove_item:
  1619. .. rst-class:: classref-method
  1620. |void| **global_menu_remove_item**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_global_menu_remove_item>`
  1621. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1622. Removes the item at index ``idx`` from the global menu ``menu_root``.
  1623. \ **Note:** The indices of items after the removed item will be shifted by one.
  1624. \ **Note:** This method is implemented only on macOS.
  1625. .. rst-class:: classref-item-separator
  1626. ----
  1627. .. _class_DisplayServer_method_global_menu_set_item_accelerator:
  1628. .. rst-class:: classref-method
  1629. |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>`
  1630. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1631. 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`).
  1632. \ **Note:** This method is implemented only on macOS.
  1633. .. rst-class:: classref-item-separator
  1634. ----
  1635. .. _class_DisplayServer_method_global_menu_set_item_callback:
  1636. .. rst-class:: classref-method
  1637. |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>`
  1638. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1639. Sets the callback of the item at index ``idx``. Callback is emitted when an item is pressed.
  1640. \ **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.
  1641. \ **Note:** This method is implemented only on macOS.
  1642. .. rst-class:: classref-item-separator
  1643. ----
  1644. .. _class_DisplayServer_method_global_menu_set_item_checkable:
  1645. .. rst-class:: classref-method
  1646. |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>`
  1647. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1648. Sets whether the item at index ``idx`` has a checkbox. If ``false``, sets the type of the item to plain text.
  1649. \ **Note:** This method is implemented only on macOS.
  1650. .. rst-class:: classref-item-separator
  1651. ----
  1652. .. _class_DisplayServer_method_global_menu_set_item_checked:
  1653. .. rst-class:: classref-method
  1654. |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>`
  1655. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1656. Sets the checkstate status of the item at index ``idx``.
  1657. \ **Note:** This method is implemented only on macOS.
  1658. .. rst-class:: classref-item-separator
  1659. ----
  1660. .. _class_DisplayServer_method_global_menu_set_item_disabled:
  1661. .. rst-class:: classref-method
  1662. |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>`
  1663. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1664. Enables/disables the item at index ``idx``. When it is disabled, it can't be selected and its action can't be invoked.
  1665. \ **Note:** This method is implemented only on macOS.
  1666. .. rst-class:: classref-item-separator
  1667. ----
  1668. .. _class_DisplayServer_method_global_menu_set_item_hidden:
  1669. .. rst-class:: classref-method
  1670. |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>`
  1671. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1672. 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.
  1673. \ **Note:** This method is implemented only on macOS.
  1674. .. rst-class:: classref-item-separator
  1675. ----
  1676. .. _class_DisplayServer_method_global_menu_set_item_hover_callbacks:
  1677. .. rst-class:: classref-method
  1678. |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>`
  1679. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1680. Sets the callback of the item at index ``idx``. The callback is emitted when an item is hovered.
  1681. \ **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.
  1682. \ **Note:** This method is implemented only on macOS.
  1683. .. rst-class:: classref-item-separator
  1684. ----
  1685. .. _class_DisplayServer_method_global_menu_set_item_icon:
  1686. .. rst-class:: classref-method
  1687. |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>`
  1688. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1689. Replaces the :ref:`Texture2D<class_Texture2D>` icon of the specified ``idx``.
  1690. \ **Note:** This method is implemented only on macOS.
  1691. \ **Note:** This method is not supported by macOS "_dock" menu items.
  1692. .. rst-class:: classref-item-separator
  1693. ----
  1694. .. _class_DisplayServer_method_global_menu_set_item_indentation_level:
  1695. .. rst-class:: classref-method
  1696. |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>`
  1697. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1698. Sets the horizontal offset of the item at the given ``idx``.
  1699. \ **Note:** This method is implemented only on macOS.
  1700. .. rst-class:: classref-item-separator
  1701. ----
  1702. .. _class_DisplayServer_method_global_menu_set_item_key_callback:
  1703. .. rst-class:: classref-method
  1704. |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>`
  1705. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1706. Sets the callback of the item at index ``idx``. Callback is emitted when its accelerator is activated.
  1707. \ **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.
  1708. \ **Note:** This method is implemented only on macOS.
  1709. .. rst-class:: classref-item-separator
  1710. ----
  1711. .. _class_DisplayServer_method_global_menu_set_item_max_states:
  1712. .. rst-class:: classref-method
  1713. |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>`
  1714. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1715. 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.
  1716. \ **Note:** This method is implemented only on macOS.
  1717. .. rst-class:: classref-item-separator
  1718. ----
  1719. .. _class_DisplayServer_method_global_menu_set_item_radio_checkable:
  1720. .. rst-class:: classref-method
  1721. |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>`
  1722. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1723. 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.
  1724. \ **Note:** This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups.
  1725. \ **Note:** This method is implemented only on macOS.
  1726. .. rst-class:: classref-item-separator
  1727. ----
  1728. .. _class_DisplayServer_method_global_menu_set_item_state:
  1729. .. rst-class:: classref-method
  1730. |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>`
  1731. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1732. Sets the state of a multistate item. See :ref:`global_menu_add_multistate_item()<class_DisplayServer_method_global_menu_add_multistate_item>` for details.
  1733. \ **Note:** This method is implemented only on macOS.
  1734. .. rst-class:: classref-item-separator
  1735. ----
  1736. .. _class_DisplayServer_method_global_menu_set_item_submenu:
  1737. .. rst-class:: classref-method
  1738. |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>`
  1739. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1740. 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.
  1741. \ **Note:** This method is implemented only on macOS.
  1742. .. rst-class:: classref-item-separator
  1743. ----
  1744. .. _class_DisplayServer_method_global_menu_set_item_tag:
  1745. .. rst-class:: classref-method
  1746. |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>`
  1747. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1748. 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.
  1749. \ **Note:** This method is implemented only on macOS.
  1750. .. rst-class:: classref-item-separator
  1751. ----
  1752. .. _class_DisplayServer_method_global_menu_set_item_text:
  1753. .. rst-class:: classref-method
  1754. |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>`
  1755. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1756. Sets the text of the item at index ``idx``.
  1757. \ **Note:** This method is implemented only on macOS.
  1758. .. rst-class:: classref-item-separator
  1759. ----
  1760. .. _class_DisplayServer_method_global_menu_set_item_tooltip:
  1761. .. rst-class:: classref-method
  1762. |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>`
  1763. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1764. Sets the :ref:`String<class_String>` tooltip of the item at the specified index ``idx``.
  1765. \ **Note:** This method is implemented only on macOS.
  1766. .. rst-class:: classref-item-separator
  1767. ----
  1768. .. _class_DisplayServer_method_global_menu_set_popup_callbacks:
  1769. .. rst-class:: classref-method
  1770. |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>`
  1771. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1772. Registers callables to emit when the menu is respectively about to show or closed. Callback methods should have zero arguments.
  1773. .. rst-class:: classref-item-separator
  1774. ----
  1775. .. _class_DisplayServer_method_has_additional_outputs:
  1776. .. rst-class:: classref-method
  1777. :ref:`bool<class_bool>` **has_additional_outputs**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_has_additional_outputs>`
  1778. Returns ``true`` if any additional outputs have been registered via :ref:`register_additional_output()<class_DisplayServer_method_register_additional_output>`.
  1779. .. rst-class:: classref-item-separator
  1780. ----
  1781. .. _class_DisplayServer_method_has_feature:
  1782. .. rst-class:: classref-method
  1783. :ref:`bool<class_bool>` **has_feature**\ (\ feature\: :ref:`Feature<enum_DisplayServer_Feature>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_has_feature>`
  1784. Returns ``true`` if the specified ``feature`` is supported by the current **DisplayServer**, ``false`` otherwise.
  1785. .. rst-class:: classref-item-separator
  1786. ----
  1787. .. _class_DisplayServer_method_has_hardware_keyboard:
  1788. .. rst-class:: classref-method
  1789. :ref:`bool<class_bool>` **has_hardware_keyboard**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_has_hardware_keyboard>`
  1790. Returns ``true`` if hardware keyboard is connected.
  1791. \ **Note:** This method is implemented on Android and iOS, on other platforms this method always returns ``true``.
  1792. .. rst-class:: classref-item-separator
  1793. ----
  1794. .. _class_DisplayServer_method_help_set_search_callbacks:
  1795. .. rst-class:: classref-method
  1796. |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>`
  1797. Sets native help system search callbacks.
  1798. \ ``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.
  1799. \ ``action_callback`` has the following arguments: ``String key``. Called when the user selects a search result in the ``Help`` menu.
  1800. \ **Note:** This method is implemented only on macOS.
  1801. .. rst-class:: classref-item-separator
  1802. ----
  1803. .. _class_DisplayServer_method_ime_get_selection:
  1804. .. rst-class:: classref-method
  1805. :ref:`Vector2i<class_Vector2i>` **ime_get_selection**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_ime_get_selection>`
  1806. 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.
  1807. \ **Note:** This method is implemented only on macOS.
  1808. .. rst-class:: classref-item-separator
  1809. ----
  1810. .. _class_DisplayServer_method_ime_get_text:
  1811. .. rst-class:: classref-method
  1812. :ref:`String<class_String>` **ime_get_text**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_ime_get_text>`
  1813. Returns the composition string contained within the `Input Method Editor <https://en.wikipedia.org/wiki/Input_method>`__ window.
  1814. \ **Note:** This method is implemented only on macOS.
  1815. .. rst-class:: classref-item-separator
  1816. ----
  1817. .. _class_DisplayServer_method_is_dark_mode:
  1818. .. rst-class:: classref-method
  1819. :ref:`bool<class_bool>` **is_dark_mode**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_is_dark_mode>`
  1820. Returns ``true`` if OS is using dark mode.
  1821. \ **Note:** This method is implemented on Android, iOS, macOS, Windows, and Linux (X11/Wayland).
  1822. .. rst-class:: classref-item-separator
  1823. ----
  1824. .. _class_DisplayServer_method_is_dark_mode_supported:
  1825. .. rst-class:: classref-method
  1826. :ref:`bool<class_bool>` **is_dark_mode_supported**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_is_dark_mode_supported>`
  1827. Returns ``true`` if OS supports dark mode.
  1828. \ **Note:** This method is implemented on Android, iOS, macOS, Windows, and Linux (X11/Wayland).
  1829. .. rst-class:: classref-item-separator
  1830. ----
  1831. .. _class_DisplayServer_method_is_touchscreen_available:
  1832. .. rst-class:: classref-method
  1833. :ref:`bool<class_bool>` **is_touchscreen_available**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_is_touchscreen_available>`
  1834. 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``.
  1835. .. rst-class:: classref-item-separator
  1836. ----
  1837. .. _class_DisplayServer_method_is_window_transparency_available:
  1838. .. rst-class:: classref-method
  1839. :ref:`bool<class_bool>` **is_window_transparency_available**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_is_window_transparency_available>`
  1840. 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.
  1841. .. rst-class:: classref-item-separator
  1842. ----
  1843. .. _class_DisplayServer_method_keyboard_get_current_layout:
  1844. .. rst-class:: classref-method
  1845. :ref:`int<class_int>` **keyboard_get_current_layout**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_keyboard_get_current_layout>`
  1846. Returns active keyboard layout index.
  1847. \ **Note:** This method is implemented on Linux (X11/Wayland), macOS, and Windows.
  1848. .. rst-class:: classref-item-separator
  1849. ----
  1850. .. _class_DisplayServer_method_keyboard_get_keycode_from_physical:
  1851. .. rst-class:: classref-method
  1852. :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>`
  1853. Converts a physical (US QWERTY) ``keycode`` to one in the active keyboard layout.
  1854. \ **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows.
  1855. .. rst-class:: classref-item-separator
  1856. ----
  1857. .. _class_DisplayServer_method_keyboard_get_label_from_physical:
  1858. .. rst-class:: classref-method
  1859. :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>`
  1860. Converts a physical (US QWERTY) ``keycode`` to localized label printed on the key in the active keyboard layout.
  1861. \ **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows.
  1862. .. rst-class:: classref-item-separator
  1863. ----
  1864. .. _class_DisplayServer_method_keyboard_get_layout_count:
  1865. .. rst-class:: classref-method
  1866. :ref:`int<class_int>` **keyboard_get_layout_count**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_keyboard_get_layout_count>`
  1867. Returns the number of keyboard layouts.
  1868. \ **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows.
  1869. .. rst-class:: classref-item-separator
  1870. ----
  1871. .. _class_DisplayServer_method_keyboard_get_layout_language:
  1872. .. rst-class:: classref-method
  1873. :ref:`String<class_String>` **keyboard_get_layout_language**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_keyboard_get_layout_language>`
  1874. Returns the ISO-639/BCP-47 language code of the keyboard layout at position ``index``.
  1875. \ **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows.
  1876. .. rst-class:: classref-item-separator
  1877. ----
  1878. .. _class_DisplayServer_method_keyboard_get_layout_name:
  1879. .. rst-class:: classref-method
  1880. :ref:`String<class_String>` **keyboard_get_layout_name**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_keyboard_get_layout_name>`
  1881. Returns the localized name of the keyboard layout at position ``index``.
  1882. \ **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows.
  1883. .. rst-class:: classref-item-separator
  1884. ----
  1885. .. _class_DisplayServer_method_keyboard_set_current_layout:
  1886. .. rst-class:: classref-method
  1887. |void| **keyboard_set_current_layout**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_keyboard_set_current_layout>`
  1888. Sets the active keyboard layout.
  1889. \ **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows.
  1890. .. rst-class:: classref-item-separator
  1891. ----
  1892. .. _class_DisplayServer_method_mouse_get_button_state:
  1893. .. rst-class:: classref-method
  1894. |bitfield|\[:ref:`MouseButtonMask<enum_@GlobalScope_MouseButtonMask>`\] **mouse_get_button_state**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_mouse_get_button_state>`
  1895. 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>`.
  1896. .. rst-class:: classref-item-separator
  1897. ----
  1898. .. _class_DisplayServer_method_mouse_get_mode:
  1899. .. rst-class:: classref-method
  1900. :ref:`MouseMode<enum_DisplayServer_MouseMode>` **mouse_get_mode**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_mouse_get_mode>`
  1901. Returns the current mouse mode. See also :ref:`mouse_set_mode()<class_DisplayServer_method_mouse_set_mode>`.
  1902. .. rst-class:: classref-item-separator
  1903. ----
  1904. .. _class_DisplayServer_method_mouse_get_position:
  1905. .. rst-class:: classref-method
  1906. :ref:`Vector2i<class_Vector2i>` **mouse_get_position**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_mouse_get_position>`
  1907. Returns the mouse cursor's current position in screen coordinates.
  1908. .. rst-class:: classref-item-separator
  1909. ----
  1910. .. _class_DisplayServer_method_mouse_set_mode:
  1911. .. rst-class:: classref-method
  1912. |void| **mouse_set_mode**\ (\ mouse_mode\: :ref:`MouseMode<enum_DisplayServer_MouseMode>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_mouse_set_mode>`
  1913. Sets the current mouse mode. See also :ref:`mouse_get_mode()<class_DisplayServer_method_mouse_get_mode>`.
  1914. .. rst-class:: classref-item-separator
  1915. ----
  1916. .. _class_DisplayServer_method_process_events:
  1917. .. rst-class:: classref-method
  1918. |void| **process_events**\ (\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_process_events>`
  1919. 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>`.
  1920. .. rst-class:: classref-item-separator
  1921. ----
  1922. .. _class_DisplayServer_method_register_additional_output:
  1923. .. rst-class:: classref-method
  1924. |void| **register_additional_output**\ (\ object\: :ref:`Object<class_Object>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_register_additional_output>`
  1925. 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>`.
  1926. This can be used to prevent Godot from skipping rendering when no normal windows are visible.
  1927. .. rst-class:: classref-item-separator
  1928. ----
  1929. .. _class_DisplayServer_method_screen_get_dpi:
  1930. .. rst-class:: classref-method
  1931. :ref:`int<class_int>` **screen_get_dpi**\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_screen_get_dpi>`
  1932. 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.
  1933. \ **Note:** On macOS, returned value is inaccurate if fractional display scaling mode is used.
  1934. \ **Note:** On Android devices, the actual screen densities are grouped into six generalized densities:
  1935. .. code:: text
  1936. ldpi - 120 dpi
  1937. mdpi - 160 dpi
  1938. hdpi - 240 dpi
  1939. xhdpi - 320 dpi
  1940. xxhdpi - 480 dpi
  1941. xxxhdpi - 640 dpi
  1942. \ **Note:** This method is implemented on Android, Linux (X11/Wayland), macOS and Windows. Returns ``72`` on unsupported platforms.
  1943. .. rst-class:: classref-item-separator
  1944. ----
  1945. .. _class_DisplayServer_method_screen_get_image:
  1946. .. rst-class:: classref-method
  1947. :ref:`Image<class_Image>` **screen_get_image**\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_screen_get_image>`
  1948. Returns screenshot of the ``screen``.
  1949. \ **Note:** This method is implemented on Linux (X11), macOS, and Windows.
  1950. \ **Note:** On macOS, this method requires "Screen Recording" permission, if permission is not granted it will return desktop wallpaper color.
  1951. .. rst-class:: classref-item-separator
  1952. ----
  1953. .. _class_DisplayServer_method_screen_get_image_rect:
  1954. .. rst-class:: classref-method
  1955. :ref:`Image<class_Image>` **screen_get_image_rect**\ (\ rect\: :ref:`Rect2i<class_Rect2i>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_screen_get_image_rect>`
  1956. Returns screenshot of the screen ``rect``.
  1957. \ **Note:** This method is implemented on macOS and Windows.
  1958. \ **Note:** On macOS, this method requires "Screen Recording" permission, if permission is not granted it will return desktop wallpaper color.
  1959. .. rst-class:: classref-item-separator
  1960. ----
  1961. .. _class_DisplayServer_method_screen_get_max_scale:
  1962. .. rst-class:: classref-method
  1963. :ref:`float<class_float>` **screen_get_max_scale**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_screen_get_max_scale>`
  1964. Returns the greatest scale factor of all screens.
  1965. \ **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.
  1966. \ **Note:** This method is implemented only on macOS.
  1967. .. rst-class:: classref-item-separator
  1968. ----
  1969. .. _class_DisplayServer_method_screen_get_orientation:
  1970. .. rst-class:: classref-method
  1971. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **screen_get_orientation**\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_screen_get_orientation>`
  1972. Returns the ``screen``'s current orientation. See also :ref:`screen_set_orientation()<class_DisplayServer_method_screen_set_orientation>`.
  1973. \ **Note:** This method is implemented on Android and iOS.
  1974. .. rst-class:: classref-item-separator
  1975. ----
  1976. .. _class_DisplayServer_method_screen_get_pixel:
  1977. .. rst-class:: classref-method
  1978. :ref:`Color<class_Color>` **screen_get_pixel**\ (\ position\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_screen_get_pixel>`
  1979. Returns color of the display pixel at the ``position``.
  1980. \ **Note:** This method is implemented on Linux (X11), macOS, and Windows.
  1981. \ **Note:** On macOS, this method requires "Screen Recording" permission, if permission is not granted it will return desktop wallpaper color.
  1982. .. rst-class:: classref-item-separator
  1983. ----
  1984. .. _class_DisplayServer_method_screen_get_position:
  1985. .. rst-class:: classref-method
  1986. :ref:`Vector2i<class_Vector2i>` **screen_get_position**\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_screen_get_position>`
  1987. 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:
  1988. .. code:: text
  1989. * (0, 0) +-------+
  1990. | |
  1991. +-------------+ | |
  1992. | | | |
  1993. | | | |
  1994. +-------------+ +-------+
  1995. See also :ref:`screen_get_size()<class_DisplayServer_method_screen_get_size>`.
  1996. \ **Note:** On Linux (Wayland) this method always returns ``(0, 0)``.
  1997. .. rst-class:: classref-item-separator
  1998. ----
  1999. .. _class_DisplayServer_method_screen_get_refresh_rate:
  2000. .. rst-class:: classref-method
  2001. :ref:`float<class_float>` **screen_get_refresh_rate**\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_screen_get_refresh_rate>`
  2002. 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.
  2003. \ **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.
  2004. To fallback to a default refresh rate if the method fails, try:
  2005. ::
  2006. var refresh_rate = DisplayServer.screen_get_refresh_rate()
  2007. if refresh_rate < 0:
  2008. refresh_rate = 60.0
  2009. .. rst-class:: classref-item-separator
  2010. ----
  2011. .. _class_DisplayServer_method_screen_get_scale:
  2012. .. rst-class:: classref-method
  2013. :ref:`float<class_float>` **screen_get_scale**\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_screen_get_scale>`
  2014. Returns the scale factor of the specified screen by index.
  2015. \ **Note:** On macOS, the returned value is ``2.0`` for hiDPI (Retina) screens, and ``1.0`` for all other cases.
  2016. \ **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``).
  2017. \ **Note:** This method is implemented on Android, iOS, Web, macOS, and Linux (Wayland).
  2018. .. rst-class:: classref-item-separator
  2019. ----
  2020. .. _class_DisplayServer_method_screen_get_size:
  2021. .. rst-class:: classref-method
  2022. :ref:`Vector2i<class_Vector2i>` **screen_get_size**\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_screen_get_size>`
  2023. 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>`.
  2024. .. rst-class:: classref-item-separator
  2025. ----
  2026. .. _class_DisplayServer_method_screen_get_usable_rect:
  2027. .. rst-class:: classref-method
  2028. :ref:`Rect2i<class_Rect2i>` **screen_get_usable_rect**\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_screen_get_usable_rect>`
  2029. 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>`.
  2030. .. rst-class:: classref-item-separator
  2031. ----
  2032. .. _class_DisplayServer_method_screen_is_kept_on:
  2033. .. rst-class:: classref-method
  2034. :ref:`bool<class_bool>` **screen_is_kept_on**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_screen_is_kept_on>`
  2035. 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>`.
  2036. .. rst-class:: classref-item-separator
  2037. ----
  2038. .. _class_DisplayServer_method_screen_set_keep_on:
  2039. .. rst-class:: classref-method
  2040. |void| **screen_set_keep_on**\ (\ enable\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_screen_set_keep_on>`
  2041. 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>`.
  2042. .. rst-class:: classref-item-separator
  2043. ----
  2044. .. _class_DisplayServer_method_screen_set_orientation:
  2045. .. rst-class:: classref-method
  2046. |void| **screen_set_orientation**\ (\ orientation\: :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>`, screen\: :ref:`int<class_int>` = -1\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_screen_set_orientation>`
  2047. Sets the ``screen``'s ``orientation``. See also :ref:`screen_get_orientation()<class_DisplayServer_method_screen_get_orientation>`.
  2048. \ **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>`.
  2049. .. rst-class:: classref-item-separator
  2050. ----
  2051. .. _class_DisplayServer_method_set_icon:
  2052. .. rst-class:: classref-method
  2053. |void| **set_icon**\ (\ image\: :ref:`Image<class_Image>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_set_icon>`
  2054. 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.
  2055. \ **Note:** Requires support for :ref:`FEATURE_ICON<class_DisplayServer_constant_FEATURE_ICON>`.
  2056. .. rst-class:: classref-item-separator
  2057. ----
  2058. .. _class_DisplayServer_method_set_native_icon:
  2059. .. rst-class:: classref-method
  2060. |void| **set_native_icon**\ (\ filename\: :ref:`String<class_String>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_set_native_icon>`
  2061. 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.
  2062. \ **Note:** Requires support for :ref:`FEATURE_NATIVE_ICON<class_DisplayServer_constant_FEATURE_NATIVE_ICON>`.
  2063. .. rst-class:: classref-item-separator
  2064. ----
  2065. .. _class_DisplayServer_method_set_system_theme_change_callback:
  2066. .. rst-class:: classref-method
  2067. |void| **set_system_theme_change_callback**\ (\ callable\: :ref:`Callable<class_Callable>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_set_system_theme_change_callback>`
  2068. Sets the ``callable`` that should be called when system theme settings are changed. Callback method should have zero arguments.
  2069. \ **Note:** This method is implemented on Android, iOS, macOS, Windows, and Linux (X11/Wayland).
  2070. .. rst-class:: classref-item-separator
  2071. ----
  2072. .. _class_DisplayServer_method_show_emoji_and_symbol_picker:
  2073. .. rst-class:: classref-method
  2074. |void| **show_emoji_and_symbol_picker**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_show_emoji_and_symbol_picker>`
  2075. Opens system emoji and symbol picker.
  2076. \ **Note:** This method is implemented on macOS and Windows.
  2077. .. rst-class:: classref-item-separator
  2078. ----
  2079. .. _class_DisplayServer_method_status_indicator_get_rect:
  2080. .. rst-class:: classref-method
  2081. :ref:`Rect2<class_Rect2>` **status_indicator_get_rect**\ (\ id\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_status_indicator_get_rect>`
  2082. 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>`.
  2083. \ **Note:** This method is implemented on macOS and Windows.
  2084. .. rst-class:: classref-item-separator
  2085. ----
  2086. .. _class_DisplayServer_method_status_indicator_set_callback:
  2087. .. rst-class:: classref-method
  2088. |void| **status_indicator_set_callback**\ (\ id\: :ref:`int<class_int>`, callback\: :ref:`Callable<class_Callable>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_status_indicator_set_callback>`
  2089. 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.
  2090. \ **Note:** This method is implemented on macOS and Windows.
  2091. .. rst-class:: classref-item-separator
  2092. ----
  2093. .. _class_DisplayServer_method_status_indicator_set_icon:
  2094. .. rst-class:: classref-method
  2095. |void| **status_indicator_set_icon**\ (\ id\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_status_indicator_set_icon>`
  2096. Sets the application status indicator icon.
  2097. \ **Note:** This method is implemented on macOS and Windows.
  2098. .. rst-class:: classref-item-separator
  2099. ----
  2100. .. _class_DisplayServer_method_status_indicator_set_menu:
  2101. .. rst-class:: classref-method
  2102. |void| **status_indicator_set_menu**\ (\ id\: :ref:`int<class_int>`, menu_rid\: :ref:`RID<class_RID>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_status_indicator_set_menu>`
  2103. Sets the application status indicator native popup menu.
  2104. \ **Note:** On macOS, the menu is activated by any mouse button. Its activation callback is *not* triggered.
  2105. \ **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.
  2106. \ **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.
  2107. .. rst-class:: classref-item-separator
  2108. ----
  2109. .. _class_DisplayServer_method_status_indicator_set_tooltip:
  2110. .. rst-class:: classref-method
  2111. |void| **status_indicator_set_tooltip**\ (\ id\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_status_indicator_set_tooltip>`
  2112. Sets the application status indicator tooltip.
  2113. \ **Note:** This method is implemented on macOS and Windows.
  2114. .. rst-class:: classref-item-separator
  2115. ----
  2116. .. _class_DisplayServer_method_tablet_get_current_driver:
  2117. .. rst-class:: classref-method
  2118. :ref:`String<class_String>` **tablet_get_current_driver**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_tablet_get_current_driver>`
  2119. Returns current active tablet driver name.
  2120. \ **Note:** This method is implemented only on Windows.
  2121. .. rst-class:: classref-item-separator
  2122. ----
  2123. .. _class_DisplayServer_method_tablet_get_driver_count:
  2124. .. rst-class:: classref-method
  2125. :ref:`int<class_int>` **tablet_get_driver_count**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_tablet_get_driver_count>`
  2126. Returns the total number of available tablet drivers.
  2127. \ **Note:** This method is implemented only on Windows.
  2128. .. rst-class:: classref-item-separator
  2129. ----
  2130. .. _class_DisplayServer_method_tablet_get_driver_name:
  2131. .. rst-class:: classref-method
  2132. :ref:`String<class_String>` **tablet_get_driver_name**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_tablet_get_driver_name>`
  2133. Returns the tablet driver name for the given index.
  2134. \ **Note:** This method is implemented only on Windows.
  2135. .. rst-class:: classref-item-separator
  2136. ----
  2137. .. _class_DisplayServer_method_tablet_set_current_driver:
  2138. .. rst-class:: classref-method
  2139. |void| **tablet_set_current_driver**\ (\ name\: :ref:`String<class_String>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_tablet_set_current_driver>`
  2140. Set active tablet driver name.
  2141. Supported drivers:
  2142. - ``winink``: Windows Ink API, default (Windows 8.1+ required).
  2143. - ``wintab``: Wacom Wintab API (compatible device driver required).
  2144. - ``dummy``: Dummy driver, tablet input is disabled.
  2145. \ **Note:** This method is implemented only on Windows.
  2146. .. rst-class:: classref-item-separator
  2147. ----
  2148. .. _class_DisplayServer_method_tts_get_voices:
  2149. .. rst-class:: classref-method
  2150. :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **tts_get_voices**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_tts_get_voices>`
  2151. Returns an :ref:`Array<class_Array>` of voice information dictionaries.
  2152. Each :ref:`Dictionary<class_Dictionary>` contains two :ref:`String<class_String>` entries:
  2153. - ``name`` is voice name.
  2154. - ``id`` is voice identifier.
  2155. - ``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.
  2156. 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.
  2157. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
  2158. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  2159. .. rst-class:: classref-item-separator
  2160. ----
  2161. .. _class_DisplayServer_method_tts_get_voices_for_language:
  2162. .. rst-class:: classref-method
  2163. :ref:`PackedStringArray<class_PackedStringArray>` **tts_get_voices_for_language**\ (\ language\: :ref:`String<class_String>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_tts_get_voices_for_language>`
  2164. Returns an :ref:`PackedStringArray<class_PackedStringArray>` of voice identifiers for the ``language``.
  2165. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
  2166. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  2167. .. rst-class:: classref-item-separator
  2168. ----
  2169. .. _class_DisplayServer_method_tts_is_paused:
  2170. .. rst-class:: classref-method
  2171. :ref:`bool<class_bool>` **tts_is_paused**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_tts_is_paused>`
  2172. Returns ``true`` if the synthesizer is in a paused state.
  2173. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
  2174. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  2175. .. rst-class:: classref-item-separator
  2176. ----
  2177. .. _class_DisplayServer_method_tts_is_speaking:
  2178. .. rst-class:: classref-method
  2179. :ref:`bool<class_bool>` **tts_is_speaking**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_tts_is_speaking>`
  2180. Returns ``true`` if the synthesizer is generating speech, or have utterance waiting in the queue.
  2181. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
  2182. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  2183. .. rst-class:: classref-item-separator
  2184. ----
  2185. .. _class_DisplayServer_method_tts_pause:
  2186. .. rst-class:: classref-method
  2187. |void| **tts_pause**\ (\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_tts_pause>`
  2188. Puts the synthesizer into a paused state.
  2189. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
  2190. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  2191. .. rst-class:: classref-item-separator
  2192. ----
  2193. .. _class_DisplayServer_method_tts_resume:
  2194. .. rst-class:: classref-method
  2195. |void| **tts_resume**\ (\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_tts_resume>`
  2196. Resumes the synthesizer if it was paused.
  2197. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
  2198. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  2199. .. rst-class:: classref-item-separator
  2200. ----
  2201. .. _class_DisplayServer_method_tts_set_utterance_callback:
  2202. .. rst-class:: classref-method
  2203. |void| **tts_set_utterance_callback**\ (\ event\: :ref:`TTSUtteranceEvent<enum_DisplayServer_TTSUtteranceEvent>`, callable\: :ref:`Callable<class_Callable>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_tts_set_utterance_callback>`
  2204. Adds a callback, which is called when the utterance has started, finished, canceled or reached a text boundary.
  2205. - :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.
  2206. - :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.
  2207. \ **Note:** The granularity of the boundary callbacks is engine dependent.
  2208. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
  2209. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  2210. .. rst-class:: classref-item-separator
  2211. ----
  2212. .. _class_DisplayServer_method_tts_speak:
  2213. .. rst-class:: classref-method
  2214. |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>`
  2215. Adds an utterance to the queue. If ``interrupt`` is ``true``, the queue is cleared first.
  2216. - ``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>`.
  2217. - ``volume`` ranges from ``0`` (lowest) to ``100`` (highest).
  2218. - ``pitch`` ranges from ``0.0`` (lowest) to ``2.0`` (highest), ``1.0`` is default pitch for the current voice.
  2219. - ``rate`` ranges from ``0.1`` (lowest) to ``10.0`` (highest), ``1.0`` is a normal speaking rate. Other values act as a percentage relative.
  2220. - ``utterance_id`` is passed as a parameter to the callback functions.
  2221. \ **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>`.
  2222. \ **Note:** The granularity of pitch, rate, and volume is engine and voice dependent. Values may be truncated.
  2223. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
  2224. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  2225. .. rst-class:: classref-item-separator
  2226. ----
  2227. .. _class_DisplayServer_method_tts_stop:
  2228. .. rst-class:: classref-method
  2229. |void| **tts_stop**\ (\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_tts_stop>`
  2230. Stops synthesis in progress and removes all utterances from the queue.
  2231. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Linux), macOS, and Windows.
  2232. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  2233. .. rst-class:: classref-item-separator
  2234. ----
  2235. .. _class_DisplayServer_method_unregister_additional_output:
  2236. .. rst-class:: classref-method
  2237. |void| **unregister_additional_output**\ (\ object\: :ref:`Object<class_Object>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_unregister_additional_output>`
  2238. Unregisters an :ref:`Object<class_Object>` representing an additional output, that was registered via :ref:`register_additional_output()<class_DisplayServer_method_register_additional_output>`.
  2239. .. rst-class:: classref-item-separator
  2240. ----
  2241. .. _class_DisplayServer_method_virtual_keyboard_get_height:
  2242. .. rst-class:: classref-method
  2243. :ref:`int<class_int>` **virtual_keyboard_get_height**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_virtual_keyboard_get_height>`
  2244. Returns the on-screen keyboard's height in pixels. Returns 0 if there is no keyboard or if it is currently hidden.
  2245. .. rst-class:: classref-item-separator
  2246. ----
  2247. .. _class_DisplayServer_method_virtual_keyboard_hide:
  2248. .. rst-class:: classref-method
  2249. |void| **virtual_keyboard_hide**\ (\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_virtual_keyboard_hide>`
  2250. Hides the virtual keyboard if it is shown, does nothing otherwise.
  2251. .. rst-class:: classref-item-separator
  2252. ----
  2253. .. _class_DisplayServer_method_virtual_keyboard_show:
  2254. .. rst-class:: classref-method
  2255. |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>`
  2256. Shows the virtual keyboard if the platform has one.
  2257. \ ``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).
  2258. \ ``position`` parameter is the screen space :ref:`Rect2<class_Rect2>` of the edited text.
  2259. \ ``type`` parameter allows configuring which type of virtual keyboard to show.
  2260. \ ``max_length`` limits the number of characters that can be entered if different from ``-1``.
  2261. \ ``cursor_start`` can optionally define the current text cursor position if ``cursor_end`` is not set.
  2262. \ ``cursor_start`` and ``cursor_end`` can optionally define the current text selection.
  2263. \ **Note:** This method is implemented on Android, iOS and Web.
  2264. .. rst-class:: classref-item-separator
  2265. ----
  2266. .. _class_DisplayServer_method_warp_mouse:
  2267. .. rst-class:: classref-method
  2268. |void| **warp_mouse**\ (\ position\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_warp_mouse>`
  2269. 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.
  2270. \ **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.
  2271. .. rst-class:: classref-item-separator
  2272. ----
  2273. .. _class_DisplayServer_method_window_can_draw:
  2274. .. rst-class:: classref-method
  2275. :ref:`bool<class_bool>` **window_can_draw**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_window_can_draw>`
  2276. 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``.
  2277. .. rst-class:: classref-item-separator
  2278. ----
  2279. .. _class_DisplayServer_method_window_get_active_popup:
  2280. .. rst-class:: classref-method
  2281. :ref:`int<class_int>` **window_get_active_popup**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_window_get_active_popup>`
  2282. Returns ID of the active popup window, or :ref:`INVALID_WINDOW_ID<class_DisplayServer_constant_INVALID_WINDOW_ID>` if there is none.
  2283. .. rst-class:: classref-item-separator
  2284. ----
  2285. .. _class_DisplayServer_method_window_get_attached_instance_id:
  2286. .. rst-class:: classref-method
  2287. :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>`
  2288. 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.
  2289. .. rst-class:: classref-item-separator
  2290. ----
  2291. .. _class_DisplayServer_method_window_get_current_screen:
  2292. .. rst-class:: classref-method
  2293. :ref:`int<class_int>` **window_get_current_screen**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_window_get_current_screen>`
  2294. 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>`.
  2295. .. rst-class:: classref-item-separator
  2296. ----
  2297. .. _class_DisplayServer_method_window_get_flag:
  2298. .. rst-class:: classref-method
  2299. :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>`
  2300. Returns the current value of the given window's ``flag``.
  2301. .. rst-class:: classref-item-separator
  2302. ----
  2303. .. _class_DisplayServer_method_window_get_max_size:
  2304. .. rst-class:: classref-method
  2305. :ref:`Vector2i<class_Vector2i>` **window_get_max_size**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_window_get_max_size>`
  2306. Returns the window's maximum size (in pixels). See also :ref:`window_set_max_size()<class_DisplayServer_method_window_set_max_size>`.
  2307. .. rst-class:: classref-item-separator
  2308. ----
  2309. .. _class_DisplayServer_method_window_get_min_size:
  2310. .. rst-class:: classref-method
  2311. :ref:`Vector2i<class_Vector2i>` **window_get_min_size**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_window_get_min_size>`
  2312. Returns the window's minimum size (in pixels). See also :ref:`window_set_min_size()<class_DisplayServer_method_window_set_min_size>`.
  2313. .. rst-class:: classref-item-separator
  2314. ----
  2315. .. _class_DisplayServer_method_window_get_mode:
  2316. .. rst-class:: classref-method
  2317. :ref:`WindowMode<enum_DisplayServer_WindowMode>` **window_get_mode**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_window_get_mode>`
  2318. Returns the mode of the given window.
  2319. .. rst-class:: classref-item-separator
  2320. ----
  2321. .. _class_DisplayServer_method_window_get_native_handle:
  2322. .. rst-class:: classref-method
  2323. :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>`
  2324. Returns internal structure pointers for use in plugins.
  2325. \ **Note:** This method is implemented on Android, Linux (X11/Wayland), macOS, and Windows.
  2326. .. rst-class:: classref-item-separator
  2327. ----
  2328. .. _class_DisplayServer_method_window_get_popup_safe_rect:
  2329. .. rst-class:: classref-method
  2330. :ref:`Rect2i<class_Rect2i>` **window_get_popup_safe_rect**\ (\ window\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_window_get_popup_safe_rect>`
  2331. Returns the bounding box of control, or menu item that was used to open the popup window, in the screen coordinate system.
  2332. .. rst-class:: classref-item-separator
  2333. ----
  2334. .. _class_DisplayServer_method_window_get_position:
  2335. .. rst-class:: classref-method
  2336. :ref:`Vector2i<class_Vector2i>` **window_get_position**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_window_get_position>`
  2337. Returns the position of the client area of the given window on the screen.
  2338. .. rst-class:: classref-item-separator
  2339. ----
  2340. .. _class_DisplayServer_method_window_get_position_with_decorations:
  2341. .. rst-class:: classref-method
  2342. :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>`
  2343. 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>`.
  2344. .. rst-class:: classref-item-separator
  2345. ----
  2346. .. _class_DisplayServer_method_window_get_safe_title_margins:
  2347. .. rst-class:: classref-method
  2348. :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>`
  2349. 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.
  2350. .. rst-class:: classref-item-separator
  2351. ----
  2352. .. _class_DisplayServer_method_window_get_size:
  2353. .. rst-class:: classref-method
  2354. :ref:`Vector2i<class_Vector2i>` **window_get_size**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_window_get_size>`
  2355. 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>`.
  2356. .. rst-class:: classref-item-separator
  2357. ----
  2358. .. _class_DisplayServer_method_window_get_size_with_decorations:
  2359. .. rst-class:: classref-method
  2360. :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>`
  2361. 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>`.
  2362. .. rst-class:: classref-item-separator
  2363. ----
  2364. .. _class_DisplayServer_method_window_get_title_size:
  2365. .. rst-class:: classref-method
  2366. :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>`
  2367. 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.
  2368. \ **Note:** This method is implemented on macOS and Windows.
  2369. .. rst-class:: classref-item-separator
  2370. ----
  2371. .. _class_DisplayServer_method_window_get_vsync_mode:
  2372. .. rst-class:: classref-method
  2373. :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>`
  2374. Returns the V-Sync mode of the given window.
  2375. .. rst-class:: classref-item-separator
  2376. ----
  2377. .. _class_DisplayServer_method_window_is_focused:
  2378. .. rst-class:: classref-method
  2379. :ref:`bool<class_bool>` **window_is_focused**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_window_is_focused>`
  2380. Returns ``true`` if the window specified by ``window_id`` is focused.
  2381. .. rst-class:: classref-item-separator
  2382. ----
  2383. .. _class_DisplayServer_method_window_is_maximize_allowed:
  2384. .. rst-class:: classref-method
  2385. :ref:`bool<class_bool>` **window_is_maximize_allowed**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_window_is_maximize_allowed>`
  2386. Returns ``true`` if the given window can be maximized (the maximize button is enabled).
  2387. .. rst-class:: classref-item-separator
  2388. ----
  2389. .. _class_DisplayServer_method_window_maximize_on_title_dbl_click:
  2390. .. rst-class:: classref-method
  2391. :ref:`bool<class_bool>` **window_maximize_on_title_dbl_click**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_window_maximize_on_title_dbl_click>`
  2392. Returns ``true``, if double-click on a window title should maximize it.
  2393. \ **Note:** This method is implemented only on macOS.
  2394. .. rst-class:: classref-item-separator
  2395. ----
  2396. .. _class_DisplayServer_method_window_minimize_on_title_dbl_click:
  2397. .. rst-class:: classref-method
  2398. :ref:`bool<class_bool>` **window_minimize_on_title_dbl_click**\ (\ ) |const| :ref:`๐Ÿ”—<class_DisplayServer_method_window_minimize_on_title_dbl_click>`
  2399. Returns ``true``, if double-click on a window title should minimize it.
  2400. \ **Note:** This method is implemented only on macOS.
  2401. .. rst-class:: classref-item-separator
  2402. ----
  2403. .. _class_DisplayServer_method_window_move_to_foreground:
  2404. .. rst-class:: classref-method
  2405. |void| **window_move_to_foreground**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_window_move_to_foreground>`
  2406. Moves the window specified by ``window_id`` to the foreground, so that it is visible over other windows.
  2407. .. rst-class:: classref-item-separator
  2408. ----
  2409. .. _class_DisplayServer_method_window_request_attention:
  2410. .. rst-class:: classref-method
  2411. |void| **window_request_attention**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_window_request_attention>`
  2412. 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.
  2413. .. rst-class:: classref-item-separator
  2414. ----
  2415. .. _class_DisplayServer_method_window_set_current_screen:
  2416. .. rst-class:: classref-method
  2417. |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>`
  2418. 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>`.
  2419. .. rst-class:: classref-item-separator
  2420. ----
  2421. .. _class_DisplayServer_method_window_set_drop_files_callback:
  2422. .. rst-class:: classref-method
  2423. |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>`
  2424. 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.
  2425. \ **Warning:** Advanced users only! Adding such a callback to a :ref:`Window<class_Window>` node will override its default implementation, which can introduce bugs.
  2426. \ **Note:** This method is implemented on Windows, macOS, Linux (X11/Wayland), and Web.
  2427. .. rst-class:: classref-item-separator
  2428. ----
  2429. .. _class_DisplayServer_method_window_set_exclusive:
  2430. .. rst-class:: classref-method
  2431. |void| **window_set_exclusive**\ (\ window_id\: :ref:`int<class_int>`, exclusive\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_window_set_exclusive>`
  2432. 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.
  2433. \ **Note:** On macOS, exclusive windows are confined to the same space (virtual desktop or screen) as the parent window.
  2434. \ **Note:** This method is implemented on macOS and Windows.
  2435. .. rst-class:: classref-item-separator
  2436. ----
  2437. .. _class_DisplayServer_method_window_set_flag:
  2438. .. rst-class:: classref-method
  2439. |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>`
  2440. Enables or disables the given window's given ``flag``. See :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` for possible values and their behavior.
  2441. .. rst-class:: classref-item-separator
  2442. ----
  2443. .. _class_DisplayServer_method_window_set_ime_active:
  2444. .. rst-class:: classref-method
  2445. |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>`
  2446. 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>`.
  2447. .. rst-class:: classref-item-separator
  2448. ----
  2449. .. _class_DisplayServer_method_window_set_ime_position:
  2450. .. rst-class:: classref-method
  2451. |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>`
  2452. 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``.
  2453. .. rst-class:: classref-item-separator
  2454. ----
  2455. .. _class_DisplayServer_method_window_set_input_event_callback:
  2456. .. rst-class:: classref-method
  2457. |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>`
  2458. Sets the ``callback`` that should be called when any :ref:`InputEvent<class_InputEvent>` is sent to the window specified by ``window_id``.
  2459. \ **Warning:** Advanced users only! Adding such a callback to a :ref:`Window<class_Window>` node will override its default implementation, which can introduce bugs.
  2460. .. rst-class:: classref-item-separator
  2461. ----
  2462. .. _class_DisplayServer_method_window_set_input_text_callback:
  2463. .. rst-class:: classref-method
  2464. |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>`
  2465. Sets the ``callback`` that should be called when text is entered using the virtual keyboard to the window specified by ``window_id``.
  2466. \ **Warning:** Advanced users only! Adding such a callback to a :ref:`Window<class_Window>` node will override its default implementation, which can introduce bugs.
  2467. .. rst-class:: classref-item-separator
  2468. ----
  2469. .. _class_DisplayServer_method_window_set_max_size:
  2470. .. rst-class:: classref-method
  2471. |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>`
  2472. 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>`.
  2473. \ **Note:** It's recommended to change this value using :ref:`Window.max_size<class_Window_property_max_size>` instead.
  2474. \ **Note:** Using third-party tools, it is possible for users to disable window geometry restrictions and therefore bypass this limit.
  2475. .. rst-class:: classref-item-separator
  2476. ----
  2477. .. _class_DisplayServer_method_window_set_min_size:
  2478. .. rst-class:: classref-method
  2479. |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>`
  2480. 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>`.
  2481. \ **Note:** It's recommended to change this value using :ref:`Window.min_size<class_Window_property_min_size>` instead.
  2482. \ **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.
  2483. \ **Note:** Using third-party tools, it is possible for users to disable window geometry restrictions and therefore bypass this limit.
  2484. .. rst-class:: classref-item-separator
  2485. ----
  2486. .. _class_DisplayServer_method_window_set_mode:
  2487. .. rst-class:: classref-method
  2488. |void| **window_set_mode**\ (\ mode\: :ref:`WindowMode<enum_DisplayServer_WindowMode>`, window_id\: :ref:`int<class_int>` = 0\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_window_set_mode>`
  2489. Sets window mode for the given window to ``mode``. See :ref:`WindowMode<enum_DisplayServer_WindowMode>` for possible values and how each mode behaves.
  2490. \ **Note:** On Android, setting it to :ref:`WINDOW_MODE_FULLSCREEN<class_DisplayServer_constant_WINDOW_MODE_FULLSCREEN>` or :ref:`WINDOW_MODE_EXCLUSIVE_FULLSCREEN<class_DisplayServer_constant_WINDOW_MODE_EXCLUSIVE_FULLSCREEN>` will enable immersive mode.
  2491. \ **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.
  2492. .. rst-class:: classref-item-separator
  2493. ----
  2494. .. _class_DisplayServer_method_window_set_mouse_passthrough:
  2495. .. rst-class:: classref-method
  2496. |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>`
  2497. Sets a polygonal region of the window which accepts mouse events. Mouse events outside the region will be passed through.
  2498. Passing an empty array will disable passthrough support (all mouse events will be intercepted by the window, which is the default behavior).
  2499. .. tabs::
  2500. .. code-tab:: gdscript
  2501. # Set region, using Path2D node.
  2502. DisplayServer.window_set_mouse_passthrough($Path2D.curve.get_baked_points())
  2503. # Set region, using Polygon2D node.
  2504. DisplayServer.window_set_mouse_passthrough($Polygon2D.polygon)
  2505. # Reset region to default.
  2506. DisplayServer.window_set_mouse_passthrough([])
  2507. .. code-tab:: csharp
  2508. // Set region, using Path2D node.
  2509. DisplayServer.WindowSetMousePassthrough(GetNode<Path2D>("Path2D").Curve.GetBakedPoints());
  2510. // Set region, using Polygon2D node.
  2511. DisplayServer.WindowSetMousePassthrough(GetNode<Polygon2D>("Polygon2D").Polygon);
  2512. // Reset region to default.
  2513. DisplayServer.WindowSetMousePassthrough([]);
  2514. \ **Note:** On Windows, the portion of a window that lies outside the region is not drawn, while on Linux (X11) and macOS it is.
  2515. \ **Note:** This method is implemented on Linux (X11), macOS and Windows.
  2516. .. rst-class:: classref-item-separator
  2517. ----
  2518. .. _class_DisplayServer_method_window_set_popup_safe_rect:
  2519. .. rst-class:: classref-method
  2520. |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>`
  2521. 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.
  2522. .. rst-class:: classref-item-separator
  2523. ----
  2524. .. _class_DisplayServer_method_window_set_position:
  2525. .. rst-class:: classref-method
  2526. |void| **window_set_position**\ (\ position\: :ref:`Vector2i<class_Vector2i>`, window_id\: :ref:`int<class_int>` = 0\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_window_set_position>`
  2527. 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:
  2528. .. code:: text
  2529. * (0, 0) +-------+
  2530. | |
  2531. +-------------+ | |
  2532. | | | |
  2533. | | | |
  2534. +-------------+ +-------+
  2535. See also :ref:`window_get_position()<class_DisplayServer_method_window_get_position>` and :ref:`window_set_size()<class_DisplayServer_method_window_set_size>`.
  2536. \ **Note:** It's recommended to change this value using :ref:`Window.position<class_Window_property_position>` instead.
  2537. \ **Note:** On Linux (Wayland): this method is a no-op.
  2538. .. rst-class:: classref-item-separator
  2539. ----
  2540. .. _class_DisplayServer_method_window_set_rect_changed_callback:
  2541. .. rst-class:: classref-method
  2542. |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>`
  2543. Sets the ``callback`` that will be called when the window specified by ``window_id`` is moved or resized.
  2544. \ **Warning:** Advanced users only! Adding such a callback to a :ref:`Window<class_Window>` node will override its default implementation, which can introduce bugs.
  2545. .. rst-class:: classref-item-separator
  2546. ----
  2547. .. _class_DisplayServer_method_window_set_size:
  2548. .. rst-class:: classref-method
  2549. |void| **window_set_size**\ (\ size\: :ref:`Vector2i<class_Vector2i>`, window_id\: :ref:`int<class_int>` = 0\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_window_set_size>`
  2550. 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>`.
  2551. \ **Note:** It's recommended to change this value using :ref:`Window.size<class_Window_property_size>` instead.
  2552. .. rst-class:: classref-item-separator
  2553. ----
  2554. .. _class_DisplayServer_method_window_set_title:
  2555. .. rst-class:: classref-method
  2556. |void| **window_set_title**\ (\ title\: :ref:`String<class_String>`, window_id\: :ref:`int<class_int>` = 0\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_window_set_title>`
  2557. Sets the title of the given window to ``title``.
  2558. \ **Note:** It's recommended to change this value using :ref:`Window.title<class_Window_property_title>` instead.
  2559. \ **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.
  2560. .. rst-class:: classref-item-separator
  2561. ----
  2562. .. _class_DisplayServer_method_window_set_transient:
  2563. .. rst-class:: classref-method
  2564. |void| **window_set_transient**\ (\ window_id\: :ref:`int<class_int>`, parent_window_id\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_window_set_transient>`
  2565. Sets window transient parent. Transient window 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.
  2566. \ **Note:** It's recommended to change this value using :ref:`Window.transient<class_Window_property_transient>` instead.
  2567. \ **Note:** The behavior might be different depending on the platform.
  2568. .. rst-class:: classref-item-separator
  2569. ----
  2570. .. _class_DisplayServer_method_window_set_vsync_mode:
  2571. .. rst-class:: classref-method
  2572. |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>`
  2573. 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>`.
  2574. See :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` for possible values and how they affect the behavior of your application.
  2575. 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.
  2576. \ **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.
  2577. .. rst-class:: classref-item-separator
  2578. ----
  2579. .. _class_DisplayServer_method_window_set_window_buttons_offset:
  2580. .. rst-class:: classref-method
  2581. |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>`
  2582. 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.
  2583. \ **Note:** This flag is implemented only on macOS.
  2584. .. rst-class:: classref-item-separator
  2585. ----
  2586. .. _class_DisplayServer_method_window_set_window_event_callback:
  2587. .. rst-class:: classref-method
  2588. |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>`
  2589. Sets the ``callback`` that will be called when an event occurs in the window specified by ``window_id``.
  2590. \ **Warning:** Advanced users only! Adding such a callback to a :ref:`Window<class_Window>` node will override its default implementation, which can introduce bugs.
  2591. .. rst-class:: classref-item-separator
  2592. ----
  2593. .. _class_DisplayServer_method_window_start_drag:
  2594. .. rst-class:: classref-method
  2595. |void| **window_start_drag**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_window_start_drag>`
  2596. Starts an interactive drag operation on the window with the given ``window_id``, using the current mouse position. Call this method when handling a mouse button being pressed to simulate a pressed event on the window's title bar. Using this method allows the window to participate in space switching, tiling, and other system features.
  2597. \ **Note:** This method is implemented on Linux (X11/Wayland), macOS, and Windows.
  2598. .. rst-class:: classref-item-separator
  2599. ----
  2600. .. _class_DisplayServer_method_window_start_resize:
  2601. .. rst-class:: classref-method
  2602. |void| **window_start_resize**\ (\ edge\: :ref:`WindowResizeEdge<enum_DisplayServer_WindowResizeEdge>`, window_id\: :ref:`int<class_int>` = 0\ ) :ref:`๐Ÿ”—<class_DisplayServer_method_window_start_resize>`
  2603. Starts an interactive resize operation on the window with the given ``window_id``, using the current mouse position. Call this method when handling a mouse button being pressed to simulate a pressed event on the window's edge.
  2604. \ **Note:** This method is implemented on Linux (X11/Wayland), macOS, and Windows.
  2605. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  2606. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  2607. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  2608. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  2609. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  2610. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  2611. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  2612. .. |void| replace:: :abbr:`void (No return value.)`