class_displayserver.rst 409 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754
  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. .. rst-class:: classref-item-separator
  562. ----
  563. .. _enum_DisplayServer_ScreenOrientation:
  564. .. rst-class:: classref-enumeration
  565. enum **ScreenOrientation**: :ref:`🔗<enum_DisplayServer_ScreenOrientation>`
  566. .. _class_DisplayServer_constant_SCREEN_LANDSCAPE:
  567. .. rst-class:: classref-enumeration-constant
  568. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_LANDSCAPE** = ``0``
  569. Default landscape orientation.
  570. .. _class_DisplayServer_constant_SCREEN_PORTRAIT:
  571. .. rst-class:: classref-enumeration-constant
  572. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_PORTRAIT** = ``1``
  573. Default portrait orientation.
  574. .. _class_DisplayServer_constant_SCREEN_REVERSE_LANDSCAPE:
  575. .. rst-class:: classref-enumeration-constant
  576. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_REVERSE_LANDSCAPE** = ``2``
  577. Reverse landscape orientation (upside down).
  578. .. _class_DisplayServer_constant_SCREEN_REVERSE_PORTRAIT:
  579. .. rst-class:: classref-enumeration-constant
  580. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_REVERSE_PORTRAIT** = ``3``
  581. Reverse portrait orientation (upside down).
  582. .. _class_DisplayServer_constant_SCREEN_SENSOR_LANDSCAPE:
  583. .. rst-class:: classref-enumeration-constant
  584. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_SENSOR_LANDSCAPE** = ``4``
  585. Automatic landscape orientation (default or reverse depending on sensor).
  586. .. _class_DisplayServer_constant_SCREEN_SENSOR_PORTRAIT:
  587. .. rst-class:: classref-enumeration-constant
  588. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_SENSOR_PORTRAIT** = ``5``
  589. Automatic portrait orientation (default or reverse depending on sensor).
  590. .. _class_DisplayServer_constant_SCREEN_SENSOR:
  591. .. rst-class:: classref-enumeration-constant
  592. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_SENSOR** = ``6``
  593. Automatic landscape or portrait orientation (default or reverse depending on sensor).
  594. .. rst-class:: classref-item-separator
  595. ----
  596. .. _enum_DisplayServer_VirtualKeyboardType:
  597. .. rst-class:: classref-enumeration
  598. enum **VirtualKeyboardType**: :ref:`🔗<enum_DisplayServer_VirtualKeyboardType>`
  599. .. _class_DisplayServer_constant_KEYBOARD_TYPE_DEFAULT:
  600. .. rst-class:: classref-enumeration-constant
  601. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_DEFAULT** = ``0``
  602. Default text virtual keyboard.
  603. .. _class_DisplayServer_constant_KEYBOARD_TYPE_MULTILINE:
  604. .. rst-class:: classref-enumeration-constant
  605. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_MULTILINE** = ``1``
  606. Multiline virtual keyboard.
  607. .. _class_DisplayServer_constant_KEYBOARD_TYPE_NUMBER:
  608. .. rst-class:: classref-enumeration-constant
  609. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_NUMBER** = ``2``
  610. Virtual number keypad, useful for PIN entry.
  611. .. _class_DisplayServer_constant_KEYBOARD_TYPE_NUMBER_DECIMAL:
  612. .. rst-class:: classref-enumeration-constant
  613. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_NUMBER_DECIMAL** = ``3``
  614. Virtual number keypad, useful for entering fractional numbers.
  615. .. _class_DisplayServer_constant_KEYBOARD_TYPE_PHONE:
  616. .. rst-class:: classref-enumeration-constant
  617. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_PHONE** = ``4``
  618. Virtual phone number keypad.
  619. .. _class_DisplayServer_constant_KEYBOARD_TYPE_EMAIL_ADDRESS:
  620. .. rst-class:: classref-enumeration-constant
  621. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_EMAIL_ADDRESS** = ``5``
  622. Virtual keyboard with additional keys to assist with typing email addresses.
  623. .. _class_DisplayServer_constant_KEYBOARD_TYPE_PASSWORD:
  624. .. rst-class:: classref-enumeration-constant
  625. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_PASSWORD** = ``6``
  626. Virtual keyboard for entering a password. On most platforms, this should disable autocomplete and autocapitalization.
  627. \ **Note:** This is not supported on Web. Instead, this behaves identically to :ref:`KEYBOARD_TYPE_DEFAULT<class_DisplayServer_constant_KEYBOARD_TYPE_DEFAULT>`.
  628. .. _class_DisplayServer_constant_KEYBOARD_TYPE_URL:
  629. .. rst-class:: classref-enumeration-constant
  630. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_URL** = ``7``
  631. Virtual keyboard with additional keys to assist with typing URLs.
  632. .. rst-class:: classref-item-separator
  633. ----
  634. .. _enum_DisplayServer_CursorShape:
  635. .. rst-class:: classref-enumeration
  636. enum **CursorShape**: :ref:`🔗<enum_DisplayServer_CursorShape>`
  637. .. _class_DisplayServer_constant_CURSOR_ARROW:
  638. .. rst-class:: classref-enumeration-constant
  639. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_ARROW** = ``0``
  640. 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>`.
  641. .. _class_DisplayServer_constant_CURSOR_IBEAM:
  642. .. rst-class:: classref-enumeration-constant
  643. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_IBEAM** = ``1``
  644. 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>`.
  645. .. _class_DisplayServer_constant_CURSOR_POINTING_HAND:
  646. .. rst-class:: classref-enumeration-constant
  647. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_POINTING_HAND** = ``2``
  648. 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>`.
  649. .. _class_DisplayServer_constant_CURSOR_CROSS:
  650. .. rst-class:: classref-enumeration-constant
  651. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_CROSS** = ``3``
  652. 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.
  653. .. _class_DisplayServer_constant_CURSOR_WAIT:
  654. .. rst-class:: classref-enumeration-constant
  655. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_WAIT** = ``4``
  656. 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>`.
  657. .. _class_DisplayServer_constant_CURSOR_BUSY:
  658. .. rst-class:: classref-enumeration-constant
  659. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_BUSY** = ``5``
  660. 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>`.
  661. .. _class_DisplayServer_constant_CURSOR_DRAG:
  662. .. rst-class:: classref-enumeration-constant
  663. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_DRAG** = ``6``
  664. Dragging hand cursor. This is displayed during drag-and-drop operations. See also :ref:`CURSOR_CAN_DROP<class_DisplayServer_constant_CURSOR_CAN_DROP>`.
  665. .. _class_DisplayServer_constant_CURSOR_CAN_DROP:
  666. .. rst-class:: classref-enumeration-constant
  667. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_CAN_DROP** = ``7``
  668. "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>`.
  669. .. _class_DisplayServer_constant_CURSOR_FORBIDDEN:
  670. .. rst-class:: classref-enumeration-constant
  671. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_FORBIDDEN** = ``8``
  672. 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.
  673. .. _class_DisplayServer_constant_CURSOR_VSIZE:
  674. .. rst-class:: classref-enumeration-constant
  675. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_VSIZE** = ``9``
  676. 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>`.
  677. .. _class_DisplayServer_constant_CURSOR_HSIZE:
  678. .. rst-class:: classref-enumeration-constant
  679. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_HSIZE** = ``10``
  680. 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>`.
  681. .. _class_DisplayServer_constant_CURSOR_BDIAGSIZE:
  682. .. rst-class:: classref-enumeration-constant
  683. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_BDIAGSIZE** = ``11``
  684. 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.
  685. .. _class_DisplayServer_constant_CURSOR_FDIAGSIZE:
  686. .. rst-class:: classref-enumeration-constant
  687. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_FDIAGSIZE** = ``12``
  688. 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.
  689. .. _class_DisplayServer_constant_CURSOR_MOVE:
  690. .. rst-class:: classref-enumeration-constant
  691. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_MOVE** = ``13``
  692. Move cursor. Intended to be displayed when the hovered :ref:`Control<class_Control>` can be moved using the mouse.
  693. .. _class_DisplayServer_constant_CURSOR_VSPLIT:
  694. .. rst-class:: classref-enumeration-constant
  695. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_VSPLIT** = ``14``
  696. 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>`.
  697. .. _class_DisplayServer_constant_CURSOR_HSPLIT:
  698. .. rst-class:: classref-enumeration-constant
  699. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_HSPLIT** = ``15``
  700. 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>`.
  701. .. _class_DisplayServer_constant_CURSOR_HELP:
  702. .. rst-class:: classref-enumeration-constant
  703. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_HELP** = ``16``
  704. 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.
  705. .. _class_DisplayServer_constant_CURSOR_MAX:
  706. .. rst-class:: classref-enumeration-constant
  707. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_MAX** = ``17``
  708. Represents the size of the :ref:`CursorShape<enum_DisplayServer_CursorShape>` enum.
  709. .. rst-class:: classref-item-separator
  710. ----
  711. .. _enum_DisplayServer_FileDialogMode:
  712. .. rst-class:: classref-enumeration
  713. enum **FileDialogMode**: :ref:`🔗<enum_DisplayServer_FileDialogMode>`
  714. .. _class_DisplayServer_constant_FILE_DIALOG_MODE_OPEN_FILE:
  715. .. rst-class:: classref-enumeration-constant
  716. :ref:`FileDialogMode<enum_DisplayServer_FileDialogMode>` **FILE_DIALOG_MODE_OPEN_FILE** = ``0``
  717. The native file dialog allows selecting one, and only one file.
  718. .. _class_DisplayServer_constant_FILE_DIALOG_MODE_OPEN_FILES:
  719. .. rst-class:: classref-enumeration-constant
  720. :ref:`FileDialogMode<enum_DisplayServer_FileDialogMode>` **FILE_DIALOG_MODE_OPEN_FILES** = ``1``
  721. The native file dialog allows selecting multiple files.
  722. .. _class_DisplayServer_constant_FILE_DIALOG_MODE_OPEN_DIR:
  723. .. rst-class:: classref-enumeration-constant
  724. :ref:`FileDialogMode<enum_DisplayServer_FileDialogMode>` **FILE_DIALOG_MODE_OPEN_DIR** = ``2``
  725. The native file dialog only allows selecting a directory, disallowing the selection of any file.
  726. .. _class_DisplayServer_constant_FILE_DIALOG_MODE_OPEN_ANY:
  727. .. rst-class:: classref-enumeration-constant
  728. :ref:`FileDialogMode<enum_DisplayServer_FileDialogMode>` **FILE_DIALOG_MODE_OPEN_ANY** = ``3``
  729. The native file dialog allows selecting one file or directory.
  730. .. _class_DisplayServer_constant_FILE_DIALOG_MODE_SAVE_FILE:
  731. .. rst-class:: classref-enumeration-constant
  732. :ref:`FileDialogMode<enum_DisplayServer_FileDialogMode>` **FILE_DIALOG_MODE_SAVE_FILE** = ``4``
  733. The native file dialog will warn when a file exists.
  734. .. rst-class:: classref-item-separator
  735. ----
  736. .. _enum_DisplayServer_WindowMode:
  737. .. rst-class:: classref-enumeration
  738. enum **WindowMode**: :ref:`🔗<enum_DisplayServer_WindowMode>`
  739. .. _class_DisplayServer_constant_WINDOW_MODE_WINDOWED:
  740. .. rst-class:: classref-enumeration-constant
  741. :ref:`WindowMode<enum_DisplayServer_WindowMode>` **WINDOW_MODE_WINDOWED** = ``0``
  742. Windowed mode, i.e. :ref:`Window<class_Window>` doesn't occupy the whole screen (unless set to the size of the screen).
  743. .. _class_DisplayServer_constant_WINDOW_MODE_MINIMIZED:
  744. .. rst-class:: classref-enumeration-constant
  745. :ref:`WindowMode<enum_DisplayServer_WindowMode>` **WINDOW_MODE_MINIMIZED** = ``1``
  746. 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.
  747. .. _class_DisplayServer_constant_WINDOW_MODE_MAXIMIZED:
  748. .. rst-class:: classref-enumeration-constant
  749. :ref:`WindowMode<enum_DisplayServer_WindowMode>` **WINDOW_MODE_MAXIMIZED** = ``2``
  750. 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.
  751. .. _class_DisplayServer_constant_WINDOW_MODE_FULLSCREEN:
  752. .. rst-class:: classref-enumeration-constant
  753. :ref:`WindowMode<enum_DisplayServer_WindowMode>` **WINDOW_MODE_FULLSCREEN** = ``3``
  754. Full screen mode with full multi-window support.
  755. Full screen window covers the entire display area of a screen and has no decorations. The display's video mode is not changed.
  756. \ **On Android:** This enables immersive mode.
  757. \ **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.
  758. \ **On macOS:** A new desktop is used to display the running project.
  759. \ **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.
  760. .. _class_DisplayServer_constant_WINDOW_MODE_EXCLUSIVE_FULLSCREEN:
  761. .. rst-class:: classref-enumeration-constant
  762. :ref:`WindowMode<enum_DisplayServer_WindowMode>` **WINDOW_MODE_EXCLUSIVE_FULLSCREEN** = ``4``
  763. 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).
  764. 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.
  765. \ **On Android:** This enables immersive mode.
  766. \ **On Windows:** Depending on video driver, full screen transition might cause screens to go black for a moment.
  767. \ **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.
  768. \ **On Linux (X11):** Exclusive full screen mode bypasses compositor.
  769. \ **On Linux (Wayland):** Equivalent to :ref:`WINDOW_MODE_FULLSCREEN<class_DisplayServer_constant_WINDOW_MODE_FULLSCREEN>`.
  770. \ **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.
  771. .. rst-class:: classref-item-separator
  772. ----
  773. .. _enum_DisplayServer_WindowFlags:
  774. .. rst-class:: classref-enumeration
  775. enum **WindowFlags**: :ref:`🔗<enum_DisplayServer_WindowFlags>`
  776. .. _class_DisplayServer_constant_WINDOW_FLAG_RESIZE_DISABLED:
  777. .. rst-class:: classref-enumeration-constant
  778. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_RESIZE_DISABLED** = ``0``
  779. 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.
  780. .. _class_DisplayServer_constant_WINDOW_FLAG_BORDERLESS:
  781. .. rst-class:: classref-enumeration-constant
  782. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_BORDERLESS** = ``1``
  783. The window do not have native title bar and other decorations. This flag is ignored for full-screen windows.
  784. .. _class_DisplayServer_constant_WINDOW_FLAG_ALWAYS_ON_TOP:
  785. .. rst-class:: classref-enumeration-constant
  786. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_ALWAYS_ON_TOP** = ``2``
  787. The window is floating on top of all other windows. This flag is ignored for full-screen windows.
  788. .. _class_DisplayServer_constant_WINDOW_FLAG_TRANSPARENT:
  789. .. rst-class:: classref-enumeration-constant
  790. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_TRANSPARENT** = ``3``
  791. The window background can be transparent.
  792. \ **Note:** This flag has no effect if :ref:`is_window_transparency_available<class_DisplayServer_method_is_window_transparency_available>` returns ``false``.
  793. \ **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.
  794. .. _class_DisplayServer_constant_WINDOW_FLAG_NO_FOCUS:
  795. .. rst-class:: classref-enumeration-constant
  796. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_NO_FOCUS** = ``4``
  797. The window can't be focused. No-focus window will ignore all input, except mouse clicks.
  798. .. _class_DisplayServer_constant_WINDOW_FLAG_POPUP:
  799. .. rst-class:: classref-enumeration-constant
  800. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_POPUP** = ``5``
  801. 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>`).
  802. .. _class_DisplayServer_constant_WINDOW_FLAG_EXTEND_TO_TITLE:
  803. .. rst-class:: classref-enumeration-constant
  804. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_EXTEND_TO_TITLE** = ``6``
  805. 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.
  806. Use :ref:`window_set_window_buttons_offset<class_DisplayServer_method_window_set_window_buttons_offset>` to adjust minimize/maximize/close buttons offset.
  807. 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.
  808. \ **Note:** This flag is implemented only on macOS.
  809. .. _class_DisplayServer_constant_WINDOW_FLAG_MOUSE_PASSTHROUGH:
  810. .. rst-class:: classref-enumeration-constant
  811. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_MOUSE_PASSTHROUGH** = ``7``
  812. All mouse events are passed to the underlying window of the same application.
  813. .. _class_DisplayServer_constant_WINDOW_FLAG_SHARP_CORNERS:
  814. .. rst-class:: classref-enumeration-constant
  815. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_SHARP_CORNERS** = ``8``
  816. Window style is overridden, forcing sharp corners.
  817. \ **Note:** This flag is implemented only on Windows (11).
  818. .. _class_DisplayServer_constant_WINDOW_FLAG_EXCLUDE_FROM_CAPTURE:
  819. .. rst-class:: classref-enumeration-constant
  820. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_EXCLUDE_FROM_CAPTURE** = ``9``
  821. 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>`.
  822. \ **Note:** This flag is implemented on macOS and Windows.
  823. \ **Note:** Setting this flag will **NOT** prevent other apps from capturing an image, it should not be used as a security measure.
  824. .. _class_DisplayServer_constant_WINDOW_FLAG_MAX:
  825. .. rst-class:: classref-enumeration-constant
  826. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_MAX** = ``10``
  827. Max value of the :ref:`WindowFlags<enum_DisplayServer_WindowFlags>`.
  828. .. rst-class:: classref-item-separator
  829. ----
  830. .. _enum_DisplayServer_WindowEvent:
  831. .. rst-class:: classref-enumeration
  832. enum **WindowEvent**: :ref:`🔗<enum_DisplayServer_WindowEvent>`
  833. .. _class_DisplayServer_constant_WINDOW_EVENT_MOUSE_ENTER:
  834. .. rst-class:: classref-enumeration-constant
  835. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_MOUSE_ENTER** = ``0``
  836. Sent when the mouse pointer enters the window.
  837. .. _class_DisplayServer_constant_WINDOW_EVENT_MOUSE_EXIT:
  838. .. rst-class:: classref-enumeration-constant
  839. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_MOUSE_EXIT** = ``1``
  840. Sent when the mouse pointer exits the window.
  841. .. _class_DisplayServer_constant_WINDOW_EVENT_FOCUS_IN:
  842. .. rst-class:: classref-enumeration-constant
  843. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_FOCUS_IN** = ``2``
  844. Sent when the window grabs focus.
  845. .. _class_DisplayServer_constant_WINDOW_EVENT_FOCUS_OUT:
  846. .. rst-class:: classref-enumeration-constant
  847. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_FOCUS_OUT** = ``3``
  848. Sent when the window loses focus.
  849. .. _class_DisplayServer_constant_WINDOW_EVENT_CLOSE_REQUEST:
  850. .. rst-class:: classref-enumeration-constant
  851. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_CLOSE_REQUEST** = ``4``
  852. Sent when the user has attempted to close the window (e.g. close button is pressed).
  853. .. _class_DisplayServer_constant_WINDOW_EVENT_GO_BACK_REQUEST:
  854. .. rst-class:: classref-enumeration-constant
  855. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_GO_BACK_REQUEST** = ``5``
  856. Sent when the device "Back" button is pressed.
  857. \ **Note:** This event is implemented only on Android.
  858. .. _class_DisplayServer_constant_WINDOW_EVENT_DPI_CHANGE:
  859. .. rst-class:: classref-enumeration-constant
  860. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_DPI_CHANGE** = ``6``
  861. Sent when the window is moved to the display with different DPI, or display DPI is changed.
  862. \ **Note:** This flag is implemented only on macOS.
  863. .. _class_DisplayServer_constant_WINDOW_EVENT_TITLEBAR_CHANGE:
  864. .. rst-class:: classref-enumeration-constant
  865. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_TITLEBAR_CHANGE** = ``7``
  866. 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).
  867. \ **Note:** This flag is implemented only on macOS.
  868. .. rst-class:: classref-item-separator
  869. ----
  870. .. _enum_DisplayServer_WindowResizeEdge:
  871. .. rst-class:: classref-enumeration
  872. enum **WindowResizeEdge**: :ref:`🔗<enum_DisplayServer_WindowResizeEdge>`
  873. .. _class_DisplayServer_constant_WINDOW_EDGE_TOP_LEFT:
  874. .. rst-class:: classref-enumeration-constant
  875. :ref:`WindowResizeEdge<enum_DisplayServer_WindowResizeEdge>` **WINDOW_EDGE_TOP_LEFT** = ``0``
  876. Top-left edge of a window.
  877. .. _class_DisplayServer_constant_WINDOW_EDGE_TOP:
  878. .. rst-class:: classref-enumeration-constant
  879. :ref:`WindowResizeEdge<enum_DisplayServer_WindowResizeEdge>` **WINDOW_EDGE_TOP** = ``1``
  880. Top edge of a window.
  881. .. _class_DisplayServer_constant_WINDOW_EDGE_TOP_RIGHT:
  882. .. rst-class:: classref-enumeration-constant
  883. :ref:`WindowResizeEdge<enum_DisplayServer_WindowResizeEdge>` **WINDOW_EDGE_TOP_RIGHT** = ``2``
  884. Top-right edge of a window.
  885. .. _class_DisplayServer_constant_WINDOW_EDGE_LEFT:
  886. .. rst-class:: classref-enumeration-constant
  887. :ref:`WindowResizeEdge<enum_DisplayServer_WindowResizeEdge>` **WINDOW_EDGE_LEFT** = ``3``
  888. Left edge of a window.
  889. .. _class_DisplayServer_constant_WINDOW_EDGE_RIGHT:
  890. .. rst-class:: classref-enumeration-constant
  891. :ref:`WindowResizeEdge<enum_DisplayServer_WindowResizeEdge>` **WINDOW_EDGE_RIGHT** = ``4``
  892. Right edge of a window.
  893. .. _class_DisplayServer_constant_WINDOW_EDGE_BOTTOM_LEFT:
  894. .. rst-class:: classref-enumeration-constant
  895. :ref:`WindowResizeEdge<enum_DisplayServer_WindowResizeEdge>` **WINDOW_EDGE_BOTTOM_LEFT** = ``5``
  896. Bottom-left edge of a window.
  897. .. _class_DisplayServer_constant_WINDOW_EDGE_BOTTOM:
  898. .. rst-class:: classref-enumeration-constant
  899. :ref:`WindowResizeEdge<enum_DisplayServer_WindowResizeEdge>` **WINDOW_EDGE_BOTTOM** = ``6``
  900. Bottom edge of a window.
  901. .. _class_DisplayServer_constant_WINDOW_EDGE_BOTTOM_RIGHT:
  902. .. rst-class:: classref-enumeration-constant
  903. :ref:`WindowResizeEdge<enum_DisplayServer_WindowResizeEdge>` **WINDOW_EDGE_BOTTOM_RIGHT** = ``7``
  904. Bottom-right edge of a window.
  905. .. _class_DisplayServer_constant_WINDOW_EDGE_MAX:
  906. .. rst-class:: classref-enumeration-constant
  907. :ref:`WindowResizeEdge<enum_DisplayServer_WindowResizeEdge>` **WINDOW_EDGE_MAX** = ``8``
  908. Represents the size of the :ref:`WindowResizeEdge<enum_DisplayServer_WindowResizeEdge>` enum.
  909. .. rst-class:: classref-item-separator
  910. ----
  911. .. _enum_DisplayServer_VSyncMode:
  912. .. rst-class:: classref-enumeration
  913. enum **VSyncMode**: :ref:`🔗<enum_DisplayServer_VSyncMode>`
  914. .. _class_DisplayServer_constant_VSYNC_DISABLED:
  915. .. rst-class:: classref-enumeration-constant
  916. :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` **VSYNC_DISABLED** = ``0``
  917. 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>`).
  918. .. _class_DisplayServer_constant_VSYNC_ENABLED:
  919. .. rst-class:: classref-enumeration-constant
  920. :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` **VSYNC_ENABLED** = ``1``
  921. 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>`).
  922. .. _class_DisplayServer_constant_VSYNC_ADAPTIVE:
  923. .. rst-class:: classref-enumeration-constant
  924. :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` **VSYNC_ADAPTIVE** = ``2``
  925. 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.
  926. .. _class_DisplayServer_constant_VSYNC_MAILBOX:
  927. .. rst-class:: classref-enumeration-constant
  928. :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` **VSYNC_MAILBOX** = ``3``
  929. 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>`).
  930. 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.
  931. .. rst-class:: classref-item-separator
  932. ----
  933. .. _enum_DisplayServer_HandleType:
  934. .. rst-class:: classref-enumeration
  935. enum **HandleType**: :ref:`🔗<enum_DisplayServer_HandleType>`
  936. .. _class_DisplayServer_constant_DISPLAY_HANDLE:
  937. .. rst-class:: classref-enumeration-constant
  938. :ref:`HandleType<enum_DisplayServer_HandleType>` **DISPLAY_HANDLE** = ``0``
  939. Display handle:
  940. - Linux (X11): ``X11::Display*`` for the display.
  941. - Linux (Wayland): ``wl_display`` for the display.
  942. - Android: ``EGLDisplay`` for the display.
  943. .. _class_DisplayServer_constant_WINDOW_HANDLE:
  944. .. rst-class:: classref-enumeration-constant
  945. :ref:`HandleType<enum_DisplayServer_HandleType>` **WINDOW_HANDLE** = ``1``
  946. Window handle:
  947. - Windows: ``HWND`` for the window.
  948. - Linux (X11): ``X11::Window*`` for the window.
  949. - Linux (Wayland): ``wl_surface`` for the window.
  950. - macOS: ``NSWindow*`` for the window.
  951. - iOS: ``UIViewController*`` for the view controller.
  952. - Android: ``jObject`` for the activity.
  953. .. _class_DisplayServer_constant_WINDOW_VIEW:
  954. .. rst-class:: classref-enumeration-constant
  955. :ref:`HandleType<enum_DisplayServer_HandleType>` **WINDOW_VIEW** = ``2``
  956. Window view:
  957. - Windows: ``HDC`` for the window (only with the Compatibility renderer).
  958. - macOS: ``NSView*`` for the window main view.
  959. - iOS: ``UIView*`` for the window main view.
  960. .. _class_DisplayServer_constant_OPENGL_CONTEXT:
  961. .. rst-class:: classref-enumeration-constant
  962. :ref:`HandleType<enum_DisplayServer_HandleType>` **OPENGL_CONTEXT** = ``3``
  963. OpenGL context (only with the Compatibility renderer):
  964. - Windows: ``HGLRC`` for the window (native GL), or ``EGLContext`` for the window (ANGLE).
  965. - Linux (X11): ``GLXContext*`` for the window.
  966. - Linux (Wayland): ``EGLContext`` for the window.
  967. - macOS: ``NSOpenGLContext*`` for the window (native GL), or ``EGLContext`` for the window (ANGLE).
  968. - Android: ``EGLContext`` for the window.
  969. .. _class_DisplayServer_constant_EGL_DISPLAY:
  970. .. rst-class:: classref-enumeration-constant
  971. :ref:`HandleType<enum_DisplayServer_HandleType>` **EGL_DISPLAY** = ``4``
  972. - Windows: ``EGLDisplay`` for the window (ANGLE).
  973. - macOS: ``EGLDisplay`` for the window (ANGLE).
  974. - Linux (Wayland): ``EGLDisplay`` for the window.
  975. .. _class_DisplayServer_constant_EGL_CONFIG:
  976. .. rst-class:: classref-enumeration-constant
  977. :ref:`HandleType<enum_DisplayServer_HandleType>` **EGL_CONFIG** = ``5``
  978. - Windows: ``EGLConfig`` for the window (ANGLE).
  979. - macOS: ``EGLConfig`` for the window (ANGLE).
  980. - Linux (Wayland): ``EGLConfig`` for the window.
  981. .. rst-class:: classref-item-separator
  982. ----
  983. .. _enum_DisplayServer_TTSUtteranceEvent:
  984. .. rst-class:: classref-enumeration
  985. enum **TTSUtteranceEvent**: :ref:`🔗<enum_DisplayServer_TTSUtteranceEvent>`
  986. .. _class_DisplayServer_constant_TTS_UTTERANCE_STARTED:
  987. .. rst-class:: classref-enumeration-constant
  988. :ref:`TTSUtteranceEvent<enum_DisplayServer_TTSUtteranceEvent>` **TTS_UTTERANCE_STARTED** = ``0``
  989. Utterance has begun to be spoken.
  990. .. _class_DisplayServer_constant_TTS_UTTERANCE_ENDED:
  991. .. rst-class:: classref-enumeration-constant
  992. :ref:`TTSUtteranceEvent<enum_DisplayServer_TTSUtteranceEvent>` **TTS_UTTERANCE_ENDED** = ``1``
  993. Utterance was successfully finished.
  994. .. _class_DisplayServer_constant_TTS_UTTERANCE_CANCELED:
  995. .. rst-class:: classref-enumeration-constant
  996. :ref:`TTSUtteranceEvent<enum_DisplayServer_TTSUtteranceEvent>` **TTS_UTTERANCE_CANCELED** = ``2``
  997. Utterance was canceled, or TTS service was unable to process it.
  998. .. _class_DisplayServer_constant_TTS_UTTERANCE_BOUNDARY:
  999. .. rst-class:: classref-enumeration-constant
  1000. :ref:`TTSUtteranceEvent<enum_DisplayServer_TTSUtteranceEvent>` **TTS_UTTERANCE_BOUNDARY** = ``3``
  1001. Utterance reached a word or sentence boundary.
  1002. .. rst-class:: classref-section-separator
  1003. ----
  1004. .. rst-class:: classref-descriptions-group
  1005. Constants
  1006. ---------
  1007. .. _class_DisplayServer_constant_SCREEN_WITH_MOUSE_FOCUS:
  1008. .. rst-class:: classref-constant
  1009. **SCREEN_WITH_MOUSE_FOCUS** = ``-4`` :ref:`🔗<class_DisplayServer_constant_SCREEN_WITH_MOUSE_FOCUS>`
  1010. Represents the screen containing the mouse pointer.
  1011. \ **Note:** On Linux (Wayland), this constant always represents the screen at index ``0``.
  1012. .. _class_DisplayServer_constant_SCREEN_WITH_KEYBOARD_FOCUS:
  1013. .. rst-class:: classref-constant
  1014. **SCREEN_WITH_KEYBOARD_FOCUS** = ``-3`` :ref:`🔗<class_DisplayServer_constant_SCREEN_WITH_KEYBOARD_FOCUS>`
  1015. Represents the screen containing the window with the keyboard focus.
  1016. \ **Note:** On Linux (Wayland), this constant always represents the screen at index ``0``.
  1017. .. _class_DisplayServer_constant_SCREEN_PRIMARY:
  1018. .. rst-class:: classref-constant
  1019. **SCREEN_PRIMARY** = ``-2`` :ref:`🔗<class_DisplayServer_constant_SCREEN_PRIMARY>`
  1020. Represents the primary screen.
  1021. \ **Note:** On Linux (Wayland), this constant always represents the screen at index ``0``.
  1022. .. _class_DisplayServer_constant_SCREEN_OF_MAIN_WINDOW:
  1023. .. rst-class:: classref-constant
  1024. **SCREEN_OF_MAIN_WINDOW** = ``-1`` :ref:`🔗<class_DisplayServer_constant_SCREEN_OF_MAIN_WINDOW>`
  1025. Represents the screen where the main window is located. This is usually the default value in functions that allow specifying one of several screens.
  1026. \ **Note:** On Linux (Wayland), this constant always represents the screen at index ``0``.
  1027. .. _class_DisplayServer_constant_MAIN_WINDOW_ID:
  1028. .. rst-class:: classref-constant
  1029. **MAIN_WINDOW_ID** = ``0`` :ref:`🔗<class_DisplayServer_constant_MAIN_WINDOW_ID>`
  1030. The ID of the main window spawned by the engine, which can be passed to methods expecting a ``window_id``.
  1031. .. _class_DisplayServer_constant_INVALID_WINDOW_ID:
  1032. .. rst-class:: classref-constant
  1033. **INVALID_WINDOW_ID** = ``-1`` :ref:`🔗<class_DisplayServer_constant_INVALID_WINDOW_ID>`
  1034. The ID that refers to a nonexistent window. This is returned by some **DisplayServer** methods if no window matches the requested result.
  1035. .. _class_DisplayServer_constant_INVALID_INDICATOR_ID:
  1036. .. rst-class:: classref-constant
  1037. **INVALID_INDICATOR_ID** = ``-1`` :ref:`🔗<class_DisplayServer_constant_INVALID_INDICATOR_ID>`
  1038. The ID that refers to a nonexistent application status indicator.
  1039. .. rst-class:: classref-section-separator
  1040. ----
  1041. .. rst-class:: classref-descriptions-group
  1042. Method Descriptions
  1043. -------------------
  1044. .. _class_DisplayServer_method_beep:
  1045. .. rst-class:: classref-method
  1046. |void| **beep**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_beep>`
  1047. 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.
  1048. \ **Note:** This method is implemented on macOS, Linux (X11/Wayland), and Windows.
  1049. .. rst-class:: classref-item-separator
  1050. ----
  1051. .. _class_DisplayServer_method_clipboard_get:
  1052. .. rst-class:: classref-method
  1053. :ref:`String<class_String>` **clipboard_get**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_clipboard_get>`
  1054. Returns the user's clipboard as a string if possible.
  1055. .. rst-class:: classref-item-separator
  1056. ----
  1057. .. _class_DisplayServer_method_clipboard_get_image:
  1058. .. rst-class:: classref-method
  1059. :ref:`Image<class_Image>` **clipboard_get_image**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_clipboard_get_image>`
  1060. Returns the user's clipboard as an image if possible.
  1061. \ **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.
  1062. .. rst-class:: classref-item-separator
  1063. ----
  1064. .. _class_DisplayServer_method_clipboard_get_primary:
  1065. .. rst-class:: classref-method
  1066. :ref:`String<class_String>` **clipboard_get_primary**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_clipboard_get_primary>`
  1067. 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.
  1068. \ **Note:** This method is only implemented on Linux (X11/Wayland).
  1069. .. rst-class:: classref-item-separator
  1070. ----
  1071. .. _class_DisplayServer_method_clipboard_has:
  1072. .. rst-class:: classref-method
  1073. :ref:`bool<class_bool>` **clipboard_has**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_clipboard_has>`
  1074. Returns ``true`` if there is a text content on the user's clipboard.
  1075. .. rst-class:: classref-item-separator
  1076. ----
  1077. .. _class_DisplayServer_method_clipboard_has_image:
  1078. .. rst-class:: classref-method
  1079. :ref:`bool<class_bool>` **clipboard_has_image**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_clipboard_has_image>`
  1080. Returns ``true`` if there is an image content on the user's clipboard.
  1081. .. rst-class:: classref-item-separator
  1082. ----
  1083. .. _class_DisplayServer_method_clipboard_set:
  1084. .. rst-class:: classref-method
  1085. |void| **clipboard_set**\ (\ clipboard\: :ref:`String<class_String>`\ ) :ref:`🔗<class_DisplayServer_method_clipboard_set>`
  1086. Sets the user's clipboard content to the given string.
  1087. .. rst-class:: classref-item-separator
  1088. ----
  1089. .. _class_DisplayServer_method_clipboard_set_primary:
  1090. .. rst-class:: classref-method
  1091. |void| **clipboard_set_primary**\ (\ clipboard_primary\: :ref:`String<class_String>`\ ) :ref:`🔗<class_DisplayServer_method_clipboard_set_primary>`
  1092. 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.
  1093. \ **Note:** This method is only implemented on Linux (X11/Wayland).
  1094. .. rst-class:: classref-item-separator
  1095. ----
  1096. .. _class_DisplayServer_method_create_status_indicator:
  1097. .. rst-class:: classref-method
  1098. :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>`
  1099. Creates a new application status indicator with the specified icon, tooltip, and activation callback.
  1100. \ ``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>`).
  1101. .. rst-class:: classref-item-separator
  1102. ----
  1103. .. _class_DisplayServer_method_cursor_get_shape:
  1104. .. rst-class:: classref-method
  1105. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **cursor_get_shape**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_cursor_get_shape>`
  1106. Returns the default mouse cursor shape set by :ref:`cursor_set_shape<class_DisplayServer_method_cursor_set_shape>`.
  1107. .. rst-class:: classref-item-separator
  1108. ----
  1109. .. _class_DisplayServer_method_cursor_set_custom_image:
  1110. .. rst-class:: classref-method
  1111. |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>`
  1112. 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.
  1113. \ ``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>`.
  1114. .. rst-class:: classref-item-separator
  1115. ----
  1116. .. _class_DisplayServer_method_cursor_set_shape:
  1117. .. rst-class:: classref-method
  1118. |void| **cursor_set_shape**\ (\ shape\: :ref:`CursorShape<enum_DisplayServer_CursorShape>`\ ) :ref:`🔗<class_DisplayServer_method_cursor_set_shape>`
  1119. 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>`.
  1120. .. rst-class:: classref-item-separator
  1121. ----
  1122. .. _class_DisplayServer_method_delete_status_indicator:
  1123. .. rst-class:: classref-method
  1124. |void| **delete_status_indicator**\ (\ id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_DisplayServer_method_delete_status_indicator>`
  1125. Removes the application status indicator.
  1126. .. rst-class:: classref-item-separator
  1127. ----
  1128. .. _class_DisplayServer_method_dialog_input_text:
  1129. .. rst-class:: classref-method
  1130. :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>`
  1131. 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.
  1132. \ **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.
  1133. .. rst-class:: classref-item-separator
  1134. ----
  1135. .. _class_DisplayServer_method_dialog_show:
  1136. .. rst-class:: classref-method
  1137. :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>`
  1138. 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.
  1139. \ **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.
  1140. .. rst-class:: classref-item-separator
  1141. ----
  1142. .. _class_DisplayServer_method_enable_for_stealing_focus:
  1143. .. rst-class:: classref-method
  1144. |void| **enable_for_stealing_focus**\ (\ process_id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_DisplayServer_method_enable_for_stealing_focus>`
  1145. 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.
  1146. \ **Note:** This method is implemented only on Windows.
  1147. .. rst-class:: classref-item-separator
  1148. ----
  1149. .. _class_DisplayServer_method_file_dialog_show:
  1150. .. rst-class:: classref-method
  1151. :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>`
  1152. Displays OS native dialog for selecting files or directories in the file system.
  1153. 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>`.
  1154. Callbacks have the following arguments: ``status: bool, selected_paths: PackedStringArray, selected_filter_index: int``. **On Android,** callback argument ``selected_filter_index`` is always zero.
  1155. \ **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.
  1156. \ **Note:** ``current_directory`` might be ignored.
  1157. \ **Note:** Embedded file dialog and Windows file dialog support only file extensions, while Android, Linux, and macOS file dialogs also support MIME types.
  1158. \ **Note:** On Android and Linux, ``show_hidden`` is ignored.
  1159. \ **Note:** On Android and macOS, native file dialogs have no title.
  1160. \ **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.
  1161. .. rst-class:: classref-item-separator
  1162. ----
  1163. .. _class_DisplayServer_method_file_dialog_with_options_show:
  1164. .. rst-class:: classref-method
  1165. :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>`
  1166. Displays OS native dialog for selecting files or directories in the file system with additional user selectable options.
  1167. 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>`.
  1168. \ ``options`` is array of :ref:`Dictionary<class_Dictionary>`\ s with the following keys:
  1169. - ``"name"`` - option's name :ref:`String<class_String>`.
  1170. - ``"values"`` - :ref:`PackedStringArray<class_PackedStringArray>` of values. If empty, boolean option (check box) is used.
  1171. - ``"default"`` - default selected option index (:ref:`int<class_int>`) or default boolean value (:ref:`bool<class_bool>`).
  1172. Callbacks have the following arguments: ``status: bool, selected_paths: PackedStringArray, selected_filter_index: int, selected_option: Dictionary``.
  1173. \ **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.
  1174. \ **Note:** ``current_directory`` might be ignored.
  1175. \ **Note:** Embedded file dialog and Windows file dialog support only file extensions, while Android, Linux, and macOS file dialogs also support MIME types.
  1176. \ **Note:** On Linux (X11), ``show_hidden`` is ignored.
  1177. \ **Note:** On macOS, native file dialogs have no title.
  1178. \ **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.
  1179. .. rst-class:: classref-item-separator
  1180. ----
  1181. .. _class_DisplayServer_method_force_process_and_drop_events:
  1182. .. rst-class:: classref-method
  1183. |void| **force_process_and_drop_events**\ (\ ) :ref:`🔗<class_DisplayServer_method_force_process_and_drop_events>`
  1184. Forces window manager processing while ignoring all :ref:`InputEvent<class_InputEvent>`\ s. See also :ref:`process_events<class_DisplayServer_method_process_events>`.
  1185. \ **Note:** This method is implemented on Windows and macOS.
  1186. .. rst-class:: classref-item-separator
  1187. ----
  1188. .. _class_DisplayServer_method_get_accent_color:
  1189. .. rst-class:: classref-method
  1190. :ref:`Color<class_Color>` **get_accent_color**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_get_accent_color>`
  1191. Returns OS theme accent color. Returns ``Color(0, 0, 0, 0)``, if accent color is unknown.
  1192. \ **Note:** This method is implemented on macOS, Windows, and Android.
  1193. .. rst-class:: classref-item-separator
  1194. ----
  1195. .. _class_DisplayServer_method_get_base_color:
  1196. .. rst-class:: classref-method
  1197. :ref:`Color<class_Color>` **get_base_color**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_get_base_color>`
  1198. Returns the OS theme base color (default control background). Returns ``Color(0, 0, 0, 0)`` if the base color is unknown.
  1199. \ **Note:** This method is implemented on macOS, Windows, and Android.
  1200. .. rst-class:: classref-item-separator
  1201. ----
  1202. .. _class_DisplayServer_method_get_display_cutouts:
  1203. .. rst-class:: classref-method
  1204. :ref:`Array<class_Array>`\[:ref:`Rect2<class_Rect2>`\] **get_display_cutouts**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_get_display_cutouts>`
  1205. 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>`.
  1206. \ **Note:** Currently only implemented on Android. Other platforms will return an empty array even if they do have display cutouts or notches.
  1207. .. rst-class:: classref-item-separator
  1208. ----
  1209. .. _class_DisplayServer_method_get_display_safe_area:
  1210. .. rst-class:: classref-method
  1211. :ref:`Rect2i<class_Rect2i>` **get_display_safe_area**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_get_display_safe_area>`
  1212. 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>`.
  1213. \ **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>`.
  1214. .. rst-class:: classref-item-separator
  1215. ----
  1216. .. _class_DisplayServer_method_get_keyboard_focus_screen:
  1217. .. rst-class:: classref-method
  1218. :ref:`int<class_int>` **get_keyboard_focus_screen**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_get_keyboard_focus_screen>`
  1219. Returns the index of the screen containing the window with the keyboard focus, or the primary screen if there's no focused window.
  1220. .. rst-class:: classref-item-separator
  1221. ----
  1222. .. _class_DisplayServer_method_get_name:
  1223. .. rst-class:: classref-method
  1224. :ref:`String<class_String>` **get_name**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_get_name>`
  1225. 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).
  1226. 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>`).
  1227. .. rst-class:: classref-item-separator
  1228. ----
  1229. .. _class_DisplayServer_method_get_primary_screen:
  1230. .. rst-class:: classref-method
  1231. :ref:`int<class_int>` **get_primary_screen**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_get_primary_screen>`
  1232. Returns index of the primary screen.
  1233. .. rst-class:: classref-item-separator
  1234. ----
  1235. .. _class_DisplayServer_method_get_screen_count:
  1236. .. rst-class:: classref-method
  1237. :ref:`int<class_int>` **get_screen_count**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_get_screen_count>`
  1238. Returns the number of displays available.
  1239. .. rst-class:: classref-item-separator
  1240. ----
  1241. .. _class_DisplayServer_method_get_screen_from_rect:
  1242. .. rst-class:: classref-method
  1243. :ref:`int<class_int>` **get_screen_from_rect**\ (\ rect\: :ref:`Rect2<class_Rect2>`\ ) |const| :ref:`🔗<class_DisplayServer_method_get_screen_from_rect>`
  1244. 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.
  1245. .. rst-class:: classref-item-separator
  1246. ----
  1247. .. _class_DisplayServer_method_get_swap_cancel_ok:
  1248. .. rst-class:: classref-method
  1249. :ref:`bool<class_bool>` **get_swap_cancel_ok**\ (\ ) :ref:`🔗<class_DisplayServer_method_get_swap_cancel_ok>`
  1250. 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>`.
  1251. \ **Note:** This doesn't affect native dialogs such as the ones spawned by :ref:`dialog_show<class_DisplayServer_method_dialog_show>`.
  1252. .. rst-class:: classref-item-separator
  1253. ----
  1254. .. _class_DisplayServer_method_get_window_at_screen_position:
  1255. .. rst-class:: classref-method
  1256. :ref:`int<class_int>` **get_window_at_screen_position**\ (\ position\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_DisplayServer_method_get_window_at_screen_position>`
  1257. 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:
  1258. .. code:: text
  1259. * (0, 0) +-------+
  1260. | |
  1261. +-------------+ | |
  1262. | | | |
  1263. | | | |
  1264. +-------------+ +-------+
  1265. .. rst-class:: classref-item-separator
  1266. ----
  1267. .. _class_DisplayServer_method_get_window_list:
  1268. .. rst-class:: classref-method
  1269. :ref:`PackedInt32Array<class_PackedInt32Array>` **get_window_list**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_get_window_list>`
  1270. Returns the list of Godot window IDs belonging to this process.
  1271. \ **Note:** Native dialogs are not included in this list.
  1272. .. rst-class:: classref-item-separator
  1273. ----
  1274. .. _class_DisplayServer_method_global_menu_add_check_item:
  1275. .. rst-class:: classref-method
  1276. :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>`
  1277. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1278. Adds a new checkable item with text ``label`` to the global menu with ID ``menu_root``.
  1279. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1280. 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`).
  1281. \ **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``.
  1282. \ **Note:** This method is implemented only on macOS.
  1283. \ **Supported system menu IDs:**\
  1284. .. code:: text
  1285. "_main" - Main menu (macOS).
  1286. "_dock" - Dock popup menu (macOS).
  1287. "_apple" - Apple menu (macOS, custom items added before "Services").
  1288. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1289. "_help" - Help menu (macOS).
  1290. .. rst-class:: classref-item-separator
  1291. ----
  1292. .. _class_DisplayServer_method_global_menu_add_icon_check_item:
  1293. .. rst-class:: classref-method
  1294. :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>`
  1295. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1296. Adds a new checkable item with text ``label`` and icon ``icon`` to the global menu with ID ``menu_root``.
  1297. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1298. 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`).
  1299. \ **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``.
  1300. \ **Note:** This method is implemented only on macOS.
  1301. \ **Supported system menu IDs:**\
  1302. .. code:: text
  1303. "_main" - Main menu (macOS).
  1304. "_dock" - Dock popup menu (macOS).
  1305. "_apple" - Apple menu (macOS, custom items added before "Services").
  1306. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1307. "_help" - Help menu (macOS).
  1308. .. rst-class:: classref-item-separator
  1309. ----
  1310. .. _class_DisplayServer_method_global_menu_add_icon_item:
  1311. .. rst-class:: classref-method
  1312. :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>`
  1313. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1314. Adds a new item with text ``label`` and icon ``icon`` to the global menu with ID ``menu_root``.
  1315. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1316. 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`).
  1317. \ **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``.
  1318. \ **Note:** This method is implemented only on macOS.
  1319. \ **Supported system menu IDs:**\
  1320. .. code:: text
  1321. "_main" - Main menu (macOS).
  1322. "_dock" - Dock popup menu (macOS).
  1323. "_apple" - Apple menu (macOS, custom items added before "Services").
  1324. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1325. "_help" - Help menu (macOS).
  1326. .. rst-class:: classref-item-separator
  1327. ----
  1328. .. _class_DisplayServer_method_global_menu_add_icon_radio_check_item:
  1329. .. rst-class:: classref-method
  1330. :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>`
  1331. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1332. Adds a new radio-checkable item with text ``label`` and icon ``icon`` to the global menu with ID ``menu_root``.
  1333. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1334. 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`).
  1335. \ **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.
  1336. \ **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``.
  1337. \ **Note:** This method is implemented only on macOS.
  1338. \ **Supported system menu IDs:**\
  1339. .. code:: text
  1340. "_main" - Main menu (macOS).
  1341. "_dock" - Dock popup menu (macOS).
  1342. "_apple" - Apple menu (macOS, custom items added before "Services").
  1343. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1344. "_help" - Help menu (macOS).
  1345. .. rst-class:: classref-item-separator
  1346. ----
  1347. .. _class_DisplayServer_method_global_menu_add_item:
  1348. .. rst-class:: classref-method
  1349. :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>`
  1350. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1351. Adds a new item with text ``label`` to the global menu with ID ``menu_root``.
  1352. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1353. 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`).
  1354. \ **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``.
  1355. \ **Note:** This method is implemented only on macOS.
  1356. \ **Supported system menu IDs:**\
  1357. .. code:: text
  1358. "_main" - Main menu (macOS).
  1359. "_dock" - Dock popup menu (macOS).
  1360. "_apple" - Apple menu (macOS, custom items added before "Services").
  1361. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1362. "_help" - Help menu (macOS).
  1363. .. rst-class:: classref-item-separator
  1364. ----
  1365. .. _class_DisplayServer_method_global_menu_add_multistate_item:
  1366. .. rst-class:: classref-method
  1367. :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>`
  1368. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1369. Adds a new item with text ``label`` to the global menu with ID ``menu_root``.
  1370. 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``.
  1371. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1372. 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`).
  1373. \ **Note:** By default, there's no indication of the current item state, it should be changed manually.
  1374. \ **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``.
  1375. \ **Note:** This method is implemented only on macOS.
  1376. \ **Supported system menu IDs:**\
  1377. .. code:: text
  1378. "_main" - Main menu (macOS).
  1379. "_dock" - Dock popup menu (macOS).
  1380. "_apple" - Apple menu (macOS, custom items added before "Services").
  1381. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1382. "_help" - Help menu (macOS).
  1383. .. rst-class:: classref-item-separator
  1384. ----
  1385. .. _class_DisplayServer_method_global_menu_add_radio_check_item:
  1386. .. rst-class:: classref-method
  1387. :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>`
  1388. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1389. Adds a new radio-checkable item with text ``label`` to the global menu with ID ``menu_root``.
  1390. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1391. 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`).
  1392. \ **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.
  1393. \ **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``.
  1394. \ **Note:** This method is implemented only on macOS.
  1395. \ **Supported system menu IDs:**\
  1396. .. code:: text
  1397. "_main" - Main menu (macOS).
  1398. "_dock" - Dock popup menu (macOS).
  1399. "_apple" - Apple menu (macOS, custom items added before "Services").
  1400. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1401. "_help" - Help menu (macOS).
  1402. .. rst-class:: classref-item-separator
  1403. ----
  1404. .. _class_DisplayServer_method_global_menu_add_separator:
  1405. .. rst-class:: classref-method
  1406. :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>`
  1407. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1408. Adds a separator between items to the global menu with ID ``menu_root``. Separators also occupy an index.
  1409. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1410. \ **Note:** This method is implemented only on macOS.
  1411. \ **Supported system menu IDs:**\
  1412. .. code:: text
  1413. "_main" - Main menu (macOS).
  1414. "_dock" - Dock popup menu (macOS).
  1415. "_apple" - Apple menu (macOS, custom items added before "Services").
  1416. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1417. "_help" - Help menu (macOS).
  1418. .. rst-class:: classref-item-separator
  1419. ----
  1420. .. _class_DisplayServer_method_global_menu_add_submenu_item:
  1421. .. rst-class:: classref-method
  1422. :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>`
  1423. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1424. 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.
  1425. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1426. \ **Note:** This method is implemented only on macOS.
  1427. \ **Supported system menu IDs:**\
  1428. .. code:: text
  1429. "_main" - Main menu (macOS).
  1430. "_dock" - Dock popup menu (macOS).
  1431. "_apple" - Apple menu (macOS, custom items added before "Services").
  1432. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1433. "_help" - Help menu (macOS).
  1434. .. rst-class:: classref-item-separator
  1435. ----
  1436. .. _class_DisplayServer_method_global_menu_clear:
  1437. .. rst-class:: classref-method
  1438. |void| **global_menu_clear**\ (\ menu_root\: :ref:`String<class_String>`\ ) :ref:`🔗<class_DisplayServer_method_global_menu_clear>`
  1439. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1440. Removes all items from the global menu with ID ``menu_root``.
  1441. \ **Note:** This method is implemented only on macOS.
  1442. \ **Supported system menu IDs:**\
  1443. .. code:: text
  1444. "_main" - Main menu (macOS).
  1445. "_dock" - Dock popup menu (macOS).
  1446. "_apple" - Apple menu (macOS, custom items added before "Services").
  1447. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1448. "_help" - Help menu (macOS).
  1449. .. rst-class:: classref-item-separator
  1450. ----
  1451. .. _class_DisplayServer_method_global_menu_get_item_accelerator:
  1452. .. rst-class:: classref-method
  1453. :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>`
  1454. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1455. 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.
  1456. \ **Note:** This method is implemented only on macOS.
  1457. .. rst-class:: classref-item-separator
  1458. ----
  1459. .. _class_DisplayServer_method_global_menu_get_item_callback:
  1460. .. rst-class:: classref-method
  1461. :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>`
  1462. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1463. Returns the callback of the item at index ``idx``.
  1464. \ **Note:** This method is implemented only on macOS.
  1465. .. rst-class:: classref-item-separator
  1466. ----
  1467. .. _class_DisplayServer_method_global_menu_get_item_count:
  1468. .. rst-class:: classref-method
  1469. :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>`
  1470. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1471. Returns number of items in the global menu with ID ``menu_root``.
  1472. \ **Note:** This method is implemented only on macOS.
  1473. .. rst-class:: classref-item-separator
  1474. ----
  1475. .. _class_DisplayServer_method_global_menu_get_item_icon:
  1476. .. rst-class:: classref-method
  1477. :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>`
  1478. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1479. Returns the icon of the item at index ``idx``.
  1480. \ **Note:** This method is implemented only on macOS.
  1481. .. rst-class:: classref-item-separator
  1482. ----
  1483. .. _class_DisplayServer_method_global_menu_get_item_indentation_level:
  1484. .. rst-class:: classref-method
  1485. :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>`
  1486. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1487. Returns the horizontal offset of the item at the given ``idx``.
  1488. \ **Note:** This method is implemented only on macOS.
  1489. .. rst-class:: classref-item-separator
  1490. ----
  1491. .. _class_DisplayServer_method_global_menu_get_item_index_from_tag:
  1492. .. rst-class:: classref-method
  1493. :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>`
  1494. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1495. 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.
  1496. \ **Note:** This method is implemented only on macOS.
  1497. .. rst-class:: classref-item-separator
  1498. ----
  1499. .. _class_DisplayServer_method_global_menu_get_item_index_from_text:
  1500. .. rst-class:: classref-method
  1501. :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>`
  1502. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1503. 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.
  1504. \ **Note:** This method is implemented only on macOS.
  1505. .. rst-class:: classref-item-separator
  1506. ----
  1507. .. _class_DisplayServer_method_global_menu_get_item_key_callback:
  1508. .. rst-class:: classref-method
  1509. :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>`
  1510. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1511. Returns the callback of the item accelerator at index ``idx``.
  1512. \ **Note:** This method is implemented only on macOS.
  1513. .. rst-class:: classref-item-separator
  1514. ----
  1515. .. _class_DisplayServer_method_global_menu_get_item_max_states:
  1516. .. rst-class:: classref-method
  1517. :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>`
  1518. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1519. 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.
  1520. \ **Note:** This method is implemented only on macOS.
  1521. .. rst-class:: classref-item-separator
  1522. ----
  1523. .. _class_DisplayServer_method_global_menu_get_item_state:
  1524. .. rst-class:: classref-method
  1525. :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>`
  1526. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1527. Returns the state of a multistate item. See :ref:`global_menu_add_multistate_item<class_DisplayServer_method_global_menu_add_multistate_item>` for details.
  1528. \ **Note:** This method is implemented only on macOS.
  1529. .. rst-class:: classref-item-separator
  1530. ----
  1531. .. _class_DisplayServer_method_global_menu_get_item_submenu:
  1532. .. rst-class:: classref-method
  1533. :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>`
  1534. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1535. 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.
  1536. \ **Note:** This method is implemented only on macOS.
  1537. .. rst-class:: classref-item-separator
  1538. ----
  1539. .. _class_DisplayServer_method_global_menu_get_item_tag:
  1540. .. rst-class:: classref-method
  1541. :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>`
  1542. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1543. 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.
  1544. \ **Note:** This method is implemented only on macOS.
  1545. .. rst-class:: classref-item-separator
  1546. ----
  1547. .. _class_DisplayServer_method_global_menu_get_item_text:
  1548. .. rst-class:: classref-method
  1549. :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>`
  1550. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1551. Returns the text of the item at index ``idx``.
  1552. \ **Note:** This method is implemented only on macOS.
  1553. .. rst-class:: classref-item-separator
  1554. ----
  1555. .. _class_DisplayServer_method_global_menu_get_item_tooltip:
  1556. .. rst-class:: classref-method
  1557. :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>`
  1558. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1559. Returns the tooltip associated with the specified index ``idx``.
  1560. \ **Note:** This method is implemented only on macOS.
  1561. .. rst-class:: classref-item-separator
  1562. ----
  1563. .. _class_DisplayServer_method_global_menu_get_system_menu_roots:
  1564. .. rst-class:: classref-method
  1565. :ref:`Dictionary<class_Dictionary>` **global_menu_get_system_menu_roots**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_global_menu_get_system_menu_roots>`
  1566. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1567. Returns Dictionary of supported system menu IDs and names.
  1568. \ **Note:** This method is implemented only on macOS.
  1569. .. rst-class:: classref-item-separator
  1570. ----
  1571. .. _class_DisplayServer_method_global_menu_is_item_checkable:
  1572. .. rst-class:: classref-method
  1573. :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>`
  1574. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1575. Returns ``true`` if the item at index ``idx`` is checkable in some way, i.e. if it has a checkbox or radio button.
  1576. \ **Note:** This method is implemented only on macOS.
  1577. .. rst-class:: classref-item-separator
  1578. ----
  1579. .. _class_DisplayServer_method_global_menu_is_item_checked:
  1580. .. rst-class:: classref-method
  1581. :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>`
  1582. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1583. Returns ``true`` if the item at index ``idx`` is checked.
  1584. \ **Note:** This method is implemented only on macOS.
  1585. .. rst-class:: classref-item-separator
  1586. ----
  1587. .. _class_DisplayServer_method_global_menu_is_item_disabled:
  1588. .. rst-class:: classref-method
  1589. :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>`
  1590. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1591. Returns ``true`` if the item at index ``idx`` is disabled. When it is disabled it can't be selected, or its action invoked.
  1592. See :ref:`global_menu_set_item_disabled<class_DisplayServer_method_global_menu_set_item_disabled>` for more info on how to disable an item.
  1593. \ **Note:** This method is implemented only on macOS.
  1594. .. rst-class:: classref-item-separator
  1595. ----
  1596. .. _class_DisplayServer_method_global_menu_is_item_hidden:
  1597. .. rst-class:: classref-method
  1598. :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>`
  1599. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1600. Returns ``true`` if the item at index ``idx`` is hidden.
  1601. See :ref:`global_menu_set_item_hidden<class_DisplayServer_method_global_menu_set_item_hidden>` for more info on how to hide an item.
  1602. \ **Note:** This method is implemented only on macOS.
  1603. .. rst-class:: classref-item-separator
  1604. ----
  1605. .. _class_DisplayServer_method_global_menu_is_item_radio_checkable:
  1606. .. rst-class:: classref-method
  1607. :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>`
  1608. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1609. Returns ``true`` if the item at index ``idx`` has radio button-style checkability.
  1610. \ **Note:** This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups.
  1611. \ **Note:** This method is implemented only on macOS.
  1612. .. rst-class:: classref-item-separator
  1613. ----
  1614. .. _class_DisplayServer_method_global_menu_remove_item:
  1615. .. rst-class:: classref-method
  1616. |void| **global_menu_remove_item**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_DisplayServer_method_global_menu_remove_item>`
  1617. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1618. Removes the item at index ``idx`` from the global menu ``menu_root``.
  1619. \ **Note:** The indices of items after the removed item will be shifted by one.
  1620. \ **Note:** This method is implemented only on macOS.
  1621. .. rst-class:: classref-item-separator
  1622. ----
  1623. .. _class_DisplayServer_method_global_menu_set_item_accelerator:
  1624. .. rst-class:: classref-method
  1625. |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>`
  1626. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1627. 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`).
  1628. \ **Note:** This method is implemented only on macOS.
  1629. .. rst-class:: classref-item-separator
  1630. ----
  1631. .. _class_DisplayServer_method_global_menu_set_item_callback:
  1632. .. rst-class:: classref-method
  1633. |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>`
  1634. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1635. Sets the callback of the item at index ``idx``. Callback is emitted when an item is pressed.
  1636. \ **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.
  1637. \ **Note:** This method is implemented only on macOS.
  1638. .. rst-class:: classref-item-separator
  1639. ----
  1640. .. _class_DisplayServer_method_global_menu_set_item_checkable:
  1641. .. rst-class:: classref-method
  1642. |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>`
  1643. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1644. Sets whether the item at index ``idx`` has a checkbox. If ``false``, sets the type of the item to plain text.
  1645. \ **Note:** This method is implemented only on macOS.
  1646. .. rst-class:: classref-item-separator
  1647. ----
  1648. .. _class_DisplayServer_method_global_menu_set_item_checked:
  1649. .. rst-class:: classref-method
  1650. |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>`
  1651. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1652. Sets the checkstate status of the item at index ``idx``.
  1653. \ **Note:** This method is implemented only on macOS.
  1654. .. rst-class:: classref-item-separator
  1655. ----
  1656. .. _class_DisplayServer_method_global_menu_set_item_disabled:
  1657. .. rst-class:: classref-method
  1658. |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>`
  1659. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1660. Enables/disables the item at index ``idx``. When it is disabled, it can't be selected and its action can't be invoked.
  1661. \ **Note:** This method is implemented only on macOS.
  1662. .. rst-class:: classref-item-separator
  1663. ----
  1664. .. _class_DisplayServer_method_global_menu_set_item_hidden:
  1665. .. rst-class:: classref-method
  1666. |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>`
  1667. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1668. 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.
  1669. \ **Note:** This method is implemented only on macOS.
  1670. .. rst-class:: classref-item-separator
  1671. ----
  1672. .. _class_DisplayServer_method_global_menu_set_item_hover_callbacks:
  1673. .. rst-class:: classref-method
  1674. |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>`
  1675. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1676. Sets the callback of the item at index ``idx``. The callback is emitted when an item is hovered.
  1677. \ **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.
  1678. \ **Note:** This method is implemented only on macOS.
  1679. .. rst-class:: classref-item-separator
  1680. ----
  1681. .. _class_DisplayServer_method_global_menu_set_item_icon:
  1682. .. rst-class:: classref-method
  1683. |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>`
  1684. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1685. Replaces the :ref:`Texture2D<class_Texture2D>` icon of the specified ``idx``.
  1686. \ **Note:** This method is implemented only on macOS.
  1687. \ **Note:** This method is not supported by macOS "_dock" menu items.
  1688. .. rst-class:: classref-item-separator
  1689. ----
  1690. .. _class_DisplayServer_method_global_menu_set_item_indentation_level:
  1691. .. rst-class:: classref-method
  1692. |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>`
  1693. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1694. Sets the horizontal offset of the item at the given ``idx``.
  1695. \ **Note:** This method is implemented only on macOS.
  1696. .. rst-class:: classref-item-separator
  1697. ----
  1698. .. _class_DisplayServer_method_global_menu_set_item_key_callback:
  1699. .. rst-class:: classref-method
  1700. |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>`
  1701. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1702. Sets the callback of the item at index ``idx``. Callback is emitted when its accelerator is activated.
  1703. \ **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.
  1704. \ **Note:** This method is implemented only on macOS.
  1705. .. rst-class:: classref-item-separator
  1706. ----
  1707. .. _class_DisplayServer_method_global_menu_set_item_max_states:
  1708. .. rst-class:: classref-method
  1709. |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>`
  1710. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1711. 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.
  1712. \ **Note:** This method is implemented only on macOS.
  1713. .. rst-class:: classref-item-separator
  1714. ----
  1715. .. _class_DisplayServer_method_global_menu_set_item_radio_checkable:
  1716. .. rst-class:: classref-method
  1717. |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>`
  1718. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1719. 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.
  1720. \ **Note:** This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups.
  1721. \ **Note:** This method is implemented only on macOS.
  1722. .. rst-class:: classref-item-separator
  1723. ----
  1724. .. _class_DisplayServer_method_global_menu_set_item_state:
  1725. .. rst-class:: classref-method
  1726. |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>`
  1727. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1728. Sets the state of a multistate item. See :ref:`global_menu_add_multistate_item<class_DisplayServer_method_global_menu_add_multistate_item>` for details.
  1729. \ **Note:** This method is implemented only on macOS.
  1730. .. rst-class:: classref-item-separator
  1731. ----
  1732. .. _class_DisplayServer_method_global_menu_set_item_submenu:
  1733. .. rst-class:: classref-method
  1734. |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>`
  1735. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1736. 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.
  1737. \ **Note:** This method is implemented only on macOS.
  1738. .. rst-class:: classref-item-separator
  1739. ----
  1740. .. _class_DisplayServer_method_global_menu_set_item_tag:
  1741. .. rst-class:: classref-method
  1742. |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>`
  1743. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1744. 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.
  1745. \ **Note:** This method is implemented only on macOS.
  1746. .. rst-class:: classref-item-separator
  1747. ----
  1748. .. _class_DisplayServer_method_global_menu_set_item_text:
  1749. .. rst-class:: classref-method
  1750. |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>`
  1751. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1752. Sets the text of the item at index ``idx``.
  1753. \ **Note:** This method is implemented only on macOS.
  1754. .. rst-class:: classref-item-separator
  1755. ----
  1756. .. _class_DisplayServer_method_global_menu_set_item_tooltip:
  1757. .. rst-class:: classref-method
  1758. |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>`
  1759. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1760. Sets the :ref:`String<class_String>` tooltip of the item at the specified index ``idx``.
  1761. \ **Note:** This method is implemented only on macOS.
  1762. .. rst-class:: classref-item-separator
  1763. ----
  1764. .. _class_DisplayServer_method_global_menu_set_popup_callbacks:
  1765. .. rst-class:: classref-method
  1766. |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>`
  1767. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1768. Registers callables to emit when the menu is respectively about to show or closed. Callback methods should have zero arguments.
  1769. .. rst-class:: classref-item-separator
  1770. ----
  1771. .. _class_DisplayServer_method_has_additional_outputs:
  1772. .. rst-class:: classref-method
  1773. :ref:`bool<class_bool>` **has_additional_outputs**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_has_additional_outputs>`
  1774. Returns ``true`` if any additional outputs have been registered via :ref:`register_additional_output<class_DisplayServer_method_register_additional_output>`.
  1775. .. rst-class:: classref-item-separator
  1776. ----
  1777. .. _class_DisplayServer_method_has_feature:
  1778. .. rst-class:: classref-method
  1779. :ref:`bool<class_bool>` **has_feature**\ (\ feature\: :ref:`Feature<enum_DisplayServer_Feature>`\ ) |const| :ref:`🔗<class_DisplayServer_method_has_feature>`
  1780. Returns ``true`` if the specified ``feature`` is supported by the current **DisplayServer**, ``false`` otherwise.
  1781. .. rst-class:: classref-item-separator
  1782. ----
  1783. .. _class_DisplayServer_method_has_hardware_keyboard:
  1784. .. rst-class:: classref-method
  1785. :ref:`bool<class_bool>` **has_hardware_keyboard**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_has_hardware_keyboard>`
  1786. Returns ``true`` if hardware keyboard is connected.
  1787. \ **Note:** This method is implemented on Android and iOS, on other platforms this method always returns ``true``.
  1788. .. rst-class:: classref-item-separator
  1789. ----
  1790. .. _class_DisplayServer_method_help_set_search_callbacks:
  1791. .. rst-class:: classref-method
  1792. |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>`
  1793. Sets native help system search callbacks.
  1794. \ ``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.
  1795. \ ``action_callback`` has the following arguments: ``String key``. Called when the user selects a search result in the ``Help`` menu.
  1796. \ **Note:** This method is implemented only on macOS.
  1797. .. rst-class:: classref-item-separator
  1798. ----
  1799. .. _class_DisplayServer_method_ime_get_selection:
  1800. .. rst-class:: classref-method
  1801. :ref:`Vector2i<class_Vector2i>` **ime_get_selection**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_ime_get_selection>`
  1802. 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.
  1803. \ **Note:** This method is implemented only on macOS.
  1804. .. rst-class:: classref-item-separator
  1805. ----
  1806. .. _class_DisplayServer_method_ime_get_text:
  1807. .. rst-class:: classref-method
  1808. :ref:`String<class_String>` **ime_get_text**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_ime_get_text>`
  1809. Returns the composition string contained within the `Input Method Editor <https://en.wikipedia.org/wiki/Input_method>`__ window.
  1810. \ **Note:** This method is implemented only on macOS.
  1811. .. rst-class:: classref-item-separator
  1812. ----
  1813. .. _class_DisplayServer_method_is_dark_mode:
  1814. .. rst-class:: classref-method
  1815. :ref:`bool<class_bool>` **is_dark_mode**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_is_dark_mode>`
  1816. Returns ``true`` if OS is using dark mode.
  1817. \ **Note:** This method is implemented on Android, iOS, macOS, Windows, and Linux (X11/Wayland).
  1818. .. rst-class:: classref-item-separator
  1819. ----
  1820. .. _class_DisplayServer_method_is_dark_mode_supported:
  1821. .. rst-class:: classref-method
  1822. :ref:`bool<class_bool>` **is_dark_mode_supported**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_is_dark_mode_supported>`
  1823. Returns ``true`` if OS supports dark mode.
  1824. \ **Note:** This method is implemented on Android, iOS, macOS, Windows, and Linux (X11/Wayland).
  1825. .. rst-class:: classref-item-separator
  1826. ----
  1827. .. _class_DisplayServer_method_is_touchscreen_available:
  1828. .. rst-class:: classref-method
  1829. :ref:`bool<class_bool>` **is_touchscreen_available**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_is_touchscreen_available>`
  1830. 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``.
  1831. .. rst-class:: classref-item-separator
  1832. ----
  1833. .. _class_DisplayServer_method_is_window_transparency_available:
  1834. .. rst-class:: classref-method
  1835. :ref:`bool<class_bool>` **is_window_transparency_available**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_is_window_transparency_available>`
  1836. 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.
  1837. .. rst-class:: classref-item-separator
  1838. ----
  1839. .. _class_DisplayServer_method_keyboard_get_current_layout:
  1840. .. rst-class:: classref-method
  1841. :ref:`int<class_int>` **keyboard_get_current_layout**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_keyboard_get_current_layout>`
  1842. Returns active keyboard layout index.
  1843. \ **Note:** This method is implemented on Linux (X11/Wayland), macOS, and Windows.
  1844. .. rst-class:: classref-item-separator
  1845. ----
  1846. .. _class_DisplayServer_method_keyboard_get_keycode_from_physical:
  1847. .. rst-class:: classref-method
  1848. :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>`
  1849. Converts a physical (US QWERTY) ``keycode`` to one in the active keyboard layout.
  1850. \ **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows.
  1851. .. rst-class:: classref-item-separator
  1852. ----
  1853. .. _class_DisplayServer_method_keyboard_get_label_from_physical:
  1854. .. rst-class:: classref-method
  1855. :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>`
  1856. Converts a physical (US QWERTY) ``keycode`` to localized label printed on the key in the active keyboard layout.
  1857. \ **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows.
  1858. .. rst-class:: classref-item-separator
  1859. ----
  1860. .. _class_DisplayServer_method_keyboard_get_layout_count:
  1861. .. rst-class:: classref-method
  1862. :ref:`int<class_int>` **keyboard_get_layout_count**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_keyboard_get_layout_count>`
  1863. Returns the number of keyboard layouts.
  1864. \ **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows.
  1865. .. rst-class:: classref-item-separator
  1866. ----
  1867. .. _class_DisplayServer_method_keyboard_get_layout_language:
  1868. .. rst-class:: classref-method
  1869. :ref:`String<class_String>` **keyboard_get_layout_language**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_DisplayServer_method_keyboard_get_layout_language>`
  1870. Returns the ISO-639/BCP-47 language code of the keyboard layout at position ``index``.
  1871. \ **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows.
  1872. .. rst-class:: classref-item-separator
  1873. ----
  1874. .. _class_DisplayServer_method_keyboard_get_layout_name:
  1875. .. rst-class:: classref-method
  1876. :ref:`String<class_String>` **keyboard_get_layout_name**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_DisplayServer_method_keyboard_get_layout_name>`
  1877. Returns the localized name of the keyboard layout at position ``index``.
  1878. \ **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows.
  1879. .. rst-class:: classref-item-separator
  1880. ----
  1881. .. _class_DisplayServer_method_keyboard_set_current_layout:
  1882. .. rst-class:: classref-method
  1883. |void| **keyboard_set_current_layout**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_DisplayServer_method_keyboard_set_current_layout>`
  1884. Sets the active keyboard layout.
  1885. \ **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows.
  1886. .. rst-class:: classref-item-separator
  1887. ----
  1888. .. _class_DisplayServer_method_mouse_get_button_state:
  1889. .. rst-class:: classref-method
  1890. |bitfield|\[:ref:`MouseButtonMask<enum_@GlobalScope_MouseButtonMask>`\] **mouse_get_button_state**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_mouse_get_button_state>`
  1891. 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>`.
  1892. .. rst-class:: classref-item-separator
  1893. ----
  1894. .. _class_DisplayServer_method_mouse_get_mode:
  1895. .. rst-class:: classref-method
  1896. :ref:`MouseMode<enum_DisplayServer_MouseMode>` **mouse_get_mode**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_mouse_get_mode>`
  1897. Returns the current mouse mode. See also :ref:`mouse_set_mode<class_DisplayServer_method_mouse_set_mode>`.
  1898. .. rst-class:: classref-item-separator
  1899. ----
  1900. .. _class_DisplayServer_method_mouse_get_position:
  1901. .. rst-class:: classref-method
  1902. :ref:`Vector2i<class_Vector2i>` **mouse_get_position**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_mouse_get_position>`
  1903. Returns the mouse cursor's current position in screen coordinates.
  1904. .. rst-class:: classref-item-separator
  1905. ----
  1906. .. _class_DisplayServer_method_mouse_set_mode:
  1907. .. rst-class:: classref-method
  1908. |void| **mouse_set_mode**\ (\ mouse_mode\: :ref:`MouseMode<enum_DisplayServer_MouseMode>`\ ) :ref:`🔗<class_DisplayServer_method_mouse_set_mode>`
  1909. Sets the current mouse mode. See also :ref:`mouse_get_mode<class_DisplayServer_method_mouse_get_mode>`.
  1910. .. rst-class:: classref-item-separator
  1911. ----
  1912. .. _class_DisplayServer_method_process_events:
  1913. .. rst-class:: classref-method
  1914. |void| **process_events**\ (\ ) :ref:`🔗<class_DisplayServer_method_process_events>`
  1915. 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>`.
  1916. .. rst-class:: classref-item-separator
  1917. ----
  1918. .. _class_DisplayServer_method_register_additional_output:
  1919. .. rst-class:: classref-method
  1920. |void| **register_additional_output**\ (\ object\: :ref:`Object<class_Object>`\ ) :ref:`🔗<class_DisplayServer_method_register_additional_output>`
  1921. 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>`.
  1922. This can be used to prevent Godot from skipping rendering when no normal windows are visible.
  1923. .. rst-class:: classref-item-separator
  1924. ----
  1925. .. _class_DisplayServer_method_screen_get_dpi:
  1926. .. rst-class:: classref-method
  1927. :ref:`int<class_int>` **screen_get_dpi**\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_DisplayServer_method_screen_get_dpi>`
  1928. 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.
  1929. \ **Note:** On macOS, returned value is inaccurate if fractional display scaling mode is used.
  1930. \ **Note:** On Android devices, the actual screen densities are grouped into six generalized densities:
  1931. .. code:: text
  1932. ldpi - 120 dpi
  1933. mdpi - 160 dpi
  1934. hdpi - 240 dpi
  1935. xhdpi - 320 dpi
  1936. xxhdpi - 480 dpi
  1937. xxxhdpi - 640 dpi
  1938. \ **Note:** This method is implemented on Android, Linux (X11/Wayland), macOS and Windows. Returns ``72`` on unsupported platforms.
  1939. .. rst-class:: classref-item-separator
  1940. ----
  1941. .. _class_DisplayServer_method_screen_get_image:
  1942. .. rst-class:: classref-method
  1943. :ref:`Image<class_Image>` **screen_get_image**\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_DisplayServer_method_screen_get_image>`
  1944. Returns screenshot of the ``screen``.
  1945. \ **Note:** This method is implemented on Linux (X11), macOS, and Windows.
  1946. \ **Note:** On macOS, this method requires "Screen Recording" permission, if permission is not granted it will return desktop wallpaper color.
  1947. .. rst-class:: classref-item-separator
  1948. ----
  1949. .. _class_DisplayServer_method_screen_get_image_rect:
  1950. .. rst-class:: classref-method
  1951. :ref:`Image<class_Image>` **screen_get_image_rect**\ (\ rect\: :ref:`Rect2i<class_Rect2i>`\ ) |const| :ref:`🔗<class_DisplayServer_method_screen_get_image_rect>`
  1952. Returns screenshot of the screen ``rect``.
  1953. \ **Note:** This method is implemented on macOS and Windows.
  1954. \ **Note:** On macOS, this method requires "Screen Recording" permission, if permission is not granted it will return desktop wallpaper color.
  1955. .. rst-class:: classref-item-separator
  1956. ----
  1957. .. _class_DisplayServer_method_screen_get_max_scale:
  1958. .. rst-class:: classref-method
  1959. :ref:`float<class_float>` **screen_get_max_scale**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_screen_get_max_scale>`
  1960. Returns the greatest scale factor of all screens.
  1961. \ **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.
  1962. \ **Note:** This method is implemented only on macOS.
  1963. .. rst-class:: classref-item-separator
  1964. ----
  1965. .. _class_DisplayServer_method_screen_get_orientation:
  1966. .. rst-class:: classref-method
  1967. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **screen_get_orientation**\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_DisplayServer_method_screen_get_orientation>`
  1968. Returns the ``screen``'s current orientation. See also :ref:`screen_set_orientation<class_DisplayServer_method_screen_set_orientation>`.
  1969. \ **Note:** This method is implemented on Android and iOS.
  1970. .. rst-class:: classref-item-separator
  1971. ----
  1972. .. _class_DisplayServer_method_screen_get_pixel:
  1973. .. rst-class:: classref-method
  1974. :ref:`Color<class_Color>` **screen_get_pixel**\ (\ position\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_DisplayServer_method_screen_get_pixel>`
  1975. Returns color of the display pixel at the ``position``.
  1976. \ **Note:** This method is implemented on Linux (X11), macOS, and Windows.
  1977. \ **Note:** On macOS, this method requires "Screen Recording" permission, if permission is not granted it will return desktop wallpaper color.
  1978. .. rst-class:: classref-item-separator
  1979. ----
  1980. .. _class_DisplayServer_method_screen_get_position:
  1981. .. rst-class:: classref-method
  1982. :ref:`Vector2i<class_Vector2i>` **screen_get_position**\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_DisplayServer_method_screen_get_position>`
  1983. 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:
  1984. .. code:: text
  1985. * (0, 0) +-------+
  1986. | |
  1987. +-------------+ | |
  1988. | | | |
  1989. | | | |
  1990. +-------------+ +-------+
  1991. See also :ref:`screen_get_size<class_DisplayServer_method_screen_get_size>`.
  1992. \ **Note:** On Linux (Wayland) this method always returns ``(0, 0)``.
  1993. .. rst-class:: classref-item-separator
  1994. ----
  1995. .. _class_DisplayServer_method_screen_get_refresh_rate:
  1996. .. rst-class:: classref-method
  1997. :ref:`float<class_float>` **screen_get_refresh_rate**\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_DisplayServer_method_screen_get_refresh_rate>`
  1998. 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.
  1999. \ **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.
  2000. To fallback to a default refresh rate if the method fails, try:
  2001. ::
  2002. var refresh_rate = DisplayServer.screen_get_refresh_rate()
  2003. if refresh_rate < 0:
  2004. refresh_rate = 60.0
  2005. .. rst-class:: classref-item-separator
  2006. ----
  2007. .. _class_DisplayServer_method_screen_get_scale:
  2008. .. rst-class:: classref-method
  2009. :ref:`float<class_float>` **screen_get_scale**\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_DisplayServer_method_screen_get_scale>`
  2010. Returns the scale factor of the specified screen by index.
  2011. \ **Note:** On macOS, the returned value is ``2.0`` for hiDPI (Retina) screens, and ``1.0`` for all other cases.
  2012. \ **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``).
  2013. \ **Note:** This method is implemented on Android, iOS, Web, macOS, and Linux (Wayland).
  2014. .. rst-class:: classref-item-separator
  2015. ----
  2016. .. _class_DisplayServer_method_screen_get_size:
  2017. .. rst-class:: classref-method
  2018. :ref:`Vector2i<class_Vector2i>` **screen_get_size**\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_DisplayServer_method_screen_get_size>`
  2019. 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>`.
  2020. .. rst-class:: classref-item-separator
  2021. ----
  2022. .. _class_DisplayServer_method_screen_get_usable_rect:
  2023. .. rst-class:: classref-method
  2024. :ref:`Rect2i<class_Rect2i>` **screen_get_usable_rect**\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_DisplayServer_method_screen_get_usable_rect>`
  2025. 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>`.
  2026. .. rst-class:: classref-item-separator
  2027. ----
  2028. .. _class_DisplayServer_method_screen_is_kept_on:
  2029. .. rst-class:: classref-method
  2030. :ref:`bool<class_bool>` **screen_is_kept_on**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_screen_is_kept_on>`
  2031. 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>`.
  2032. .. rst-class:: classref-item-separator
  2033. ----
  2034. .. _class_DisplayServer_method_screen_set_keep_on:
  2035. .. rst-class:: classref-method
  2036. |void| **screen_set_keep_on**\ (\ enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_DisplayServer_method_screen_set_keep_on>`
  2037. 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>`.
  2038. .. rst-class:: classref-item-separator
  2039. ----
  2040. .. _class_DisplayServer_method_screen_set_orientation:
  2041. .. rst-class:: classref-method
  2042. |void| **screen_set_orientation**\ (\ orientation\: :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>`, screen\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_DisplayServer_method_screen_set_orientation>`
  2043. Sets the ``screen``'s ``orientation``. See also :ref:`screen_get_orientation<class_DisplayServer_method_screen_get_orientation>`.
  2044. \ **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>`.
  2045. .. rst-class:: classref-item-separator
  2046. ----
  2047. .. _class_DisplayServer_method_set_icon:
  2048. .. rst-class:: classref-method
  2049. |void| **set_icon**\ (\ image\: :ref:`Image<class_Image>`\ ) :ref:`🔗<class_DisplayServer_method_set_icon>`
  2050. 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.
  2051. \ **Note:** Requires support for :ref:`FEATURE_ICON<class_DisplayServer_constant_FEATURE_ICON>`.
  2052. .. rst-class:: classref-item-separator
  2053. ----
  2054. .. _class_DisplayServer_method_set_native_icon:
  2055. .. rst-class:: classref-method
  2056. |void| **set_native_icon**\ (\ filename\: :ref:`String<class_String>`\ ) :ref:`🔗<class_DisplayServer_method_set_native_icon>`
  2057. 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.
  2058. \ **Note:** Requires support for :ref:`FEATURE_NATIVE_ICON<class_DisplayServer_constant_FEATURE_NATIVE_ICON>`.
  2059. .. rst-class:: classref-item-separator
  2060. ----
  2061. .. _class_DisplayServer_method_set_system_theme_change_callback:
  2062. .. rst-class:: classref-method
  2063. |void| **set_system_theme_change_callback**\ (\ callable\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_DisplayServer_method_set_system_theme_change_callback>`
  2064. Sets the ``callable`` that should be called when system theme settings are changed. Callback method should have zero arguments.
  2065. \ **Note:** This method is implemented on Android, iOS, macOS, Windows, and Linux (X11/Wayland).
  2066. .. rst-class:: classref-item-separator
  2067. ----
  2068. .. _class_DisplayServer_method_show_emoji_and_symbol_picker:
  2069. .. rst-class:: classref-method
  2070. |void| **show_emoji_and_symbol_picker**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_show_emoji_and_symbol_picker>`
  2071. Opens system emoji and symbol picker.
  2072. \ **Note:** This method is implemented on macOS and Windows.
  2073. .. rst-class:: classref-item-separator
  2074. ----
  2075. .. _class_DisplayServer_method_status_indicator_get_rect:
  2076. .. rst-class:: classref-method
  2077. :ref:`Rect2<class_Rect2>` **status_indicator_get_rect**\ (\ id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_DisplayServer_method_status_indicator_get_rect>`
  2078. 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>`.
  2079. \ **Note:** This method is implemented on macOS and Windows.
  2080. .. rst-class:: classref-item-separator
  2081. ----
  2082. .. _class_DisplayServer_method_status_indicator_set_callback:
  2083. .. rst-class:: classref-method
  2084. |void| **status_indicator_set_callback**\ (\ id\: :ref:`int<class_int>`, callback\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_DisplayServer_method_status_indicator_set_callback>`
  2085. 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.
  2086. \ **Note:** This method is implemented on macOS and Windows.
  2087. .. rst-class:: classref-item-separator
  2088. ----
  2089. .. _class_DisplayServer_method_status_indicator_set_icon:
  2090. .. rst-class:: classref-method
  2091. |void| **status_indicator_set_icon**\ (\ id\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_DisplayServer_method_status_indicator_set_icon>`
  2092. Sets the application status indicator icon.
  2093. \ **Note:** This method is implemented on macOS and Windows.
  2094. .. rst-class:: classref-item-separator
  2095. ----
  2096. .. _class_DisplayServer_method_status_indicator_set_menu:
  2097. .. rst-class:: classref-method
  2098. |void| **status_indicator_set_menu**\ (\ id\: :ref:`int<class_int>`, menu_rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_DisplayServer_method_status_indicator_set_menu>`
  2099. Sets the application status indicator native popup menu.
  2100. \ **Note:** On macOS, the menu is activated by any mouse button. Its activation callback is *not* triggered.
  2101. \ **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.
  2102. \ **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.
  2103. .. rst-class:: classref-item-separator
  2104. ----
  2105. .. _class_DisplayServer_method_status_indicator_set_tooltip:
  2106. .. rst-class:: classref-method
  2107. |void| **status_indicator_set_tooltip**\ (\ id\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) :ref:`🔗<class_DisplayServer_method_status_indicator_set_tooltip>`
  2108. Sets the application status indicator tooltip.
  2109. \ **Note:** This method is implemented on macOS and Windows.
  2110. .. rst-class:: classref-item-separator
  2111. ----
  2112. .. _class_DisplayServer_method_tablet_get_current_driver:
  2113. .. rst-class:: classref-method
  2114. :ref:`String<class_String>` **tablet_get_current_driver**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_tablet_get_current_driver>`
  2115. Returns current active tablet driver name.
  2116. \ **Note:** This method is implemented only on Windows.
  2117. .. rst-class:: classref-item-separator
  2118. ----
  2119. .. _class_DisplayServer_method_tablet_get_driver_count:
  2120. .. rst-class:: classref-method
  2121. :ref:`int<class_int>` **tablet_get_driver_count**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_tablet_get_driver_count>`
  2122. Returns the total number of available tablet drivers.
  2123. \ **Note:** This method is implemented only on Windows.
  2124. .. rst-class:: classref-item-separator
  2125. ----
  2126. .. _class_DisplayServer_method_tablet_get_driver_name:
  2127. .. rst-class:: classref-method
  2128. :ref:`String<class_String>` **tablet_get_driver_name**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_DisplayServer_method_tablet_get_driver_name>`
  2129. Returns the tablet driver name for the given index.
  2130. \ **Note:** This method is implemented only on Windows.
  2131. .. rst-class:: classref-item-separator
  2132. ----
  2133. .. _class_DisplayServer_method_tablet_set_current_driver:
  2134. .. rst-class:: classref-method
  2135. |void| **tablet_set_current_driver**\ (\ name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_DisplayServer_method_tablet_set_current_driver>`
  2136. Set active tablet driver name.
  2137. Supported drivers:
  2138. - ``winink``: Windows Ink API, default (Windows 8.1+ required).
  2139. - ``wintab``: Wacom Wintab API (compatible device driver required).
  2140. - ``dummy``: Dummy driver, tablet input is disabled.
  2141. \ **Note:** This method is implemented only on Windows.
  2142. .. rst-class:: classref-item-separator
  2143. ----
  2144. .. _class_DisplayServer_method_tts_get_voices:
  2145. .. rst-class:: classref-method
  2146. :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **tts_get_voices**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_tts_get_voices>`
  2147. Returns an :ref:`Array<class_Array>` of voice information dictionaries.
  2148. Each :ref:`Dictionary<class_Dictionary>` contains two :ref:`String<class_String>` entries:
  2149. - ``name`` is voice name.
  2150. - ``id`` is voice identifier.
  2151. - ``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.
  2152. 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.
  2153. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
  2154. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  2155. .. rst-class:: classref-item-separator
  2156. ----
  2157. .. _class_DisplayServer_method_tts_get_voices_for_language:
  2158. .. rst-class:: classref-method
  2159. :ref:`PackedStringArray<class_PackedStringArray>` **tts_get_voices_for_language**\ (\ language\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_DisplayServer_method_tts_get_voices_for_language>`
  2160. Returns an :ref:`PackedStringArray<class_PackedStringArray>` of voice identifiers for the ``language``.
  2161. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
  2162. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  2163. .. rst-class:: classref-item-separator
  2164. ----
  2165. .. _class_DisplayServer_method_tts_is_paused:
  2166. .. rst-class:: classref-method
  2167. :ref:`bool<class_bool>` **tts_is_paused**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_tts_is_paused>`
  2168. Returns ``true`` if the synthesizer is in a paused state.
  2169. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
  2170. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  2171. .. rst-class:: classref-item-separator
  2172. ----
  2173. .. _class_DisplayServer_method_tts_is_speaking:
  2174. .. rst-class:: classref-method
  2175. :ref:`bool<class_bool>` **tts_is_speaking**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_tts_is_speaking>`
  2176. Returns ``true`` if the synthesizer is generating speech, or have utterance waiting in the queue.
  2177. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
  2178. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  2179. .. rst-class:: classref-item-separator
  2180. ----
  2181. .. _class_DisplayServer_method_tts_pause:
  2182. .. rst-class:: classref-method
  2183. |void| **tts_pause**\ (\ ) :ref:`🔗<class_DisplayServer_method_tts_pause>`
  2184. Puts the synthesizer into a paused state.
  2185. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
  2186. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  2187. .. rst-class:: classref-item-separator
  2188. ----
  2189. .. _class_DisplayServer_method_tts_resume:
  2190. .. rst-class:: classref-method
  2191. |void| **tts_resume**\ (\ ) :ref:`🔗<class_DisplayServer_method_tts_resume>`
  2192. Resumes the synthesizer if it was paused.
  2193. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
  2194. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  2195. .. rst-class:: classref-item-separator
  2196. ----
  2197. .. _class_DisplayServer_method_tts_set_utterance_callback:
  2198. .. rst-class:: classref-method
  2199. |void| **tts_set_utterance_callback**\ (\ event\: :ref:`TTSUtteranceEvent<enum_DisplayServer_TTSUtteranceEvent>`, callable\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_DisplayServer_method_tts_set_utterance_callback>`
  2200. Adds a callback, which is called when the utterance has started, finished, canceled or reached a text boundary.
  2201. - :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.
  2202. - :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.
  2203. \ **Note:** The granularity of the boundary callbacks is engine dependent.
  2204. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
  2205. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  2206. .. rst-class:: classref-item-separator
  2207. ----
  2208. .. _class_DisplayServer_method_tts_speak:
  2209. .. rst-class:: classref-method
  2210. |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>`
  2211. Adds an utterance to the queue. If ``interrupt`` is ``true``, the queue is cleared first.
  2212. - ``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>`.
  2213. - ``volume`` ranges from ``0`` (lowest) to ``100`` (highest).
  2214. - ``pitch`` ranges from ``0.0`` (lowest) to ``2.0`` (highest), ``1.0`` is default pitch for the current voice.
  2215. - ``rate`` ranges from ``0.1`` (lowest) to ``10.0`` (highest), ``1.0`` is a normal speaking rate. Other values act as a percentage relative.
  2216. - ``utterance_id`` is passed as a parameter to the callback functions.
  2217. \ **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>`.
  2218. \ **Note:** The granularity of pitch, rate, and volume is engine and voice dependent. Values may be truncated.
  2219. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
  2220. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  2221. .. rst-class:: classref-item-separator
  2222. ----
  2223. .. _class_DisplayServer_method_tts_stop:
  2224. .. rst-class:: classref-method
  2225. |void| **tts_stop**\ (\ ) :ref:`🔗<class_DisplayServer_method_tts_stop>`
  2226. Stops synthesis in progress and removes all utterances from the queue.
  2227. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Linux), macOS, and Windows.
  2228. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  2229. .. rst-class:: classref-item-separator
  2230. ----
  2231. .. _class_DisplayServer_method_unregister_additional_output:
  2232. .. rst-class:: classref-method
  2233. |void| **unregister_additional_output**\ (\ object\: :ref:`Object<class_Object>`\ ) :ref:`🔗<class_DisplayServer_method_unregister_additional_output>`
  2234. Unregisters an :ref:`Object<class_Object>` representing an additional output, that was registered via :ref:`register_additional_output<class_DisplayServer_method_register_additional_output>`.
  2235. .. rst-class:: classref-item-separator
  2236. ----
  2237. .. _class_DisplayServer_method_virtual_keyboard_get_height:
  2238. .. rst-class:: classref-method
  2239. :ref:`int<class_int>` **virtual_keyboard_get_height**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_virtual_keyboard_get_height>`
  2240. Returns the on-screen keyboard's height in pixels. Returns 0 if there is no keyboard or if it is currently hidden.
  2241. .. rst-class:: classref-item-separator
  2242. ----
  2243. .. _class_DisplayServer_method_virtual_keyboard_hide:
  2244. .. rst-class:: classref-method
  2245. |void| **virtual_keyboard_hide**\ (\ ) :ref:`🔗<class_DisplayServer_method_virtual_keyboard_hide>`
  2246. Hides the virtual keyboard if it is shown, does nothing otherwise.
  2247. .. rst-class:: classref-item-separator
  2248. ----
  2249. .. _class_DisplayServer_method_virtual_keyboard_show:
  2250. .. rst-class:: classref-method
  2251. |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>`
  2252. Shows the virtual keyboard if the platform has one.
  2253. \ ``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).
  2254. \ ``position`` parameter is the screen space :ref:`Rect2<class_Rect2>` of the edited text.
  2255. \ ``type`` parameter allows configuring which type of virtual keyboard to show.
  2256. \ ``max_length`` limits the number of characters that can be entered if different from ``-1``.
  2257. \ ``cursor_start`` can optionally define the current text cursor position if ``cursor_end`` is not set.
  2258. \ ``cursor_start`` and ``cursor_end`` can optionally define the current text selection.
  2259. \ **Note:** This method is implemented on Android, iOS and Web.
  2260. .. rst-class:: classref-item-separator
  2261. ----
  2262. .. _class_DisplayServer_method_warp_mouse:
  2263. .. rst-class:: classref-method
  2264. |void| **warp_mouse**\ (\ position\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_DisplayServer_method_warp_mouse>`
  2265. 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.
  2266. \ **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.
  2267. .. rst-class:: classref-item-separator
  2268. ----
  2269. .. _class_DisplayServer_method_window_can_draw:
  2270. .. rst-class:: classref-method
  2271. :ref:`bool<class_bool>` **window_can_draw**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_DisplayServer_method_window_can_draw>`
  2272. 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``.
  2273. .. rst-class:: classref-item-separator
  2274. ----
  2275. .. _class_DisplayServer_method_window_get_active_popup:
  2276. .. rst-class:: classref-method
  2277. :ref:`int<class_int>` **window_get_active_popup**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_window_get_active_popup>`
  2278. Returns ID of the active popup window, or :ref:`INVALID_WINDOW_ID<class_DisplayServer_constant_INVALID_WINDOW_ID>` if there is none.
  2279. .. rst-class:: classref-item-separator
  2280. ----
  2281. .. _class_DisplayServer_method_window_get_attached_instance_id:
  2282. .. rst-class:: classref-method
  2283. :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>`
  2284. 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.
  2285. .. rst-class:: classref-item-separator
  2286. ----
  2287. .. _class_DisplayServer_method_window_get_current_screen:
  2288. .. rst-class:: classref-method
  2289. :ref:`int<class_int>` **window_get_current_screen**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_DisplayServer_method_window_get_current_screen>`
  2290. 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>`.
  2291. .. rst-class:: classref-item-separator
  2292. ----
  2293. .. _class_DisplayServer_method_window_get_flag:
  2294. .. rst-class:: classref-method
  2295. :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>`
  2296. Returns the current value of the given window's ``flag``.
  2297. .. rst-class:: classref-item-separator
  2298. ----
  2299. .. _class_DisplayServer_method_window_get_max_size:
  2300. .. rst-class:: classref-method
  2301. :ref:`Vector2i<class_Vector2i>` **window_get_max_size**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_DisplayServer_method_window_get_max_size>`
  2302. Returns the window's maximum size (in pixels). See also :ref:`window_set_max_size<class_DisplayServer_method_window_set_max_size>`.
  2303. .. rst-class:: classref-item-separator
  2304. ----
  2305. .. _class_DisplayServer_method_window_get_min_size:
  2306. .. rst-class:: classref-method
  2307. :ref:`Vector2i<class_Vector2i>` **window_get_min_size**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_DisplayServer_method_window_get_min_size>`
  2308. Returns the window's minimum size (in pixels). See also :ref:`window_set_min_size<class_DisplayServer_method_window_set_min_size>`.
  2309. .. rst-class:: classref-item-separator
  2310. ----
  2311. .. _class_DisplayServer_method_window_get_mode:
  2312. .. rst-class:: classref-method
  2313. :ref:`WindowMode<enum_DisplayServer_WindowMode>` **window_get_mode**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_DisplayServer_method_window_get_mode>`
  2314. Returns the mode of the given window.
  2315. .. rst-class:: classref-item-separator
  2316. ----
  2317. .. _class_DisplayServer_method_window_get_native_handle:
  2318. .. rst-class:: classref-method
  2319. :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>`
  2320. Returns internal structure pointers for use in plugins.
  2321. \ **Note:** This method is implemented on Android, Linux (X11/Wayland), macOS, and Windows.
  2322. .. rst-class:: classref-item-separator
  2323. ----
  2324. .. _class_DisplayServer_method_window_get_popup_safe_rect:
  2325. .. rst-class:: classref-method
  2326. :ref:`Rect2i<class_Rect2i>` **window_get_popup_safe_rect**\ (\ window\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_DisplayServer_method_window_get_popup_safe_rect>`
  2327. Returns the bounding box of control, or menu item that was used to open the popup window, in the screen coordinate system.
  2328. .. rst-class:: classref-item-separator
  2329. ----
  2330. .. _class_DisplayServer_method_window_get_position:
  2331. .. rst-class:: classref-method
  2332. :ref:`Vector2i<class_Vector2i>` **window_get_position**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_DisplayServer_method_window_get_position>`
  2333. Returns the position of the client area of the given window on the screen.
  2334. .. rst-class:: classref-item-separator
  2335. ----
  2336. .. _class_DisplayServer_method_window_get_position_with_decorations:
  2337. .. rst-class:: classref-method
  2338. :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>`
  2339. 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>`.
  2340. .. rst-class:: classref-item-separator
  2341. ----
  2342. .. _class_DisplayServer_method_window_get_safe_title_margins:
  2343. .. rst-class:: classref-method
  2344. :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>`
  2345. 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.
  2346. .. rst-class:: classref-item-separator
  2347. ----
  2348. .. _class_DisplayServer_method_window_get_size:
  2349. .. rst-class:: classref-method
  2350. :ref:`Vector2i<class_Vector2i>` **window_get_size**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_DisplayServer_method_window_get_size>`
  2351. 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>`.
  2352. .. rst-class:: classref-item-separator
  2353. ----
  2354. .. _class_DisplayServer_method_window_get_size_with_decorations:
  2355. .. rst-class:: classref-method
  2356. :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>`
  2357. 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>`.
  2358. .. rst-class:: classref-item-separator
  2359. ----
  2360. .. _class_DisplayServer_method_window_get_title_size:
  2361. .. rst-class:: classref-method
  2362. :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>`
  2363. 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.
  2364. \ **Note:** This method is implemented on macOS and Windows.
  2365. .. rst-class:: classref-item-separator
  2366. ----
  2367. .. _class_DisplayServer_method_window_get_vsync_mode:
  2368. .. rst-class:: classref-method
  2369. :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>`
  2370. Returns the V-Sync mode of the given window.
  2371. .. rst-class:: classref-item-separator
  2372. ----
  2373. .. _class_DisplayServer_method_window_is_focused:
  2374. .. rst-class:: classref-method
  2375. :ref:`bool<class_bool>` **window_is_focused**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_DisplayServer_method_window_is_focused>`
  2376. Returns ``true`` if the window specified by ``window_id`` is focused.
  2377. .. rst-class:: classref-item-separator
  2378. ----
  2379. .. _class_DisplayServer_method_window_is_maximize_allowed:
  2380. .. rst-class:: classref-method
  2381. :ref:`bool<class_bool>` **window_is_maximize_allowed**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_DisplayServer_method_window_is_maximize_allowed>`
  2382. Returns ``true`` if the given window can be maximized (the maximize button is enabled).
  2383. .. rst-class:: classref-item-separator
  2384. ----
  2385. .. _class_DisplayServer_method_window_maximize_on_title_dbl_click:
  2386. .. rst-class:: classref-method
  2387. :ref:`bool<class_bool>` **window_maximize_on_title_dbl_click**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_window_maximize_on_title_dbl_click>`
  2388. Returns ``true``, if double-click on a window title should maximize it.
  2389. \ **Note:** This method is implemented only on macOS.
  2390. .. rst-class:: classref-item-separator
  2391. ----
  2392. .. _class_DisplayServer_method_window_minimize_on_title_dbl_click:
  2393. .. rst-class:: classref-method
  2394. :ref:`bool<class_bool>` **window_minimize_on_title_dbl_click**\ (\ ) |const| :ref:`🔗<class_DisplayServer_method_window_minimize_on_title_dbl_click>`
  2395. Returns ``true``, if double-click on a window title should minimize it.
  2396. \ **Note:** This method is implemented only on macOS.
  2397. .. rst-class:: classref-item-separator
  2398. ----
  2399. .. _class_DisplayServer_method_window_move_to_foreground:
  2400. .. rst-class:: classref-method
  2401. |void| **window_move_to_foreground**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_DisplayServer_method_window_move_to_foreground>`
  2402. Moves the window specified by ``window_id`` to the foreground, so that it is visible over other windows.
  2403. .. rst-class:: classref-item-separator
  2404. ----
  2405. .. _class_DisplayServer_method_window_request_attention:
  2406. .. rst-class:: classref-method
  2407. |void| **window_request_attention**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_DisplayServer_method_window_request_attention>`
  2408. 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.
  2409. .. rst-class:: classref-item-separator
  2410. ----
  2411. .. _class_DisplayServer_method_window_set_current_screen:
  2412. .. rst-class:: classref-method
  2413. |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>`
  2414. 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>`.
  2415. .. rst-class:: classref-item-separator
  2416. ----
  2417. .. _class_DisplayServer_method_window_set_drop_files_callback:
  2418. .. rst-class:: classref-method
  2419. |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>`
  2420. 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.
  2421. \ **Warning:** Advanced users only! Adding such a callback to a :ref:`Window<class_Window>` node will override its default implementation, which can introduce bugs.
  2422. \ **Note:** This method is implemented on Windows, macOS, Linux (X11/Wayland), and Web.
  2423. .. rst-class:: classref-item-separator
  2424. ----
  2425. .. _class_DisplayServer_method_window_set_exclusive:
  2426. .. rst-class:: classref-method
  2427. |void| **window_set_exclusive**\ (\ window_id\: :ref:`int<class_int>`, exclusive\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_DisplayServer_method_window_set_exclusive>`
  2428. 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.
  2429. \ **Note:** On macOS, exclusive windows are confined to the same space (virtual desktop or screen) as the parent window.
  2430. \ **Note:** This method is implemented on macOS and Windows.
  2431. .. rst-class:: classref-item-separator
  2432. ----
  2433. .. _class_DisplayServer_method_window_set_flag:
  2434. .. rst-class:: classref-method
  2435. |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>`
  2436. Enables or disables the given window's given ``flag``. See :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` for possible values and their behavior.
  2437. .. rst-class:: classref-item-separator
  2438. ----
  2439. .. _class_DisplayServer_method_window_set_ime_active:
  2440. .. rst-class:: classref-method
  2441. |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>`
  2442. 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>`.
  2443. .. rst-class:: classref-item-separator
  2444. ----
  2445. .. _class_DisplayServer_method_window_set_ime_position:
  2446. .. rst-class:: classref-method
  2447. |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>`
  2448. 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``.
  2449. .. rst-class:: classref-item-separator
  2450. ----
  2451. .. _class_DisplayServer_method_window_set_input_event_callback:
  2452. .. rst-class:: classref-method
  2453. |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>`
  2454. Sets the ``callback`` that should be called when any :ref:`InputEvent<class_InputEvent>` is sent to the window specified by ``window_id``.
  2455. \ **Warning:** Advanced users only! Adding such a callback to a :ref:`Window<class_Window>` node will override its default implementation, which can introduce bugs.
  2456. .. rst-class:: classref-item-separator
  2457. ----
  2458. .. _class_DisplayServer_method_window_set_input_text_callback:
  2459. .. rst-class:: classref-method
  2460. |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>`
  2461. Sets the ``callback`` that should be called when text is entered using the virtual keyboard to the window specified by ``window_id``.
  2462. \ **Warning:** Advanced users only! Adding such a callback to a :ref:`Window<class_Window>` node will override its default implementation, which can introduce bugs.
  2463. .. rst-class:: classref-item-separator
  2464. ----
  2465. .. _class_DisplayServer_method_window_set_max_size:
  2466. .. rst-class:: classref-method
  2467. |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>`
  2468. 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>`.
  2469. \ **Note:** It's recommended to change this value using :ref:`Window.max_size<class_Window_property_max_size>` instead.
  2470. \ **Note:** Using third-party tools, it is possible for users to disable window geometry restrictions and therefore bypass this limit.
  2471. .. rst-class:: classref-item-separator
  2472. ----
  2473. .. _class_DisplayServer_method_window_set_min_size:
  2474. .. rst-class:: classref-method
  2475. |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>`
  2476. 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>`.
  2477. \ **Note:** It's recommended to change this value using :ref:`Window.min_size<class_Window_property_min_size>` instead.
  2478. \ **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.
  2479. \ **Note:** Using third-party tools, it is possible for users to disable window geometry restrictions and therefore bypass this limit.
  2480. .. rst-class:: classref-item-separator
  2481. ----
  2482. .. _class_DisplayServer_method_window_set_mode:
  2483. .. rst-class:: classref-method
  2484. |void| **window_set_mode**\ (\ mode\: :ref:`WindowMode<enum_DisplayServer_WindowMode>`, window_id\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_DisplayServer_method_window_set_mode>`
  2485. Sets window mode for the given window to ``mode``. See :ref:`WindowMode<enum_DisplayServer_WindowMode>` for possible values and how each mode behaves.
  2486. \ **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.
  2487. \ **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.
  2488. .. rst-class:: classref-item-separator
  2489. ----
  2490. .. _class_DisplayServer_method_window_set_mouse_passthrough:
  2491. .. rst-class:: classref-method
  2492. |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>`
  2493. Sets a polygonal region of the window which accepts mouse events. Mouse events outside the region will be passed through.
  2494. Passing an empty array will disable passthrough support (all mouse events will be intercepted by the window, which is the default behavior).
  2495. .. tabs::
  2496. .. code-tab:: gdscript
  2497. # Set region, using Path2D node.
  2498. DisplayServer.window_set_mouse_passthrough($Path2D.curve.get_baked_points())
  2499. # Set region, using Polygon2D node.
  2500. DisplayServer.window_set_mouse_passthrough($Polygon2D.polygon)
  2501. # Reset region to default.
  2502. DisplayServer.window_set_mouse_passthrough([])
  2503. .. code-tab:: csharp
  2504. // Set region, using Path2D node.
  2505. DisplayServer.WindowSetMousePassthrough(GetNode<Path2D>("Path2D").Curve.GetBakedPoints());
  2506. // Set region, using Polygon2D node.
  2507. DisplayServer.WindowSetMousePassthrough(GetNode<Polygon2D>("Polygon2D").Polygon);
  2508. // Reset region to default.
  2509. DisplayServer.WindowSetMousePassthrough([]);
  2510. \ **Note:** On Windows, the portion of a window that lies outside the region is not drawn, while on Linux (X11) and macOS it is.
  2511. \ **Note:** This method is implemented on Linux (X11), macOS and Windows.
  2512. .. rst-class:: classref-item-separator
  2513. ----
  2514. .. _class_DisplayServer_method_window_set_popup_safe_rect:
  2515. .. rst-class:: classref-method
  2516. |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>`
  2517. 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.
  2518. .. rst-class:: classref-item-separator
  2519. ----
  2520. .. _class_DisplayServer_method_window_set_position:
  2521. .. rst-class:: classref-method
  2522. |void| **window_set_position**\ (\ position\: :ref:`Vector2i<class_Vector2i>`, window_id\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_DisplayServer_method_window_set_position>`
  2523. 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:
  2524. .. code:: text
  2525. * (0, 0) +-------+
  2526. | |
  2527. +-------------+ | |
  2528. | | | |
  2529. | | | |
  2530. +-------------+ +-------+
  2531. See also :ref:`window_get_position<class_DisplayServer_method_window_get_position>` and :ref:`window_set_size<class_DisplayServer_method_window_set_size>`.
  2532. \ **Note:** It's recommended to change this value using :ref:`Window.position<class_Window_property_position>` instead.
  2533. \ **Note:** On Linux (Wayland): this method is a no-op.
  2534. .. rst-class:: classref-item-separator
  2535. ----
  2536. .. _class_DisplayServer_method_window_set_rect_changed_callback:
  2537. .. rst-class:: classref-method
  2538. |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>`
  2539. Sets the ``callback`` that will be called when the window specified by ``window_id`` is moved or resized.
  2540. \ **Warning:** Advanced users only! Adding such a callback to a :ref:`Window<class_Window>` node will override its default implementation, which can introduce bugs.
  2541. .. rst-class:: classref-item-separator
  2542. ----
  2543. .. _class_DisplayServer_method_window_set_size:
  2544. .. rst-class:: classref-method
  2545. |void| **window_set_size**\ (\ size\: :ref:`Vector2i<class_Vector2i>`, window_id\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_DisplayServer_method_window_set_size>`
  2546. 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>`.
  2547. \ **Note:** It's recommended to change this value using :ref:`Window.size<class_Window_property_size>` instead.
  2548. .. rst-class:: classref-item-separator
  2549. ----
  2550. .. _class_DisplayServer_method_window_set_title:
  2551. .. rst-class:: classref-method
  2552. |void| **window_set_title**\ (\ title\: :ref:`String<class_String>`, window_id\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_DisplayServer_method_window_set_title>`
  2553. Sets the title of the given window to ``title``.
  2554. \ **Note:** It's recommended to change this value using :ref:`Window.title<class_Window_property_title>` instead.
  2555. \ **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.
  2556. .. rst-class:: classref-item-separator
  2557. ----
  2558. .. _class_DisplayServer_method_window_set_transient:
  2559. .. rst-class:: classref-method
  2560. |void| **window_set_transient**\ (\ window_id\: :ref:`int<class_int>`, parent_window_id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_DisplayServer_method_window_set_transient>`
  2561. 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.
  2562. \ **Note:** It's recommended to change this value using :ref:`Window.transient<class_Window_property_transient>` instead.
  2563. \ **Note:** The behavior might be different depending on the platform.
  2564. .. rst-class:: classref-item-separator
  2565. ----
  2566. .. _class_DisplayServer_method_window_set_vsync_mode:
  2567. .. rst-class:: classref-method
  2568. |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>`
  2569. 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>`.
  2570. See :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` for possible values and how they affect the behavior of your application.
  2571. 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.
  2572. \ **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.
  2573. .. rst-class:: classref-item-separator
  2574. ----
  2575. .. _class_DisplayServer_method_window_set_window_buttons_offset:
  2576. .. rst-class:: classref-method
  2577. |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>`
  2578. 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.
  2579. \ **Note:** This flag is implemented only on macOS.
  2580. .. rst-class:: classref-item-separator
  2581. ----
  2582. .. _class_DisplayServer_method_window_set_window_event_callback:
  2583. .. rst-class:: classref-method
  2584. |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>`
  2585. Sets the ``callback`` that will be called when an event occurs in the window specified by ``window_id``.
  2586. \ **Warning:** Advanced users only! Adding such a callback to a :ref:`Window<class_Window>` node will override its default implementation, which can introduce bugs.
  2587. .. rst-class:: classref-item-separator
  2588. ----
  2589. .. _class_DisplayServer_method_window_start_drag:
  2590. .. rst-class:: classref-method
  2591. |void| **window_start_drag**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_DisplayServer_method_window_start_drag>`
  2592. 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.
  2593. \ **Note:** This method is implemented on Linux (X11/Wayland), macOS, and Windows.
  2594. .. rst-class:: classref-item-separator
  2595. ----
  2596. .. _class_DisplayServer_method_window_start_resize:
  2597. .. rst-class:: classref-method
  2598. |void| **window_start_resize**\ (\ edge\: :ref:`WindowResizeEdge<enum_DisplayServer_WindowResizeEdge>`, window_id\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_DisplayServer_method_window_start_resize>`
  2599. 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.
  2600. \ **Note:** This method is implemented on Linux (X11/Wayland), macOS, and Windows.
  2601. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  2602. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  2603. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  2604. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  2605. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  2606. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  2607. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  2608. .. |void| replace:: :abbr:`void (No return value.)`