class_displayserver.rst 367 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353
  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. | :ref:`String<class_String>` | :ref:`clipboard_get<class_DisplayServer_method_clipboard_get>`\ (\ ) |const| |
  23. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  24. | :ref:`Image<class_Image>` | :ref:`clipboard_get_image<class_DisplayServer_method_clipboard_get_image>`\ (\ ) |const| |
  25. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  26. | :ref:`String<class_String>` | :ref:`clipboard_get_primary<class_DisplayServer_method_clipboard_get_primary>`\ (\ ) |const| |
  27. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  28. | :ref:`bool<class_bool>` | :ref:`clipboard_has<class_DisplayServer_method_clipboard_has>`\ (\ ) |const| |
  29. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | :ref:`bool<class_bool>` | :ref:`clipboard_has_image<class_DisplayServer_method_clipboard_has_image>`\ (\ ) |const| |
  31. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. | |void| | :ref:`clipboard_set<class_DisplayServer_method_clipboard_set>`\ (\ clipboard\: :ref:`String<class_String>`\ ) |
  33. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | |void| | :ref:`clipboard_set_primary<class_DisplayServer_method_clipboard_set_primary>`\ (\ clipboard_primary\: :ref:`String<class_String>`\ ) |
  35. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | :ref:`int<class_int>` | :ref:`create_status_indicator<class_DisplayServer_method_create_status_indicator>`\ (\ icon\: :ref:`Image<class_Image>`, tooltip\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>`\ ) |
  37. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | :ref:`CursorShape<enum_DisplayServer_CursorShape>` | :ref:`cursor_get_shape<class_DisplayServer_method_cursor_get_shape>`\ (\ ) |const| |
  39. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | |void| | :ref:`cursor_set_custom_image<class_DisplayServer_method_cursor_set_custom_image>`\ (\ cursor\: :ref:`Resource<class_Resource>`, shape\: :ref:`CursorShape<enum_DisplayServer_CursorShape>` = 0, hotspot\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) |
  41. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | |void| | :ref:`cursor_set_shape<class_DisplayServer_method_cursor_set_shape>`\ (\ shape\: :ref:`CursorShape<enum_DisplayServer_CursorShape>`\ ) |
  43. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | |void| | :ref:`delete_status_indicator<class_DisplayServer_method_delete_status_indicator>`\ (\ id\: :ref:`int<class_int>`\ ) |
  45. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`dialog_input_text<class_DisplayServer_method_dialog_input_text>`\ (\ title\: :ref:`String<class_String>`, description\: :ref:`String<class_String>`, existing_text\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>`\ ) |
  47. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`dialog_show<class_DisplayServer_method_dialog_show>`\ (\ title\: :ref:`String<class_String>`, description\: :ref:`String<class_String>`, buttons\: :ref:`PackedStringArray<class_PackedStringArray>`, callback\: :ref:`Callable<class_Callable>`\ ) |
  49. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | |void| | :ref:`enable_for_stealing_focus<class_DisplayServer_method_enable_for_stealing_focus>`\ (\ process_id\: :ref:`int<class_int>`\ ) |
  51. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`file_dialog_show<class_DisplayServer_method_file_dialog_show>`\ (\ title\: :ref:`String<class_String>`, current_directory\: :ref:`String<class_String>`, filename\: :ref:`String<class_String>`, show_hidden\: :ref:`bool<class_bool>`, mode\: :ref:`FileDialogMode<enum_DisplayServer_FileDialogMode>`, filters\: :ref:`PackedStringArray<class_PackedStringArray>`, callback\: :ref:`Callable<class_Callable>`\ ) |
  53. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`file_dialog_with_options_show<class_DisplayServer_method_file_dialog_with_options_show>`\ (\ title\: :ref:`String<class_String>`, current_directory\: :ref:`String<class_String>`, root\: :ref:`String<class_String>`, filename\: :ref:`String<class_String>`, show_hidden\: :ref:`bool<class_bool>`, mode\: :ref:`FileDialogMode<enum_DisplayServer_FileDialogMode>`, filters\: :ref:`PackedStringArray<class_PackedStringArray>`, options\: :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\], callback\: :ref:`Callable<class_Callable>`\ ) |
  55. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | |void| | :ref:`force_process_and_drop_events<class_DisplayServer_method_force_process_and_drop_events>`\ (\ ) |
  57. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | :ref:`Color<class_Color>` | :ref:`get_accent_color<class_DisplayServer_method_get_accent_color>`\ (\ ) |const| |
  59. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | :ref:`Color<class_Color>` | :ref:`get_base_color<class_DisplayServer_method_get_base_color>`\ (\ ) |const| |
  61. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | :ref:`Array<class_Array>`\[:ref:`Rect2<class_Rect2>`\] | :ref:`get_display_cutouts<class_DisplayServer_method_get_display_cutouts>`\ (\ ) |const| |
  63. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | :ref:`Rect2i<class_Rect2i>` | :ref:`get_display_safe_area<class_DisplayServer_method_get_display_safe_area>`\ (\ ) |const| |
  65. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | :ref:`int<class_int>` | :ref:`get_keyboard_focus_screen<class_DisplayServer_method_get_keyboard_focus_screen>`\ (\ ) |const| |
  67. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | :ref:`String<class_String>` | :ref:`get_name<class_DisplayServer_method_get_name>`\ (\ ) |const| |
  69. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | :ref:`int<class_int>` | :ref:`get_primary_screen<class_DisplayServer_method_get_primary_screen>`\ (\ ) |const| |
  71. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | :ref:`int<class_int>` | :ref:`get_screen_count<class_DisplayServer_method_get_screen_count>`\ (\ ) |const| |
  73. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | :ref:`int<class_int>` | :ref:`get_screen_from_rect<class_DisplayServer_method_get_screen_from_rect>`\ (\ rect\: :ref:`Rect2<class_Rect2>`\ ) |const| |
  75. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | :ref:`bool<class_bool>` | :ref:`get_swap_cancel_ok<class_DisplayServer_method_get_swap_cancel_ok>`\ (\ ) |
  77. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | :ref:`int<class_int>` | :ref:`get_window_at_screen_position<class_DisplayServer_method_get_window_at_screen_position>`\ (\ position\: :ref:`Vector2i<class_Vector2i>`\ ) |const| |
  79. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_window_list<class_DisplayServer_method_get_window_list>`\ (\ ) |const| |
  81. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | :ref:`int<class_int>` | :ref:`global_menu_add_check_item<class_DisplayServer_method_global_menu_add_check_item>`\ (\ menu_root\: :ref:`String<class_String>`, label\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) |
  83. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | :ref:`int<class_int>` | :ref:`global_menu_add_icon_check_item<class_DisplayServer_method_global_menu_add_icon_check_item>`\ (\ menu_root\: :ref:`String<class_String>`, icon\: :ref:`Texture2D<class_Texture2D>`, label\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) |
  85. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  86. | :ref:`int<class_int>` | :ref:`global_menu_add_icon_item<class_DisplayServer_method_global_menu_add_icon_item>`\ (\ menu_root\: :ref:`String<class_String>`, icon\: :ref:`Texture2D<class_Texture2D>`, label\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) |
  87. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  88. | :ref:`int<class_int>` | :ref:`global_menu_add_icon_radio_check_item<class_DisplayServer_method_global_menu_add_icon_radio_check_item>`\ (\ menu_root\: :ref:`String<class_String>`, icon\: :ref:`Texture2D<class_Texture2D>`, label\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) |
  89. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  90. | :ref:`int<class_int>` | :ref:`global_menu_add_item<class_DisplayServer_method_global_menu_add_item>`\ (\ menu_root\: :ref:`String<class_String>`, label\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) |
  91. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  92. | :ref:`int<class_int>` | :ref:`global_menu_add_multistate_item<class_DisplayServer_method_global_menu_add_multistate_item>`\ (\ menu_root\: :ref:`String<class_String>`, label\: :ref:`String<class_String>`, max_states\: :ref:`int<class_int>`, default_state\: :ref:`int<class_int>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) |
  93. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  94. | :ref:`int<class_int>` | :ref:`global_menu_add_radio_check_item<class_DisplayServer_method_global_menu_add_radio_check_item>`\ (\ menu_root\: :ref:`String<class_String>`, label\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) |
  95. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  96. | :ref:`int<class_int>` | :ref:`global_menu_add_separator<class_DisplayServer_method_global_menu_add_separator>`\ (\ menu_root\: :ref:`String<class_String>`, index\: :ref:`int<class_int>` = -1\ ) |
  97. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  98. | :ref:`int<class_int>` | :ref:`global_menu_add_submenu_item<class_DisplayServer_method_global_menu_add_submenu_item>`\ (\ menu_root\: :ref:`String<class_String>`, label\: :ref:`String<class_String>`, submenu\: :ref:`String<class_String>`, index\: :ref:`int<class_int>` = -1\ ) |
  99. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  100. | |void| | :ref:`global_menu_clear<class_DisplayServer_method_global_menu_clear>`\ (\ menu_root\: :ref:`String<class_String>`\ ) |
  101. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  102. | :ref:`Key<enum_@GlobalScope_Key>` | :ref:`global_menu_get_item_accelerator<class_DisplayServer_method_global_menu_get_item_accelerator>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| |
  103. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  104. | :ref:`Callable<class_Callable>` | :ref:`global_menu_get_item_callback<class_DisplayServer_method_global_menu_get_item_callback>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| |
  105. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  106. | :ref:`int<class_int>` | :ref:`global_menu_get_item_count<class_DisplayServer_method_global_menu_get_item_count>`\ (\ menu_root\: :ref:`String<class_String>`\ ) |const| |
  107. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  108. | :ref:`Texture2D<class_Texture2D>` | :ref:`global_menu_get_item_icon<class_DisplayServer_method_global_menu_get_item_icon>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| |
  109. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  110. | :ref:`int<class_int>` | :ref:`global_menu_get_item_indentation_level<class_DisplayServer_method_global_menu_get_item_indentation_level>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| |
  111. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  112. | :ref:`int<class_int>` | :ref:`global_menu_get_item_index_from_tag<class_DisplayServer_method_global_menu_get_item_index_from_tag>`\ (\ menu_root\: :ref:`String<class_String>`, tag\: :ref:`Variant<class_Variant>`\ ) |const| |
  113. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  114. | :ref:`int<class_int>` | :ref:`global_menu_get_item_index_from_text<class_DisplayServer_method_global_menu_get_item_index_from_text>`\ (\ menu_root\: :ref:`String<class_String>`, text\: :ref:`String<class_String>`\ ) |const| |
  115. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  116. | :ref:`Callable<class_Callable>` | :ref:`global_menu_get_item_key_callback<class_DisplayServer_method_global_menu_get_item_key_callback>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| |
  117. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  118. | :ref:`int<class_int>` | :ref:`global_menu_get_item_max_states<class_DisplayServer_method_global_menu_get_item_max_states>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| |
  119. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  120. | :ref:`int<class_int>` | :ref:`global_menu_get_item_state<class_DisplayServer_method_global_menu_get_item_state>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| |
  121. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  122. | :ref:`String<class_String>` | :ref:`global_menu_get_item_submenu<class_DisplayServer_method_global_menu_get_item_submenu>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| |
  123. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  124. | :ref:`Variant<class_Variant>` | :ref:`global_menu_get_item_tag<class_DisplayServer_method_global_menu_get_item_tag>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| |
  125. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  126. | :ref:`String<class_String>` | :ref:`global_menu_get_item_text<class_DisplayServer_method_global_menu_get_item_text>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| |
  127. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  128. | :ref:`String<class_String>` | :ref:`global_menu_get_item_tooltip<class_DisplayServer_method_global_menu_get_item_tooltip>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| |
  129. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  130. | :ref:`Dictionary<class_Dictionary>` | :ref:`global_menu_get_system_menu_roots<class_DisplayServer_method_global_menu_get_system_menu_roots>`\ (\ ) |const| |
  131. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  132. | :ref:`bool<class_bool>` | :ref:`global_menu_is_item_checkable<class_DisplayServer_method_global_menu_is_item_checkable>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| |
  133. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  134. | :ref:`bool<class_bool>` | :ref:`global_menu_is_item_checked<class_DisplayServer_method_global_menu_is_item_checked>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| |
  135. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  136. | :ref:`bool<class_bool>` | :ref:`global_menu_is_item_disabled<class_DisplayServer_method_global_menu_is_item_disabled>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| |
  137. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  138. | :ref:`bool<class_bool>` | :ref:`global_menu_is_item_hidden<class_DisplayServer_method_global_menu_is_item_hidden>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| |
  139. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  140. | :ref:`bool<class_bool>` | :ref:`global_menu_is_item_radio_checkable<class_DisplayServer_method_global_menu_is_item_radio_checkable>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const| |
  141. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  142. | |void| | :ref:`global_menu_remove_item<class_DisplayServer_method_global_menu_remove_item>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |
  143. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  144. | |void| | :ref:`global_menu_set_item_accelerator<class_DisplayServer_method_global_menu_set_item_accelerator>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, keycode\: :ref:`Key<enum_@GlobalScope_Key>`\ ) |
  145. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  146. | |void| | :ref:`global_menu_set_item_callback<class_DisplayServer_method_global_menu_set_item_callback>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, callback\: :ref:`Callable<class_Callable>`\ ) |
  147. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  148. | |void| | :ref:`global_menu_set_item_checkable<class_DisplayServer_method_global_menu_set_item_checkable>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, checkable\: :ref:`bool<class_bool>`\ ) |
  149. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  150. | |void| | :ref:`global_menu_set_item_checked<class_DisplayServer_method_global_menu_set_item_checked>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, checked\: :ref:`bool<class_bool>`\ ) |
  151. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  152. | |void| | :ref:`global_menu_set_item_disabled<class_DisplayServer_method_global_menu_set_item_disabled>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) |
  153. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  154. | |void| | :ref:`global_menu_set_item_hidden<class_DisplayServer_method_global_menu_set_item_hidden>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, hidden\: :ref:`bool<class_bool>`\ ) |
  155. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  156. | |void| | :ref:`global_menu_set_item_hover_callbacks<class_DisplayServer_method_global_menu_set_item_hover_callbacks>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, callback\: :ref:`Callable<class_Callable>`\ ) |
  157. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  158. | |void| | :ref:`global_menu_set_item_icon<class_DisplayServer_method_global_menu_set_item_icon>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) |
  159. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  160. | |void| | :ref:`global_menu_set_item_indentation_level<class_DisplayServer_method_global_menu_set_item_indentation_level>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, level\: :ref:`int<class_int>`\ ) |
  161. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  162. | |void| | :ref:`global_menu_set_item_key_callback<class_DisplayServer_method_global_menu_set_item_key_callback>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, key_callback\: :ref:`Callable<class_Callable>`\ ) |
  163. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  164. | |void| | :ref:`global_menu_set_item_max_states<class_DisplayServer_method_global_menu_set_item_max_states>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, max_states\: :ref:`int<class_int>`\ ) |
  165. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  166. | |void| | :ref:`global_menu_set_item_radio_checkable<class_DisplayServer_method_global_menu_set_item_radio_checkable>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, checkable\: :ref:`bool<class_bool>`\ ) |
  167. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  168. | |void| | :ref:`global_menu_set_item_state<class_DisplayServer_method_global_menu_set_item_state>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, state\: :ref:`int<class_int>`\ ) |
  169. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  170. | |void| | :ref:`global_menu_set_item_submenu<class_DisplayServer_method_global_menu_set_item_submenu>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, submenu\: :ref:`String<class_String>`\ ) |
  171. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  172. | |void| | :ref:`global_menu_set_item_tag<class_DisplayServer_method_global_menu_set_item_tag>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, tag\: :ref:`Variant<class_Variant>`\ ) |
  173. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  174. | |void| | :ref:`global_menu_set_item_text<class_DisplayServer_method_global_menu_set_item_text>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) |
  175. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  176. | |void| | :ref:`global_menu_set_item_tooltip<class_DisplayServer_method_global_menu_set_item_tooltip>`\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) |
  177. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  178. | |void| | :ref:`global_menu_set_popup_callbacks<class_DisplayServer_method_global_menu_set_popup_callbacks>`\ (\ menu_root\: :ref:`String<class_String>`, open_callback\: :ref:`Callable<class_Callable>`, close_callback\: :ref:`Callable<class_Callable>`\ ) |
  179. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  180. | :ref:`bool<class_bool>` | :ref:`has_feature<class_DisplayServer_method_has_feature>`\ (\ feature\: :ref:`Feature<enum_DisplayServer_Feature>`\ ) |const| |
  181. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  182. | |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>`\ ) |
  183. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  184. | :ref:`Vector2i<class_Vector2i>` | :ref:`ime_get_selection<class_DisplayServer_method_ime_get_selection>`\ (\ ) |const| |
  185. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  186. | :ref:`String<class_String>` | :ref:`ime_get_text<class_DisplayServer_method_ime_get_text>`\ (\ ) |const| |
  187. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  188. | :ref:`bool<class_bool>` | :ref:`is_dark_mode<class_DisplayServer_method_is_dark_mode>`\ (\ ) |const| |
  189. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  190. | :ref:`bool<class_bool>` | :ref:`is_dark_mode_supported<class_DisplayServer_method_is_dark_mode_supported>`\ (\ ) |const| |
  191. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  192. | :ref:`bool<class_bool>` | :ref:`is_touchscreen_available<class_DisplayServer_method_is_touchscreen_available>`\ (\ ) |const| |
  193. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  194. | :ref:`int<class_int>` | :ref:`keyboard_get_current_layout<class_DisplayServer_method_keyboard_get_current_layout>`\ (\ ) |const| |
  195. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  196. | :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| |
  197. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  198. | :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| |
  199. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  200. | :ref:`int<class_int>` | :ref:`keyboard_get_layout_count<class_DisplayServer_method_keyboard_get_layout_count>`\ (\ ) |const| |
  201. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  202. | :ref:`String<class_String>` | :ref:`keyboard_get_layout_language<class_DisplayServer_method_keyboard_get_layout_language>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
  203. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  204. | :ref:`String<class_String>` | :ref:`keyboard_get_layout_name<class_DisplayServer_method_keyboard_get_layout_name>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
  205. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  206. | |void| | :ref:`keyboard_set_current_layout<class_DisplayServer_method_keyboard_set_current_layout>`\ (\ index\: :ref:`int<class_int>`\ ) |
  207. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  208. | |bitfield|\[:ref:`MouseButtonMask<enum_@GlobalScope_MouseButtonMask>`\] | :ref:`mouse_get_button_state<class_DisplayServer_method_mouse_get_button_state>`\ (\ ) |const| |
  209. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  210. | :ref:`MouseMode<enum_DisplayServer_MouseMode>` | :ref:`mouse_get_mode<class_DisplayServer_method_mouse_get_mode>`\ (\ ) |const| |
  211. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  212. | :ref:`Vector2i<class_Vector2i>` | :ref:`mouse_get_position<class_DisplayServer_method_mouse_get_position>`\ (\ ) |const| |
  213. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  214. | |void| | :ref:`mouse_set_mode<class_DisplayServer_method_mouse_set_mode>`\ (\ mouse_mode\: :ref:`MouseMode<enum_DisplayServer_MouseMode>`\ ) |
  215. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  216. | |void| | :ref:`process_events<class_DisplayServer_method_process_events>`\ (\ ) |
  217. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  218. | :ref:`int<class_int>` | :ref:`screen_get_dpi<class_DisplayServer_method_screen_get_dpi>`\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| |
  219. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  220. | :ref:`Image<class_Image>` | :ref:`screen_get_image<class_DisplayServer_method_screen_get_image>`\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| |
  221. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  222. | :ref:`float<class_float>` | :ref:`screen_get_max_scale<class_DisplayServer_method_screen_get_max_scale>`\ (\ ) |const| |
  223. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  224. | :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` | :ref:`screen_get_orientation<class_DisplayServer_method_screen_get_orientation>`\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| |
  225. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  226. | :ref:`Color<class_Color>` | :ref:`screen_get_pixel<class_DisplayServer_method_screen_get_pixel>`\ (\ position\: :ref:`Vector2i<class_Vector2i>`\ ) |const| |
  227. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  228. | :ref:`Vector2i<class_Vector2i>` | :ref:`screen_get_position<class_DisplayServer_method_screen_get_position>`\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| |
  229. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  230. | :ref:`float<class_float>` | :ref:`screen_get_refresh_rate<class_DisplayServer_method_screen_get_refresh_rate>`\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| |
  231. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  232. | :ref:`float<class_float>` | :ref:`screen_get_scale<class_DisplayServer_method_screen_get_scale>`\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| |
  233. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  234. | :ref:`Vector2i<class_Vector2i>` | :ref:`screen_get_size<class_DisplayServer_method_screen_get_size>`\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| |
  235. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  236. | :ref:`Rect2i<class_Rect2i>` | :ref:`screen_get_usable_rect<class_DisplayServer_method_screen_get_usable_rect>`\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const| |
  237. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  238. | :ref:`bool<class_bool>` | :ref:`screen_is_kept_on<class_DisplayServer_method_screen_is_kept_on>`\ (\ ) |const| |
  239. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  240. | |void| | :ref:`screen_set_keep_on<class_DisplayServer_method_screen_set_keep_on>`\ (\ enable\: :ref:`bool<class_bool>`\ ) |
  241. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  242. | |void| | :ref:`screen_set_orientation<class_DisplayServer_method_screen_set_orientation>`\ (\ orientation\: :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>`, screen\: :ref:`int<class_int>` = -1\ ) |
  243. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  244. | |void| | :ref:`set_icon<class_DisplayServer_method_set_icon>`\ (\ image\: :ref:`Image<class_Image>`\ ) |
  245. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  246. | |void| | :ref:`set_native_icon<class_DisplayServer_method_set_native_icon>`\ (\ filename\: :ref:`String<class_String>`\ ) |
  247. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  248. | |void| | :ref:`set_system_theme_change_callback<class_DisplayServer_method_set_system_theme_change_callback>`\ (\ callable\: :ref:`Callable<class_Callable>`\ ) |
  249. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  250. | |void| | :ref:`status_indicator_set_callback<class_DisplayServer_method_status_indicator_set_callback>`\ (\ id\: :ref:`int<class_int>`, callback\: :ref:`Callable<class_Callable>`\ ) |
  251. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  252. | |void| | :ref:`status_indicator_set_icon<class_DisplayServer_method_status_indicator_set_icon>`\ (\ id\: :ref:`int<class_int>`, icon\: :ref:`Image<class_Image>`\ ) |
  253. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  254. | |void| | :ref:`status_indicator_set_tooltip<class_DisplayServer_method_status_indicator_set_tooltip>`\ (\ id\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) |
  255. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  256. | :ref:`String<class_String>` | :ref:`tablet_get_current_driver<class_DisplayServer_method_tablet_get_current_driver>`\ (\ ) |const| |
  257. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  258. | :ref:`int<class_int>` | :ref:`tablet_get_driver_count<class_DisplayServer_method_tablet_get_driver_count>`\ (\ ) |const| |
  259. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  260. | :ref:`String<class_String>` | :ref:`tablet_get_driver_name<class_DisplayServer_method_tablet_get_driver_name>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  261. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  262. | |void| | :ref:`tablet_set_current_driver<class_DisplayServer_method_tablet_set_current_driver>`\ (\ name\: :ref:`String<class_String>`\ ) |
  263. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  264. | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`tts_get_voices<class_DisplayServer_method_tts_get_voices>`\ (\ ) |const| |
  265. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  266. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`tts_get_voices_for_language<class_DisplayServer_method_tts_get_voices_for_language>`\ (\ language\: :ref:`String<class_String>`\ ) |const| |
  267. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  268. | :ref:`bool<class_bool>` | :ref:`tts_is_paused<class_DisplayServer_method_tts_is_paused>`\ (\ ) |const| |
  269. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  270. | :ref:`bool<class_bool>` | :ref:`tts_is_speaking<class_DisplayServer_method_tts_is_speaking>`\ (\ ) |const| |
  271. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  272. | |void| | :ref:`tts_pause<class_DisplayServer_method_tts_pause>`\ (\ ) |
  273. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  274. | |void| | :ref:`tts_resume<class_DisplayServer_method_tts_resume>`\ (\ ) |
  275. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  276. | |void| | :ref:`tts_set_utterance_callback<class_DisplayServer_method_tts_set_utterance_callback>`\ (\ event\: :ref:`TTSUtteranceEvent<enum_DisplayServer_TTSUtteranceEvent>`, callable\: :ref:`Callable<class_Callable>`\ ) |
  277. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  278. | |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\ ) |
  279. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  280. | |void| | :ref:`tts_stop<class_DisplayServer_method_tts_stop>`\ (\ ) |
  281. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  282. | :ref:`int<class_int>` | :ref:`virtual_keyboard_get_height<class_DisplayServer_method_virtual_keyboard_get_height>`\ (\ ) |const| |
  283. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  284. | |void| | :ref:`virtual_keyboard_hide<class_DisplayServer_method_virtual_keyboard_hide>`\ (\ ) |
  285. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  286. | |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\ ) |
  287. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  288. | |void| | :ref:`warp_mouse<class_DisplayServer_method_warp_mouse>`\ (\ position\: :ref:`Vector2i<class_Vector2i>`\ ) |
  289. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  290. | :ref:`bool<class_bool>` | :ref:`window_can_draw<class_DisplayServer_method_window_can_draw>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  291. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  292. | :ref:`int<class_int>` | :ref:`window_get_active_popup<class_DisplayServer_method_window_get_active_popup>`\ (\ ) |const| |
  293. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  294. | :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| |
  295. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  296. | :ref:`int<class_int>` | :ref:`window_get_current_screen<class_DisplayServer_method_window_get_current_screen>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  297. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  298. | :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| |
  299. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  300. | :ref:`Vector2i<class_Vector2i>` | :ref:`window_get_max_size<class_DisplayServer_method_window_get_max_size>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  301. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  302. | :ref:`Vector2i<class_Vector2i>` | :ref:`window_get_min_size<class_DisplayServer_method_window_get_min_size>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  303. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  304. | :ref:`WindowMode<enum_DisplayServer_WindowMode>` | :ref:`window_get_mode<class_DisplayServer_method_window_get_mode>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  305. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  306. | :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| |
  307. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  308. | :ref:`Rect2i<class_Rect2i>` | :ref:`window_get_popup_safe_rect<class_DisplayServer_method_window_get_popup_safe_rect>`\ (\ window\: :ref:`int<class_int>`\ ) |const| |
  309. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  310. | :ref:`Vector2i<class_Vector2i>` | :ref:`window_get_position<class_DisplayServer_method_window_get_position>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  311. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  312. | :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| |
  313. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  314. | :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| |
  315. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  316. | :ref:`Vector2i<class_Vector2i>` | :ref:`window_get_size<class_DisplayServer_method_window_get_size>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  317. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  318. | :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| |
  319. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  320. | :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| |
  321. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  322. | :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| |
  323. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  324. | :ref:`bool<class_bool>` | :ref:`window_is_focused<class_DisplayServer_method_window_is_focused>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  325. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  326. | :ref:`bool<class_bool>` | :ref:`window_is_maximize_allowed<class_DisplayServer_method_window_is_maximize_allowed>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const| |
  327. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  328. | :ref:`bool<class_bool>` | :ref:`window_maximize_on_title_dbl_click<class_DisplayServer_method_window_maximize_on_title_dbl_click>`\ (\ ) |const| |
  329. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  330. | :ref:`bool<class_bool>` | :ref:`window_minimize_on_title_dbl_click<class_DisplayServer_method_window_minimize_on_title_dbl_click>`\ (\ ) |const| |
  331. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  332. | |void| | :ref:`window_move_to_foreground<class_DisplayServer_method_window_move_to_foreground>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |
  333. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  334. | |void| | :ref:`window_request_attention<class_DisplayServer_method_window_request_attention>`\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |
  335. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  336. | |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\ ) |
  337. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  338. | |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\ ) |
  339. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  340. | |void| | :ref:`window_set_exclusive<class_DisplayServer_method_window_set_exclusive>`\ (\ window_id\: :ref:`int<class_int>`, exclusive\: :ref:`bool<class_bool>`\ ) |
  341. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  342. | |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\ ) |
  343. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  344. | |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\ ) |
  345. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  346. | |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\ ) |
  347. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  348. | |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\ ) |
  349. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  350. | |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\ ) |
  351. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  352. | |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\ ) |
  353. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  354. | |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\ ) |
  355. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  356. | |void| | :ref:`window_set_mode<class_DisplayServer_method_window_set_mode>`\ (\ mode\: :ref:`WindowMode<enum_DisplayServer_WindowMode>`, window_id\: :ref:`int<class_int>` = 0\ ) |
  357. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  358. | |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\ ) |
  359. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  360. | |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>`\ ) |
  361. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  362. | |void| | :ref:`window_set_position<class_DisplayServer_method_window_set_position>`\ (\ position\: :ref:`Vector2i<class_Vector2i>`, window_id\: :ref:`int<class_int>` = 0\ ) |
  363. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  364. | |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\ ) |
  365. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  366. | |void| | :ref:`window_set_size<class_DisplayServer_method_window_set_size>`\ (\ size\: :ref:`Vector2i<class_Vector2i>`, window_id\: :ref:`int<class_int>` = 0\ ) |
  367. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  368. | |void| | :ref:`window_set_title<class_DisplayServer_method_window_set_title>`\ (\ title\: :ref:`String<class_String>`, window_id\: :ref:`int<class_int>` = 0\ ) |
  369. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  370. | |void| | :ref:`window_set_transient<class_DisplayServer_method_window_set_transient>`\ (\ window_id\: :ref:`int<class_int>`, parent_window_id\: :ref:`int<class_int>`\ ) |
  371. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  372. | |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\ ) |
  373. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  374. | |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\ ) |
  375. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  376. | |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\ ) |
  377. +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  378. .. rst-class:: classref-section-separator
  379. ----
  380. .. rst-class:: classref-descriptions-group
  381. Enumerations
  382. ------------
  383. .. _enum_DisplayServer_Feature:
  384. .. rst-class:: classref-enumeration
  385. enum **Feature**:
  386. .. _class_DisplayServer_constant_FEATURE_GLOBAL_MENU:
  387. .. rst-class:: classref-enumeration-constant
  388. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_GLOBAL_MENU** = ``0``
  389. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  390. Display server supports global menu. This allows the application to display its menu items in the operating system's top bar. **macOS**
  391. .. _class_DisplayServer_constant_FEATURE_SUBWINDOWS:
  392. .. rst-class:: classref-enumeration-constant
  393. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_SUBWINDOWS** = ``1``
  394. Display server supports multiple windows that can be moved outside of the main window. **Windows, macOS, Linux (X11)**
  395. .. _class_DisplayServer_constant_FEATURE_TOUCHSCREEN:
  396. .. rst-class:: classref-enumeration-constant
  397. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_TOUCHSCREEN** = ``2``
  398. Display server supports touchscreen input. **Windows, Linux (X11), Android, iOS, Web**
  399. .. _class_DisplayServer_constant_FEATURE_MOUSE:
  400. .. rst-class:: classref-enumeration-constant
  401. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_MOUSE** = ``3``
  402. Display server supports mouse input. **Windows, macOS, Linux (X11/Wayland), Android, Web**
  403. .. _class_DisplayServer_constant_FEATURE_MOUSE_WARP:
  404. .. rst-class:: classref-enumeration-constant
  405. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_MOUSE_WARP** = ``4``
  406. 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)**
  407. .. _class_DisplayServer_constant_FEATURE_CLIPBOARD:
  408. .. rst-class:: classref-enumeration-constant
  409. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_CLIPBOARD** = ``5``
  410. 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**
  411. .. _class_DisplayServer_constant_FEATURE_VIRTUAL_KEYBOARD:
  412. .. rst-class:: classref-enumeration-constant
  413. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_VIRTUAL_KEYBOARD** = ``6``
  414. Display server supports popping up a virtual keyboard when requested to input text without a physical keyboard. **Android, iOS, Web**
  415. .. _class_DisplayServer_constant_FEATURE_CURSOR_SHAPE:
  416. .. rst-class:: classref-enumeration-constant
  417. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_CURSOR_SHAPE** = ``7``
  418. Display server supports setting the mouse cursor shape to be different from the default. **Windows, macOS, Linux (X11/Wayland), Android, Web**
  419. .. _class_DisplayServer_constant_FEATURE_CUSTOM_CURSOR_SHAPE:
  420. .. rst-class:: classref-enumeration-constant
  421. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_CUSTOM_CURSOR_SHAPE** = ``8``
  422. Display server supports setting the mouse cursor shape to a custom image. **Windows, macOS, Linux (X11/Wayland), Web**
  423. .. _class_DisplayServer_constant_FEATURE_NATIVE_DIALOG:
  424. .. rst-class:: classref-enumeration-constant
  425. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_NATIVE_DIALOG** = ``9``
  426. 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**
  427. .. _class_DisplayServer_constant_FEATURE_IME:
  428. .. rst-class:: classref-enumeration-constant
  429. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_IME** = ``10``
  430. 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)**
  431. .. _class_DisplayServer_constant_FEATURE_WINDOW_TRANSPARENCY:
  432. .. rst-class:: classref-enumeration-constant
  433. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_WINDOW_TRANSPARENCY** = ``11``
  434. Display server supports windows can use per-pixel transparency to make windows behind them partially or fully visible. **Windows, macOS, Linux (X11/Wayland)**
  435. .. _class_DisplayServer_constant_FEATURE_HIDPI:
  436. .. rst-class:: classref-enumeration-constant
  437. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_HIDPI** = ``12``
  438. 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**
  439. .. _class_DisplayServer_constant_FEATURE_ICON:
  440. .. rst-class:: classref-enumeration-constant
  441. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_ICON** = ``13``
  442. Display server supports changing the window icon (usually displayed in the top-left corner). **Windows, macOS, Linux (X11)**
  443. .. _class_DisplayServer_constant_FEATURE_NATIVE_ICON:
  444. .. rst-class:: classref-enumeration-constant
  445. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_NATIVE_ICON** = ``14``
  446. Display server supports changing the window icon (usually displayed in the top-left corner). **Windows, macOS**
  447. .. _class_DisplayServer_constant_FEATURE_ORIENTATION:
  448. .. rst-class:: classref-enumeration-constant
  449. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_ORIENTATION** = ``15``
  450. Display server supports changing the screen orientation. **Android, iOS**
  451. .. _class_DisplayServer_constant_FEATURE_SWAP_BUFFERS:
  452. .. rst-class:: classref-enumeration-constant
  453. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_SWAP_BUFFERS** = ``16``
  454. 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)**
  455. .. _class_DisplayServer_constant_FEATURE_CLIPBOARD_PRIMARY:
  456. .. rst-class:: classref-enumeration-constant
  457. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_CLIPBOARD_PRIMARY** = ``18``
  458. 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)**
  459. .. _class_DisplayServer_constant_FEATURE_TEXT_TO_SPEECH:
  460. .. rst-class:: classref-enumeration-constant
  461. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_TEXT_TO_SPEECH** = ``19``
  462. Display server supports text-to-speech. See ``tts_*`` methods. **Windows, macOS, Linux (X11/Wayland), Android, iOS, Web**
  463. .. _class_DisplayServer_constant_FEATURE_EXTEND_TO_TITLE:
  464. .. rst-class:: classref-enumeration-constant
  465. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_EXTEND_TO_TITLE** = ``20``
  466. 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**
  467. .. _class_DisplayServer_constant_FEATURE_SCREEN_CAPTURE:
  468. .. rst-class:: classref-enumeration-constant
  469. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_SCREEN_CAPTURE** = ``21``
  470. Display server supports reading screen pixels. See :ref:`screen_get_pixel<class_DisplayServer_method_screen_get_pixel>`.
  471. .. _class_DisplayServer_constant_FEATURE_STATUS_INDICATOR:
  472. .. rst-class:: classref-enumeration-constant
  473. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_STATUS_INDICATOR** = ``22``
  474. Display server supports application status indicators.
  475. .. _class_DisplayServer_constant_FEATURE_NATIVE_HELP:
  476. .. rst-class:: classref-enumeration-constant
  477. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_NATIVE_HELP** = ``23``
  478. Display server supports native help system search callbacks. See :ref:`help_set_search_callbacks<class_DisplayServer_method_help_set_search_callbacks>`.
  479. .. _class_DisplayServer_constant_FEATURE_NATIVE_DIALOG_INPUT:
  480. .. rst-class:: classref-enumeration-constant
  481. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_NATIVE_DIALOG_INPUT** = ``24``
  482. 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**
  483. .. _class_DisplayServer_constant_FEATURE_NATIVE_DIALOG_FILE:
  484. .. rst-class:: classref-enumeration-constant
  485. :ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_NATIVE_DIALOG_FILE** = ``25``
  486. Display server supports spawning dialogs for selecting files or directories using the operating system's native look-and-feel. See :ref:`file_dialog_show<class_DisplayServer_method_file_dialog_show>` and :ref:`file_dialog_with_options_show<class_DisplayServer_method_file_dialog_with_options_show>`. **Windows, macOS, Linux (X11/Wayland)**
  487. .. rst-class:: classref-item-separator
  488. ----
  489. .. _enum_DisplayServer_MouseMode:
  490. .. rst-class:: classref-enumeration
  491. enum **MouseMode**:
  492. .. _class_DisplayServer_constant_MOUSE_MODE_VISIBLE:
  493. .. rst-class:: classref-enumeration-constant
  494. :ref:`MouseMode<enum_DisplayServer_MouseMode>` **MOUSE_MODE_VISIBLE** = ``0``
  495. Makes the mouse cursor visible if it is hidden.
  496. .. _class_DisplayServer_constant_MOUSE_MODE_HIDDEN:
  497. .. rst-class:: classref-enumeration-constant
  498. :ref:`MouseMode<enum_DisplayServer_MouseMode>` **MOUSE_MODE_HIDDEN** = ``1``
  499. Makes the mouse cursor hidden if it is visible.
  500. .. _class_DisplayServer_constant_MOUSE_MODE_CAPTURED:
  501. .. rst-class:: classref-enumeration-constant
  502. :ref:`MouseMode<enum_DisplayServer_MouseMode>` **MOUSE_MODE_CAPTURED** = ``2``
  503. Captures the mouse. The mouse will be hidden and its position locked at the center of the window manager's window.
  504. \ **Note:** If you want to process the mouse's movement in this mode, you need to use :ref:`InputEventMouseMotion.relative<class_InputEventMouseMotion_property_relative>`.
  505. .. _class_DisplayServer_constant_MOUSE_MODE_CONFINED:
  506. .. rst-class:: classref-enumeration-constant
  507. :ref:`MouseMode<enum_DisplayServer_MouseMode>` **MOUSE_MODE_CONFINED** = ``3``
  508. Confines the mouse cursor to the game window, and make it visible.
  509. .. _class_DisplayServer_constant_MOUSE_MODE_CONFINED_HIDDEN:
  510. .. rst-class:: classref-enumeration-constant
  511. :ref:`MouseMode<enum_DisplayServer_MouseMode>` **MOUSE_MODE_CONFINED_HIDDEN** = ``4``
  512. Confines the mouse cursor to the game window, and make it hidden.
  513. .. rst-class:: classref-item-separator
  514. ----
  515. .. _enum_DisplayServer_ScreenOrientation:
  516. .. rst-class:: classref-enumeration
  517. enum **ScreenOrientation**:
  518. .. _class_DisplayServer_constant_SCREEN_LANDSCAPE:
  519. .. rst-class:: classref-enumeration-constant
  520. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_LANDSCAPE** = ``0``
  521. Default landscape orientation.
  522. .. _class_DisplayServer_constant_SCREEN_PORTRAIT:
  523. .. rst-class:: classref-enumeration-constant
  524. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_PORTRAIT** = ``1``
  525. Default portrait orientation.
  526. .. _class_DisplayServer_constant_SCREEN_REVERSE_LANDSCAPE:
  527. .. rst-class:: classref-enumeration-constant
  528. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_REVERSE_LANDSCAPE** = ``2``
  529. Reverse landscape orientation (upside down).
  530. .. _class_DisplayServer_constant_SCREEN_REVERSE_PORTRAIT:
  531. .. rst-class:: classref-enumeration-constant
  532. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_REVERSE_PORTRAIT** = ``3``
  533. Reverse portrait orientation (upside down).
  534. .. _class_DisplayServer_constant_SCREEN_SENSOR_LANDSCAPE:
  535. .. rst-class:: classref-enumeration-constant
  536. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_SENSOR_LANDSCAPE** = ``4``
  537. Automatic landscape orientation (default or reverse depending on sensor).
  538. .. _class_DisplayServer_constant_SCREEN_SENSOR_PORTRAIT:
  539. .. rst-class:: classref-enumeration-constant
  540. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_SENSOR_PORTRAIT** = ``5``
  541. Automatic portrait orientation (default or reverse depending on sensor).
  542. .. _class_DisplayServer_constant_SCREEN_SENSOR:
  543. .. rst-class:: classref-enumeration-constant
  544. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **SCREEN_SENSOR** = ``6``
  545. Automatic landscape or portrait orientation (default or reverse depending on sensor).
  546. .. rst-class:: classref-item-separator
  547. ----
  548. .. _enum_DisplayServer_VirtualKeyboardType:
  549. .. rst-class:: classref-enumeration
  550. enum **VirtualKeyboardType**:
  551. .. _class_DisplayServer_constant_KEYBOARD_TYPE_DEFAULT:
  552. .. rst-class:: classref-enumeration-constant
  553. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_DEFAULT** = ``0``
  554. Default text virtual keyboard.
  555. .. _class_DisplayServer_constant_KEYBOARD_TYPE_MULTILINE:
  556. .. rst-class:: classref-enumeration-constant
  557. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_MULTILINE** = ``1``
  558. Multiline virtual keyboard.
  559. .. _class_DisplayServer_constant_KEYBOARD_TYPE_NUMBER:
  560. .. rst-class:: classref-enumeration-constant
  561. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_NUMBER** = ``2``
  562. Virtual number keypad, useful for PIN entry.
  563. .. _class_DisplayServer_constant_KEYBOARD_TYPE_NUMBER_DECIMAL:
  564. .. rst-class:: classref-enumeration-constant
  565. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_NUMBER_DECIMAL** = ``3``
  566. Virtual number keypad, useful for entering fractional numbers.
  567. .. _class_DisplayServer_constant_KEYBOARD_TYPE_PHONE:
  568. .. rst-class:: classref-enumeration-constant
  569. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_PHONE** = ``4``
  570. Virtual phone number keypad.
  571. .. _class_DisplayServer_constant_KEYBOARD_TYPE_EMAIL_ADDRESS:
  572. .. rst-class:: classref-enumeration-constant
  573. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_EMAIL_ADDRESS** = ``5``
  574. Virtual keyboard with additional keys to assist with typing email addresses.
  575. .. _class_DisplayServer_constant_KEYBOARD_TYPE_PASSWORD:
  576. .. rst-class:: classref-enumeration-constant
  577. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_PASSWORD** = ``6``
  578. Virtual keyboard for entering a password. On most platforms, this should disable autocomplete and autocapitalization.
  579. \ **Note:** This is not supported on Web. Instead, this behaves identically to :ref:`KEYBOARD_TYPE_DEFAULT<class_DisplayServer_constant_KEYBOARD_TYPE_DEFAULT>`.
  580. .. _class_DisplayServer_constant_KEYBOARD_TYPE_URL:
  581. .. rst-class:: classref-enumeration-constant
  582. :ref:`VirtualKeyboardType<enum_DisplayServer_VirtualKeyboardType>` **KEYBOARD_TYPE_URL** = ``7``
  583. Virtual keyboard with additional keys to assist with typing URLs.
  584. .. rst-class:: classref-item-separator
  585. ----
  586. .. _enum_DisplayServer_CursorShape:
  587. .. rst-class:: classref-enumeration
  588. enum **CursorShape**:
  589. .. _class_DisplayServer_constant_CURSOR_ARROW:
  590. .. rst-class:: classref-enumeration-constant
  591. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_ARROW** = ``0``
  592. 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>`.
  593. .. _class_DisplayServer_constant_CURSOR_IBEAM:
  594. .. rst-class:: classref-enumeration-constant
  595. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_IBEAM** = ``1``
  596. 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>`.
  597. .. _class_DisplayServer_constant_CURSOR_POINTING_HAND:
  598. .. rst-class:: classref-enumeration-constant
  599. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_POINTING_HAND** = ``2``
  600. 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>`.
  601. .. _class_DisplayServer_constant_CURSOR_CROSS:
  602. .. rst-class:: classref-enumeration-constant
  603. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_CROSS** = ``3``
  604. 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.
  605. .. _class_DisplayServer_constant_CURSOR_WAIT:
  606. .. rst-class:: classref-enumeration-constant
  607. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_WAIT** = ``4``
  608. 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>`.
  609. .. _class_DisplayServer_constant_CURSOR_BUSY:
  610. .. rst-class:: classref-enumeration-constant
  611. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_BUSY** = ``5``
  612. 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>`.
  613. .. _class_DisplayServer_constant_CURSOR_DRAG:
  614. .. rst-class:: classref-enumeration-constant
  615. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_DRAG** = ``6``
  616. Dragging hand cursor. This is displayed during drag-and-drop operations. See also :ref:`CURSOR_CAN_DROP<class_DisplayServer_constant_CURSOR_CAN_DROP>`.
  617. .. _class_DisplayServer_constant_CURSOR_CAN_DROP:
  618. .. rst-class:: classref-enumeration-constant
  619. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_CAN_DROP** = ``7``
  620. "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>`.
  621. .. _class_DisplayServer_constant_CURSOR_FORBIDDEN:
  622. .. rst-class:: classref-enumeration-constant
  623. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_FORBIDDEN** = ``8``
  624. 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.
  625. .. _class_DisplayServer_constant_CURSOR_VSIZE:
  626. .. rst-class:: classref-enumeration-constant
  627. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_VSIZE** = ``9``
  628. 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>`.
  629. .. _class_DisplayServer_constant_CURSOR_HSIZE:
  630. .. rst-class:: classref-enumeration-constant
  631. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_HSIZE** = ``10``
  632. 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>`.
  633. .. _class_DisplayServer_constant_CURSOR_BDIAGSIZE:
  634. .. rst-class:: classref-enumeration-constant
  635. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_BDIAGSIZE** = ``11``
  636. 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.
  637. .. _class_DisplayServer_constant_CURSOR_FDIAGSIZE:
  638. .. rst-class:: classref-enumeration-constant
  639. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_FDIAGSIZE** = ``12``
  640. 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.
  641. .. _class_DisplayServer_constant_CURSOR_MOVE:
  642. .. rst-class:: classref-enumeration-constant
  643. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_MOVE** = ``13``
  644. Move cursor. Intended to be displayed when the hovered :ref:`Control<class_Control>` can be moved using the mouse.
  645. .. _class_DisplayServer_constant_CURSOR_VSPLIT:
  646. .. rst-class:: classref-enumeration-constant
  647. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_VSPLIT** = ``14``
  648. 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>`.
  649. .. _class_DisplayServer_constant_CURSOR_HSPLIT:
  650. .. rst-class:: classref-enumeration-constant
  651. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_HSPLIT** = ``15``
  652. 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>`.
  653. .. _class_DisplayServer_constant_CURSOR_HELP:
  654. .. rst-class:: classref-enumeration-constant
  655. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_HELP** = ``16``
  656. 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.
  657. .. _class_DisplayServer_constant_CURSOR_MAX:
  658. .. rst-class:: classref-enumeration-constant
  659. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **CURSOR_MAX** = ``17``
  660. Represents the size of the :ref:`CursorShape<enum_DisplayServer_CursorShape>` enum.
  661. .. rst-class:: classref-item-separator
  662. ----
  663. .. _enum_DisplayServer_FileDialogMode:
  664. .. rst-class:: classref-enumeration
  665. enum **FileDialogMode**:
  666. .. _class_DisplayServer_constant_FILE_DIALOG_MODE_OPEN_FILE:
  667. .. rst-class:: classref-enumeration-constant
  668. :ref:`FileDialogMode<enum_DisplayServer_FileDialogMode>` **FILE_DIALOG_MODE_OPEN_FILE** = ``0``
  669. The native file dialog allows selecting one, and only one file.
  670. .. _class_DisplayServer_constant_FILE_DIALOG_MODE_OPEN_FILES:
  671. .. rst-class:: classref-enumeration-constant
  672. :ref:`FileDialogMode<enum_DisplayServer_FileDialogMode>` **FILE_DIALOG_MODE_OPEN_FILES** = ``1``
  673. The native file dialog allows selecting multiple files.
  674. .. _class_DisplayServer_constant_FILE_DIALOG_MODE_OPEN_DIR:
  675. .. rst-class:: classref-enumeration-constant
  676. :ref:`FileDialogMode<enum_DisplayServer_FileDialogMode>` **FILE_DIALOG_MODE_OPEN_DIR** = ``2``
  677. The native file dialog only allows selecting a directory, disallowing the selection of any file.
  678. .. _class_DisplayServer_constant_FILE_DIALOG_MODE_OPEN_ANY:
  679. .. rst-class:: classref-enumeration-constant
  680. :ref:`FileDialogMode<enum_DisplayServer_FileDialogMode>` **FILE_DIALOG_MODE_OPEN_ANY** = ``3``
  681. The native file dialog allows selecting one file or directory.
  682. .. _class_DisplayServer_constant_FILE_DIALOG_MODE_SAVE_FILE:
  683. .. rst-class:: classref-enumeration-constant
  684. :ref:`FileDialogMode<enum_DisplayServer_FileDialogMode>` **FILE_DIALOG_MODE_SAVE_FILE** = ``4``
  685. The native file dialog will warn when a file exists.
  686. .. rst-class:: classref-item-separator
  687. ----
  688. .. _enum_DisplayServer_WindowMode:
  689. .. rst-class:: classref-enumeration
  690. enum **WindowMode**:
  691. .. _class_DisplayServer_constant_WINDOW_MODE_WINDOWED:
  692. .. rst-class:: classref-enumeration-constant
  693. :ref:`WindowMode<enum_DisplayServer_WindowMode>` **WINDOW_MODE_WINDOWED** = ``0``
  694. Windowed mode, i.e. :ref:`Window<class_Window>` doesn't occupy the whole screen (unless set to the size of the screen).
  695. .. _class_DisplayServer_constant_WINDOW_MODE_MINIMIZED:
  696. .. rst-class:: classref-enumeration-constant
  697. :ref:`WindowMode<enum_DisplayServer_WindowMode>` **WINDOW_MODE_MINIMIZED** = ``1``
  698. 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.
  699. .. _class_DisplayServer_constant_WINDOW_MODE_MAXIMIZED:
  700. .. rst-class:: classref-enumeration-constant
  701. :ref:`WindowMode<enum_DisplayServer_WindowMode>` **WINDOW_MODE_MAXIMIZED** = ``2``
  702. 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.
  703. .. _class_DisplayServer_constant_WINDOW_MODE_FULLSCREEN:
  704. .. rst-class:: classref-enumeration-constant
  705. :ref:`WindowMode<enum_DisplayServer_WindowMode>` **WINDOW_MODE_FULLSCREEN** = ``3``
  706. Full screen mode with full multi-window support.
  707. Full screen window covers the entire display area of a screen and has no decorations. The display's video mode is not changed.
  708. \ **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.
  709. \ **On macOS:** A new desktop is used to display the running project.
  710. \ **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.
  711. .. _class_DisplayServer_constant_WINDOW_MODE_EXCLUSIVE_FULLSCREEN:
  712. .. rst-class:: classref-enumeration-constant
  713. :ref:`WindowMode<enum_DisplayServer_WindowMode>` **WINDOW_MODE_EXCLUSIVE_FULLSCREEN** = ``4``
  714. 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).
  715. 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.
  716. \ **On Windows:** Depending on video driver, full screen transition might cause screens to go black for a moment.
  717. \ **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.
  718. \ **On Linux (X11):** Exclusive full screen mode bypasses compositor.
  719. \ **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.
  720. .. rst-class:: classref-item-separator
  721. ----
  722. .. _enum_DisplayServer_WindowFlags:
  723. .. rst-class:: classref-enumeration
  724. enum **WindowFlags**:
  725. .. _class_DisplayServer_constant_WINDOW_FLAG_RESIZE_DISABLED:
  726. .. rst-class:: classref-enumeration-constant
  727. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_RESIZE_DISABLED** = ``0``
  728. 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.
  729. .. _class_DisplayServer_constant_WINDOW_FLAG_BORDERLESS:
  730. .. rst-class:: classref-enumeration-constant
  731. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_BORDERLESS** = ``1``
  732. The window do not have native title bar and other decorations. This flag is ignored for full-screen windows.
  733. .. _class_DisplayServer_constant_WINDOW_FLAG_ALWAYS_ON_TOP:
  734. .. rst-class:: classref-enumeration-constant
  735. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_ALWAYS_ON_TOP** = ``2``
  736. The window is floating on top of all other windows. This flag is ignored for full-screen windows.
  737. .. _class_DisplayServer_constant_WINDOW_FLAG_TRANSPARENT:
  738. .. rst-class:: classref-enumeration-constant
  739. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_TRANSPARENT** = ``3``
  740. The window background can be transparent.
  741. \ **Note:** This flag has no effect if :ref:`ProjectSettings.display/window/per_pixel_transparency/allowed<class_ProjectSettings_property_display/window/per_pixel_transparency/allowed>` is set to ``false``.
  742. \ **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.
  743. .. _class_DisplayServer_constant_WINDOW_FLAG_NO_FOCUS:
  744. .. rst-class:: classref-enumeration-constant
  745. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_NO_FOCUS** = ``4``
  746. The window can't be focused. No-focus window will ignore all input, except mouse clicks.
  747. .. _class_DisplayServer_constant_WINDOW_FLAG_POPUP:
  748. .. rst-class:: classref-enumeration-constant
  749. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_POPUP** = ``5``
  750. 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>`).
  751. .. _class_DisplayServer_constant_WINDOW_FLAG_EXTEND_TO_TITLE:
  752. .. rst-class:: classref-enumeration-constant
  753. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_EXTEND_TO_TITLE** = ``6``
  754. 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.
  755. Use :ref:`window_set_window_buttons_offset<class_DisplayServer_method_window_set_window_buttons_offset>` to adjust minimize/maximize/close buttons offset.
  756. 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.
  757. \ **Note:** This flag is implemented only on macOS.
  758. .. _class_DisplayServer_constant_WINDOW_FLAG_MOUSE_PASSTHROUGH:
  759. .. rst-class:: classref-enumeration-constant
  760. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_MOUSE_PASSTHROUGH** = ``7``
  761. All mouse events are passed to the underlying window of the same application.
  762. .. _class_DisplayServer_constant_WINDOW_FLAG_MAX:
  763. .. rst-class:: classref-enumeration-constant
  764. :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` **WINDOW_FLAG_MAX** = ``8``
  765. Max value of the :ref:`WindowFlags<enum_DisplayServer_WindowFlags>`.
  766. .. rst-class:: classref-item-separator
  767. ----
  768. .. _enum_DisplayServer_WindowEvent:
  769. .. rst-class:: classref-enumeration
  770. enum **WindowEvent**:
  771. .. _class_DisplayServer_constant_WINDOW_EVENT_MOUSE_ENTER:
  772. .. rst-class:: classref-enumeration-constant
  773. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_MOUSE_ENTER** = ``0``
  774. Sent when the mouse pointer enters the window.
  775. .. _class_DisplayServer_constant_WINDOW_EVENT_MOUSE_EXIT:
  776. .. rst-class:: classref-enumeration-constant
  777. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_MOUSE_EXIT** = ``1``
  778. Sent when the mouse pointer exits the window.
  779. .. _class_DisplayServer_constant_WINDOW_EVENT_FOCUS_IN:
  780. .. rst-class:: classref-enumeration-constant
  781. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_FOCUS_IN** = ``2``
  782. Sent when the window grabs focus.
  783. .. _class_DisplayServer_constant_WINDOW_EVENT_FOCUS_OUT:
  784. .. rst-class:: classref-enumeration-constant
  785. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_FOCUS_OUT** = ``3``
  786. Sent when the window loses focus.
  787. .. _class_DisplayServer_constant_WINDOW_EVENT_CLOSE_REQUEST:
  788. .. rst-class:: classref-enumeration-constant
  789. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_CLOSE_REQUEST** = ``4``
  790. Sent when the user has attempted to close the window (e.g. close button is pressed).
  791. .. _class_DisplayServer_constant_WINDOW_EVENT_GO_BACK_REQUEST:
  792. .. rst-class:: classref-enumeration-constant
  793. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_GO_BACK_REQUEST** = ``5``
  794. Sent when the device "Back" button is pressed.
  795. \ **Note:** This event is implemented only on Android.
  796. .. _class_DisplayServer_constant_WINDOW_EVENT_DPI_CHANGE:
  797. .. rst-class:: classref-enumeration-constant
  798. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_DPI_CHANGE** = ``6``
  799. Sent when the window is moved to the display with different DPI, or display DPI is changed.
  800. \ **Note:** This flag is implemented only on macOS.
  801. .. _class_DisplayServer_constant_WINDOW_EVENT_TITLEBAR_CHANGE:
  802. .. rst-class:: classref-enumeration-constant
  803. :ref:`WindowEvent<enum_DisplayServer_WindowEvent>` **WINDOW_EVENT_TITLEBAR_CHANGE** = ``7``
  804. 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).
  805. \ **Note:** This flag is implemented only on macOS.
  806. .. rst-class:: classref-item-separator
  807. ----
  808. .. _enum_DisplayServer_VSyncMode:
  809. .. rst-class:: classref-enumeration
  810. enum **VSyncMode**:
  811. .. _class_DisplayServer_constant_VSYNC_DISABLED:
  812. .. rst-class:: classref-enumeration-constant
  813. :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` **VSYNC_DISABLED** = ``0``
  814. 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>`).
  815. .. _class_DisplayServer_constant_VSYNC_ENABLED:
  816. .. rst-class:: classref-enumeration-constant
  817. :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` **VSYNC_ENABLED** = ``1``
  818. 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>`).
  819. .. _class_DisplayServer_constant_VSYNC_ADAPTIVE:
  820. .. rst-class:: classref-enumeration-constant
  821. :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` **VSYNC_ADAPTIVE** = ``2``
  822. 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.
  823. .. _class_DisplayServer_constant_VSYNC_MAILBOX:
  824. .. rst-class:: classref-enumeration-constant
  825. :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` **VSYNC_MAILBOX** = ``3``
  826. 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>`).
  827. 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.
  828. .. rst-class:: classref-item-separator
  829. ----
  830. .. _enum_DisplayServer_HandleType:
  831. .. rst-class:: classref-enumeration
  832. enum **HandleType**:
  833. .. _class_DisplayServer_constant_DISPLAY_HANDLE:
  834. .. rst-class:: classref-enumeration-constant
  835. :ref:`HandleType<enum_DisplayServer_HandleType>` **DISPLAY_HANDLE** = ``0``
  836. Display handle:
  837. - Linux (X11): ``X11::Display*`` for the display.
  838. - Android: ``EGLDisplay`` for the display.
  839. .. _class_DisplayServer_constant_WINDOW_HANDLE:
  840. .. rst-class:: classref-enumeration-constant
  841. :ref:`HandleType<enum_DisplayServer_HandleType>` **WINDOW_HANDLE** = ``1``
  842. Window handle:
  843. - Windows: ``HWND`` for the window.
  844. - Linux (X11): ``X11::Window*`` for the window.
  845. - macOS: ``NSWindow*`` for the window.
  846. - iOS: ``UIViewController*`` for the view controller.
  847. - Android: ``jObject`` for the activity.
  848. .. _class_DisplayServer_constant_WINDOW_VIEW:
  849. .. rst-class:: classref-enumeration-constant
  850. :ref:`HandleType<enum_DisplayServer_HandleType>` **WINDOW_VIEW** = ``2``
  851. Window view:
  852. - Windows: ``HDC`` for the window (only with the GL Compatibility renderer).
  853. - macOS: ``NSView*`` for the window main view.
  854. - iOS: ``UIView*`` for the window main view.
  855. .. _class_DisplayServer_constant_OPENGL_CONTEXT:
  856. .. rst-class:: classref-enumeration-constant
  857. :ref:`HandleType<enum_DisplayServer_HandleType>` **OPENGL_CONTEXT** = ``3``
  858. OpenGL context (only with the GL Compatibility renderer):
  859. - Windows: ``HGLRC`` for the window (native GL), or ``EGLContext`` for the window (ANGLE).
  860. - Linux (X11): ``GLXContext*`` for the window.
  861. - macOS: ``NSOpenGLContext*`` for the window (native GL), or ``EGLContext`` for the window (ANGLE).
  862. - Android: ``EGLContext`` for the window.
  863. .. rst-class:: classref-item-separator
  864. ----
  865. .. _enum_DisplayServer_TTSUtteranceEvent:
  866. .. rst-class:: classref-enumeration
  867. enum **TTSUtteranceEvent**:
  868. .. _class_DisplayServer_constant_TTS_UTTERANCE_STARTED:
  869. .. rst-class:: classref-enumeration-constant
  870. :ref:`TTSUtteranceEvent<enum_DisplayServer_TTSUtteranceEvent>` **TTS_UTTERANCE_STARTED** = ``0``
  871. Utterance has begun to be spoken.
  872. .. _class_DisplayServer_constant_TTS_UTTERANCE_ENDED:
  873. .. rst-class:: classref-enumeration-constant
  874. :ref:`TTSUtteranceEvent<enum_DisplayServer_TTSUtteranceEvent>` **TTS_UTTERANCE_ENDED** = ``1``
  875. Utterance was successfully finished.
  876. .. _class_DisplayServer_constant_TTS_UTTERANCE_CANCELED:
  877. .. rst-class:: classref-enumeration-constant
  878. :ref:`TTSUtteranceEvent<enum_DisplayServer_TTSUtteranceEvent>` **TTS_UTTERANCE_CANCELED** = ``2``
  879. Utterance was canceled, or TTS service was unable to process it.
  880. .. _class_DisplayServer_constant_TTS_UTTERANCE_BOUNDARY:
  881. .. rst-class:: classref-enumeration-constant
  882. :ref:`TTSUtteranceEvent<enum_DisplayServer_TTSUtteranceEvent>` **TTS_UTTERANCE_BOUNDARY** = ``3``
  883. Utterance reached a word or sentence boundary.
  884. .. rst-class:: classref-section-separator
  885. ----
  886. .. rst-class:: classref-descriptions-group
  887. Constants
  888. ---------
  889. .. _class_DisplayServer_constant_SCREEN_WITH_MOUSE_FOCUS:
  890. .. rst-class:: classref-constant
  891. **SCREEN_WITH_MOUSE_FOCUS** = ``-4``
  892. Represents the screen containing the mouse pointer.
  893. \ **Note:** On Linux (Wayland), this constant always represents the screen at index ``0``.
  894. .. _class_DisplayServer_constant_SCREEN_WITH_KEYBOARD_FOCUS:
  895. .. rst-class:: classref-constant
  896. **SCREEN_WITH_KEYBOARD_FOCUS** = ``-3``
  897. Represents the screen containing the window with the keyboard focus.
  898. \ **Note:** On Linux (Wayland), this constant always represents the screen at index ``0``.
  899. .. _class_DisplayServer_constant_SCREEN_PRIMARY:
  900. .. rst-class:: classref-constant
  901. **SCREEN_PRIMARY** = ``-2``
  902. Represents the primary screen.
  903. \ **Note:** On Linux (Wayland), this constant always represents the screen at index ``0``.
  904. .. _class_DisplayServer_constant_SCREEN_OF_MAIN_WINDOW:
  905. .. rst-class:: classref-constant
  906. **SCREEN_OF_MAIN_WINDOW** = ``-1``
  907. Represents the screen where the main window is located. This is usually the default value in functions that allow specifying one of several screens.
  908. \ **Note:** On Linux (Wayland), this constant always represents the screen at index ``0``.
  909. .. _class_DisplayServer_constant_MAIN_WINDOW_ID:
  910. .. rst-class:: classref-constant
  911. **MAIN_WINDOW_ID** = ``0``
  912. The ID of the main window spawned by the engine, which can be passed to methods expecting a ``window_id``.
  913. .. _class_DisplayServer_constant_INVALID_WINDOW_ID:
  914. .. rst-class:: classref-constant
  915. **INVALID_WINDOW_ID** = ``-1``
  916. The ID that refers to a nonexistent window. This is returned by some **DisplayServer** methods if no window matches the requested result.
  917. .. _class_DisplayServer_constant_INVALID_INDICATOR_ID:
  918. .. rst-class:: classref-constant
  919. **INVALID_INDICATOR_ID** = ``-1``
  920. The ID that refers to a nonexistent application status indicator.
  921. .. rst-class:: classref-section-separator
  922. ----
  923. .. rst-class:: classref-descriptions-group
  924. Method Descriptions
  925. -------------------
  926. .. _class_DisplayServer_method_clipboard_get:
  927. .. rst-class:: classref-method
  928. :ref:`String<class_String>` **clipboard_get**\ (\ ) |const|
  929. Returns the user's clipboard as a string if possible.
  930. .. rst-class:: classref-item-separator
  931. ----
  932. .. _class_DisplayServer_method_clipboard_get_image:
  933. .. rst-class:: classref-method
  934. :ref:`Image<class_Image>` **clipboard_get_image**\ (\ ) |const|
  935. Returns the user's clipboard as an image if possible.
  936. .. rst-class:: classref-item-separator
  937. ----
  938. .. _class_DisplayServer_method_clipboard_get_primary:
  939. .. rst-class:: classref-method
  940. :ref:`String<class_String>` **clipboard_get_primary**\ (\ ) |const|
  941. 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.
  942. \ **Note:** This method is only implemented on Linux (X11/Wayland).
  943. .. rst-class:: classref-item-separator
  944. ----
  945. .. _class_DisplayServer_method_clipboard_has:
  946. .. rst-class:: classref-method
  947. :ref:`bool<class_bool>` **clipboard_has**\ (\ ) |const|
  948. Returns ``true`` if there is a text content on the user's clipboard.
  949. .. rst-class:: classref-item-separator
  950. ----
  951. .. _class_DisplayServer_method_clipboard_has_image:
  952. .. rst-class:: classref-method
  953. :ref:`bool<class_bool>` **clipboard_has_image**\ (\ ) |const|
  954. Returns ``true`` if there is an image content on the user's clipboard.
  955. .. rst-class:: classref-item-separator
  956. ----
  957. .. _class_DisplayServer_method_clipboard_set:
  958. .. rst-class:: classref-method
  959. |void| **clipboard_set**\ (\ clipboard\: :ref:`String<class_String>`\ )
  960. Sets the user's clipboard content to the given string.
  961. .. rst-class:: classref-item-separator
  962. ----
  963. .. _class_DisplayServer_method_clipboard_set_primary:
  964. .. rst-class:: classref-method
  965. |void| **clipboard_set_primary**\ (\ clipboard_primary\: :ref:`String<class_String>`\ )
  966. 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.
  967. \ **Note:** This method is only implemented on Linux (X11/Wayland).
  968. .. rst-class:: classref-item-separator
  969. ----
  970. .. _class_DisplayServer_method_create_status_indicator:
  971. .. rst-class:: classref-method
  972. :ref:`int<class_int>` **create_status_indicator**\ (\ icon\: :ref:`Image<class_Image>`, tooltip\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>`\ )
  973. Creates a new application status indicator with the specified icon, tooltip, and activation callback.
  974. .. rst-class:: classref-item-separator
  975. ----
  976. .. _class_DisplayServer_method_cursor_get_shape:
  977. .. rst-class:: classref-method
  978. :ref:`CursorShape<enum_DisplayServer_CursorShape>` **cursor_get_shape**\ (\ ) |const|
  979. Returns the default mouse cursor shape set by :ref:`cursor_set_shape<class_DisplayServer_method_cursor_set_shape>`.
  980. .. rst-class:: classref-item-separator
  981. ----
  982. .. _class_DisplayServer_method_cursor_set_custom_image:
  983. .. rst-class:: classref-method
  984. |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)\ )
  985. 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.
  986. \ ``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>`.
  987. .. rst-class:: classref-item-separator
  988. ----
  989. .. _class_DisplayServer_method_cursor_set_shape:
  990. .. rst-class:: classref-method
  991. |void| **cursor_set_shape**\ (\ shape\: :ref:`CursorShape<enum_DisplayServer_CursorShape>`\ )
  992. 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>`.
  993. .. rst-class:: classref-item-separator
  994. ----
  995. .. _class_DisplayServer_method_delete_status_indicator:
  996. .. rst-class:: classref-method
  997. |void| **delete_status_indicator**\ (\ id\: :ref:`int<class_int>`\ )
  998. Removes the application status indicator.
  999. .. rst-class:: classref-item-separator
  1000. ----
  1001. .. _class_DisplayServer_method_dialog_input_text:
  1002. .. rst-class:: classref-method
  1003. :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>`\ )
  1004. 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.
  1005. \ **Note:** This method is implemented if the display server has the :ref:`FEATURE_NATIVE_DIALOG_INPUT<class_DisplayServer_constant_FEATURE_NATIVE_DIALOG_INPUT>` feature. Supported platforms include macOS and Windows.
  1006. .. rst-class:: classref-item-separator
  1007. ----
  1008. .. _class_DisplayServer_method_dialog_show:
  1009. .. rst-class:: classref-method
  1010. :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>`\ )
  1011. 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.
  1012. \ **Note:** This method is implemented if the display server has the :ref:`FEATURE_NATIVE_DIALOG<class_DisplayServer_constant_FEATURE_NATIVE_DIALOG>` feature. Supported platforms include macOS and Windows.
  1013. .. rst-class:: classref-item-separator
  1014. ----
  1015. .. _class_DisplayServer_method_enable_for_stealing_focus:
  1016. .. rst-class:: classref-method
  1017. |void| **enable_for_stealing_focus**\ (\ process_id\: :ref:`int<class_int>`\ )
  1018. 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.
  1019. \ **Note:** This method is implemented only on Windows.
  1020. .. rst-class:: classref-item-separator
  1021. ----
  1022. .. _class_DisplayServer_method_file_dialog_show:
  1023. .. rst-class:: classref-method
  1024. :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>`\ )
  1025. Displays OS native dialog for selecting files or directories in the file system.
  1026. Each filter string in the ``filters`` array should be formatted like this: ``*.txt,*.doc;Text Files``. The description text of the filter is optional and can be omitted. See also :ref:`FileDialog.filters<class_FileDialog_property_filters>`.
  1027. Callbacks have the following arguments: ``status: bool, selected_paths: PackedStringArray, selected_filter_index: int``.
  1028. \ **Note:** This method is implemented if the display server has the :ref:`FEATURE_NATIVE_DIALOG_FILE<class_DisplayServer_constant_FEATURE_NATIVE_DIALOG_FILE>` feature. Supported platforms include Linux (X11/Wayland), Windows, and macOS.
  1029. \ **Note:** ``current_directory`` might be ignored.
  1030. \ **Note:** On Linux, ``show_hidden`` is ignored.
  1031. \ **Note:** On macOS, native file dialogs have no title.
  1032. \ **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.
  1033. .. rst-class:: classref-item-separator
  1034. ----
  1035. .. _class_DisplayServer_method_file_dialog_with_options_show:
  1036. .. rst-class:: classref-method
  1037. :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>`\ )
  1038. Displays OS native dialog for selecting files or directories in the file system with additional user selectable options.
  1039. Each filter string in the ``filters`` array should be formatted like this: ``*.txt,*.doc;Text Files``. The description text of the filter is optional and can be omitted. See also :ref:`FileDialog.filters<class_FileDialog_property_filters>`.
  1040. \ ``options`` is array of :ref:`Dictionary<class_Dictionary>`\ s with the following keys:
  1041. - ``"name"`` - option's name :ref:`String<class_String>`.
  1042. - ``"values"`` - :ref:`PackedStringArray<class_PackedStringArray>` of values. If empty, boolean option (check box) is used.
  1043. - ``"default"`` - default selected option index (:ref:`int<class_int>`) or default boolean value (:ref:`bool<class_bool>`).
  1044. Callbacks have the following arguments: ``status: bool, selected_paths: PackedStringArray, selected_filter_index: int, selected_option: Dictionary``.
  1045. \ **Note:** This method is implemented if the display server has the :ref:`FEATURE_NATIVE_DIALOG_FILE<class_DisplayServer_constant_FEATURE_NATIVE_DIALOG_FILE>` feature. Supported platforms include Linux (X11/Wayland), Windows, and macOS.
  1046. \ **Note:** ``current_directory`` might be ignored.
  1047. \ **Note:** On Linux (X11), ``show_hidden`` is ignored.
  1048. \ **Note:** On macOS, native file dialogs have no title.
  1049. \ **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.
  1050. .. rst-class:: classref-item-separator
  1051. ----
  1052. .. _class_DisplayServer_method_force_process_and_drop_events:
  1053. .. rst-class:: classref-method
  1054. |void| **force_process_and_drop_events**\ (\ )
  1055. Forces window manager processing while ignoring all :ref:`InputEvent<class_InputEvent>`\ s. See also :ref:`process_events<class_DisplayServer_method_process_events>`.
  1056. \ **Note:** This method is implemented on Windows and macOS.
  1057. .. rst-class:: classref-item-separator
  1058. ----
  1059. .. _class_DisplayServer_method_get_accent_color:
  1060. .. rst-class:: classref-method
  1061. :ref:`Color<class_Color>` **get_accent_color**\ (\ ) |const|
  1062. Returns OS theme accent color. Returns ``Color(0, 0, 0, 0)``, if accent color is unknown.
  1063. \ **Note:** This method is implemented on macOS and Windows.
  1064. .. rst-class:: classref-item-separator
  1065. ----
  1066. .. _class_DisplayServer_method_get_base_color:
  1067. .. rst-class:: classref-method
  1068. :ref:`Color<class_Color>` **get_base_color**\ (\ ) |const|
  1069. Returns the OS theme base color (default control background). Returns ``Color(0, 0, 0, 0)`` if the base color is unknown.
  1070. \ **Note:** This method is implemented on macOS and Windows.
  1071. .. rst-class:: classref-item-separator
  1072. ----
  1073. .. _class_DisplayServer_method_get_display_cutouts:
  1074. .. rst-class:: classref-method
  1075. :ref:`Array<class_Array>`\[:ref:`Rect2<class_Rect2>`\] **get_display_cutouts**\ (\ ) |const|
  1076. 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>`.
  1077. \ **Note:** Currently only implemented on Android. Other platforms will return an empty array even if they do have display cutouts or notches.
  1078. .. rst-class:: classref-item-separator
  1079. ----
  1080. .. _class_DisplayServer_method_get_display_safe_area:
  1081. .. rst-class:: classref-method
  1082. :ref:`Rect2i<class_Rect2i>` **get_display_safe_area**\ (\ ) |const|
  1083. 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>`.
  1084. .. rst-class:: classref-item-separator
  1085. ----
  1086. .. _class_DisplayServer_method_get_keyboard_focus_screen:
  1087. .. rst-class:: classref-method
  1088. :ref:`int<class_int>` **get_keyboard_focus_screen**\ (\ ) |const|
  1089. Returns the index of the screen containing the window with the keyboard focus, or the primary screen if there's no focused window.
  1090. .. rst-class:: classref-item-separator
  1091. ----
  1092. .. _class_DisplayServer_method_get_name:
  1093. .. rst-class:: classref-method
  1094. :ref:`String<class_String>` **get_name**\ (\ ) |const|
  1095. 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).
  1096. 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>`).
  1097. .. rst-class:: classref-item-separator
  1098. ----
  1099. .. _class_DisplayServer_method_get_primary_screen:
  1100. .. rst-class:: classref-method
  1101. :ref:`int<class_int>` **get_primary_screen**\ (\ ) |const|
  1102. Returns index of the primary screen.
  1103. .. rst-class:: classref-item-separator
  1104. ----
  1105. .. _class_DisplayServer_method_get_screen_count:
  1106. .. rst-class:: classref-method
  1107. :ref:`int<class_int>` **get_screen_count**\ (\ ) |const|
  1108. Returns the number of displays available.
  1109. .. rst-class:: classref-item-separator
  1110. ----
  1111. .. _class_DisplayServer_method_get_screen_from_rect:
  1112. .. rst-class:: classref-method
  1113. :ref:`int<class_int>` **get_screen_from_rect**\ (\ rect\: :ref:`Rect2<class_Rect2>`\ ) |const|
  1114. Returns index of the screen which contains specified rectangle.
  1115. .. rst-class:: classref-item-separator
  1116. ----
  1117. .. _class_DisplayServer_method_get_swap_cancel_ok:
  1118. .. rst-class:: classref-method
  1119. :ref:`bool<class_bool>` **get_swap_cancel_ok**\ (\ )
  1120. 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>`.
  1121. \ **Note:** This doesn't affect native dialogs such as the ones spawned by :ref:`dialog_show<class_DisplayServer_method_dialog_show>`.
  1122. .. rst-class:: classref-item-separator
  1123. ----
  1124. .. _class_DisplayServer_method_get_window_at_screen_position:
  1125. .. rst-class:: classref-method
  1126. :ref:`int<class_int>` **get_window_at_screen_position**\ (\ position\: :ref:`Vector2i<class_Vector2i>`\ ) |const|
  1127. 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:
  1128. .. code:: text
  1129. * (0, 0) +-------+
  1130. | |
  1131. +-------------+ | |
  1132. | | | |
  1133. | | | |
  1134. +-------------+ +-------+
  1135. .. rst-class:: classref-item-separator
  1136. ----
  1137. .. _class_DisplayServer_method_get_window_list:
  1138. .. rst-class:: classref-method
  1139. :ref:`PackedInt32Array<class_PackedInt32Array>` **get_window_list**\ (\ ) |const|
  1140. Returns the list of Godot window IDs belonging to this process.
  1141. \ **Note:** Native dialogs are not included in this list.
  1142. .. rst-class:: classref-item-separator
  1143. ----
  1144. .. _class_DisplayServer_method_global_menu_add_check_item:
  1145. .. rst-class:: classref-method
  1146. :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\ )
  1147. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1148. Adds a new checkable item with text ``label`` to the global menu with ID ``menu_root``.
  1149. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1150. 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`).
  1151. \ **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``.
  1152. \ **Note:** This method is implemented only on macOS.
  1153. \ **Supported system menu IDs:**\
  1154. .. code:: text
  1155. "_main" - Main menu (macOS).
  1156. "_dock" - Dock popup menu (macOS).
  1157. "_apple" - Apple menu (macOS, custom items added before "Services").
  1158. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1159. "_help" - Help menu (macOS).
  1160. .. rst-class:: classref-item-separator
  1161. ----
  1162. .. _class_DisplayServer_method_global_menu_add_icon_check_item:
  1163. .. rst-class:: classref-method
  1164. :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\ )
  1165. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1166. Adds a new checkable item with text ``label`` and icon ``icon`` to the global menu with ID ``menu_root``.
  1167. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1168. 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`).
  1169. \ **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``.
  1170. \ **Note:** This method is implemented only on macOS.
  1171. \ **Supported system menu IDs:**\
  1172. .. code:: text
  1173. "_main" - Main menu (macOS).
  1174. "_dock" - Dock popup menu (macOS).
  1175. "_apple" - Apple menu (macOS, custom items added before "Services").
  1176. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1177. "_help" - Help menu (macOS).
  1178. .. rst-class:: classref-item-separator
  1179. ----
  1180. .. _class_DisplayServer_method_global_menu_add_icon_item:
  1181. .. rst-class:: classref-method
  1182. :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\ )
  1183. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1184. Adds a new item with text ``label`` and icon ``icon`` to the global menu with ID ``menu_root``.
  1185. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1186. 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`).
  1187. \ **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``.
  1188. \ **Note:** This method is implemented only on macOS.
  1189. \ **Supported system menu IDs:**\
  1190. .. code:: text
  1191. "_main" - Main menu (macOS).
  1192. "_dock" - Dock popup menu (macOS).
  1193. "_apple" - Apple menu (macOS, custom items added before "Services").
  1194. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1195. "_help" - Help menu (macOS).
  1196. .. rst-class:: classref-item-separator
  1197. ----
  1198. .. _class_DisplayServer_method_global_menu_add_icon_radio_check_item:
  1199. .. rst-class:: classref-method
  1200. :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\ )
  1201. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1202. Adds a new radio-checkable item with text ``label`` and icon ``icon`` to the global menu with ID ``menu_root``.
  1203. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1204. 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`).
  1205. \ **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.
  1206. \ **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``.
  1207. \ **Note:** This method is implemented only on macOS.
  1208. \ **Supported system menu IDs:**\
  1209. .. code:: text
  1210. "_main" - Main menu (macOS).
  1211. "_dock" - Dock popup menu (macOS).
  1212. "_apple" - Apple menu (macOS, custom items added before "Services").
  1213. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1214. "_help" - Help menu (macOS).
  1215. .. rst-class:: classref-item-separator
  1216. ----
  1217. .. _class_DisplayServer_method_global_menu_add_item:
  1218. .. rst-class:: classref-method
  1219. :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\ )
  1220. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1221. Adds a new item with text ``label`` to the global menu with ID ``menu_root``.
  1222. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1223. 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`).
  1224. \ **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``.
  1225. \ **Note:** This method is implemented only on macOS.
  1226. \ **Supported system menu IDs:**\
  1227. .. code:: text
  1228. "_main" - Main menu (macOS).
  1229. "_dock" - Dock popup menu (macOS).
  1230. "_apple" - Apple menu (macOS, custom items added before "Services").
  1231. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1232. "_help" - Help menu (macOS).
  1233. .. rst-class:: classref-item-separator
  1234. ----
  1235. .. _class_DisplayServer_method_global_menu_add_multistate_item:
  1236. .. rst-class:: classref-method
  1237. :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\ )
  1238. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1239. Adds a new item with text ``label`` to the global menu with ID ``menu_root``.
  1240. 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``.
  1241. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1242. 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`).
  1243. \ **Note:** By default, there's no indication of the current item state, it should be changed manually.
  1244. \ **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``.
  1245. \ **Note:** This method is implemented only on macOS.
  1246. \ **Supported system menu IDs:**\
  1247. .. code:: text
  1248. "_main" - Main menu (macOS).
  1249. "_dock" - Dock popup menu (macOS).
  1250. "_apple" - Apple menu (macOS, custom items added before "Services").
  1251. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1252. "_help" - Help menu (macOS).
  1253. .. rst-class:: classref-item-separator
  1254. ----
  1255. .. _class_DisplayServer_method_global_menu_add_radio_check_item:
  1256. .. rst-class:: classref-method
  1257. :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\ )
  1258. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1259. Adds a new radio-checkable item with text ``label`` to the global menu with ID ``menu_root``.
  1260. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1261. 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`).
  1262. \ **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.
  1263. \ **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``.
  1264. \ **Note:** This method is implemented only on macOS.
  1265. \ **Supported system menu IDs:**\
  1266. .. code:: text
  1267. "_main" - Main menu (macOS).
  1268. "_dock" - Dock popup menu (macOS).
  1269. "_apple" - Apple menu (macOS, custom items added before "Services").
  1270. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1271. "_help" - Help menu (macOS).
  1272. .. rst-class:: classref-item-separator
  1273. ----
  1274. .. _class_DisplayServer_method_global_menu_add_separator:
  1275. .. rst-class:: classref-method
  1276. :ref:`int<class_int>` **global_menu_add_separator**\ (\ menu_root\: :ref:`String<class_String>`, index\: :ref:`int<class_int>` = -1\ )
  1277. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1278. Adds a separator between items to the global menu with ID ``menu_root``. Separators also occupy an index.
  1279. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1280. \ **Note:** This method is implemented only on macOS.
  1281. \ **Supported system menu IDs:**\
  1282. .. code:: text
  1283. "_main" - Main menu (macOS).
  1284. "_dock" - Dock popup menu (macOS).
  1285. "_apple" - Apple menu (macOS, custom items added before "Services").
  1286. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1287. "_help" - Help menu (macOS).
  1288. .. rst-class:: classref-item-separator
  1289. ----
  1290. .. _class_DisplayServer_method_global_menu_add_submenu_item:
  1291. .. rst-class:: classref-method
  1292. :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\ )
  1293. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1294. 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.
  1295. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value.
  1296. \ **Note:** This method is implemented only on macOS.
  1297. \ **Supported system menu IDs:**\
  1298. .. code:: text
  1299. "_main" - Main menu (macOS).
  1300. "_dock" - Dock popup menu (macOS).
  1301. "_apple" - Apple menu (macOS, custom items added before "Services").
  1302. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1303. "_help" - Help menu (macOS).
  1304. .. rst-class:: classref-item-separator
  1305. ----
  1306. .. _class_DisplayServer_method_global_menu_clear:
  1307. .. rst-class:: classref-method
  1308. |void| **global_menu_clear**\ (\ menu_root\: :ref:`String<class_String>`\ )
  1309. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1310. Removes all items from the global menu with ID ``menu_root``.
  1311. \ **Note:** This method is implemented only on macOS.
  1312. \ **Supported system menu IDs:**\
  1313. .. code:: text
  1314. "_main" - Main menu (macOS).
  1315. "_dock" - Dock popup menu (macOS).
  1316. "_apple" - Apple menu (macOS, custom items added before "Services").
  1317. "_window" - Window menu (macOS, custom items added after "Bring All to Front").
  1318. "_help" - Help menu (macOS).
  1319. .. rst-class:: classref-item-separator
  1320. ----
  1321. .. _class_DisplayServer_method_global_menu_get_item_accelerator:
  1322. .. rst-class:: classref-method
  1323. :ref:`Key<enum_@GlobalScope_Key>` **global_menu_get_item_accelerator**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const|
  1324. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1325. 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.
  1326. \ **Note:** This method is implemented only on macOS.
  1327. .. rst-class:: classref-item-separator
  1328. ----
  1329. .. _class_DisplayServer_method_global_menu_get_item_callback:
  1330. .. rst-class:: classref-method
  1331. :ref:`Callable<class_Callable>` **global_menu_get_item_callback**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const|
  1332. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1333. Returns the callback of the item at index ``idx``.
  1334. \ **Note:** This method is implemented only on macOS.
  1335. .. rst-class:: classref-item-separator
  1336. ----
  1337. .. _class_DisplayServer_method_global_menu_get_item_count:
  1338. .. rst-class:: classref-method
  1339. :ref:`int<class_int>` **global_menu_get_item_count**\ (\ menu_root\: :ref:`String<class_String>`\ ) |const|
  1340. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1341. Returns number of items in the global menu with ID ``menu_root``.
  1342. \ **Note:** This method is implemented only on macOS.
  1343. .. rst-class:: classref-item-separator
  1344. ----
  1345. .. _class_DisplayServer_method_global_menu_get_item_icon:
  1346. .. rst-class:: classref-method
  1347. :ref:`Texture2D<class_Texture2D>` **global_menu_get_item_icon**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const|
  1348. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1349. Returns the icon of the item at index ``idx``.
  1350. \ **Note:** This method is implemented only on macOS.
  1351. .. rst-class:: classref-item-separator
  1352. ----
  1353. .. _class_DisplayServer_method_global_menu_get_item_indentation_level:
  1354. .. rst-class:: classref-method
  1355. :ref:`int<class_int>` **global_menu_get_item_indentation_level**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const|
  1356. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1357. Returns the horizontal offset of the item at the given ``idx``.
  1358. \ **Note:** This method is implemented only on macOS.
  1359. .. rst-class:: classref-item-separator
  1360. ----
  1361. .. _class_DisplayServer_method_global_menu_get_item_index_from_tag:
  1362. .. rst-class:: classref-method
  1363. :ref:`int<class_int>` **global_menu_get_item_index_from_tag**\ (\ menu_root\: :ref:`String<class_String>`, tag\: :ref:`Variant<class_Variant>`\ ) |const|
  1364. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1365. 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.
  1366. \ **Note:** This method is implemented only on macOS.
  1367. .. rst-class:: classref-item-separator
  1368. ----
  1369. .. _class_DisplayServer_method_global_menu_get_item_index_from_text:
  1370. .. rst-class:: classref-method
  1371. :ref:`int<class_int>` **global_menu_get_item_index_from_text**\ (\ menu_root\: :ref:`String<class_String>`, text\: :ref:`String<class_String>`\ ) |const|
  1372. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1373. 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.
  1374. \ **Note:** This method is implemented only on macOS.
  1375. .. rst-class:: classref-item-separator
  1376. ----
  1377. .. _class_DisplayServer_method_global_menu_get_item_key_callback:
  1378. .. rst-class:: classref-method
  1379. :ref:`Callable<class_Callable>` **global_menu_get_item_key_callback**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const|
  1380. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1381. Returns the callback of the item accelerator at index ``idx``.
  1382. \ **Note:** This method is implemented only on macOS.
  1383. .. rst-class:: classref-item-separator
  1384. ----
  1385. .. _class_DisplayServer_method_global_menu_get_item_max_states:
  1386. .. rst-class:: classref-method
  1387. :ref:`int<class_int>` **global_menu_get_item_max_states**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const|
  1388. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1389. 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.
  1390. \ **Note:** This method is implemented only on macOS.
  1391. .. rst-class:: classref-item-separator
  1392. ----
  1393. .. _class_DisplayServer_method_global_menu_get_item_state:
  1394. .. rst-class:: classref-method
  1395. :ref:`int<class_int>` **global_menu_get_item_state**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const|
  1396. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1397. Returns the state of a multistate item. See :ref:`global_menu_add_multistate_item<class_DisplayServer_method_global_menu_add_multistate_item>` for details.
  1398. \ **Note:** This method is implemented only on macOS.
  1399. .. rst-class:: classref-item-separator
  1400. ----
  1401. .. _class_DisplayServer_method_global_menu_get_item_submenu:
  1402. .. rst-class:: classref-method
  1403. :ref:`String<class_String>` **global_menu_get_item_submenu**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const|
  1404. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1405. 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.
  1406. \ **Note:** This method is implemented only on macOS.
  1407. .. rst-class:: classref-item-separator
  1408. ----
  1409. .. _class_DisplayServer_method_global_menu_get_item_tag:
  1410. .. rst-class:: classref-method
  1411. :ref:`Variant<class_Variant>` **global_menu_get_item_tag**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const|
  1412. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1413. 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.
  1414. \ **Note:** This method is implemented only on macOS.
  1415. .. rst-class:: classref-item-separator
  1416. ----
  1417. .. _class_DisplayServer_method_global_menu_get_item_text:
  1418. .. rst-class:: classref-method
  1419. :ref:`String<class_String>` **global_menu_get_item_text**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const|
  1420. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1421. Returns the text of the item at index ``idx``.
  1422. \ **Note:** This method is implemented only on macOS.
  1423. .. rst-class:: classref-item-separator
  1424. ----
  1425. .. _class_DisplayServer_method_global_menu_get_item_tooltip:
  1426. .. rst-class:: classref-method
  1427. :ref:`String<class_String>` **global_menu_get_item_tooltip**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const|
  1428. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1429. Returns the tooltip associated with the specified index ``idx``.
  1430. \ **Note:** This method is implemented only on macOS.
  1431. .. rst-class:: classref-item-separator
  1432. ----
  1433. .. _class_DisplayServer_method_global_menu_get_system_menu_roots:
  1434. .. rst-class:: classref-method
  1435. :ref:`Dictionary<class_Dictionary>` **global_menu_get_system_menu_roots**\ (\ ) |const|
  1436. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1437. Returns Dictionary of supported system menu IDs and names.
  1438. \ **Note:** This method is implemented only on macOS.
  1439. .. rst-class:: classref-item-separator
  1440. ----
  1441. .. _class_DisplayServer_method_global_menu_is_item_checkable:
  1442. .. rst-class:: classref-method
  1443. :ref:`bool<class_bool>` **global_menu_is_item_checkable**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const|
  1444. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1445. Returns ``true`` if the item at index ``idx`` is checkable in some way, i.e. if it has a checkbox or radio button.
  1446. \ **Note:** This method is implemented only on macOS.
  1447. .. rst-class:: classref-item-separator
  1448. ----
  1449. .. _class_DisplayServer_method_global_menu_is_item_checked:
  1450. .. rst-class:: classref-method
  1451. :ref:`bool<class_bool>` **global_menu_is_item_checked**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const|
  1452. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1453. Returns ``true`` if the item at index ``idx`` is checked.
  1454. \ **Note:** This method is implemented only on macOS.
  1455. .. rst-class:: classref-item-separator
  1456. ----
  1457. .. _class_DisplayServer_method_global_menu_is_item_disabled:
  1458. .. rst-class:: classref-method
  1459. :ref:`bool<class_bool>` **global_menu_is_item_disabled**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const|
  1460. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1461. Returns ``true`` if the item at index ``idx`` is disabled. When it is disabled it can't be selected, or its action invoked.
  1462. See :ref:`global_menu_set_item_disabled<class_DisplayServer_method_global_menu_set_item_disabled>` for more info on how to disable an item.
  1463. \ **Note:** This method is implemented only on macOS.
  1464. .. rst-class:: classref-item-separator
  1465. ----
  1466. .. _class_DisplayServer_method_global_menu_is_item_hidden:
  1467. .. rst-class:: classref-method
  1468. :ref:`bool<class_bool>` **global_menu_is_item_hidden**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const|
  1469. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1470. Returns ``true`` if the item at index ``idx`` is hidden.
  1471. See :ref:`global_menu_set_item_hidden<class_DisplayServer_method_global_menu_set_item_hidden>` for more info on how to hide an item.
  1472. \ **Note:** This method is implemented only on macOS.
  1473. .. rst-class:: classref-item-separator
  1474. ----
  1475. .. _class_DisplayServer_method_global_menu_is_item_radio_checkable:
  1476. .. rst-class:: classref-method
  1477. :ref:`bool<class_bool>` **global_menu_is_item_radio_checkable**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ ) |const|
  1478. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1479. Returns ``true`` if the item at index ``idx`` has radio button-style checkability.
  1480. \ **Note:** This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups.
  1481. \ **Note:** This method is implemented only on macOS.
  1482. .. rst-class:: classref-item-separator
  1483. ----
  1484. .. _class_DisplayServer_method_global_menu_remove_item:
  1485. .. rst-class:: classref-method
  1486. |void| **global_menu_remove_item**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`\ )
  1487. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1488. Removes the item at index ``idx`` from the global menu ``menu_root``.
  1489. \ **Note:** The indices of items after the removed item will be shifted by one.
  1490. \ **Note:** This method is implemented only on macOS.
  1491. .. rst-class:: classref-item-separator
  1492. ----
  1493. .. _class_DisplayServer_method_global_menu_set_item_accelerator:
  1494. .. rst-class:: classref-method
  1495. |void| **global_menu_set_item_accelerator**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, keycode\: :ref:`Key<enum_@GlobalScope_Key>`\ )
  1496. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1497. 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`).
  1498. \ **Note:** This method is implemented only on macOS.
  1499. .. rst-class:: classref-item-separator
  1500. ----
  1501. .. _class_DisplayServer_method_global_menu_set_item_callback:
  1502. .. rst-class:: classref-method
  1503. |void| **global_menu_set_item_callback**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, callback\: :ref:`Callable<class_Callable>`\ )
  1504. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1505. Sets the callback of the item at index ``idx``. Callback is emitted when an item is pressed.
  1506. \ **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.
  1507. \ **Note:** This method is implemented only on macOS.
  1508. .. rst-class:: classref-item-separator
  1509. ----
  1510. .. _class_DisplayServer_method_global_menu_set_item_checkable:
  1511. .. rst-class:: classref-method
  1512. |void| **global_menu_set_item_checkable**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, checkable\: :ref:`bool<class_bool>`\ )
  1513. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1514. Sets whether the item at index ``idx`` has a checkbox. If ``false``, sets the type of the item to plain text.
  1515. \ **Note:** This method is implemented only on macOS.
  1516. .. rst-class:: classref-item-separator
  1517. ----
  1518. .. _class_DisplayServer_method_global_menu_set_item_checked:
  1519. .. rst-class:: classref-method
  1520. |void| **global_menu_set_item_checked**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, checked\: :ref:`bool<class_bool>`\ )
  1521. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1522. Sets the checkstate status of the item at index ``idx``.
  1523. \ **Note:** This method is implemented only on macOS.
  1524. .. rst-class:: classref-item-separator
  1525. ----
  1526. .. _class_DisplayServer_method_global_menu_set_item_disabled:
  1527. .. rst-class:: classref-method
  1528. |void| **global_menu_set_item_disabled**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ )
  1529. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1530. Enables/disables the item at index ``idx``. When it is disabled, it can't be selected and its action can't be invoked.
  1531. \ **Note:** This method is implemented only on macOS.
  1532. .. rst-class:: classref-item-separator
  1533. ----
  1534. .. _class_DisplayServer_method_global_menu_set_item_hidden:
  1535. .. rst-class:: classref-method
  1536. |void| **global_menu_set_item_hidden**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, hidden\: :ref:`bool<class_bool>`\ )
  1537. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1538. 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.
  1539. \ **Note:** This method is implemented only on macOS.
  1540. .. rst-class:: classref-item-separator
  1541. ----
  1542. .. _class_DisplayServer_method_global_menu_set_item_hover_callbacks:
  1543. .. rst-class:: classref-method
  1544. |void| **global_menu_set_item_hover_callbacks**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, callback\: :ref:`Callable<class_Callable>`\ )
  1545. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1546. Sets the callback of the item at index ``idx``. The callback is emitted when an item is hovered.
  1547. \ **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.
  1548. \ **Note:** This method is implemented only on macOS.
  1549. .. rst-class:: classref-item-separator
  1550. ----
  1551. .. _class_DisplayServer_method_global_menu_set_item_icon:
  1552. .. rst-class:: classref-method
  1553. |void| **global_menu_set_item_icon**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ )
  1554. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1555. Replaces the :ref:`Texture2D<class_Texture2D>` icon of the specified ``idx``.
  1556. \ **Note:** This method is implemented only on macOS.
  1557. \ **Note:** This method is not supported by macOS "_dock" menu items.
  1558. .. rst-class:: classref-item-separator
  1559. ----
  1560. .. _class_DisplayServer_method_global_menu_set_item_indentation_level:
  1561. .. rst-class:: classref-method
  1562. |void| **global_menu_set_item_indentation_level**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, level\: :ref:`int<class_int>`\ )
  1563. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1564. Sets the horizontal offset of the item at the given ``idx``.
  1565. \ **Note:** This method is implemented only on macOS.
  1566. .. rst-class:: classref-item-separator
  1567. ----
  1568. .. _class_DisplayServer_method_global_menu_set_item_key_callback:
  1569. .. rst-class:: classref-method
  1570. |void| **global_menu_set_item_key_callback**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, key_callback\: :ref:`Callable<class_Callable>`\ )
  1571. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1572. Sets the callback of the item at index ``idx``. Callback is emitted when its accelerator is activated.
  1573. \ **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.
  1574. \ **Note:** This method is implemented only on macOS.
  1575. .. rst-class:: classref-item-separator
  1576. ----
  1577. .. _class_DisplayServer_method_global_menu_set_item_max_states:
  1578. .. rst-class:: classref-method
  1579. |void| **global_menu_set_item_max_states**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, max_states\: :ref:`int<class_int>`\ )
  1580. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1581. 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.
  1582. \ **Note:** This method is implemented only on macOS.
  1583. .. rst-class:: classref-item-separator
  1584. ----
  1585. .. _class_DisplayServer_method_global_menu_set_item_radio_checkable:
  1586. .. rst-class:: classref-method
  1587. |void| **global_menu_set_item_radio_checkable**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, checkable\: :ref:`bool<class_bool>`\ )
  1588. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1589. 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.
  1590. \ **Note:** This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups.
  1591. \ **Note:** This method is implemented only on macOS.
  1592. .. rst-class:: classref-item-separator
  1593. ----
  1594. .. _class_DisplayServer_method_global_menu_set_item_state:
  1595. .. rst-class:: classref-method
  1596. |void| **global_menu_set_item_state**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, state\: :ref:`int<class_int>`\ )
  1597. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1598. Sets the state of a multistate item. See :ref:`global_menu_add_multistate_item<class_DisplayServer_method_global_menu_add_multistate_item>` for details.
  1599. \ **Note:** This method is implemented only on macOS.
  1600. .. rst-class:: classref-item-separator
  1601. ----
  1602. .. _class_DisplayServer_method_global_menu_set_item_submenu:
  1603. .. rst-class:: classref-method
  1604. |void| **global_menu_set_item_submenu**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, submenu\: :ref:`String<class_String>`\ )
  1605. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1606. 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.
  1607. \ **Note:** This method is implemented only on macOS.
  1608. .. rst-class:: classref-item-separator
  1609. ----
  1610. .. _class_DisplayServer_method_global_menu_set_item_tag:
  1611. .. rst-class:: classref-method
  1612. |void| **global_menu_set_item_tag**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, tag\: :ref:`Variant<class_Variant>`\ )
  1613. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1614. 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.
  1615. \ **Note:** This method is implemented only on macOS.
  1616. .. rst-class:: classref-item-separator
  1617. ----
  1618. .. _class_DisplayServer_method_global_menu_set_item_text:
  1619. .. rst-class:: classref-method
  1620. |void| **global_menu_set_item_text**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ )
  1621. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1622. Sets the text of the item at index ``idx``.
  1623. \ **Note:** This method is implemented only on macOS.
  1624. .. rst-class:: classref-item-separator
  1625. ----
  1626. .. _class_DisplayServer_method_global_menu_set_item_tooltip:
  1627. .. rst-class:: classref-method
  1628. |void| **global_menu_set_item_tooltip**\ (\ menu_root\: :ref:`String<class_String>`, idx\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ )
  1629. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1630. Sets the :ref:`String<class_String>` tooltip of the item at the specified index ``idx``.
  1631. \ **Note:** This method is implemented only on macOS.
  1632. .. rst-class:: classref-item-separator
  1633. ----
  1634. .. _class_DisplayServer_method_global_menu_set_popup_callbacks:
  1635. .. rst-class:: classref-method
  1636. |void| **global_menu_set_popup_callbacks**\ (\ menu_root\: :ref:`String<class_String>`, open_callback\: :ref:`Callable<class_Callable>`, close_callback\: :ref:`Callable<class_Callable>`\ )
  1637. **Deprecated:** Use :ref:`NativeMenu<class_NativeMenu>` or :ref:`PopupMenu<class_PopupMenu>` instead.
  1638. Registers callables to emit when the menu is respectively about to show or closed.
  1639. .. rst-class:: classref-item-separator
  1640. ----
  1641. .. _class_DisplayServer_method_has_feature:
  1642. .. rst-class:: classref-method
  1643. :ref:`bool<class_bool>` **has_feature**\ (\ feature\: :ref:`Feature<enum_DisplayServer_Feature>`\ ) |const|
  1644. Returns ``true`` if the specified ``feature`` is supported by the current **DisplayServer**, ``false`` otherwise.
  1645. .. rst-class:: classref-item-separator
  1646. ----
  1647. .. _class_DisplayServer_method_help_set_search_callbacks:
  1648. .. rst-class:: classref-method
  1649. |void| **help_set_search_callbacks**\ (\ search_callback\: :ref:`Callable<class_Callable>`, action_callback\: :ref:`Callable<class_Callable>`\ )
  1650. Sets native help system search callbacks.
  1651. \ ``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.
  1652. \ ``action_callback`` has the following arguments: ``String key``. Called when the user selects a search result in the ``Help`` menu.
  1653. \ **Note:** This method is implemented only on macOS.
  1654. .. rst-class:: classref-item-separator
  1655. ----
  1656. .. _class_DisplayServer_method_ime_get_selection:
  1657. .. rst-class:: classref-method
  1658. :ref:`Vector2i<class_Vector2i>` **ime_get_selection**\ (\ ) |const|
  1659. 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.
  1660. \ **Note:** This method is implemented only on macOS.
  1661. .. rst-class:: classref-item-separator
  1662. ----
  1663. .. _class_DisplayServer_method_ime_get_text:
  1664. .. rst-class:: classref-method
  1665. :ref:`String<class_String>` **ime_get_text**\ (\ ) |const|
  1666. Returns the composition string contained within the `Input Method Editor <https://en.wikipedia.org/wiki/Input_method>`__ window.
  1667. \ **Note:** This method is implemented only on macOS.
  1668. .. rst-class:: classref-item-separator
  1669. ----
  1670. .. _class_DisplayServer_method_is_dark_mode:
  1671. .. rst-class:: classref-method
  1672. :ref:`bool<class_bool>` **is_dark_mode**\ (\ ) |const|
  1673. Returns ``true`` if OS is using dark mode.
  1674. \ **Note:** This method is implemented on Android, iOS, macOS, Windows, and Linux (X11/Wayland).
  1675. .. rst-class:: classref-item-separator
  1676. ----
  1677. .. _class_DisplayServer_method_is_dark_mode_supported:
  1678. .. rst-class:: classref-method
  1679. :ref:`bool<class_bool>` **is_dark_mode_supported**\ (\ ) |const|
  1680. Returns ``true`` if OS supports dark mode.
  1681. \ **Note:** This method is implemented on Android, iOS, macOS, Windows, and Linux (X11/Wayland).
  1682. .. rst-class:: classref-item-separator
  1683. ----
  1684. .. _class_DisplayServer_method_is_touchscreen_available:
  1685. .. rst-class:: classref-method
  1686. :ref:`bool<class_bool>` **is_touchscreen_available**\ (\ ) |const|
  1687. 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``.
  1688. .. rst-class:: classref-item-separator
  1689. ----
  1690. .. _class_DisplayServer_method_keyboard_get_current_layout:
  1691. .. rst-class:: classref-method
  1692. :ref:`int<class_int>` **keyboard_get_current_layout**\ (\ ) |const|
  1693. Returns active keyboard layout index.
  1694. \ **Note:** This method is implemented on Linux (X11/Wayland), macOS, and Windows.
  1695. .. rst-class:: classref-item-separator
  1696. ----
  1697. .. _class_DisplayServer_method_keyboard_get_keycode_from_physical:
  1698. .. rst-class:: classref-method
  1699. :ref:`Key<enum_@GlobalScope_Key>` **keyboard_get_keycode_from_physical**\ (\ keycode\: :ref:`Key<enum_@GlobalScope_Key>`\ ) |const|
  1700. Converts a physical (US QWERTY) ``keycode`` to one in the active keyboard layout.
  1701. \ **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows.
  1702. .. rst-class:: classref-item-separator
  1703. ----
  1704. .. _class_DisplayServer_method_keyboard_get_label_from_physical:
  1705. .. rst-class:: classref-method
  1706. :ref:`Key<enum_@GlobalScope_Key>` **keyboard_get_label_from_physical**\ (\ keycode\: :ref:`Key<enum_@GlobalScope_Key>`\ ) |const|
  1707. Converts a physical (US QWERTY) ``keycode`` to localized label printed on the key in the active keyboard layout.
  1708. \ **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows.
  1709. .. rst-class:: classref-item-separator
  1710. ----
  1711. .. _class_DisplayServer_method_keyboard_get_layout_count:
  1712. .. rst-class:: classref-method
  1713. :ref:`int<class_int>` **keyboard_get_layout_count**\ (\ ) |const|
  1714. Returns the number of keyboard layouts.
  1715. \ **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows.
  1716. .. rst-class:: classref-item-separator
  1717. ----
  1718. .. _class_DisplayServer_method_keyboard_get_layout_language:
  1719. .. rst-class:: classref-method
  1720. :ref:`String<class_String>` **keyboard_get_layout_language**\ (\ index\: :ref:`int<class_int>`\ ) |const|
  1721. Returns the ISO-639/BCP-47 language code of the keyboard layout at position ``index``.
  1722. \ **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows.
  1723. .. rst-class:: classref-item-separator
  1724. ----
  1725. .. _class_DisplayServer_method_keyboard_get_layout_name:
  1726. .. rst-class:: classref-method
  1727. :ref:`String<class_String>` **keyboard_get_layout_name**\ (\ index\: :ref:`int<class_int>`\ ) |const|
  1728. Returns the localized name of the keyboard layout at position ``index``.
  1729. \ **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows.
  1730. .. rst-class:: classref-item-separator
  1731. ----
  1732. .. _class_DisplayServer_method_keyboard_set_current_layout:
  1733. .. rst-class:: classref-method
  1734. |void| **keyboard_set_current_layout**\ (\ index\: :ref:`int<class_int>`\ )
  1735. Sets the active keyboard layout.
  1736. \ **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows.
  1737. .. rst-class:: classref-item-separator
  1738. ----
  1739. .. _class_DisplayServer_method_mouse_get_button_state:
  1740. .. rst-class:: classref-method
  1741. |bitfield|\[:ref:`MouseButtonMask<enum_@GlobalScope_MouseButtonMask>`\] **mouse_get_button_state**\ (\ ) |const|
  1742. 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>`.
  1743. .. rst-class:: classref-item-separator
  1744. ----
  1745. .. _class_DisplayServer_method_mouse_get_mode:
  1746. .. rst-class:: classref-method
  1747. :ref:`MouseMode<enum_DisplayServer_MouseMode>` **mouse_get_mode**\ (\ ) |const|
  1748. Returns the current mouse mode. See also :ref:`mouse_set_mode<class_DisplayServer_method_mouse_set_mode>`.
  1749. .. rst-class:: classref-item-separator
  1750. ----
  1751. .. _class_DisplayServer_method_mouse_get_position:
  1752. .. rst-class:: classref-method
  1753. :ref:`Vector2i<class_Vector2i>` **mouse_get_position**\ (\ ) |const|
  1754. Returns the mouse cursor's current position in screen coordinates.
  1755. .. rst-class:: classref-item-separator
  1756. ----
  1757. .. _class_DisplayServer_method_mouse_set_mode:
  1758. .. rst-class:: classref-method
  1759. |void| **mouse_set_mode**\ (\ mouse_mode\: :ref:`MouseMode<enum_DisplayServer_MouseMode>`\ )
  1760. Sets the current mouse mode. See also :ref:`mouse_get_mode<class_DisplayServer_method_mouse_get_mode>`.
  1761. .. rst-class:: classref-item-separator
  1762. ----
  1763. .. _class_DisplayServer_method_process_events:
  1764. .. rst-class:: classref-method
  1765. |void| **process_events**\ (\ )
  1766. 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>`.
  1767. .. rst-class:: classref-item-separator
  1768. ----
  1769. .. _class_DisplayServer_method_screen_get_dpi:
  1770. .. rst-class:: classref-method
  1771. :ref:`int<class_int>` **screen_get_dpi**\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const|
  1772. 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.
  1773. \ **Note:** On macOS, returned value is inaccurate if fractional display scaling mode is used.
  1774. \ **Note:** On Android devices, the actual screen densities are grouped into six generalized densities:
  1775. .. code:: text
  1776. ldpi - 120 dpi
  1777. mdpi - 160 dpi
  1778. hdpi - 240 dpi
  1779. xhdpi - 320 dpi
  1780. xxhdpi - 480 dpi
  1781. xxxhdpi - 640 dpi
  1782. \ **Note:** This method is implemented on Android, Linux (X11/Wayland), macOS and Windows. Returns ``72`` on unsupported platforms.
  1783. .. rst-class:: classref-item-separator
  1784. ----
  1785. .. _class_DisplayServer_method_screen_get_image:
  1786. .. rst-class:: classref-method
  1787. :ref:`Image<class_Image>` **screen_get_image**\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const|
  1788. Returns screenshot of the ``screen``.
  1789. \ **Note:** This method is implemented on Linux (X11), macOS, and Windows.
  1790. \ **Note:** On macOS, this method requires "Screen Recording" permission, if permission is not granted it will return desktop wallpaper color.
  1791. .. rst-class:: classref-item-separator
  1792. ----
  1793. .. _class_DisplayServer_method_screen_get_max_scale:
  1794. .. rst-class:: classref-method
  1795. :ref:`float<class_float>` **screen_get_max_scale**\ (\ ) |const|
  1796. Returns the greatest scale factor of all screens.
  1797. \ **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.
  1798. \ **Note:** This method is implemented only on macOS.
  1799. .. rst-class:: classref-item-separator
  1800. ----
  1801. .. _class_DisplayServer_method_screen_get_orientation:
  1802. .. rst-class:: classref-method
  1803. :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` **screen_get_orientation**\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const|
  1804. Returns the ``screen``'s current orientation. See also :ref:`screen_set_orientation<class_DisplayServer_method_screen_set_orientation>`.
  1805. \ **Note:** This method is implemented on Android and iOS.
  1806. .. rst-class:: classref-item-separator
  1807. ----
  1808. .. _class_DisplayServer_method_screen_get_pixel:
  1809. .. rst-class:: classref-method
  1810. :ref:`Color<class_Color>` **screen_get_pixel**\ (\ position\: :ref:`Vector2i<class_Vector2i>`\ ) |const|
  1811. Returns color of the display pixel at the ``position``.
  1812. \ **Note:** This method is implemented on Linux (X11), macOS, and Windows.
  1813. \ **Note:** On macOS, this method requires "Screen Recording" permission, if permission is not granted it will return desktop wallpaper color.
  1814. .. rst-class:: classref-item-separator
  1815. ----
  1816. .. _class_DisplayServer_method_screen_get_position:
  1817. .. rst-class:: classref-method
  1818. :ref:`Vector2i<class_Vector2i>` **screen_get_position**\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const|
  1819. 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:
  1820. .. code:: text
  1821. * (0, 0) +-------+
  1822. | |
  1823. +-------------+ | |
  1824. | | | |
  1825. | | | |
  1826. +-------------+ +-------+
  1827. See also :ref:`screen_get_size<class_DisplayServer_method_screen_get_size>`.
  1828. \ **Note:** On Linux (Wayland) this method always returns ``(0, 0)``.
  1829. .. rst-class:: classref-item-separator
  1830. ----
  1831. .. _class_DisplayServer_method_screen_get_refresh_rate:
  1832. .. rst-class:: classref-method
  1833. :ref:`float<class_float>` **screen_get_refresh_rate**\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const|
  1834. 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.
  1835. \ **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.
  1836. To fallback to a default refresh rate if the method fails, try:
  1837. ::
  1838. var refresh_rate = DisplayServer.screen_get_refresh_rate()
  1839. if refresh_rate < 0:
  1840. refresh_rate = 60.0
  1841. .. rst-class:: classref-item-separator
  1842. ----
  1843. .. _class_DisplayServer_method_screen_get_scale:
  1844. .. rst-class:: classref-method
  1845. :ref:`float<class_float>` **screen_get_scale**\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const|
  1846. Returns the scale factor of the specified screen by index.
  1847. \ **Note:** On macOS returned value is ``2.0`` for hiDPI (Retina) screen, and ``1.0`` for all other cases.
  1848. \ **Note:** This method is implemented only on macOS.
  1849. .. rst-class:: classref-item-separator
  1850. ----
  1851. .. _class_DisplayServer_method_screen_get_size:
  1852. .. rst-class:: classref-method
  1853. :ref:`Vector2i<class_Vector2i>` **screen_get_size**\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const|
  1854. 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>`.
  1855. .. rst-class:: classref-item-separator
  1856. ----
  1857. .. _class_DisplayServer_method_screen_get_usable_rect:
  1858. .. rst-class:: classref-method
  1859. :ref:`Rect2i<class_Rect2i>` **screen_get_usable_rect**\ (\ screen\: :ref:`int<class_int>` = -1\ ) |const|
  1860. 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>`.
  1861. .. rst-class:: classref-item-separator
  1862. ----
  1863. .. _class_DisplayServer_method_screen_is_kept_on:
  1864. .. rst-class:: classref-method
  1865. :ref:`bool<class_bool>` **screen_is_kept_on**\ (\ ) |const|
  1866. 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>`.
  1867. .. rst-class:: classref-item-separator
  1868. ----
  1869. .. _class_DisplayServer_method_screen_set_keep_on:
  1870. .. rst-class:: classref-method
  1871. |void| **screen_set_keep_on**\ (\ enable\: :ref:`bool<class_bool>`\ )
  1872. 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>`.
  1873. .. rst-class:: classref-item-separator
  1874. ----
  1875. .. _class_DisplayServer_method_screen_set_orientation:
  1876. .. rst-class:: classref-method
  1877. |void| **screen_set_orientation**\ (\ orientation\: :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>`, screen\: :ref:`int<class_int>` = -1\ )
  1878. Sets the ``screen``'s ``orientation``. See also :ref:`screen_get_orientation<class_DisplayServer_method_screen_get_orientation>`.
  1879. \ **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>`.
  1880. .. rst-class:: classref-item-separator
  1881. ----
  1882. .. _class_DisplayServer_method_set_icon:
  1883. .. rst-class:: classref-method
  1884. |void| **set_icon**\ (\ image\: :ref:`Image<class_Image>`\ )
  1885. 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.
  1886. \ **Note:** Requires support for :ref:`FEATURE_ICON<class_DisplayServer_constant_FEATURE_ICON>`.
  1887. .. rst-class:: classref-item-separator
  1888. ----
  1889. .. _class_DisplayServer_method_set_native_icon:
  1890. .. rst-class:: classref-method
  1891. |void| **set_native_icon**\ (\ filename\: :ref:`String<class_String>`\ )
  1892. 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.
  1893. \ **Note:** Requires support for :ref:`FEATURE_NATIVE_ICON<class_DisplayServer_constant_FEATURE_NATIVE_ICON>`.
  1894. .. rst-class:: classref-item-separator
  1895. ----
  1896. .. _class_DisplayServer_method_set_system_theme_change_callback:
  1897. .. rst-class:: classref-method
  1898. |void| **set_system_theme_change_callback**\ (\ callable\: :ref:`Callable<class_Callable>`\ )
  1899. Sets the ``callable`` that should be called when system theme settings are changed. Callback method should have zero arguments.
  1900. \ **Note:** This method is implemented on Android, iOS, macOS, Windows, and Linux (X11/Wayland).
  1901. .. rst-class:: classref-item-separator
  1902. ----
  1903. .. _class_DisplayServer_method_status_indicator_set_callback:
  1904. .. rst-class:: classref-method
  1905. |void| **status_indicator_set_callback**\ (\ id\: :ref:`int<class_int>`, callback\: :ref:`Callable<class_Callable>`\ )
  1906. Sets the application status indicator activation callback.
  1907. .. rst-class:: classref-item-separator
  1908. ----
  1909. .. _class_DisplayServer_method_status_indicator_set_icon:
  1910. .. rst-class:: classref-method
  1911. |void| **status_indicator_set_icon**\ (\ id\: :ref:`int<class_int>`, icon\: :ref:`Image<class_Image>`\ )
  1912. Sets the application status indicator icon.
  1913. .. rst-class:: classref-item-separator
  1914. ----
  1915. .. _class_DisplayServer_method_status_indicator_set_tooltip:
  1916. .. rst-class:: classref-method
  1917. |void| **status_indicator_set_tooltip**\ (\ id\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ )
  1918. Sets the application status indicator tooltip.
  1919. .. rst-class:: classref-item-separator
  1920. ----
  1921. .. _class_DisplayServer_method_tablet_get_current_driver:
  1922. .. rst-class:: classref-method
  1923. :ref:`String<class_String>` **tablet_get_current_driver**\ (\ ) |const|
  1924. Returns current active tablet driver name.
  1925. \ **Note:** This method is implemented only on Windows.
  1926. .. rst-class:: classref-item-separator
  1927. ----
  1928. .. _class_DisplayServer_method_tablet_get_driver_count:
  1929. .. rst-class:: classref-method
  1930. :ref:`int<class_int>` **tablet_get_driver_count**\ (\ ) |const|
  1931. Returns the total number of available tablet drivers.
  1932. \ **Note:** This method is implemented only on Windows.
  1933. .. rst-class:: classref-item-separator
  1934. ----
  1935. .. _class_DisplayServer_method_tablet_get_driver_name:
  1936. .. rst-class:: classref-method
  1937. :ref:`String<class_String>` **tablet_get_driver_name**\ (\ idx\: :ref:`int<class_int>`\ ) |const|
  1938. Returns the tablet driver name for the given index.
  1939. \ **Note:** This method is implemented only on Windows.
  1940. .. rst-class:: classref-item-separator
  1941. ----
  1942. .. _class_DisplayServer_method_tablet_set_current_driver:
  1943. .. rst-class:: classref-method
  1944. |void| **tablet_set_current_driver**\ (\ name\: :ref:`String<class_String>`\ )
  1945. Set active tablet driver name.
  1946. Supported drivers:
  1947. - ``winink``: Windows Ink API, default (Windows 8.1+ required).
  1948. - ``wintab``: Wacom Wintab API (compatible device driver required).
  1949. - ``dummy``: Dummy driver, tablet input is disabled.
  1950. \ **Note:** This method is implemented only on Windows.
  1951. .. rst-class:: classref-item-separator
  1952. ----
  1953. .. _class_DisplayServer_method_tts_get_voices:
  1954. .. rst-class:: classref-method
  1955. :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **tts_get_voices**\ (\ ) |const|
  1956. Returns an :ref:`Array<class_Array>` of voice information dictionaries.
  1957. Each :ref:`Dictionary<class_Dictionary>` contains two :ref:`String<class_String>` entries:
  1958. - ``name`` is voice name.
  1959. - ``id`` is voice identifier.
  1960. - ``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.
  1961. 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.
  1962. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
  1963. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  1964. .. rst-class:: classref-item-separator
  1965. ----
  1966. .. _class_DisplayServer_method_tts_get_voices_for_language:
  1967. .. rst-class:: classref-method
  1968. :ref:`PackedStringArray<class_PackedStringArray>` **tts_get_voices_for_language**\ (\ language\: :ref:`String<class_String>`\ ) |const|
  1969. Returns an :ref:`PackedStringArray<class_PackedStringArray>` of voice identifiers for the ``language``.
  1970. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
  1971. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  1972. .. rst-class:: classref-item-separator
  1973. ----
  1974. .. _class_DisplayServer_method_tts_is_paused:
  1975. .. rst-class:: classref-method
  1976. :ref:`bool<class_bool>` **tts_is_paused**\ (\ ) |const|
  1977. Returns ``true`` if the synthesizer is in a paused state.
  1978. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
  1979. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  1980. .. rst-class:: classref-item-separator
  1981. ----
  1982. .. _class_DisplayServer_method_tts_is_speaking:
  1983. .. rst-class:: classref-method
  1984. :ref:`bool<class_bool>` **tts_is_speaking**\ (\ ) |const|
  1985. Returns ``true`` if the synthesizer is generating speech, or have utterance waiting in the queue.
  1986. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
  1987. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  1988. .. rst-class:: classref-item-separator
  1989. ----
  1990. .. _class_DisplayServer_method_tts_pause:
  1991. .. rst-class:: classref-method
  1992. |void| **tts_pause**\ (\ )
  1993. Puts the synthesizer into a paused state.
  1994. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
  1995. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  1996. .. rst-class:: classref-item-separator
  1997. ----
  1998. .. _class_DisplayServer_method_tts_resume:
  1999. .. rst-class:: classref-method
  2000. |void| **tts_resume**\ (\ )
  2001. Resumes the synthesizer if it was paused.
  2002. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
  2003. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  2004. .. rst-class:: classref-item-separator
  2005. ----
  2006. .. _class_DisplayServer_method_tts_set_utterance_callback:
  2007. .. rst-class:: classref-method
  2008. |void| **tts_set_utterance_callback**\ (\ event\: :ref:`TTSUtteranceEvent<enum_DisplayServer_TTSUtteranceEvent>`, callable\: :ref:`Callable<class_Callable>`\ )
  2009. Adds a callback, which is called when the utterance has started, finished, canceled or reached a text boundary.
  2010. - :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.
  2011. - :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.
  2012. \ **Note:** The granularity of the boundary callbacks is engine dependent.
  2013. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
  2014. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  2015. .. rst-class:: classref-item-separator
  2016. ----
  2017. .. _class_DisplayServer_method_tts_speak:
  2018. .. rst-class:: classref-method
  2019. |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\ )
  2020. Adds an utterance to the queue. If ``interrupt`` is ``true``, the queue is cleared first.
  2021. - ``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>`.
  2022. - ``volume`` ranges from ``0`` (lowest) to ``100`` (highest).
  2023. - ``pitch`` ranges from ``0.0`` (lowest) to ``2.0`` (highest), ``1.0`` is default pitch for the current voice.
  2024. - ``rate`` ranges from ``0.1`` (lowest) to ``10.0`` (highest), ``1.0`` is a normal speaking rate. Other values act as a percentage relative.
  2025. - ``utterance_id`` is passed as a parameter to the callback functions.
  2026. \ **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>`.
  2027. \ **Note:** The granularity of pitch, rate, and volume is engine and voice dependent. Values may be truncated.
  2028. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
  2029. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  2030. .. rst-class:: classref-item-separator
  2031. ----
  2032. .. _class_DisplayServer_method_tts_stop:
  2033. .. rst-class:: classref-method
  2034. |void| **tts_stop**\ (\ )
  2035. Stops synthesis in progress and removes all utterances from the queue.
  2036. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Linux), macOS, and Windows.
  2037. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` should be ``true`` to use text-to-speech.
  2038. .. rst-class:: classref-item-separator
  2039. ----
  2040. .. _class_DisplayServer_method_virtual_keyboard_get_height:
  2041. .. rst-class:: classref-method
  2042. :ref:`int<class_int>` **virtual_keyboard_get_height**\ (\ ) |const|
  2043. Returns the on-screen keyboard's height in pixels. Returns 0 if there is no keyboard or if it is currently hidden.
  2044. .. rst-class:: classref-item-separator
  2045. ----
  2046. .. _class_DisplayServer_method_virtual_keyboard_hide:
  2047. .. rst-class:: classref-method
  2048. |void| **virtual_keyboard_hide**\ (\ )
  2049. Hides the virtual keyboard if it is shown, does nothing otherwise.
  2050. .. rst-class:: classref-item-separator
  2051. ----
  2052. .. _class_DisplayServer_method_virtual_keyboard_show:
  2053. .. rst-class:: classref-method
  2054. |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\ )
  2055. Shows the virtual keyboard if the platform has one.
  2056. \ ``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).
  2057. \ ``position`` parameter is the screen space :ref:`Rect2<class_Rect2>` of the edited text.
  2058. \ ``type`` parameter allows configuring which type of virtual keyboard to show.
  2059. \ ``max_length`` limits the number of characters that can be entered if different from ``-1``.
  2060. \ ``cursor_start`` can optionally define the current text cursor position if ``cursor_end`` is not set.
  2061. \ ``cursor_start`` and ``cursor_end`` can optionally define the current text selection.
  2062. \ **Note:** This method is implemented on Android, iOS and Web.
  2063. .. rst-class:: classref-item-separator
  2064. ----
  2065. .. _class_DisplayServer_method_warp_mouse:
  2066. .. rst-class:: classref-method
  2067. |void| **warp_mouse**\ (\ position\: :ref:`Vector2i<class_Vector2i>`\ )
  2068. 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.
  2069. \ **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.
  2070. .. rst-class:: classref-item-separator
  2071. ----
  2072. .. _class_DisplayServer_method_window_can_draw:
  2073. .. rst-class:: classref-method
  2074. :ref:`bool<class_bool>` **window_can_draw**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const|
  2075. 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``.
  2076. .. rst-class:: classref-item-separator
  2077. ----
  2078. .. _class_DisplayServer_method_window_get_active_popup:
  2079. .. rst-class:: classref-method
  2080. :ref:`int<class_int>` **window_get_active_popup**\ (\ ) |const|
  2081. Returns ID of the active popup window, or :ref:`INVALID_WINDOW_ID<class_DisplayServer_constant_INVALID_WINDOW_ID>` if there is none.
  2082. .. rst-class:: classref-item-separator
  2083. ----
  2084. .. _class_DisplayServer_method_window_get_attached_instance_id:
  2085. .. rst-class:: classref-method
  2086. :ref:`int<class_int>` **window_get_attached_instance_id**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const|
  2087. 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.
  2088. .. rst-class:: classref-item-separator
  2089. ----
  2090. .. _class_DisplayServer_method_window_get_current_screen:
  2091. .. rst-class:: classref-method
  2092. :ref:`int<class_int>` **window_get_current_screen**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const|
  2093. 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>`.
  2094. .. rst-class:: classref-item-separator
  2095. ----
  2096. .. _class_DisplayServer_method_window_get_flag:
  2097. .. rst-class:: classref-method
  2098. :ref:`bool<class_bool>` **window_get_flag**\ (\ flag\: :ref:`WindowFlags<enum_DisplayServer_WindowFlags>`, window_id\: :ref:`int<class_int>` = 0\ ) |const|
  2099. Returns the current value of the given window's ``flag``.
  2100. .. rst-class:: classref-item-separator
  2101. ----
  2102. .. _class_DisplayServer_method_window_get_max_size:
  2103. .. rst-class:: classref-method
  2104. :ref:`Vector2i<class_Vector2i>` **window_get_max_size**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const|
  2105. Returns the window's maximum size (in pixels). See also :ref:`window_set_max_size<class_DisplayServer_method_window_set_max_size>`.
  2106. .. rst-class:: classref-item-separator
  2107. ----
  2108. .. _class_DisplayServer_method_window_get_min_size:
  2109. .. rst-class:: classref-method
  2110. :ref:`Vector2i<class_Vector2i>` **window_get_min_size**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const|
  2111. Returns the window's minimum size (in pixels). See also :ref:`window_set_min_size<class_DisplayServer_method_window_set_min_size>`.
  2112. .. rst-class:: classref-item-separator
  2113. ----
  2114. .. _class_DisplayServer_method_window_get_mode:
  2115. .. rst-class:: classref-method
  2116. :ref:`WindowMode<enum_DisplayServer_WindowMode>` **window_get_mode**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const|
  2117. Returns the mode of the given window.
  2118. .. rst-class:: classref-item-separator
  2119. ----
  2120. .. _class_DisplayServer_method_window_get_native_handle:
  2121. .. rst-class:: classref-method
  2122. :ref:`int<class_int>` **window_get_native_handle**\ (\ handle_type\: :ref:`HandleType<enum_DisplayServer_HandleType>`, window_id\: :ref:`int<class_int>` = 0\ ) |const|
  2123. Returns internal structure pointers for use in plugins.
  2124. \ **Note:** This method is implemented on Android, Linux (X11/Wayland), macOS, and Windows.
  2125. .. rst-class:: classref-item-separator
  2126. ----
  2127. .. _class_DisplayServer_method_window_get_popup_safe_rect:
  2128. .. rst-class:: classref-method
  2129. :ref:`Rect2i<class_Rect2i>` **window_get_popup_safe_rect**\ (\ window\: :ref:`int<class_int>`\ ) |const|
  2130. Returns the bounding box of control, or menu item that was used to open the popup window, in the screen coordinate system.
  2131. .. rst-class:: classref-item-separator
  2132. ----
  2133. .. _class_DisplayServer_method_window_get_position:
  2134. .. rst-class:: classref-method
  2135. :ref:`Vector2i<class_Vector2i>` **window_get_position**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const|
  2136. Returns the position of the client area of the given window on the screen.
  2137. .. rst-class:: classref-item-separator
  2138. ----
  2139. .. _class_DisplayServer_method_window_get_position_with_decorations:
  2140. .. rst-class:: classref-method
  2141. :ref:`Vector2i<class_Vector2i>` **window_get_position_with_decorations**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const|
  2142. 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>`.
  2143. .. rst-class:: classref-item-separator
  2144. ----
  2145. .. _class_DisplayServer_method_window_get_safe_title_margins:
  2146. .. rst-class:: classref-method
  2147. :ref:`Vector3i<class_Vector3i>` **window_get_safe_title_margins**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const|
  2148. 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.
  2149. .. rst-class:: classref-item-separator
  2150. ----
  2151. .. _class_DisplayServer_method_window_get_size:
  2152. .. rst-class:: classref-method
  2153. :ref:`Vector2i<class_Vector2i>` **window_get_size**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const|
  2154. 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>`.
  2155. .. rst-class:: classref-item-separator
  2156. ----
  2157. .. _class_DisplayServer_method_window_get_size_with_decorations:
  2158. .. rst-class:: classref-method
  2159. :ref:`Vector2i<class_Vector2i>` **window_get_size_with_decorations**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const|
  2160. 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>`.
  2161. .. rst-class:: classref-item-separator
  2162. ----
  2163. .. _class_DisplayServer_method_window_get_title_size:
  2164. .. rst-class:: classref-method
  2165. :ref:`Vector2i<class_Vector2i>` **window_get_title_size**\ (\ title\: :ref:`String<class_String>`, window_id\: :ref:`int<class_int>` = 0\ ) |const|
  2166. 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.
  2167. \ **Note:** This method is implemented on macOS and Windows.
  2168. .. rst-class:: classref-item-separator
  2169. ----
  2170. .. _class_DisplayServer_method_window_get_vsync_mode:
  2171. .. rst-class:: classref-method
  2172. :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` **window_get_vsync_mode**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const|
  2173. Returns the V-Sync mode of the given window.
  2174. .. rst-class:: classref-item-separator
  2175. ----
  2176. .. _class_DisplayServer_method_window_is_focused:
  2177. .. rst-class:: classref-method
  2178. :ref:`bool<class_bool>` **window_is_focused**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const|
  2179. Returns ``true`` if the window specified by ``window_id`` is focused.
  2180. .. rst-class:: classref-item-separator
  2181. ----
  2182. .. _class_DisplayServer_method_window_is_maximize_allowed:
  2183. .. rst-class:: classref-method
  2184. :ref:`bool<class_bool>` **window_is_maximize_allowed**\ (\ window_id\: :ref:`int<class_int>` = 0\ ) |const|
  2185. Returns ``true`` if the given window can be maximized (the maximize button is enabled).
  2186. .. rst-class:: classref-item-separator
  2187. ----
  2188. .. _class_DisplayServer_method_window_maximize_on_title_dbl_click:
  2189. .. rst-class:: classref-method
  2190. :ref:`bool<class_bool>` **window_maximize_on_title_dbl_click**\ (\ ) |const|
  2191. Returns ``true``, if double-click on a window title should maximize it.
  2192. \ **Note:** This method is implemented only on macOS.
  2193. .. rst-class:: classref-item-separator
  2194. ----
  2195. .. _class_DisplayServer_method_window_minimize_on_title_dbl_click:
  2196. .. rst-class:: classref-method
  2197. :ref:`bool<class_bool>` **window_minimize_on_title_dbl_click**\ (\ ) |const|
  2198. Returns ``true``, if double-click on a window title should minimize it.
  2199. \ **Note:** This method is implemented only on macOS.
  2200. .. rst-class:: classref-item-separator
  2201. ----
  2202. .. _class_DisplayServer_method_window_move_to_foreground:
  2203. .. rst-class:: classref-method
  2204. |void| **window_move_to_foreground**\ (\ window_id\: :ref:`int<class_int>` = 0\ )
  2205. Moves the window specified by ``window_id`` to the foreground, so that it is visible over other windows.
  2206. .. rst-class:: classref-item-separator
  2207. ----
  2208. .. _class_DisplayServer_method_window_request_attention:
  2209. .. rst-class:: classref-method
  2210. |void| **window_request_attention**\ (\ window_id\: :ref:`int<class_int>` = 0\ )
  2211. 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.
  2212. .. rst-class:: classref-item-separator
  2213. ----
  2214. .. _class_DisplayServer_method_window_set_current_screen:
  2215. .. rst-class:: classref-method
  2216. |void| **window_set_current_screen**\ (\ screen\: :ref:`int<class_int>`, window_id\: :ref:`int<class_int>` = 0\ )
  2217. 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>`.
  2218. .. rst-class:: classref-item-separator
  2219. ----
  2220. .. _class_DisplayServer_method_window_set_drop_files_callback:
  2221. .. rst-class:: classref-method
  2222. |void| **window_set_drop_files_callback**\ (\ callback\: :ref:`Callable<class_Callable>`, window_id\: :ref:`int<class_int>` = 0\ )
  2223. 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``.
  2224. \ **Warning:** Advanced users only! Adding such a callback to a :ref:`Window<class_Window>` node will override its default implementation, which can introduce bugs.
  2225. \ **Note:** This method is implemented on Windows, macOS, Linux (X11/Wayland), and Web.
  2226. .. rst-class:: classref-item-separator
  2227. ----
  2228. .. _class_DisplayServer_method_window_set_exclusive:
  2229. .. rst-class:: classref-method
  2230. |void| **window_set_exclusive**\ (\ window_id\: :ref:`int<class_int>`, exclusive\: :ref:`bool<class_bool>`\ )
  2231. 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.
  2232. \ **Note:** On macOS, exclusive windows are confined to the same space (virtual desktop or screen) as the parent window.
  2233. \ **Note:** This method is implemented on macOS and Windows.
  2234. .. rst-class:: classref-item-separator
  2235. ----
  2236. .. _class_DisplayServer_method_window_set_flag:
  2237. .. rst-class:: classref-method
  2238. |void| **window_set_flag**\ (\ flag\: :ref:`WindowFlags<enum_DisplayServer_WindowFlags>`, enabled\: :ref:`bool<class_bool>`, window_id\: :ref:`int<class_int>` = 0\ )
  2239. Enables or disables the given window's given ``flag``. See :ref:`WindowFlags<enum_DisplayServer_WindowFlags>` for possible values and their behavior.
  2240. .. rst-class:: classref-item-separator
  2241. ----
  2242. .. _class_DisplayServer_method_window_set_ime_active:
  2243. .. rst-class:: classref-method
  2244. |void| **window_set_ime_active**\ (\ active\: :ref:`bool<class_bool>`, window_id\: :ref:`int<class_int>` = 0\ )
  2245. 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>`.
  2246. .. rst-class:: classref-item-separator
  2247. ----
  2248. .. _class_DisplayServer_method_window_set_ime_position:
  2249. .. rst-class:: classref-method
  2250. |void| **window_set_ime_position**\ (\ position\: :ref:`Vector2i<class_Vector2i>`, window_id\: :ref:`int<class_int>` = 0\ )
  2251. 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``.
  2252. .. rst-class:: classref-item-separator
  2253. ----
  2254. .. _class_DisplayServer_method_window_set_input_event_callback:
  2255. .. rst-class:: classref-method
  2256. |void| **window_set_input_event_callback**\ (\ callback\: :ref:`Callable<class_Callable>`, window_id\: :ref:`int<class_int>` = 0\ )
  2257. Sets the ``callback`` that should be called when any :ref:`InputEvent<class_InputEvent>` is sent to the window specified by ``window_id``.
  2258. \ **Warning:** Advanced users only! Adding such a callback to a :ref:`Window<class_Window>` node will override its default implementation, which can introduce bugs.
  2259. .. rst-class:: classref-item-separator
  2260. ----
  2261. .. _class_DisplayServer_method_window_set_input_text_callback:
  2262. .. rst-class:: classref-method
  2263. |void| **window_set_input_text_callback**\ (\ callback\: :ref:`Callable<class_Callable>`, window_id\: :ref:`int<class_int>` = 0\ )
  2264. Sets the ``callback`` that should be called when text is entered using the virtual keyboard to the window specified by ``window_id``.
  2265. \ **Warning:** Advanced users only! Adding such a callback to a :ref:`Window<class_Window>` node will override its default implementation, which can introduce bugs.
  2266. .. rst-class:: classref-item-separator
  2267. ----
  2268. .. _class_DisplayServer_method_window_set_max_size:
  2269. .. rst-class:: classref-method
  2270. |void| **window_set_max_size**\ (\ max_size\: :ref:`Vector2i<class_Vector2i>`, window_id\: :ref:`int<class_int>` = 0\ )
  2271. Sets the maximum size of the window specified by ``window_id`` in pixels. Normally, the user will not be able to drag the window to make it smaller than the specified size. See also :ref:`window_get_max_size<class_DisplayServer_method_window_get_max_size>`.
  2272. \ **Note:** It's recommended to change this value using :ref:`Window.max_size<class_Window_property_max_size>` instead.
  2273. \ **Note:** Using third-party tools, it is possible for users to disable window geometry restrictions and therefore bypass this limit.
  2274. .. rst-class:: classref-item-separator
  2275. ----
  2276. .. _class_DisplayServer_method_window_set_min_size:
  2277. .. rst-class:: classref-method
  2278. |void| **window_set_min_size**\ (\ min_size\: :ref:`Vector2i<class_Vector2i>`, window_id\: :ref:`int<class_int>` = 0\ )
  2279. Sets the minimum size for the given window to ``min_size`` (in pixels). Normally, the user will not be able to drag the window to make it larger than the specified size. See also :ref:`window_get_min_size<class_DisplayServer_method_window_get_min_size>`.
  2280. \ **Note:** It's recommended to change this value using :ref:`Window.min_size<class_Window_property_min_size>` instead.
  2281. \ **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.
  2282. \ **Note:** Using third-party tools, it is possible for users to disable window geometry restrictions and therefore bypass this limit.
  2283. .. rst-class:: classref-item-separator
  2284. ----
  2285. .. _class_DisplayServer_method_window_set_mode:
  2286. .. rst-class:: classref-method
  2287. |void| **window_set_mode**\ (\ mode\: :ref:`WindowMode<enum_DisplayServer_WindowMode>`, window_id\: :ref:`int<class_int>` = 0\ )
  2288. Sets window mode for the given window to ``mode``. See :ref:`WindowMode<enum_DisplayServer_WindowMode>` for possible values and how each mode behaves.
  2289. \ **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.
  2290. .. rst-class:: classref-item-separator
  2291. ----
  2292. .. _class_DisplayServer_method_window_set_mouse_passthrough:
  2293. .. rst-class:: classref-method
  2294. |void| **window_set_mouse_passthrough**\ (\ region\: :ref:`PackedVector2Array<class_PackedVector2Array>`, window_id\: :ref:`int<class_int>` = 0\ )
  2295. Sets a polygonal region of the window which accepts mouse events. Mouse events outside the region will be passed through.
  2296. Passing an empty array will disable passthrough support (all mouse events will be intercepted by the window, which is the default behavior).
  2297. .. tabs::
  2298. .. code-tab:: gdscript
  2299. # Set region, using Path2D node.
  2300. DisplayServer.window_set_mouse_passthrough($Path2D.curve.get_baked_points())
  2301. # Set region, using Polygon2D node.
  2302. DisplayServer.window_set_mouse_passthrough($Polygon2D.polygon)
  2303. # Reset region to default.
  2304. DisplayServer.window_set_mouse_passthrough([])
  2305. .. code-tab:: csharp
  2306. // Set region, using Path2D node.
  2307. DisplayServer.WindowSetMousePassthrough(GetNode<Path2D>("Path2D").Curve.GetBakedPoints());
  2308. // Set region, using Polygon2D node.
  2309. DisplayServer.WindowSetMousePassthrough(GetNode<Polygon2D>("Polygon2D").Polygon);
  2310. // Reset region to default.
  2311. DisplayServer.WindowSetMousePassthrough(new Vector2[] {});
  2312. \ **Note:** On Windows, the portion of a window that lies outside the region is not drawn, while on Linux (X11) and macOS it is.
  2313. \ **Note:** This method is implemented on Linux (X11), macOS and Windows.
  2314. .. rst-class:: classref-item-separator
  2315. ----
  2316. .. _class_DisplayServer_method_window_set_popup_safe_rect:
  2317. .. rst-class:: classref-method
  2318. |void| **window_set_popup_safe_rect**\ (\ window\: :ref:`int<class_int>`, rect\: :ref:`Rect2i<class_Rect2i>`\ )
  2319. 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.
  2320. .. rst-class:: classref-item-separator
  2321. ----
  2322. .. _class_DisplayServer_method_window_set_position:
  2323. .. rst-class:: classref-method
  2324. |void| **window_set_position**\ (\ position\: :ref:`Vector2i<class_Vector2i>`, window_id\: :ref:`int<class_int>` = 0\ )
  2325. 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:
  2326. .. code:: text
  2327. * (0, 0) +-------+
  2328. | |
  2329. +-------------+ | |
  2330. | | | |
  2331. | | | |
  2332. +-------------+ +-------+
  2333. See also :ref:`window_get_position<class_DisplayServer_method_window_get_position>` and :ref:`window_set_size<class_DisplayServer_method_window_set_size>`.
  2334. \ **Note:** It's recommended to change this value using :ref:`Window.position<class_Window_property_position>` instead.
  2335. \ **Note:** On Linux (Wayland): this method is a no-op.
  2336. .. rst-class:: classref-item-separator
  2337. ----
  2338. .. _class_DisplayServer_method_window_set_rect_changed_callback:
  2339. .. rst-class:: classref-method
  2340. |void| **window_set_rect_changed_callback**\ (\ callback\: :ref:`Callable<class_Callable>`, window_id\: :ref:`int<class_int>` = 0\ )
  2341. Sets the ``callback`` that will be called when the window specified by ``window_id`` is moved or resized.
  2342. \ **Warning:** Advanced users only! Adding such a callback to a :ref:`Window<class_Window>` node will override its default implementation, which can introduce bugs.
  2343. .. rst-class:: classref-item-separator
  2344. ----
  2345. .. _class_DisplayServer_method_window_set_size:
  2346. .. rst-class:: classref-method
  2347. |void| **window_set_size**\ (\ size\: :ref:`Vector2i<class_Vector2i>`, window_id\: :ref:`int<class_int>` = 0\ )
  2348. 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>`.
  2349. \ **Note:** It's recommended to change this value using :ref:`Window.size<class_Window_property_size>` instead.
  2350. .. rst-class:: classref-item-separator
  2351. ----
  2352. .. _class_DisplayServer_method_window_set_title:
  2353. .. rst-class:: classref-method
  2354. |void| **window_set_title**\ (\ title\: :ref:`String<class_String>`, window_id\: :ref:`int<class_int>` = 0\ )
  2355. Sets the title of the given window to ``title``.
  2356. \ **Note:** It's recommended to change this value using :ref:`Window.title<class_Window_property_title>` instead.
  2357. \ **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.
  2358. .. rst-class:: classref-item-separator
  2359. ----
  2360. .. _class_DisplayServer_method_window_set_transient:
  2361. .. rst-class:: classref-method
  2362. |void| **window_set_transient**\ (\ window_id\: :ref:`int<class_int>`, parent_window_id\: :ref:`int<class_int>`\ )
  2363. Sets window transient parent. Transient window is will be destroyed with its transient parent and will return focus to their parent when closed. The transient window is displayed on top of a non-exclusive full-screen parent window. Transient windows can't enter full-screen mode.
  2364. \ **Note:** It's recommended to change this value using :ref:`Window.transient<class_Window_property_transient>` instead.
  2365. \ **Note:** The behavior might be different depending on the platform.
  2366. .. rst-class:: classref-item-separator
  2367. ----
  2368. .. _class_DisplayServer_method_window_set_vsync_mode:
  2369. .. rst-class:: classref-method
  2370. |void| **window_set_vsync_mode**\ (\ vsync_mode\: :ref:`VSyncMode<enum_DisplayServer_VSyncMode>`, window_id\: :ref:`int<class_int>` = 0\ )
  2371. 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>`.
  2372. See :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` for possible values and how they affect the behavior of your application.
  2373. 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.
  2374. \ **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.
  2375. .. rst-class:: classref-item-separator
  2376. ----
  2377. .. _class_DisplayServer_method_window_set_window_buttons_offset:
  2378. .. rst-class:: classref-method
  2379. |void| **window_set_window_buttons_offset**\ (\ offset\: :ref:`Vector2i<class_Vector2i>`, window_id\: :ref:`int<class_int>` = 0\ )
  2380. 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.
  2381. \ **Note:** This flag is implemented only on macOS.
  2382. .. rst-class:: classref-item-separator
  2383. ----
  2384. .. _class_DisplayServer_method_window_set_window_event_callback:
  2385. .. rst-class:: classref-method
  2386. |void| **window_set_window_event_callback**\ (\ callback\: :ref:`Callable<class_Callable>`, window_id\: :ref:`int<class_int>` = 0\ )
  2387. Sets the ``callback`` that will be called when an event occurs in the window specified by ``window_id``.
  2388. \ **Warning:** Advanced users only! Adding such a callback to a :ref:`Window<class_Window>` node will override its default implementation, which can introduce bugs.
  2389. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  2390. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  2391. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  2392. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  2393. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  2394. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  2395. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  2396. .. |void| replace:: :abbr:`void (No return value.)`