diff --git a/mkdocs-website/docs/en/roadmap.md b/mkdocs-website/docs/en/roadmap.md index 875f468101e..559d755089e 100644 --- a/mkdocs-website/docs/en/roadmap.md +++ b/mkdocs-website/docs/en/roadmap.md @@ -23,6 +23,16 @@ Report any issues you find using [this guide](./getting-started/feedback.md). - Test all the things on Linux! +#### Status + +Linux examples: + +- :material-check-bold: - Working +- :material-minus: - Partially working +- :material-close: - Not working + +{{ read_csv("alpha5.csv") }} + ## Upcoming milestones ## Alpha 6 diff --git a/mkdocs-website/shared/alpha1.csv b/mkdocs-website/shared/alpha1.csv index f372dc65f02..1f553d43306 100644 --- a/mkdocs-website/shared/alpha1.csv +++ b/mkdocs-website/shared/alpha1.csv @@ -1,16 +1,16 @@ -" ",Mac,Windows,Linux -binding,:material-check-bold:,:material-check-bold:,:material-check-bold: -build,:material-check-bold:,:material-check-bold:,:material-check-bold: -clipboard,:material-check-bold:,:material-check-bold:,:material-check-bold: -context menus,:material-check-bold:,:material-check-bold:,:material-check-bold: -dialogs,:material-check-bold:,:material-check-bold:,:material-check-bold: -drag-n-drop,:material-check-bold:,:material-check-bold:,:material-check-bold: -events,:material-check-bold:,:material-check-bold:,:material-minus: -frameless,:material-check-bold:,:material-check-bold:,:material-check-bold: -keybindings,:material-check-bold:,:material-check-bold:,:material-minus: -plain,:material-check-bold:,:material-check-bold:,:material-check-bold: -screen,:material-check-bold:,:material-check-bold:,:material-check-bold: -systray,:material-check-bold:,:material-check-bold:,:material-check-bold: -video,:material-check-bold:,:material-check-bold:,:material-check-bold: -window,:material-check-bold:,:material-check-bold:,:material-minus: -wml,:material-check-bold:,:material-check-bold:,:material-check-bold: \ No newline at end of file +" ",Linux,Notes +binding," "," " +build," "," " +clipboard," "," " +context menus," "," " +dialogs," "," " +drag-n-drop," "," " +events,:material-check-bold:," " +frameless," "," " +keybindings," "," " +plain," "," " +screen," "," " +systray," "," " +video," "," " +window," "," " +wml," "," " \ No newline at end of file diff --git a/mkdocs-website/shared/alpha3-bindings-callbyname.csv b/mkdocs-website/shared/alpha3-bindings-callbyname.csv index dbbc00e5c2b..faa8b62d9ba 100644 --- a/mkdocs-website/shared/alpha3-bindings-callbyname.csv +++ b/mkdocs-website/shared/alpha3-bindings-callbyname.csv @@ -1,9 +1,5 @@ Scenario,Windows,Mac,Linux -Same package,: clipboardLock.RLock() - defer clipboardLock.RUnlock() - clipboardText := C.getClipboardText() - result := C.GoString(clipboardText) - return result, true:,:material-check-bold:,:material-check-bold: +Same package,:material-check-bold,:material-check-bold:,:material-check-bold: Different package,:material-check-bold:,:material-check-bold:,:material-check-bold: Different package with same name,"on hold","on hold","on hold" Containing another struct from same package,:material-check-bold:,:material-check-bold:,:material-check-bold: diff --git a/mkdocs-website/shared/alpha5.csv b/mkdocs-website/shared/alpha5.csv new file mode 100644 index 00000000000..f62050de27f --- /dev/null +++ b/mkdocs-website/shared/alpha5.csv @@ -0,0 +1,16 @@ +Example,Linux +binding," " +build,:material-check-bold: +clipboard,:material-check-bold: +context menus,:material-minus: +dialogs,:material-minus: +drag-n-drop," " +events,:material-check-bold: +frameless,:material-check-bold: +keybindings,:material-check-bold: +plain," " +screen,:material-check-bold: +systray,:material-check-bold: +video,:material-check-bold: +window,:material-check-bold: +wml,:material-check-bold: \ No newline at end of file diff --git a/v2/go.mod b/v2/go.mod index a2d0ab416b8..aef70015a27 100644 --- a/v2/go.mod +++ b/v2/go.mod @@ -1,6 +1,8 @@ module github.com/wailsapp/wails/v2 -go 1.20 +go 1.21 + +toolchain go1.22.0 require ( github.com/Masterminds/semver v1.5.0 diff --git a/v2/pkg/options/linux/linux.go b/v2/pkg/options/linux/linux.go index 797450c2725..1287f1da2b5 100644 --- a/v2/pkg/options/linux/linux.go +++ b/v2/pkg/options/linux/linux.go @@ -4,10 +4,10 @@ package linux type WebviewGpuPolicy int const ( - // WebviewGpuPolicyAlways Hardware acceleration is always enabled. - WebviewGpuPolicyAlways WebviewGpuPolicy = iota // WebviewGpuPolicyOnDemand Hardware acceleration is enabled/disabled as request by web contents. - WebviewGpuPolicyOnDemand + WebviewGpuPolicyOnDemand WebviewGpuPolicy = iota + // WebviewGpuPolicyAlways Hardware acceleration is always enabled. + WebviewGpuPolicyAlways // WebviewGpuPolicyNever Hardware acceleration is always disabled. WebviewGpuPolicyNever ) diff --git a/v3/examples/binding/go.mod b/v3/examples/binding/go.mod index d53e53e657d..963d59f479a 100644 --- a/v3/examples/binding/go.mod +++ b/v3/examples/binding/go.mod @@ -39,11 +39,11 @@ require ( github.com/wailsapp/go-webview2 v1.0.9 // indirect github.com/wailsapp/mimetype v1.4.1 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect - golang.org/x/crypto v0.16.0 // indirect + golang.org/x/crypto v0.19.0 // indirect golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect golang.org/x/mod v0.12.0 // indirect golang.org/x/net v0.19.0 // indirect - golang.org/x/sys v0.15.0 // indirect + golang.org/x/sys v0.17.0 // indirect golang.org/x/tools v0.13.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect ) diff --git a/v3/examples/binding/go.sum b/v3/examples/binding/go.sum index b451aafd047..53111bf10b4 100644 --- a/v3/examples/binding/go.sum +++ b/v3/examples/binding/go.sum @@ -110,8 +110,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= -golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df h1:UA2aFVmmsIlefxMk29Dp2juaUSth8Pyn3Tq5Y5mJGME= golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= @@ -150,15 +150,15 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= -golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= +golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= diff --git a/v3/examples/contextmenus/assets/index.html b/v3/examples/contextmenus/assets/index.html index db6721e39d9..0c1c5e110aa 100644 --- a/v3/examples/contextmenus/assets/index.html +++ b/v3/examples/contextmenus/assets/index.html @@ -3,7 +3,7 @@ Title - + diff --git a/v3/examples/contextmenus/assets/runtime.js b/v3/examples/contextmenus/assets/runtime.js new file mode 100644 index 00000000000..baaccee0402 --- /dev/null +++ b/v3/examples/contextmenus/assets/runtime.js @@ -0,0 +1 @@ +(()=>{var de=Object.defineProperty;var w=(e,i)=>{for(var n in i)de(e,n,{get:i[n],enumerable:!0})};var T={};w(T,{Hide:()=>We,Quit:()=>fe,Show:()=>ge});var le="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var f=(e=21)=>{let i="",n=e;for(;n--;)i+=le[Math.random()*64|0];return i};var ce=window.location.origin+"/wails/runtime",d={Call:0,Clipboard:1,Application:2,Events:3,ContextMenu:4,Dialog:5,Window:6,Screens:7,System:8,Browser:9},se=f();function l(e,i){return function(n,o=null){return we(e,n,i,o)}}function we(e,i,n,o){let t=new URL(ce);t.searchParams.append("object",e),t.searchParams.append("method",i);let a={headers:{}};return n&&(a.headers["x-wails-window-name"]=n),o&&t.searchParams.append("args",JSON.stringify(o)),a.headers["x-wails-client-id"]=se,new Promise((s,p)=>{fetch(t,a).then(c=>{if(c.ok)return c.headers.get("Content-Type")&&c.headers.get("Content-Type").indexOf("application/json")!==-1?c.json():c.text();p(Error(c.statusText))}).then(c=>s(c)).catch(c=>p(c))})}var P=l(d.Application,""),me=0,ue=1,pe=2;function We(){return P(me)}function ge(){return P(ue)}function fe(){return P(pe)}var B={};w(B,{OpenURL:()=>b});var he=l(d.Browser,""),De=0;function b(e){return he(De,{url:e})}var I={};w(I,{SetText:()=>xe,Text:()=>Me});var q=l(d.Clipboard,""),Ce=0,Se=1;function xe(e){return q(Ce,{text:e})}function Me(){return q(Se)}var L={};w(L,{Capabilities:()=>Re,Environment:()=>Ee,IsAMD64:()=>Oe,IsARM:()=>Pe,IsARM64:()=>Te,IsDarkMode:()=>be,IsDebug:()=>F,IsLinux:()=>Ue,IsMac:()=>ye,IsWindows:()=>R,invoke:()=>h});var J=l(d.System,""),Ae=0,ve=1;function h(e){return window.chrome?window.chrome.webview.postMessage(e):window.webkit.messageHandlers.external.postMessage(e)}function be(){return J(Ae)}function Re(){return fetch("/wails/capabilities").json()}function Ee(){return J(ve)}function R(){return window._wails.environment.OS==="windows"}function Ue(){return window._wails.environment.OS==="linux"}function ye(){return window._wails.environment.OS==="darwin"}function Oe(){return window._wails.environment.Arch==="amd64"}function Pe(){return window._wails.environment.Arch==="arm"}function Te(){return window._wails.environment.Arch==="arm64"}function F(){return window._wails.environment.Debug===!0}window.addEventListener("contextmenu",Le);var Be=l(d.ContextMenu,""),Ie=0;function Fe(e,i,n,o){Be(Ie,{id:e,x:i,y:n,data:o})}function Le(e){let i=e.target,n=window.getComputedStyle(i).getPropertyValue("--custom-contextmenu");if(n=n?n.trim():"",n){e.preventDefault();let o=window.getComputedStyle(i).getPropertyValue("--custom-contextmenu-data");Fe(n,e.clientX,e.clientY,o);return}ze(e)}function ze(e){if(F())return;let i=e.target;switch(window.getComputedStyle(i).getPropertyValue("--default-contextmenu").trim()){case"show":return;case"hide":e.preventDefault();return;default:if(i.isContentEditable)return;let t=window.getSelection(),a=t.toString().length>0;if(a)for(let s=0;sS});function S(e){try{return window._wails.flags[e]}catch(i){throw new Error("Unable to retrieve flag '"+e+"': "+i)}}window._wails=window._wails||{};window._wails.setResizable=He;window._wails.endDrag=ee;window.addEventListener("mousedown",_e);window.addEventListener("mousemove",Ge);window.addEventListener("mouseup",je);var x=!1,E=null,$=!1,ke="auto";function Ne(e){let i=window.getComputedStyle(e.target).getPropertyValue("--webkit-app-region");return!i||i===""||i.trim()!=="drag"||e.buttons!==1?!1:e.detail===1}function He(e){$=e}function ee(){document.body.style.cursor="default",x=!1}function Ve(){return E?(h(`resize:${E}`),!0):!1}function _e(e){(R()&&Ve()||Ne(e))&&(x=!!Ze(e))}function Ze(e){return!(e.offsetX>e.target.clientWidth||e.offsetY>e.target.clientHeight)}function je(e){(e.buttons!==void 0?e.buttons:e.which)>0&&ee()}function u(e=ke){document.documentElement.style.cursor=e,E=e}function Ge(e){x=Ye(e),R()&&$&&Ke(e)}function Ye(e){let i=e.buttons!==void 0?e.buttons:e.which;return x&&i>0?(h("drag"),!1):x}function Ke(e){let i=S("system.resizeHandleHeight")||5,n=S("system.resizeHandleWidth")||5,o=S("resizeCornerExtra")||10,t=window.outerWidth-e.clientXJe,GetCurrent:()=>ei,GetPrimary:()=>$e});var k=l(d.Screens,""),Xe=0,Qe=1,qe=2;function Je(){return k(Xe)}function $e(){return k(Qe)}function ei(){return k(qe)}var H={};w(H,{Center:()=>Oi,Close:()=>Qi,Fullscreen:()=>Ti,Get:()=>U,GetZoomLevel:()=>rn,Height:()=>en,Hide:()=>Vi,Maximise:()=>_i,Minimise:()=>Gi,RelativePosition:()=>Ni,Restore:()=>Ki,Screen:()=>Hi,SetAlwaysOnTop:()=>zi,SetBackgroundColour:()=>qi,SetMaxSize:()=>Fi,SetMinSize:()=>Li,SetRelativePosition:()=>ki,SetResizable:()=>Ji,SetSize:()=>Bi,SetTitle:()=>Pi,SetZoomLevel:()=>an,Show:()=>Xi,Size:()=>Ii,ToggleMaximise:()=>ji,UnMaximise:()=>Zi,UnMinimise:()=>Yi,Width:()=>$i,ZoomIn:()=>nn,ZoomOut:()=>on,ZoomReset:()=>tn});var ii=0,ni=1,oi=2,ti=3,ri=4,ai=5,di=6,li=7,ci=8,si=9,wi=10,mi=11,ui=12,pi=13,Wi=14,gi=15,fi=16,hi=17,Di=18,Ci=19,Si=20,xi=21,Mi=22,Ai=23,vi=24,bi=25,Ri=26,Ei=27,Ui=28,yi=29,r=U("");function ie(e){return{Get:i=>ie(l(d.Window,i)),Center:()=>e(ii),SetTitle:i=>e(ni,{title:i}),Fullscreen:()=>e(oi),UnFullscreen:()=>e(ti),SetSize:(i,n)=>e(ri,{width:i,height:n}),Size:()=>e(ai),SetMaxSize:(i,n)=>e(di,{width:i,height:n}),SetMinSize:(i,n)=>e(li,{width:i,height:n}),SetAlwaysOnTop:i=>e(ci,{alwaysOnTop:i}),SetRelativePosition:(i,n)=>e(si,{x:i,y:n}),RelativePosition:()=>e(wi),Screen:()=>e(mi),Hide:()=>e(ui),Maximise:()=>e(pi),UnMaximise:()=>e(Wi),ToggleMaximise:()=>e(gi),Minimise:()=>e(fi),UnMinimise:()=>e(hi),Restore:()=>e(Di),Show:()=>e(Ci),Close:()=>e(Si),SetBackgroundColour:(i,n,o,t)=>e(xi,{r:i,g:n,b:o,a:t}),SetResizable:i=>e(Mi,{resizable:i}),Width:()=>e(Ai),Height:()=>e(vi),ZoomIn:()=>e(bi),ZoomOut:()=>e(Ri),ZoomReset:()=>e(Ei),GetZoomLevel:()=>e(Ui),SetZoomLevel:i=>e(yi,{zoomLevel:i})}}function U(e){return ie(l(d.Window,e))}function Oi(){r.Center()}function Pi(e){r.SetTitle(e)}function Ti(){r.Fullscreen()}function Bi(e,i){r.SetSize(e,i)}function Ii(){return r.Size()}function Fi(e,i){r.SetMaxSize(e,i)}function Li(e,i){r.SetMinSize(e,i)}function zi(e){r.SetAlwaysOnTop(e)}function ki(e,i){r.SetRelativePosition(e,i)}function Ni(){return r.RelativePosition()}function Hi(){return r.Screen()}function Vi(){r.Hide()}function _i(){r.Maximise()}function Zi(){r.UnMaximise()}function ji(){r.ToggleMaximise()}function Gi(){r.Minimise()}function Yi(){r.UnMinimise()}function Ki(){r.Restore()}function Xi(){r.Show()}function Qi(){r.Close()}function qi(e,i,n,o){r.SetBackgroundColour(e,i,n,o)}function Ji(e){r.SetResizable(e)}function $i(){return r.Width()}function en(){return r.Height()}function nn(){r.ZoomIn()}function on(){r.ZoomOut()}function tn(){r.ZoomReset()}function rn(){return r.GetZoomLevel()}function an(e){r.SetZoomLevel(e)}var K={};w(K,{Reload:()=>Y});var j={};w(j,{Emit:()=>Z,Off:()=>Wn,OffAll:()=>gn,On:()=>mn,OnMultiple:()=>_,Once:()=>un,Types:()=>dn,WailsEvent:()=>M,setup:()=>sn});var ne={Windows:{SystemThemeChanged:"windows:SystemThemeChanged",APMPowerStatusChange:"windows:APMPowerStatusChange",APMSuspend:"windows:APMSuspend",APMResumeAutomatic:"windows:APMResumeAutomatic",APMResumeSuspend:"windows:APMResumeSuspend",APMPowerSettingChange:"windows:APMPowerSettingChange",ApplicationStarted:"windows:ApplicationStarted",WebViewNavigationCompleted:"windows:WebViewNavigationCompleted",WindowInactive:"windows:WindowInactive",WindowActive:"windows:WindowActive",WindowClickActive:"windows:WindowClickActive",WindowMaximise:"windows:WindowMaximise",WindowUnMaximise:"windows:WindowUnMaximise",WindowFullscreen:"windows:WindowFullscreen",WindowUnFullscreen:"windows:WindowUnFullscreen",WindowRestore:"windows:WindowRestore",WindowMinimise:"windows:WindowMinimise",WindowUnMinimise:"windows:WindowUnMinimise",WindowClose:"windows:WindowClose",WindowSetFocus:"windows:WindowSetFocus",WindowKillFocus:"windows:WindowKillFocus",WindowDragDrop:"windows:WindowDragDrop",WindowDragEnter:"windows:WindowDragEnter",WindowDragLeave:"windows:WindowDragLeave",WindowDragOver:"windows:WindowDragOver"},Mac:{ApplicationDidBecomeActive:"mac:ApplicationDidBecomeActive",ApplicationDidChangeBackingProperties:"mac:ApplicationDidChangeBackingProperties",ApplicationDidChangeEffectiveAppearance:"mac:ApplicationDidChangeEffectiveAppearance",ApplicationDidChangeIcon:"mac:ApplicationDidChangeIcon",ApplicationDidChangeOcclusionState:"mac:ApplicationDidChangeOcclusionState",ApplicationDidChangeScreenParameters:"mac:ApplicationDidChangeScreenParameters",ApplicationDidChangeStatusBarFrame:"mac:ApplicationDidChangeStatusBarFrame",ApplicationDidChangeStatusBarOrientation:"mac:ApplicationDidChangeStatusBarOrientation",ApplicationDidFinishLaunching:"mac:ApplicationDidFinishLaunching",ApplicationDidHide:"mac:ApplicationDidHide",ApplicationDidResignActiveNotification:"mac:ApplicationDidResignActiveNotification",ApplicationDidUnhide:"mac:ApplicationDidUnhide",ApplicationDidUpdate:"mac:ApplicationDidUpdate",ApplicationWillBecomeActive:"mac:ApplicationWillBecomeActive",ApplicationWillFinishLaunching:"mac:ApplicationWillFinishLaunching",ApplicationWillHide:"mac:ApplicationWillHide",ApplicationWillResignActive:"mac:ApplicationWillResignActive",ApplicationWillTerminate:"mac:ApplicationWillTerminate",ApplicationWillUnhide:"mac:ApplicationWillUnhide",ApplicationWillUpdate:"mac:ApplicationWillUpdate",ApplicationDidChangeTheme:"mac:ApplicationDidChangeTheme!",ApplicationShouldHandleReopen:"mac:ApplicationShouldHandleReopen!",WindowDidBecomeKey:"mac:WindowDidBecomeKey",WindowDidBecomeMain:"mac:WindowDidBecomeMain",WindowDidBeginSheet:"mac:WindowDidBeginSheet",WindowDidChangeAlpha:"mac:WindowDidChangeAlpha",WindowDidChangeBackingLocation:"mac:WindowDidChangeBackingLocation",WindowDidChangeBackingProperties:"mac:WindowDidChangeBackingProperties",WindowDidChangeCollectionBehavior:"mac:WindowDidChangeCollectionBehavior",WindowDidChangeEffectiveAppearance:"mac:WindowDidChangeEffectiveAppearance",WindowDidChangeOcclusionState:"mac:WindowDidChangeOcclusionState",WindowDidChangeOrderingMode:"mac:WindowDidChangeOrderingMode",WindowDidChangeScreen:"mac:WindowDidChangeScreen",WindowDidChangeScreenParameters:"mac:WindowDidChangeScreenParameters",WindowDidChangeScreenProfile:"mac:WindowDidChangeScreenProfile",WindowDidChangeScreenSpace:"mac:WindowDidChangeScreenSpace",WindowDidChangeScreenSpaceProperties:"mac:WindowDidChangeScreenSpaceProperties",WindowDidChangeSharingType:"mac:WindowDidChangeSharingType",WindowDidChangeSpace:"mac:WindowDidChangeSpace",WindowDidChangeSpaceOrderingMode:"mac:WindowDidChangeSpaceOrderingMode",WindowDidChangeTitle:"mac:WindowDidChangeTitle",WindowDidChangeToolbar:"mac:WindowDidChangeToolbar",WindowDidChangeVisibility:"mac:WindowDidChangeVisibility",WindowDidDeminiaturize:"mac:WindowDidDeminiaturize",WindowDidEndSheet:"mac:WindowDidEndSheet",WindowDidEnterFullScreen:"mac:WindowDidEnterFullScreen",WindowDidEnterVersionBrowser:"mac:WindowDidEnterVersionBrowser",WindowDidExitFullScreen:"mac:WindowDidExitFullScreen",WindowDidExitVersionBrowser:"mac:WindowDidExitVersionBrowser",WindowDidExpose:"mac:WindowDidExpose",WindowDidFocus:"mac:WindowDidFocus",WindowDidMiniaturize:"mac:WindowDidMiniaturize",WindowDidMove:"mac:WindowDidMove",WindowDidOrderOffScreen:"mac:WindowDidOrderOffScreen",WindowDidOrderOnScreen:"mac:WindowDidOrderOnScreen",WindowDidResignKey:"mac:WindowDidResignKey",WindowDidResignMain:"mac:WindowDidResignMain",WindowDidResize:"mac:WindowDidResize",WindowDidUpdate:"mac:WindowDidUpdate",WindowDidUpdateAlpha:"mac:WindowDidUpdateAlpha",WindowDidUpdateCollectionBehavior:"mac:WindowDidUpdateCollectionBehavior",WindowDidUpdateCollectionProperties:"mac:WindowDidUpdateCollectionProperties",WindowDidUpdateShadow:"mac:WindowDidUpdateShadow",WindowDidUpdateTitle:"mac:WindowDidUpdateTitle",WindowDidUpdateToolbar:"mac:WindowDidUpdateToolbar",WindowDidUpdateVisibility:"mac:WindowDidUpdateVisibility",WindowShouldClose:"mac:WindowShouldClose!",WindowWillBecomeKey:"mac:WindowWillBecomeKey",WindowWillBecomeMain:"mac:WindowWillBecomeMain",WindowWillBeginSheet:"mac:WindowWillBeginSheet",WindowWillChangeOrderingMode:"mac:WindowWillChangeOrderingMode",WindowWillClose:"mac:WindowWillClose",WindowWillDeminiaturize:"mac:WindowWillDeminiaturize",WindowWillEnterFullScreen:"mac:WindowWillEnterFullScreen",WindowWillEnterVersionBrowser:"mac:WindowWillEnterVersionBrowser",WindowWillExitFullScreen:"mac:WindowWillExitFullScreen",WindowWillExitVersionBrowser:"mac:WindowWillExitVersionBrowser",WindowWillFocus:"mac:WindowWillFocus",WindowWillMiniaturize:"mac:WindowWillMiniaturize",WindowWillMove:"mac:WindowWillMove",WindowWillOrderOffScreen:"mac:WindowWillOrderOffScreen",WindowWillOrderOnScreen:"mac:WindowWillOrderOnScreen",WindowWillResignMain:"mac:WindowWillResignMain",WindowWillResize:"mac:WindowWillResize",WindowWillUnfocus:"mac:WindowWillUnfocus",WindowWillUpdate:"mac:WindowWillUpdate",WindowWillUpdateAlpha:"mac:WindowWillUpdateAlpha",WindowWillUpdateCollectionBehavior:"mac:WindowWillUpdateCollectionBehavior",WindowWillUpdateCollectionProperties:"mac:WindowWillUpdateCollectionProperties",WindowWillUpdateShadow:"mac:WindowWillUpdateShadow",WindowWillUpdateTitle:"mac:WindowWillUpdateTitle",WindowWillUpdateToolbar:"mac:WindowWillUpdateToolbar",WindowWillUpdateVisibility:"mac:WindowWillUpdateVisibility",WindowWillUseStandardFrame:"mac:WindowWillUseStandardFrame",MenuWillOpen:"mac:MenuWillOpen",MenuDidOpen:"mac:MenuDidOpen",MenuDidClose:"mac:MenuDidClose",MenuWillSendAction:"mac:MenuWillSendAction",MenuDidSendAction:"mac:MenuDidSendAction",MenuWillHighlightItem:"mac:MenuWillHighlightItem",MenuDidHighlightItem:"mac:MenuDidHighlightItem",MenuWillDisplayItem:"mac:MenuWillDisplayItem",MenuDidDisplayItem:"mac:MenuDidDisplayItem",MenuWillAddItem:"mac:MenuWillAddItem",MenuDidAddItem:"mac:MenuDidAddItem",MenuWillRemoveItem:"mac:MenuWillRemoveItem",MenuDidRemoveItem:"mac:MenuDidRemoveItem",MenuWillBeginTracking:"mac:MenuWillBeginTracking",MenuDidBeginTracking:"mac:MenuDidBeginTracking",MenuWillEndTracking:"mac:MenuWillEndTracking",MenuDidEndTracking:"mac:MenuDidEndTracking",MenuWillUpdate:"mac:MenuWillUpdate",MenuDidUpdate:"mac:MenuDidUpdate",MenuWillPopUp:"mac:MenuWillPopUp",MenuDidPopUp:"mac:MenuDidPopUp",MenuWillSendActionToItem:"mac:MenuWillSendActionToItem",MenuDidSendActionToItem:"mac:MenuDidSendActionToItem",WebViewDidStartProvisionalNavigation:"mac:WebViewDidStartProvisionalNavigation",WebViewDidReceiveServerRedirectForProvisionalNavigation:"mac:WebViewDidReceiveServerRedirectForProvisionalNavigation",WebViewDidFinishNavigation:"mac:WebViewDidFinishNavigation",WebViewDidCommitNavigation:"mac:WebViewDidCommitNavigation",WindowFileDraggingEntered:"mac:WindowFileDraggingEntered",WindowFileDraggingPerformed:"mac:WindowFileDraggingPerformed",WindowFileDraggingExited:"mac:WindowFileDraggingExited"},Linux:{SystemThemeChanged:"linux:SystemThemeChanged",WindowLoadChanged:"linux:WindowLoadChanged",WindowDeleteEvent:"linux:WindowDeleteEvent",WindowFocusIn:"linux:WindowFocusIn",WindowFocusOut:"linux:WindowFocusOut",ApplicationStartup:"linux:ApplicationStartup"},Common:{ApplicationStarted:"common:ApplicationStarted",WindowMaximise:"common:WindowMaximise",WindowUnMaximise:"common:WindowUnMaximise",WindowFullscreen:"common:WindowFullscreen",WindowUnFullscreen:"common:WindowUnFullscreen",WindowRestore:"common:WindowRestore",WindowMinimise:"common:WindowMinimise",WindowUnMinimise:"common:WindowUnMinimise",WindowClosing:"common:WindowClosing",WindowZoom:"common:WindowZoom",WindowZoomIn:"common:WindowZoomIn",WindowZoomOut:"common:WindowZoomOut",WindowZoomReset:"common:WindowZoomReset",WindowFocus:"common:WindowFocus",WindowLostFocus:"common:WindowLostFocus",WindowShow:"common:WindowShow",WindowHide:"common:WindowHide",WindowDPIChanged:"common:WindowDPIChanged",WindowFilesDropped:"common:WindowFilesDropped",WindowRuntimeReady:"common:WindowRuntimeReady",ThemeChanged:"common:ThemeChanged"}};var dn=ne;window._wails=window._wails||{};window._wails.dispatchWailsEvent=wn;var ln=l(d.Events,""),cn=0,m=new Map,V=class{constructor(i,n,o){this.eventName=i,this.maxCallbacks=o||-1,this.Callback=t=>(n(t),this.maxCallbacks===-1?!1:(this.maxCallbacks-=1,this.maxCallbacks===0))}},M=class{constructor(i,n=null){this.name=i,this.data=n}};function sn(){}function wn(e){let i=m.get(e.name);if(i){let n=i.filter(o=>{if(o.Callback(e))return!0});n.length>0&&(i=i.filter(o=>!n.includes(o)),i.length===0?m.delete(e.name):m.set(e.name,i))}}function _(e,i,n){let o=m.get(e)||[],t=new V(e,i,n);return o.push(t),m.set(e,o),()=>pn(t)}function mn(e,i){return _(e,i,-1)}function un(e,i){return _(e,i,1)}function pn(e){let i=e.eventName,n=m.get(i).filter(o=>o!==e);n.length===0?m.delete(i):m.set(i,n)}function Wn(e,...i){[e,...i].forEach(o=>m.delete(o))}function gn(){m.clear()}function Z(e){return ln(cn,e)}var G={};w(G,{Error:()=>Un,Info:()=>Rn,OpenFile:()=>yn,Question:()=>A,SaveFile:()=>On,Warning:()=>En});window._wails=window._wails||{};window._wails.dialogErrorCallback=bn;window._wails.dialogResultCallback=vn;var fn=0,hn=1,Dn=2,Cn=3,Sn=4,xn=5,Mn=l(d.Dialog,""),W=new Map;function An(){let e;do e=f();while(W.has(e));return e}function D(e,i={}){let n=An();return i["dialog-id"]=n,new Promise((o,t)=>{W.set(n,{resolve:o,reject:t}),Mn(e,i).catch(a=>{t(a),W.delete(n)})})}function vn(e,i,n){let o=W.get(e);o&&(n?o.resolve(JSON.parse(i)):o.resolve(i),W.delete(e))}function bn(e,i){let n=W.get(e);n&&(n.reject(i),W.delete(e))}var Rn=e=>D(fn,e),En=e=>D(hn,e),Un=e=>D(Dn,e),A=e=>D(Cn,e),yn=e=>D(Sn,e),On=e=>D(xn,e);function oe(e,i=null){let n=new M(e,i);Z(n)}function Pn(){document.querySelectorAll("[wml-event]").forEach(function(i){let n=i.getAttribute("wml-event"),o=i.getAttribute("wml-confirm"),t=i.getAttribute("wml-trigger")||"click",a=function(){if(o){A({Title:"Confirm",Message:o,Detached:!1,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(s){s!=="No"&&oe(n)});return}oe(n)};i.removeEventListener(t,a),i.addEventListener(t,a)})}function te(e,i){let n=U(e),o=In(n);o.has(i);try{o.get(i)()}catch{}}function Tn(){document.querySelectorAll("[wml-window]").forEach(function(i){let n=i.getAttribute("wml-window"),o=i.getAttribute("wml-confirm"),t=i.getAttribute("wml-trigger")||"click",a=i.getAttribute("wml-target-window")||"",s=function(){if(o){A({Title:"Confirm",Message:o,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(p){p!=="No"&&te(a,n)});return}te(a,n)};i.removeEventListener(t,s),i.addEventListener(t,s)})}function Bn(){document.querySelectorAll("[wml-openurl]").forEach(function(i){let n=i.getAttribute("wml-openurl"),o=i.getAttribute("wml-confirm"),t=i.getAttribute("wml-trigger")||"click",a=function(){if(o){A({Title:"Confirm",Message:o,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(s){s!=="No"&&b(n)});return}b(n)};i.removeEventListener(t,a),i.addEventListener(t,a)})}function Y(){Pn(),Tn(),Bn()}function In(e){let i=new Map;for(let n in e)typeof e[n]=="function"&&i.set(n,e[n]);return i}var X={};w(X,{ByID:()=>Vn,ByName:()=>Hn,Call:()=>Nn,Plugin:()=>_n});window._wails=window._wails||{};window._wails.callResultHandler=zn;window._wails.callErrorHandler=kn;var y=0,Fn=l(d.Call,""),v=new Map;function Ln(){let e;do e=f();while(v.has(e));return e}function zn(e,i,n){let o=re(e);o&&o.resolve(n?JSON.parse(i):i)}function kn(e,i){let n=re(e);n&&n.reject(i)}function re(e){let i=v.get(e);return v.delete(e),i}function O(e,i={}){return new Promise((n,o)=>{let t=Ln();i["call-id"]=t,v.set(t,{resolve:n,reject:o}),Fn(e,i).catch(a=>{o(a),v.delete(t)})})}function Nn(e){return O(y,e)}function Hn(e,...i){if(typeof e!="string"||e.split(".").length!==3)throw new Error("CallByName requires a string in the format 'package.struct.method'");let[n,o,t]=e.split(".");return O(y,{packageName:n,structName:o,methodName:t,args:i})}function Vn(e,...i){return O(y,{methodID:e,args:i})}function _n(e,i,...n){return O(y,{packageName:"wails-plugins",structName:e,methodName:i,args:n})}window._wails=window._wails||{};window._wails.invoke=h;window.wails=window.wails||{};window.wails.Application=T;window.wails.Browser=B;window.wails.Call=X;window.wails.Clipboard=I;window.wails.Dialogs=G;window.wails.Events=j;window.wails.Flags=z;window.wails.Screens=N;window.wails.System=L;window.wails.Window=H;window.wails.WML=K;var ae=!1;document.addEventListener("DOMContentLoaded",function(){ae=!0,window._wails.invoke("wails:runtime:ready")});function Zn(e){ae||document.readyState==="complete"?e():document.addEventListener("DOMContentLoaded",e)}Zn(()=>{Y()});})(); diff --git a/v3/examples/dev/go.mod b/v3/examples/dev/go.mod index cebd31d2402..33fde4e41f8 100644 --- a/v3/examples/dev/go.mod +++ b/v3/examples/dev/go.mod @@ -1,17 +1,19 @@ module changeme -go 1.21 +go 1.21.1 + +toolchain go1.22.0 require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 require ( - github.com/Microsoft/go-winio v0.4.16 // indirect + github.com/Microsoft/go-winio v0.6.1 // indirect github.com/bep/debounce v1.2.1 // indirect github.com/ebitengine/purego v0.4.0-alpha.4 // indirect - github.com/emirpasic/gods v1.12.0 // indirect - github.com/go-git/gcfg v1.5.0 // indirect - github.com/go-git/go-billy/v5 v5.2.0 // indirect - github.com/go-git/go-git/v5 v5.3.0 // indirect + github.com/emirpasic/gods v1.18.1 // indirect + github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect + github.com/go-git/go-billy/v5 v5.5.0 // indirect + github.com/go-git/go-git/v5 v5.11.0 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/godbus/dbus/v5 v5.1.0 // indirect github.com/google/uuid v1.3.0 // indirect @@ -19,11 +21,11 @@ require ( github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect + github.com/kevinburke/ssh_config v1.2.0 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/leaanthony/go-ansi-parser v1.6.1 // indirect github.com/leaanthony/u v1.1.0 // indirect - github.com/lmittmann/tint v1.0.0 // indirect + github.com/lmittmann/tint v1.0.3 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.19 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect @@ -31,17 +33,17 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect github.com/rivo/uniseg v0.4.4 // indirect - github.com/rogpeppe/go-internal v1.10.1-0.20230524175051-ec119421bb97 // indirect + github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/samber/lo v1.38.1 // indirect github.com/sergi/go-diff v1.2.0 // indirect github.com/stretchr/testify v1.8.4 // indirect github.com/wailsapp/go-webview2 v1.0.9 // indirect github.com/wailsapp/mimetype v1.4.1 // indirect - github.com/xanzy/ssh-agent v0.3.0 // indirect - golang.org/x/crypto v0.9.0 // indirect + github.com/xanzy/ssh-agent v0.3.3 // indirect + golang.org/x/crypto v0.19.0 // indirect golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/sys v0.13.0 // indirect + golang.org/x/net v0.19.0 // indirect + golang.org/x/sys v0.17.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect ) diff --git a/v3/examples/dev/go.sum b/v3/examples/dev/go.sum index acb39d10195..817d628318a 100644 --- a/v3/examples/dev/go.sum +++ b/v3/examples/dev/go.sum @@ -1,6 +1,8 @@ github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk= github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= +github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7 h1:uSoVVbwJiQipAclBbw+8quDsfcvFjOpI5iCf4p/cqCs= github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA= @@ -17,19 +19,23 @@ github.com/ebitengine/purego v0.4.0-alpha.4 h1:Y7yIV06Yo5M2BAdD7EVPhfp6LZ0tEcQo5 github.com/ebitengine/purego v0.4.0-alpha.4/go.mod h1:ah1In8AOtksoNK6yk5z1HTJeUkC1Ez4Wk2idgGslMwQ= github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= +github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= +github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= github.com/go-git/go-billy/v5 v5.0.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= github.com/go-git/go-billy/v5 v5.1.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= github.com/go-git/go-billy/v5 v5.2.0 h1:GcoouCP9J+5slw2uXAocL70z8ml4A8B/H8nEPt6CLPk= github.com/go-git/go-billy/v5 v5.2.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= +github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12 h1:PbKy9zOy4aAKrJ5pibIRpVO2BXnK1Tlcg+caKI7Ox5M= github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12/go.mod h1:m+ICp2rF3jDhFgEZ/8yziagdT1C+ZpZcrJjappBCDSw= github.com/go-git/go-git/v5 v5.3.0 h1:8WKMtJR2j8RntEXR/uvTKagfEt4GYlwQ7mntE4+0GWc= github.com/go-git/go-git/v5 v5.3.0/go.mod h1:xdX4bWJ48aOrdhnl2XqHYstHbbp6+LFS4r4X+lNVprw= +github.com/go-git/go-git/v5 v5.11.0/go.mod h1:6GFcX2P3NM7FPBfpePbpLd21XxsgdAt+lKqXmCUiUCY= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= @@ -51,6 +57,7 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 h1:DowS9hvgyYSX4TO5NpyC606/Z4SxnNYbT+WX27or6Ck= github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= +github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -66,6 +73,7 @@ github.com/leaanthony/u v1.1.0 h1:2n0d2BwPVXSUq5yhe8lJPHdxevE2qK5G99PMStMZMaI= github.com/leaanthony/u v1.1.0/go.mod h1:9+o6hejoRljvZ3BzdYlVL0JYCwtnAsVuN9pVTQcaRfI= github.com/lmittmann/tint v1.0.0 h1:fzEj70K1L58uyoePQxKe+ezDZJ5pybiWGdA0JeFvvyw= github.com/lmittmann/tint v1.0.0/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE= +github.com/lmittmann/tint v1.0.3/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE= github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= @@ -94,12 +102,14 @@ github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUc github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.1-0.20230524175051-ec119421bb97 h1:3RPlVWzZ/PDqmVuf/FKHARG5EMid/tl7cv54Sw/QRVY= github.com/rogpeppe/go-internal v1.10.1-0.20230524175051-ec119421bb97/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/samber/lo v1.38.1 h1:j2XEAqXKb09Am4ebOg31SpvzUTTs6EN3VfgeLUhPdXM= github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= @@ -113,31 +123,43 @@ github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhw github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI= github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= +github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df h1:UA2aFVmmsIlefxMk29Dp2juaUSth8Pyn3Tq5Y5mJGME= golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= diff --git a/v3/examples/events/assets/index.html b/v3/examples/events/assets/index.html index d8e0906ee5e..a64a42c32da 100644 --- a/v3/examples/events/assets/index.html +++ b/v3/examples/events/assets/index.html @@ -3,6 +3,7 @@ Title + diff --git a/v3/examples/events/assets/runtime.js b/v3/examples/events/assets/runtime.js new file mode 100644 index 00000000000..ec430090db6 --- /dev/null +++ b/v3/examples/events/assets/runtime.js @@ -0,0 +1 @@ +(()=>{var de=Object.defineProperty;var w=(e,i)=>{for(var n in i)de(e,n,{get:i[n],enumerable:!0})};var T={};w(T,{Hide:()=>We,Quit:()=>fe,Show:()=>ge});var le="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var f=(e=21)=>{let i="",n=e;for(;n--;)i+=le[Math.random()*64|0];return i};var ce=window.location.origin+"/wails/runtime",d={Call:0,Clipboard:1,Application:2,Events:3,ContextMenu:4,Dialog:5,Window:6,Screens:7,System:8,Browser:9},se=f();function l(e,i){return function(n,o=null){return we(e,n,i,o)}}function we(e,i,n,o){let t=new URL(ce);t.searchParams.append("object",e),t.searchParams.append("method",i);let a={headers:{}};return n&&(a.headers["x-wails-window-name"]=n),o&&t.searchParams.append("args",JSON.stringify(o)),a.headers["x-wails-client-id"]=se,new Promise((s,p)=>{fetch(t,a).then(c=>{if(c.ok)return c.headers.get("Content-Type")&&c.headers.get("Content-Type").indexOf("application/json")!==-1?c.json():c.text();p(Error(c.statusText))}).then(c=>s(c)).catch(c=>p(c))})}var P=l(d.Application,""),me=0,ue=1,pe=2;function We(){return P(me)}function ge(){return P(ue)}function fe(){return P(pe)}var B={};w(B,{OpenURL:()=>b});var he=l(d.Browser,""),De=0;function b(e){return he(De,{url:e})}var I={};w(I,{SetText:()=>Me,Text:()=>xe});var q=l(d.Clipboard,""),Ce=0,Se=1;function Me(e){return q(Ce,{text:e})}function xe(){return q(Se)}var L={};w(L,{Capabilities:()=>Re,Environment:()=>Ee,IsAMD64:()=>Oe,IsARM:()=>Pe,IsARM64:()=>Te,IsDarkMode:()=>be,IsDebug:()=>F,IsLinux:()=>Ue,IsMac:()=>ye,IsWindows:()=>R,invoke:()=>h});var J=l(d.System,""),Ae=0,ve=1;function h(e){return window.chrome?window.chrome.webview.postMessage(e):window.webkit.messageHandlers.external.postMessage(e)}function be(){return J(Ae)}function Re(){return fetch("/wails/capabilities").json()}function Ee(){return J(ve)}function R(){return window._wails.environment.OS==="windows"}function Ue(){return window._wails.environment.OS==="linux"}function ye(){return window._wails.environment.OS==="darwin"}function Oe(){return window._wails.environment.Arch==="amd64"}function Pe(){return window._wails.environment.Arch==="arm"}function Te(){return window._wails.environment.Arch==="arm64"}function F(){return window._wails.environment.Debug===!0}window.addEventListener("contextmenu",Le);var Be=l(d.ContextMenu,""),Ie=0;function Fe(e,i,n,o){Be(Ie,{id:e,x:i,y:n,data:o})}function Le(e){let i=e.target,n=window.getComputedStyle(i).getPropertyValue("--custom-contextmenu");if(n=n?n.trim():"",n){e.preventDefault();let o=window.getComputedStyle(i).getPropertyValue("--custom-contextmenu-data");Fe(n,e.clientX,e.clientY,o);return}ze(e)}function ze(e){if(F())return;let i=e.target;switch(window.getComputedStyle(i).getPropertyValue("--default-contextmenu").trim()){case"show":return;case"hide":e.preventDefault();return;default:if(i.isContentEditable)return;let t=window.getSelection(),a=t.toString().length>0;if(a)for(let s=0;sS});function S(e){try{return window._wails.flags[e]}catch(i){throw new Error("Unable to retrieve flag '"+e+"': "+i)}}window._wails=window._wails||{};window._wails.setResizable=He;window._wails.endDrag=ee;window.addEventListener("mousedown",_e);window.addEventListener("mousemove",Ge);window.addEventListener("mouseup",je);var M=!1,E=null,$=!1,ke="auto";function Ne(e){let i=window.getComputedStyle(e.target).getPropertyValue("--webkit-app-region");return!i||i===""||i.trim()!=="drag"||e.buttons!==1?!1:e.detail===1}function He(e){$=e}function ee(){document.body.style.cursor="default",M=!1}function Ve(){return E?(h(`resize:${E}`),!0):!1}function _e(e){(R()&&Ve()||Ne(e))&&(M=!!Ze(e))}function Ze(e){return!(e.offsetX>e.target.clientWidth||e.offsetY>e.target.clientHeight)}function je(e){(e.buttons!==void 0?e.buttons:e.which)>0&&ee()}function u(e=ke){document.documentElement.style.cursor=e,E=e}function Ge(e){M=Ye(e),R()&&$&&Ke(e)}function Ye(e){let i=e.buttons!==void 0?e.buttons:e.which;return M&&i>0?(h("drag"),!1):M}function Ke(e){let i=S("system.resizeHandleHeight")||5,n=S("system.resizeHandleWidth")||5,o=S("resizeCornerExtra")||10,t=window.outerWidth-e.clientXJe,GetCurrent:()=>ei,GetPrimary:()=>$e});var k=l(d.Screens,""),Xe=0,Qe=1,qe=2;function Je(){return k(Xe)}function $e(){return k(Qe)}function ei(){return k(qe)}var H={};w(H,{Center:()=>Oi,Close:()=>Qi,Fullscreen:()=>Ti,Get:()=>U,GetZoomLevel:()=>rn,Height:()=>en,Hide:()=>Vi,Maximise:()=>_i,Minimise:()=>Gi,RelativePosition:()=>Ni,Restore:()=>Ki,Screen:()=>Hi,SetAlwaysOnTop:()=>zi,SetBackgroundColour:()=>qi,SetMaxSize:()=>Fi,SetMinSize:()=>Li,SetRelativePosition:()=>ki,SetResizable:()=>Ji,SetSize:()=>Bi,SetTitle:()=>Pi,SetZoomLevel:()=>an,Show:()=>Xi,Size:()=>Ii,ToggleMaximise:()=>ji,UnMaximise:()=>Zi,UnMinimise:()=>Yi,Width:()=>$i,ZoomIn:()=>nn,ZoomOut:()=>on,ZoomReset:()=>tn});var ii=0,ni=1,oi=2,ti=3,ri=4,ai=5,di=6,li=7,ci=8,si=9,wi=10,mi=11,ui=12,pi=13,Wi=14,gi=15,fi=16,hi=17,Di=18,Ci=19,Si=20,Mi=21,xi=22,Ai=23,vi=24,bi=25,Ri=26,Ei=27,Ui=28,yi=29,r=U("");function ie(e){return{Get:i=>ie(l(d.Window,i)),Center:()=>e(ii),SetTitle:i=>e(ni,{title:i}),Fullscreen:()=>e(oi),UnFullscreen:()=>e(ti),SetSize:(i,n)=>e(ri,{width:i,height:n}),Size:()=>e(ai),SetMaxSize:(i,n)=>e(di,{width:i,height:n}),SetMinSize:(i,n)=>e(li,{width:i,height:n}),SetAlwaysOnTop:i=>e(ci,{alwaysOnTop:i}),SetRelativePosition:(i,n)=>e(si,{x:i,y:n}),RelativePosition:()=>e(wi),Screen:()=>e(mi),Hide:()=>e(ui),Maximise:()=>e(pi),UnMaximise:()=>e(Wi),ToggleMaximise:()=>e(gi),Minimise:()=>e(fi),UnMinimise:()=>e(hi),Restore:()=>e(Di),Show:()=>e(Ci),Close:()=>e(Si),SetBackgroundColour:(i,n,o,t)=>e(Mi,{r:i,g:n,b:o,a:t}),SetResizable:i=>e(xi,{resizable:i}),Width:()=>e(Ai),Height:()=>e(vi),ZoomIn:()=>e(bi),ZoomOut:()=>e(Ri),ZoomReset:()=>e(Ei),GetZoomLevel:()=>e(Ui),SetZoomLevel:i=>e(yi,{zoomLevel:i})}}function U(e){return ie(l(d.Window,e))}function Oi(){r.Center()}function Pi(e){r.SetTitle(e)}function Ti(){r.Fullscreen()}function Bi(e,i){r.SetSize(e,i)}function Ii(){return r.Size()}function Fi(e,i){r.SetMaxSize(e,i)}function Li(e,i){r.SetMinSize(e,i)}function zi(e){r.SetAlwaysOnTop(e)}function ki(e,i){r.SetRelativePosition(e,i)}function Ni(){return r.RelativePosition()}function Hi(){return r.Screen()}function Vi(){r.Hide()}function _i(){r.Maximise()}function Zi(){r.UnMaximise()}function ji(){r.ToggleMaximise()}function Gi(){r.Minimise()}function Yi(){r.UnMinimise()}function Ki(){r.Restore()}function Xi(){r.Show()}function Qi(){r.Close()}function qi(e,i,n,o){r.SetBackgroundColour(e,i,n,o)}function Ji(e){r.SetResizable(e)}function $i(){return r.Width()}function en(){return r.Height()}function nn(){r.ZoomIn()}function on(){r.ZoomOut()}function tn(){r.ZoomReset()}function rn(){return r.GetZoomLevel()}function an(e){r.SetZoomLevel(e)}var K={};w(K,{Reload:()=>Y});var j={};w(j,{Emit:()=>Z,Off:()=>Wn,OffAll:()=>gn,On:()=>mn,OnMultiple:()=>_,Once:()=>un,Types:()=>dn,WailsEvent:()=>x,setup:()=>sn});var ne={Windows:{SystemThemeChanged:"windows:SystemThemeChanged",APMPowerStatusChange:"windows:APMPowerStatusChange",APMSuspend:"windows:APMSuspend",APMResumeAutomatic:"windows:APMResumeAutomatic",APMResumeSuspend:"windows:APMResumeSuspend",APMPowerSettingChange:"windows:APMPowerSettingChange",ApplicationStarted:"windows:ApplicationStarted",WebViewNavigationCompleted:"windows:WebViewNavigationCompleted",WindowInactive:"windows:WindowInactive",WindowActive:"windows:WindowActive",WindowClickActive:"windows:WindowClickActive",WindowMaximise:"windows:WindowMaximise",WindowUnMaximise:"windows:WindowUnMaximise",WindowFullscreen:"windows:WindowFullscreen",WindowUnFullscreen:"windows:WindowUnFullscreen",WindowRestore:"windows:WindowRestore",WindowMinimise:"windows:WindowMinimise",WindowUnMinimise:"windows:WindowUnMinimise",WindowClose:"windows:WindowClose",WindowSetFocus:"windows:WindowSetFocus",WindowKillFocus:"windows:WindowKillFocus",WindowDragDrop:"windows:WindowDragDrop",WindowDragEnter:"windows:WindowDragEnter",WindowDragLeave:"windows:WindowDragLeave",WindowDragOver:"windows:WindowDragOver"},Mac:{ApplicationDidBecomeActive:"mac:ApplicationDidBecomeActive",ApplicationDidChangeBackingProperties:"mac:ApplicationDidChangeBackingProperties",ApplicationDidChangeEffectiveAppearance:"mac:ApplicationDidChangeEffectiveAppearance",ApplicationDidChangeIcon:"mac:ApplicationDidChangeIcon",ApplicationDidChangeOcclusionState:"mac:ApplicationDidChangeOcclusionState",ApplicationDidChangeScreenParameters:"mac:ApplicationDidChangeScreenParameters",ApplicationDidChangeStatusBarFrame:"mac:ApplicationDidChangeStatusBarFrame",ApplicationDidChangeStatusBarOrientation:"mac:ApplicationDidChangeStatusBarOrientation",ApplicationDidFinishLaunching:"mac:ApplicationDidFinishLaunching",ApplicationDidHide:"mac:ApplicationDidHide",ApplicationDidResignActiveNotification:"mac:ApplicationDidResignActiveNotification",ApplicationDidUnhide:"mac:ApplicationDidUnhide",ApplicationDidUpdate:"mac:ApplicationDidUpdate",ApplicationWillBecomeActive:"mac:ApplicationWillBecomeActive",ApplicationWillFinishLaunching:"mac:ApplicationWillFinishLaunching",ApplicationWillHide:"mac:ApplicationWillHide",ApplicationWillResignActive:"mac:ApplicationWillResignActive",ApplicationWillTerminate:"mac:ApplicationWillTerminate",ApplicationWillUnhide:"mac:ApplicationWillUnhide",ApplicationWillUpdate:"mac:ApplicationWillUpdate",ApplicationDidChangeTheme:"mac:ApplicationDidChangeTheme!",ApplicationShouldHandleReopen:"mac:ApplicationShouldHandleReopen!",WindowDidBecomeKey:"mac:WindowDidBecomeKey",WindowDidBecomeMain:"mac:WindowDidBecomeMain",WindowDidBeginSheet:"mac:WindowDidBeginSheet",WindowDidChangeAlpha:"mac:WindowDidChangeAlpha",WindowDidChangeBackingLocation:"mac:WindowDidChangeBackingLocation",WindowDidChangeBackingProperties:"mac:WindowDidChangeBackingProperties",WindowDidChangeCollectionBehavior:"mac:WindowDidChangeCollectionBehavior",WindowDidChangeEffectiveAppearance:"mac:WindowDidChangeEffectiveAppearance",WindowDidChangeOcclusionState:"mac:WindowDidChangeOcclusionState",WindowDidChangeOrderingMode:"mac:WindowDidChangeOrderingMode",WindowDidChangeScreen:"mac:WindowDidChangeScreen",WindowDidChangeScreenParameters:"mac:WindowDidChangeScreenParameters",WindowDidChangeScreenProfile:"mac:WindowDidChangeScreenProfile",WindowDidChangeScreenSpace:"mac:WindowDidChangeScreenSpace",WindowDidChangeScreenSpaceProperties:"mac:WindowDidChangeScreenSpaceProperties",WindowDidChangeSharingType:"mac:WindowDidChangeSharingType",WindowDidChangeSpace:"mac:WindowDidChangeSpace",WindowDidChangeSpaceOrderingMode:"mac:WindowDidChangeSpaceOrderingMode",WindowDidChangeTitle:"mac:WindowDidChangeTitle",WindowDidChangeToolbar:"mac:WindowDidChangeToolbar",WindowDidChangeVisibility:"mac:WindowDidChangeVisibility",WindowDidDeminiaturize:"mac:WindowDidDeminiaturize",WindowDidEndSheet:"mac:WindowDidEndSheet",WindowDidEnterFullScreen:"mac:WindowDidEnterFullScreen",WindowDidEnterVersionBrowser:"mac:WindowDidEnterVersionBrowser",WindowDidExitFullScreen:"mac:WindowDidExitFullScreen",WindowDidExitVersionBrowser:"mac:WindowDidExitVersionBrowser",WindowDidExpose:"mac:WindowDidExpose",WindowDidFocus:"mac:WindowDidFocus",WindowDidMiniaturize:"mac:WindowDidMiniaturize",WindowDidMove:"mac:WindowDidMove",WindowDidOrderOffScreen:"mac:WindowDidOrderOffScreen",WindowDidOrderOnScreen:"mac:WindowDidOrderOnScreen",WindowDidResignKey:"mac:WindowDidResignKey",WindowDidResignMain:"mac:WindowDidResignMain",WindowDidResize:"mac:WindowDidResize",WindowDidUpdate:"mac:WindowDidUpdate",WindowDidUpdateAlpha:"mac:WindowDidUpdateAlpha",WindowDidUpdateCollectionBehavior:"mac:WindowDidUpdateCollectionBehavior",WindowDidUpdateCollectionProperties:"mac:WindowDidUpdateCollectionProperties",WindowDidUpdateShadow:"mac:WindowDidUpdateShadow",WindowDidUpdateTitle:"mac:WindowDidUpdateTitle",WindowDidUpdateToolbar:"mac:WindowDidUpdateToolbar",WindowDidUpdateVisibility:"mac:WindowDidUpdateVisibility",WindowShouldClose:"mac:WindowShouldClose!",WindowWillBecomeKey:"mac:WindowWillBecomeKey",WindowWillBecomeMain:"mac:WindowWillBecomeMain",WindowWillBeginSheet:"mac:WindowWillBeginSheet",WindowWillChangeOrderingMode:"mac:WindowWillChangeOrderingMode",WindowWillClose:"mac:WindowWillClose",WindowWillDeminiaturize:"mac:WindowWillDeminiaturize",WindowWillEnterFullScreen:"mac:WindowWillEnterFullScreen",WindowWillEnterVersionBrowser:"mac:WindowWillEnterVersionBrowser",WindowWillExitFullScreen:"mac:WindowWillExitFullScreen",WindowWillExitVersionBrowser:"mac:WindowWillExitVersionBrowser",WindowWillFocus:"mac:WindowWillFocus",WindowWillMiniaturize:"mac:WindowWillMiniaturize",WindowWillMove:"mac:WindowWillMove",WindowWillOrderOffScreen:"mac:WindowWillOrderOffScreen",WindowWillOrderOnScreen:"mac:WindowWillOrderOnScreen",WindowWillResignMain:"mac:WindowWillResignMain",WindowWillResize:"mac:WindowWillResize",WindowWillUnfocus:"mac:WindowWillUnfocus",WindowWillUpdate:"mac:WindowWillUpdate",WindowWillUpdateAlpha:"mac:WindowWillUpdateAlpha",WindowWillUpdateCollectionBehavior:"mac:WindowWillUpdateCollectionBehavior",WindowWillUpdateCollectionProperties:"mac:WindowWillUpdateCollectionProperties",WindowWillUpdateShadow:"mac:WindowWillUpdateShadow",WindowWillUpdateTitle:"mac:WindowWillUpdateTitle",WindowWillUpdateToolbar:"mac:WindowWillUpdateToolbar",WindowWillUpdateVisibility:"mac:WindowWillUpdateVisibility",WindowWillUseStandardFrame:"mac:WindowWillUseStandardFrame",MenuWillOpen:"mac:MenuWillOpen",MenuDidOpen:"mac:MenuDidOpen",MenuDidClose:"mac:MenuDidClose",MenuWillSendAction:"mac:MenuWillSendAction",MenuDidSendAction:"mac:MenuDidSendAction",MenuWillHighlightItem:"mac:MenuWillHighlightItem",MenuDidHighlightItem:"mac:MenuDidHighlightItem",MenuWillDisplayItem:"mac:MenuWillDisplayItem",MenuDidDisplayItem:"mac:MenuDidDisplayItem",MenuWillAddItem:"mac:MenuWillAddItem",MenuDidAddItem:"mac:MenuDidAddItem",MenuWillRemoveItem:"mac:MenuWillRemoveItem",MenuDidRemoveItem:"mac:MenuDidRemoveItem",MenuWillBeginTracking:"mac:MenuWillBeginTracking",MenuDidBeginTracking:"mac:MenuDidBeginTracking",MenuWillEndTracking:"mac:MenuWillEndTracking",MenuDidEndTracking:"mac:MenuDidEndTracking",MenuWillUpdate:"mac:MenuWillUpdate",MenuDidUpdate:"mac:MenuDidUpdate",MenuWillPopUp:"mac:MenuWillPopUp",MenuDidPopUp:"mac:MenuDidPopUp",MenuWillSendActionToItem:"mac:MenuWillSendActionToItem",MenuDidSendActionToItem:"mac:MenuDidSendActionToItem",WebViewDidStartProvisionalNavigation:"mac:WebViewDidStartProvisionalNavigation",WebViewDidReceiveServerRedirectForProvisionalNavigation:"mac:WebViewDidReceiveServerRedirectForProvisionalNavigation",WebViewDidFinishNavigation:"mac:WebViewDidFinishNavigation",WebViewDidCommitNavigation:"mac:WebViewDidCommitNavigation",WindowFileDraggingEntered:"mac:WindowFileDraggingEntered",WindowFileDraggingPerformed:"mac:WindowFileDraggingPerformed",WindowFileDraggingExited:"mac:WindowFileDraggingExited"},Linux:{SystemThemeChanged:"linux:SystemThemeChanged"},Common:{ApplicationStarted:"common:ApplicationStarted",WindowMaximise:"common:WindowMaximise",WindowUnMaximise:"common:WindowUnMaximise",WindowFullscreen:"common:WindowFullscreen",WindowUnFullscreen:"common:WindowUnFullscreen",WindowRestore:"common:WindowRestore",WindowMinimise:"common:WindowMinimise",WindowUnMinimise:"common:WindowUnMinimise",WindowClosing:"common:WindowClosing",WindowZoom:"common:WindowZoom",WindowZoomIn:"common:WindowZoomIn",WindowZoomOut:"common:WindowZoomOut",WindowZoomReset:"common:WindowZoomReset",WindowFocus:"common:WindowFocus",WindowLostFocus:"common:WindowLostFocus",WindowShow:"common:WindowShow",WindowHide:"common:WindowHide",WindowDPIChanged:"common:WindowDPIChanged",WindowFilesDropped:"common:WindowFilesDropped",WindowRuntimeReady:"common:WindowRuntimeReady",ThemeChanged:"common:ThemeChanged"}};var dn=ne;window._wails=window._wails||{};window._wails.dispatchWailsEvent=wn;var ln=l(d.Events,""),cn=0,m=new Map,V=class{constructor(i,n,o){this.eventName=i,this.maxCallbacks=o||-1,this.Callback=t=>(n(t),this.maxCallbacks===-1?!1:(this.maxCallbacks-=1,this.maxCallbacks===0))}},x=class{constructor(i,n=null){this.name=i,this.data=n}};function sn(){}function wn(e){let i=m.get(e.name);if(i){let n=i.filter(o=>{if(o.Callback(e))return!0});n.length>0&&(i=i.filter(o=>!n.includes(o)),i.length===0?m.delete(e.name):m.set(e.name,i))}}function _(e,i,n){let o=m.get(e)||[],t=new V(e,i,n);return o.push(t),m.set(e,o),()=>pn(t)}function mn(e,i){return _(e,i,-1)}function un(e,i){return _(e,i,1)}function pn(e){let i=e.eventName,n=m.get(i).filter(o=>o!==e);n.length===0?m.delete(i):m.set(i,n)}function Wn(e,...i){[e,...i].forEach(o=>m.delete(o))}function gn(){m.clear()}function Z(e){return ln(cn,e)}var G={};w(G,{Error:()=>Un,Info:()=>Rn,OpenFile:()=>yn,Question:()=>A,SaveFile:()=>On,Warning:()=>En});window._wails=window._wails||{};window._wails.dialogErrorCallback=bn;window._wails.dialogResultCallback=vn;var fn=0,hn=1,Dn=2,Cn=3,Sn=4,Mn=5,xn=l(d.Dialog,""),W=new Map;function An(){let e;do e=f();while(W.has(e));return e}function D(e,i={}){let n=An();return i["dialog-id"]=n,new Promise((o,t)=>{W.set(n,{resolve:o,reject:t}),xn(e,i).catch(a=>{t(a),W.delete(n)})})}function vn(e,i,n){let o=W.get(e);o&&(n?o.resolve(JSON.parse(i)):o.resolve(i),W.delete(e))}function bn(e,i){let n=W.get(e);n&&(n.reject(i),W.delete(e))}var Rn=e=>D(fn,e),En=e=>D(hn,e),Un=e=>D(Dn,e),A=e=>D(Cn,e),yn=e=>D(Sn,e),On=e=>D(Mn,e);function oe(e,i=null){let n=new x(e,i);Z(n)}function Pn(){document.querySelectorAll("[wml-event]").forEach(function(i){let n=i.getAttribute("wml-event"),o=i.getAttribute("wml-confirm"),t=i.getAttribute("wml-trigger")||"click",a=function(){if(o){A({Title:"Confirm",Message:o,Detached:!1,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(s){s!=="No"&&oe(n)});return}oe(n)};i.removeEventListener(t,a),i.addEventListener(t,a)})}function te(e,i){let n=U(e),o=In(n);o.has(i);try{o.get(i)()}catch{}}function Tn(){document.querySelectorAll("[wml-window]").forEach(function(i){let n=i.getAttribute("wml-window"),o=i.getAttribute("wml-confirm"),t=i.getAttribute("wml-trigger")||"click",a=i.getAttribute("wml-target-window")||"",s=function(){if(o){A({Title:"Confirm",Message:o,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(p){p!=="No"&&te(a,n)});return}te(a,n)};i.removeEventListener(t,s),i.addEventListener(t,s)})}function Bn(){document.querySelectorAll("[wml-openurl]").forEach(function(i){let n=i.getAttribute("wml-openurl"),o=i.getAttribute("wml-confirm"),t=i.getAttribute("wml-trigger")||"click",a=function(){if(o){A({Title:"Confirm",Message:o,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(s){s!=="No"&&b(n)});return}b(n)};i.removeEventListener(t,a),i.addEventListener(t,a)})}function Y(){Pn(),Tn(),Bn()}function In(e){let i=new Map;for(let n in e)typeof e[n]=="function"&&i.set(n,e[n]);return i}var X={};w(X,{ByID:()=>Vn,ByName:()=>Hn,Call:()=>Nn,Plugin:()=>_n});window._wails=window._wails||{};window._wails.callResultHandler=zn;window._wails.callErrorHandler=kn;var y=0,Fn=l(d.Call,""),v=new Map;function Ln(){let e;do e=f();while(v.has(e));return e}function zn(e,i,n){let o=re(e);o&&o.resolve(n?JSON.parse(i):i)}function kn(e,i){let n=re(e);n&&n.reject(i)}function re(e){let i=v.get(e);return v.delete(e),i}function O(e,i={}){return new Promise((n,o)=>{let t=Ln();i["call-id"]=t,v.set(t,{resolve:n,reject:o}),Fn(e,i).catch(a=>{o(a),v.delete(t)})})}function Nn(e){return O(y,e)}function Hn(e,...i){if(typeof e!="string"||e.split(".").length!==3)throw new Error("CallByName requires a string in the format 'package.struct.method'");let[n,o,t]=e.split(".");return O(y,{packageName:n,structName:o,methodName:t,args:i})}function Vn(e,...i){return O(y,{methodID:e,args:i})}function _n(e,i,...n){return O(y,{packageName:"wails-plugins",structName:e,methodName:i,args:n})}window._wails=window._wails||{};window._wails.invoke=h;window.wails=window.wails||{};window.wails.Application=T;window.wails.Browser=B;window.wails.Call=X;window.wails.Clipboard=I;window.wails.Dialogs=G;window.wails.Events=j;window.wails.Flags=z;window.wails.Screens=N;window.wails.System=L;window.wails.Window=H;window.wails.WML=K;var ae=!1;document.addEventListener("DOMContentLoaded",function(){ae=!0,window._wails.invoke("wails:runtime:ready")});function Zn(e){ae||document.readyState==="complete"?e():document.addEventListener("DOMContentLoaded",e)}Zn(()=>{Y()});})(); diff --git a/v3/examples/frameless/assets/runtime.js b/v3/examples/frameless/assets/runtime.js index 2c7d16ed30b..baaccee0402 100644 --- a/v3/examples/frameless/assets/runtime.js +++ b/v3/examples/frameless/assets/runtime.js @@ -1 +1 @@ -(()=>{var le=Object.defineProperty;var w=(e,i)=>{for(var n in i)le(e,n,{get:i[n],enumerable:!0})};var T={};w(T,{Hide:()=>We,Quit:()=>fe,Show:()=>ge});var de="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var f=(e=21)=>{let i="",n=e;for(;n--;)i+=de[Math.random()*64|0];return i};var ce=window.location.origin+"/wails/runtime",l={Call:0,Clipboard:1,Application:2,Events:3,ContextMenu:4,Dialog:5,Window:6,Screens:7,System:8,Browser:9,CancelCall:10},se=f();function d(e,i){return function(n,o=null){return we(e,n,i,o)}}function we(e,i,n,o){let t=new URL(ce);t.searchParams.append("object",e),t.searchParams.append("method",i);let a={headers:{}};return n&&(a.headers["x-wails-window-name"]=n),o&&t.searchParams.append("args",JSON.stringify(o)),a.headers["x-wails-client-id"]=se,new Promise((s,m)=>{fetch(t,a).then(c=>{if(c.ok)return c.headers.get("Content-Type")&&c.headers.get("Content-Type").indexOf("application/json")!==-1?c.json():c.text();m(Error(c.statusText))}).then(c=>s(c)).catch(c=>m(c))})}var P=d(l.Application,""),me=0,ue=1,pe=2;function We(){return P(me)}function ge(){return P(ue)}function fe(){return P(pe)}var B={};w(B,{OpenURL:()=>b});var he=d(l.Browser,""),De=0;function b(e){return he(De,{url:e})}var I={};w(I,{SetText:()=>Me,Text:()=>xe});var Q=d(l.Clipboard,""),Ce=0,Se=1;function Me(e){return Q(Ce,{text:e})}function xe(){return Q(Se)}var L={};w(L,{Capabilities:()=>Re,Environment:()=>Ee,IsAMD64:()=>Oe,IsARM:()=>Pe,IsARM64:()=>Te,IsDarkMode:()=>be,IsDebug:()=>F,IsLinux:()=>Ue,IsMac:()=>ye,IsWindows:()=>R,invoke:()=>h});var J=d(l.System,""),Ae=0,ve=1;function h(e){return window.chrome?window.chrome.webview.postMessage(e):window.webkit.messageHandlers.external.postMessage(e)}function be(){return J(Ae)}function Re(){return fetch("/wails/capabilities").json()}function Ee(){return J(ve)}function R(){return window._wails.environment.OS==="windows"}function Ue(){return window._wails.environment.OS==="linux"}function ye(){return window._wails.environment.OS==="darwin"}function Oe(){return window._wails.environment.Arch==="amd64"}function Pe(){return window._wails.environment.Arch==="arm"}function Te(){return window._wails.environment.Arch==="arm64"}function F(){return window._wails.environment.Debug===!0}window.addEventListener("contextmenu",Le);var Be=d(l.ContextMenu,""),Ie=0;function Fe(e,i,n,o){Be(Ie,{id:e,x:i,y:n,data:o})}function Le(e){let i=e.target,n=window.getComputedStyle(i).getPropertyValue("--custom-contextmenu");if(n=n?n.trim():"",n){e.preventDefault();let o=window.getComputedStyle(i).getPropertyValue("--custom-contextmenu-data");Fe(n,e.clientX,e.clientY,o);return}ze(e)}function ze(e){if(F())return;let i=e.target;switch(window.getComputedStyle(i).getPropertyValue("--default-contextmenu").trim()){case"show":return;case"hide":e.preventDefault();return;default:if(i.isContentEditable)return;let t=window.getSelection(),a=t.toString().length>0;if(a)for(let s=0;sS});function S(e){try{return window._wails.flags[e]}catch(i){throw new Error("Unable to retrieve flag '"+e+"': "+i)}}window._wails=window._wails||{};window._wails.setResizable=He;window._wails.endDrag=ee;window.addEventListener("mousedown",_e);window.addEventListener("mousemove",Ge);window.addEventListener("mouseup",je);var M=!1,E=null,$=!1,ke="auto";function Ne(e){let i=window.getComputedStyle(e.target).getPropertyValue("--webkit-app-region");return!i||i===""||i.trim()!=="drag"||e.buttons!==1?!1:e.detail===1}function He(e){$=e}function ee(){document.body.style.cursor="default",M=!1}function Ve(){return E?(h(`resize:${E}`),!0):!1}function _e(e){(R()&&Ve()||Ne(e))&&(M=!!Ze(e))}function Ze(e){return!(e.offsetX>e.target.clientWidth||e.offsetY>e.target.clientHeight)}function je(e){(e.buttons!==void 0?e.buttons:e.which)>0&&ee()}function W(e=ke){document.documentElement.style.cursor=e,E=e}function Ge(e){M=Ye(e),R()&&$&&Ke(e)}function Ye(e){let i=e.buttons!==void 0?e.buttons:e.which;return M&&i>0?(h("drag"),!1):M}function Ke(e){let i=S("system.resizeHandleHeight")||5,n=S("system.resizeHandleWidth")||5,o=S("resizeCornerExtra")||10,t=window.outerWidth-e.clientXJe,GetCurrent:()=>ei,GetPrimary:()=>$e});var k=d(l.Screens,""),Xe=0,qe=1,Qe=2;function Je(){return k(Xe)}function $e(){return k(qe)}function ei(){return k(Qe)}var H={};w(H,{Center:()=>Oi,Close:()=>qi,Fullscreen:()=>Ti,Get:()=>U,GetZoomLevel:()=>rn,Height:()=>en,Hide:()=>Vi,Maximise:()=>_i,Minimise:()=>Gi,RelativePosition:()=>Ni,Restore:()=>Ki,Screen:()=>Hi,SetAlwaysOnTop:()=>zi,SetBackgroundColour:()=>Qi,SetMaxSize:()=>Fi,SetMinSize:()=>Li,SetRelativePosition:()=>ki,SetResizable:()=>Ji,SetSize:()=>Bi,SetTitle:()=>Pi,SetZoomLevel:()=>an,Show:()=>Xi,Size:()=>Ii,ToggleMaximise:()=>ji,UnMaximise:()=>Zi,UnMinimise:()=>Yi,Width:()=>$i,ZoomIn:()=>nn,ZoomOut:()=>on,ZoomReset:()=>tn});var ii=0,ni=1,oi=2,ti=3,ri=4,ai=5,li=6,di=7,ci=8,si=9,wi=10,mi=11,ui=12,pi=13,Wi=14,gi=15,fi=16,hi=17,Di=18,Ci=19,Si=20,Mi=21,xi=22,Ai=23,vi=24,bi=25,Ri=26,Ei=27,Ui=28,yi=29,r=U("");function ie(e){return{Get:i=>ie(d(l.Window,i)),Center:()=>e(ii),SetTitle:i=>e(ni,{title:i}),Fullscreen:()=>e(oi),UnFullscreen:()=>e(ti),SetSize:(i,n)=>e(ri,{width:i,height:n}),Size:()=>e(ai),SetMaxSize:(i,n)=>e(li,{width:i,height:n}),SetMinSize:(i,n)=>e(di,{width:i,height:n}),SetAlwaysOnTop:i=>e(ci,{alwaysOnTop:i}),SetRelativePosition:(i,n)=>e(si,{x:i,y:n}),RelativePosition:()=>e(wi),Screen:()=>e(mi),Hide:()=>e(ui),Maximise:()=>e(pi),UnMaximise:()=>e(Wi),ToggleMaximise:()=>e(gi),Minimise:()=>e(fi),UnMinimise:()=>e(hi),Restore:()=>e(Di),Show:()=>e(Ci),Close:()=>e(Si),SetBackgroundColour:(i,n,o,t)=>e(Mi,{r:i,g:n,b:o,a:t}),SetResizable:i=>e(xi,{resizable:i}),Width:()=>e(Ai),Height:()=>e(vi),ZoomIn:()=>e(bi),ZoomOut:()=>e(Ri),ZoomReset:()=>e(Ei),GetZoomLevel:()=>e(Ui),SetZoomLevel:i=>e(yi,{zoomLevel:i})}}function U(e){return ie(d(l.Window,e))}function Oi(){r.Center()}function Pi(e){r.SetTitle(e)}function Ti(){r.Fullscreen()}function Bi(e,i){r.SetSize(e,i)}function Ii(){return r.Size()}function Fi(e,i){r.SetMaxSize(e,i)}function Li(e,i){r.SetMinSize(e,i)}function zi(e){r.SetAlwaysOnTop(e)}function ki(e,i){r.SetRelativePosition(e,i)}function Ni(){return r.RelativePosition()}function Hi(){return r.Screen()}function Vi(){r.Hide()}function _i(){r.Maximise()}function Zi(){r.UnMaximise()}function ji(){r.ToggleMaximise()}function Gi(){r.Minimise()}function Yi(){r.UnMinimise()}function Ki(){r.Restore()}function Xi(){r.Show()}function qi(){r.Close()}function Qi(e,i,n,o){r.SetBackgroundColour(e,i,n,o)}function Ji(e){r.SetResizable(e)}function $i(){return r.Width()}function en(){return r.Height()}function nn(){r.ZoomIn()}function on(){r.ZoomOut()}function tn(){r.ZoomReset()}function rn(){return r.GetZoomLevel()}function an(e){r.SetZoomLevel(e)}var K={};w(K,{Reload:()=>Y});var j={};w(j,{Emit:()=>Z,Off:()=>Wn,OffAll:()=>gn,On:()=>mn,OnMultiple:()=>_,Once:()=>un,Types:()=>ln,WailsEvent:()=>x,setup:()=>sn});var ne={Windows:{SystemThemeChanged:"windows:SystemThemeChanged",APMPowerStatusChange:"windows:APMPowerStatusChange",APMSuspend:"windows:APMSuspend",APMResumeAutomatic:"windows:APMResumeAutomatic",APMResumeSuspend:"windows:APMResumeSuspend",APMPowerSettingChange:"windows:APMPowerSettingChange",ApplicationStarted:"windows:ApplicationStarted",WebViewNavigationCompleted:"windows:WebViewNavigationCompleted",WindowInactive:"windows:WindowInactive",WindowActive:"windows:WindowActive",WindowClickActive:"windows:WindowClickActive",WindowMaximise:"windows:WindowMaximise",WindowUnMaximise:"windows:WindowUnMaximise",WindowFullscreen:"windows:WindowFullscreen",WindowUnFullscreen:"windows:WindowUnFullscreen",WindowRestore:"windows:WindowRestore",WindowMinimise:"windows:WindowMinimise",WindowUnMinimise:"windows:WindowUnMinimise",WindowClose:"windows:WindowClose",WindowSetFocus:"windows:WindowSetFocus",WindowKillFocus:"windows:WindowKillFocus",WindowDragDrop:"windows:WindowDragDrop",WindowDragEnter:"windows:WindowDragEnter",WindowDragLeave:"windows:WindowDragLeave",WindowDragOver:"windows:WindowDragOver"},Mac:{ApplicationDidBecomeActive:"mac:ApplicationDidBecomeActive",ApplicationDidChangeBackingProperties:"mac:ApplicationDidChangeBackingProperties",ApplicationDidChangeEffectiveAppearance:"mac:ApplicationDidChangeEffectiveAppearance",ApplicationDidChangeIcon:"mac:ApplicationDidChangeIcon",ApplicationDidChangeOcclusionState:"mac:ApplicationDidChangeOcclusionState",ApplicationDidChangeScreenParameters:"mac:ApplicationDidChangeScreenParameters",ApplicationDidChangeStatusBarFrame:"mac:ApplicationDidChangeStatusBarFrame",ApplicationDidChangeStatusBarOrientation:"mac:ApplicationDidChangeStatusBarOrientation",ApplicationDidFinishLaunching:"mac:ApplicationDidFinishLaunching",ApplicationDidHide:"mac:ApplicationDidHide",ApplicationDidResignActiveNotification:"mac:ApplicationDidResignActiveNotification",ApplicationDidUnhide:"mac:ApplicationDidUnhide",ApplicationDidUpdate:"mac:ApplicationDidUpdate",ApplicationWillBecomeActive:"mac:ApplicationWillBecomeActive",ApplicationWillFinishLaunching:"mac:ApplicationWillFinishLaunching",ApplicationWillHide:"mac:ApplicationWillHide",ApplicationWillResignActive:"mac:ApplicationWillResignActive",ApplicationWillTerminate:"mac:ApplicationWillTerminate",ApplicationWillUnhide:"mac:ApplicationWillUnhide",ApplicationWillUpdate:"mac:ApplicationWillUpdate",ApplicationDidChangeTheme:"mac:ApplicationDidChangeTheme!",ApplicationShouldHandleReopen:"mac:ApplicationShouldHandleReopen!",WindowDidBecomeKey:"mac:WindowDidBecomeKey",WindowDidBecomeMain:"mac:WindowDidBecomeMain",WindowDidBeginSheet:"mac:WindowDidBeginSheet",WindowDidChangeAlpha:"mac:WindowDidChangeAlpha",WindowDidChangeBackingLocation:"mac:WindowDidChangeBackingLocation",WindowDidChangeBackingProperties:"mac:WindowDidChangeBackingProperties",WindowDidChangeCollectionBehavior:"mac:WindowDidChangeCollectionBehavior",WindowDidChangeEffectiveAppearance:"mac:WindowDidChangeEffectiveAppearance",WindowDidChangeOcclusionState:"mac:WindowDidChangeOcclusionState",WindowDidChangeOrderingMode:"mac:WindowDidChangeOrderingMode",WindowDidChangeScreen:"mac:WindowDidChangeScreen",WindowDidChangeScreenParameters:"mac:WindowDidChangeScreenParameters",WindowDidChangeScreenProfile:"mac:WindowDidChangeScreenProfile",WindowDidChangeScreenSpace:"mac:WindowDidChangeScreenSpace",WindowDidChangeScreenSpaceProperties:"mac:WindowDidChangeScreenSpaceProperties",WindowDidChangeSharingType:"mac:WindowDidChangeSharingType",WindowDidChangeSpace:"mac:WindowDidChangeSpace",WindowDidChangeSpaceOrderingMode:"mac:WindowDidChangeSpaceOrderingMode",WindowDidChangeTitle:"mac:WindowDidChangeTitle",WindowDidChangeToolbar:"mac:WindowDidChangeToolbar",WindowDidChangeVisibility:"mac:WindowDidChangeVisibility",WindowDidDeminiaturize:"mac:WindowDidDeminiaturize",WindowDidEndSheet:"mac:WindowDidEndSheet",WindowDidEnterFullScreen:"mac:WindowDidEnterFullScreen",WindowDidEnterVersionBrowser:"mac:WindowDidEnterVersionBrowser",WindowDidExitFullScreen:"mac:WindowDidExitFullScreen",WindowDidExitVersionBrowser:"mac:WindowDidExitVersionBrowser",WindowDidExpose:"mac:WindowDidExpose",WindowDidFocus:"mac:WindowDidFocus",WindowDidMiniaturize:"mac:WindowDidMiniaturize",WindowDidMove:"mac:WindowDidMove",WindowDidOrderOffScreen:"mac:WindowDidOrderOffScreen",WindowDidOrderOnScreen:"mac:WindowDidOrderOnScreen",WindowDidResignKey:"mac:WindowDidResignKey",WindowDidResignMain:"mac:WindowDidResignMain",WindowDidResize:"mac:WindowDidResize",WindowDidUpdate:"mac:WindowDidUpdate",WindowDidUpdateAlpha:"mac:WindowDidUpdateAlpha",WindowDidUpdateCollectionBehavior:"mac:WindowDidUpdateCollectionBehavior",WindowDidUpdateCollectionProperties:"mac:WindowDidUpdateCollectionProperties",WindowDidUpdateShadow:"mac:WindowDidUpdateShadow",WindowDidUpdateTitle:"mac:WindowDidUpdateTitle",WindowDidUpdateToolbar:"mac:WindowDidUpdateToolbar",WindowDidUpdateVisibility:"mac:WindowDidUpdateVisibility",WindowShouldClose:"mac:WindowShouldClose!",WindowWillBecomeKey:"mac:WindowWillBecomeKey",WindowWillBecomeMain:"mac:WindowWillBecomeMain",WindowWillBeginSheet:"mac:WindowWillBeginSheet",WindowWillChangeOrderingMode:"mac:WindowWillChangeOrderingMode",WindowWillClose:"mac:WindowWillClose",WindowWillDeminiaturize:"mac:WindowWillDeminiaturize",WindowWillEnterFullScreen:"mac:WindowWillEnterFullScreen",WindowWillEnterVersionBrowser:"mac:WindowWillEnterVersionBrowser",WindowWillExitFullScreen:"mac:WindowWillExitFullScreen",WindowWillExitVersionBrowser:"mac:WindowWillExitVersionBrowser",WindowWillFocus:"mac:WindowWillFocus",WindowWillMiniaturize:"mac:WindowWillMiniaturize",WindowWillMove:"mac:WindowWillMove",WindowWillOrderOffScreen:"mac:WindowWillOrderOffScreen",WindowWillOrderOnScreen:"mac:WindowWillOrderOnScreen",WindowWillResignMain:"mac:WindowWillResignMain",WindowWillResize:"mac:WindowWillResize",WindowWillUnfocus:"mac:WindowWillUnfocus",WindowWillUpdate:"mac:WindowWillUpdate",WindowWillUpdateAlpha:"mac:WindowWillUpdateAlpha",WindowWillUpdateCollectionBehavior:"mac:WindowWillUpdateCollectionBehavior",WindowWillUpdateCollectionProperties:"mac:WindowWillUpdateCollectionProperties",WindowWillUpdateShadow:"mac:WindowWillUpdateShadow",WindowWillUpdateTitle:"mac:WindowWillUpdateTitle",WindowWillUpdateToolbar:"mac:WindowWillUpdateToolbar",WindowWillUpdateVisibility:"mac:WindowWillUpdateVisibility",WindowWillUseStandardFrame:"mac:WindowWillUseStandardFrame",MenuWillOpen:"mac:MenuWillOpen",MenuDidOpen:"mac:MenuDidOpen",MenuDidClose:"mac:MenuDidClose",MenuWillSendAction:"mac:MenuWillSendAction",MenuDidSendAction:"mac:MenuDidSendAction",MenuWillHighlightItem:"mac:MenuWillHighlightItem",MenuDidHighlightItem:"mac:MenuDidHighlightItem",MenuWillDisplayItem:"mac:MenuWillDisplayItem",MenuDidDisplayItem:"mac:MenuDidDisplayItem",MenuWillAddItem:"mac:MenuWillAddItem",MenuDidAddItem:"mac:MenuDidAddItem",MenuWillRemoveItem:"mac:MenuWillRemoveItem",MenuDidRemoveItem:"mac:MenuDidRemoveItem",MenuWillBeginTracking:"mac:MenuWillBeginTracking",MenuDidBeginTracking:"mac:MenuDidBeginTracking",MenuWillEndTracking:"mac:MenuWillEndTracking",MenuDidEndTracking:"mac:MenuDidEndTracking",MenuWillUpdate:"mac:MenuWillUpdate",MenuDidUpdate:"mac:MenuDidUpdate",MenuWillPopUp:"mac:MenuWillPopUp",MenuDidPopUp:"mac:MenuDidPopUp",MenuWillSendActionToItem:"mac:MenuWillSendActionToItem",MenuDidSendActionToItem:"mac:MenuDidSendActionToItem",WebViewDidStartProvisionalNavigation:"mac:WebViewDidStartProvisionalNavigation",WebViewDidReceiveServerRedirectForProvisionalNavigation:"mac:WebViewDidReceiveServerRedirectForProvisionalNavigation",WebViewDidFinishNavigation:"mac:WebViewDidFinishNavigation",WebViewDidCommitNavigation:"mac:WebViewDidCommitNavigation",WindowFileDraggingEntered:"mac:WindowFileDraggingEntered",WindowFileDraggingPerformed:"mac:WindowFileDraggingPerformed",WindowFileDraggingExited:"mac:WindowFileDraggingExited"},Linux:{SystemThemeChanged:"linux:SystemThemeChanged"},Common:{ApplicationStarted:"common:ApplicationStarted",WindowMaximise:"common:WindowMaximise",WindowUnMaximise:"common:WindowUnMaximise",WindowFullscreen:"common:WindowFullscreen",WindowUnFullscreen:"common:WindowUnFullscreen",WindowRestore:"common:WindowRestore",WindowMinimise:"common:WindowMinimise",WindowUnMinimise:"common:WindowUnMinimise",WindowClosing:"common:WindowClosing",WindowZoom:"common:WindowZoom",WindowZoomIn:"common:WindowZoomIn",WindowZoomOut:"common:WindowZoomOut",WindowZoomReset:"common:WindowZoomReset",WindowFocus:"common:WindowFocus",WindowLostFocus:"common:WindowLostFocus",WindowShow:"common:WindowShow",WindowHide:"common:WindowHide",WindowDPIChanged:"common:WindowDPIChanged",WindowFilesDropped:"common:WindowFilesDropped",WindowRuntimeReady:"common:WindowRuntimeReady",ThemeChanged:"common:ThemeChanged"}};var ln=ne;window._wails=window._wails||{};window._wails.dispatchWailsEvent=wn;var dn=d(l.Events,""),cn=0,u=new Map,V=class{constructor(i,n,o){this.eventName=i,this.maxCallbacks=o||-1,this.Callback=t=>(n(t),this.maxCallbacks===-1?!1:(this.maxCallbacks-=1,this.maxCallbacks===0))}},x=class{constructor(i,n=null){this.name=i,this.data=n}};function sn(){}function wn(e){let i=u.get(e.name);if(i){let n=i.filter(o=>{if(o.Callback(e))return!0});n.length>0&&(i=i.filter(o=>!n.includes(o)),i.length===0?u.delete(e.name):u.set(e.name,i))}}function _(e,i,n){let o=u.get(e)||[],t=new V(e,i,n);return o.push(t),u.set(e,o),()=>pn(t)}function mn(e,i){return _(e,i,-1)}function un(e,i){return _(e,i,1)}function pn(e){let i=e.eventName,n=u.get(i).filter(o=>o!==e);n.length===0?u.delete(i):u.set(i,n)}function Wn(e,...i){[e,...i].forEach(o=>u.delete(o))}function gn(){u.clear()}function Z(e){return dn(cn,e)}var G={};w(G,{Error:()=>Un,Info:()=>Rn,OpenFile:()=>yn,Question:()=>A,SaveFile:()=>On,Warning:()=>En});window._wails=window._wails||{};window._wails.dialogErrorCallback=bn;window._wails.dialogResultCallback=vn;var fn=0,hn=1,Dn=2,Cn=3,Sn=4,Mn=5,xn=d(l.Dialog,""),g=new Map;function An(){let e;do e=f();while(g.has(e));return e}function D(e,i={}){let n=An();return i["dialog-id"]=n,new Promise((o,t)=>{g.set(n,{resolve:o,reject:t}),xn(e,i).catch(a=>{t(a),g.delete(n)})})}function vn(e,i,n){let o=g.get(e);o&&(n?o.resolve(JSON.parse(i)):o.resolve(i),g.delete(e))}function bn(e,i){let n=g.get(e);n&&(n.reject(i),g.delete(e))}var Rn=e=>D(fn,e),En=e=>D(hn,e),Un=e=>D(Dn,e),A=e=>D(Cn,e),yn=e=>D(Sn,e),On=e=>D(Mn,e);function oe(e,i=null){let n=new x(e,i);Z(n)}function Pn(){document.querySelectorAll("[wml-event]").forEach(function(i){let n=i.getAttribute("wml-event"),o=i.getAttribute("wml-confirm"),t=i.getAttribute("wml-trigger")||"click",a=function(){if(o){A({Title:"Confirm",Message:o,Detached:!1,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(s){s!=="No"&&oe(n)});return}oe(n)};i.removeEventListener(t,a),i.addEventListener(t,a)})}function te(e,i){let n=U(e),o=In(n);o.has(i);try{o.get(i)()}catch{}}function Tn(){document.querySelectorAll("[wml-window]").forEach(function(i){let n=i.getAttribute("wml-window"),o=i.getAttribute("wml-confirm"),t=i.getAttribute("wml-trigger")||"click",a=i.getAttribute("wml-target-window")||"",s=function(){if(o){A({Title:"Confirm",Message:o,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(m){m!=="No"&&te(a,n)});return}te(a,n)};i.removeEventListener(t,s),i.addEventListener(t,s)})}function Bn(){document.querySelectorAll("[wml-openurl]").forEach(function(i){let n=i.getAttribute("wml-openurl"),o=i.getAttribute("wml-confirm"),t=i.getAttribute("wml-trigger")||"click",a=function(){if(o){A({Title:"Confirm",Message:o,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(s){s!=="No"&&b(n)});return}b(n)};i.removeEventListener(t,a),i.addEventListener(t,a)})}function Y(){Pn(),Tn(),Bn()}function In(e){let i=new Map;for(let n in e)typeof e[n]=="function"&&i.set(n,e[n]);return i}var X={};w(X,{ByID:()=>_n,ByName:()=>Vn,Call:()=>Hn,Plugin:()=>Zn});window._wails=window._wails||{};window._wails.callResultHandler=kn;window._wails.callErrorHandler=Nn;var y=0,Fn=d(l.Call,""),Ln=d(l.CancelCall,""),v=new Map;function zn(){let e;do e=f();while(v.has(e));return e}function kn(e,i,n){let o=re(e);o&&o.resolve(n?JSON.parse(i):i)}function Nn(e,i){let n=re(e);n&&n.reject(i)}function re(e){let i=v.get(e);return v.delete(e),i}function O(e,i={}){let n=zn(),o=()=>{Ln(e,{"call-id":n})};var t=!1,a=!1,s=new Promise((m,c)=>{i["call-id"]=n,v.set(n,{resolve:m,reject:c}),Fn(e,i).then(p=>{a=!0,t&&o()}).catch(p=>{c(p),v.delete(n)})});return s.cancel=()=>{a?o():t=!0},s}function Hn(e){return O(y,e)}function Vn(e,...i){if(typeof e!="string"||e.split(".").length!==3)throw new Error("CallByName requires a string in the format 'package.struct.method'");let[n,o,t]=e.split(".");return O(y,{packageName:n,structName:o,methodName:t,args:i})}function _n(e,...i){return O(y,{methodID:e,args:i})}function Zn(e,i,...n){return O(y,{packageName:"wails-plugins",structName:e,methodName:i,args:n})}window._wails=window._wails||{};window._wails.invoke=h;window.wails=window.wails||{};window.wails.Application=T;window.wails.Browser=B;window.wails.Call=X;window.wails.Clipboard=I;window.wails.Dialogs=G;window.wails.Events=j;window.wails.Flags=z;window.wails.Screens=N;window.wails.System=L;window.wails.Window=H;window.wails.WML=K;var ae=!1;document.addEventListener("DOMContentLoaded",function(){ae=!0,window._wails.invoke("wails:runtime:ready")});function jn(e){ae||document.readyState==="complete"?e():document.addEventListener("DOMContentLoaded",e)}jn(()=>{Y()});})(); +(()=>{var de=Object.defineProperty;var w=(e,i)=>{for(var n in i)de(e,n,{get:i[n],enumerable:!0})};var T={};w(T,{Hide:()=>We,Quit:()=>fe,Show:()=>ge});var le="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var f=(e=21)=>{let i="",n=e;for(;n--;)i+=le[Math.random()*64|0];return i};var ce=window.location.origin+"/wails/runtime",d={Call:0,Clipboard:1,Application:2,Events:3,ContextMenu:4,Dialog:5,Window:6,Screens:7,System:8,Browser:9},se=f();function l(e,i){return function(n,o=null){return we(e,n,i,o)}}function we(e,i,n,o){let t=new URL(ce);t.searchParams.append("object",e),t.searchParams.append("method",i);let a={headers:{}};return n&&(a.headers["x-wails-window-name"]=n),o&&t.searchParams.append("args",JSON.stringify(o)),a.headers["x-wails-client-id"]=se,new Promise((s,p)=>{fetch(t,a).then(c=>{if(c.ok)return c.headers.get("Content-Type")&&c.headers.get("Content-Type").indexOf("application/json")!==-1?c.json():c.text();p(Error(c.statusText))}).then(c=>s(c)).catch(c=>p(c))})}var P=l(d.Application,""),me=0,ue=1,pe=2;function We(){return P(me)}function ge(){return P(ue)}function fe(){return P(pe)}var B={};w(B,{OpenURL:()=>b});var he=l(d.Browser,""),De=0;function b(e){return he(De,{url:e})}var I={};w(I,{SetText:()=>xe,Text:()=>Me});var q=l(d.Clipboard,""),Ce=0,Se=1;function xe(e){return q(Ce,{text:e})}function Me(){return q(Se)}var L={};w(L,{Capabilities:()=>Re,Environment:()=>Ee,IsAMD64:()=>Oe,IsARM:()=>Pe,IsARM64:()=>Te,IsDarkMode:()=>be,IsDebug:()=>F,IsLinux:()=>Ue,IsMac:()=>ye,IsWindows:()=>R,invoke:()=>h});var J=l(d.System,""),Ae=0,ve=1;function h(e){return window.chrome?window.chrome.webview.postMessage(e):window.webkit.messageHandlers.external.postMessage(e)}function be(){return J(Ae)}function Re(){return fetch("/wails/capabilities").json()}function Ee(){return J(ve)}function R(){return window._wails.environment.OS==="windows"}function Ue(){return window._wails.environment.OS==="linux"}function ye(){return window._wails.environment.OS==="darwin"}function Oe(){return window._wails.environment.Arch==="amd64"}function Pe(){return window._wails.environment.Arch==="arm"}function Te(){return window._wails.environment.Arch==="arm64"}function F(){return window._wails.environment.Debug===!0}window.addEventListener("contextmenu",Le);var Be=l(d.ContextMenu,""),Ie=0;function Fe(e,i,n,o){Be(Ie,{id:e,x:i,y:n,data:o})}function Le(e){let i=e.target,n=window.getComputedStyle(i).getPropertyValue("--custom-contextmenu");if(n=n?n.trim():"",n){e.preventDefault();let o=window.getComputedStyle(i).getPropertyValue("--custom-contextmenu-data");Fe(n,e.clientX,e.clientY,o);return}ze(e)}function ze(e){if(F())return;let i=e.target;switch(window.getComputedStyle(i).getPropertyValue("--default-contextmenu").trim()){case"show":return;case"hide":e.preventDefault();return;default:if(i.isContentEditable)return;let t=window.getSelection(),a=t.toString().length>0;if(a)for(let s=0;sS});function S(e){try{return window._wails.flags[e]}catch(i){throw new Error("Unable to retrieve flag '"+e+"': "+i)}}window._wails=window._wails||{};window._wails.setResizable=He;window._wails.endDrag=ee;window.addEventListener("mousedown",_e);window.addEventListener("mousemove",Ge);window.addEventListener("mouseup",je);var x=!1,E=null,$=!1,ke="auto";function Ne(e){let i=window.getComputedStyle(e.target).getPropertyValue("--webkit-app-region");return!i||i===""||i.trim()!=="drag"||e.buttons!==1?!1:e.detail===1}function He(e){$=e}function ee(){document.body.style.cursor="default",x=!1}function Ve(){return E?(h(`resize:${E}`),!0):!1}function _e(e){(R()&&Ve()||Ne(e))&&(x=!!Ze(e))}function Ze(e){return!(e.offsetX>e.target.clientWidth||e.offsetY>e.target.clientHeight)}function je(e){(e.buttons!==void 0?e.buttons:e.which)>0&&ee()}function u(e=ke){document.documentElement.style.cursor=e,E=e}function Ge(e){x=Ye(e),R()&&$&&Ke(e)}function Ye(e){let i=e.buttons!==void 0?e.buttons:e.which;return x&&i>0?(h("drag"),!1):x}function Ke(e){let i=S("system.resizeHandleHeight")||5,n=S("system.resizeHandleWidth")||5,o=S("resizeCornerExtra")||10,t=window.outerWidth-e.clientXJe,GetCurrent:()=>ei,GetPrimary:()=>$e});var k=l(d.Screens,""),Xe=0,Qe=1,qe=2;function Je(){return k(Xe)}function $e(){return k(Qe)}function ei(){return k(qe)}var H={};w(H,{Center:()=>Oi,Close:()=>Qi,Fullscreen:()=>Ti,Get:()=>U,GetZoomLevel:()=>rn,Height:()=>en,Hide:()=>Vi,Maximise:()=>_i,Minimise:()=>Gi,RelativePosition:()=>Ni,Restore:()=>Ki,Screen:()=>Hi,SetAlwaysOnTop:()=>zi,SetBackgroundColour:()=>qi,SetMaxSize:()=>Fi,SetMinSize:()=>Li,SetRelativePosition:()=>ki,SetResizable:()=>Ji,SetSize:()=>Bi,SetTitle:()=>Pi,SetZoomLevel:()=>an,Show:()=>Xi,Size:()=>Ii,ToggleMaximise:()=>ji,UnMaximise:()=>Zi,UnMinimise:()=>Yi,Width:()=>$i,ZoomIn:()=>nn,ZoomOut:()=>on,ZoomReset:()=>tn});var ii=0,ni=1,oi=2,ti=3,ri=4,ai=5,di=6,li=7,ci=8,si=9,wi=10,mi=11,ui=12,pi=13,Wi=14,gi=15,fi=16,hi=17,Di=18,Ci=19,Si=20,xi=21,Mi=22,Ai=23,vi=24,bi=25,Ri=26,Ei=27,Ui=28,yi=29,r=U("");function ie(e){return{Get:i=>ie(l(d.Window,i)),Center:()=>e(ii),SetTitle:i=>e(ni,{title:i}),Fullscreen:()=>e(oi),UnFullscreen:()=>e(ti),SetSize:(i,n)=>e(ri,{width:i,height:n}),Size:()=>e(ai),SetMaxSize:(i,n)=>e(di,{width:i,height:n}),SetMinSize:(i,n)=>e(li,{width:i,height:n}),SetAlwaysOnTop:i=>e(ci,{alwaysOnTop:i}),SetRelativePosition:(i,n)=>e(si,{x:i,y:n}),RelativePosition:()=>e(wi),Screen:()=>e(mi),Hide:()=>e(ui),Maximise:()=>e(pi),UnMaximise:()=>e(Wi),ToggleMaximise:()=>e(gi),Minimise:()=>e(fi),UnMinimise:()=>e(hi),Restore:()=>e(Di),Show:()=>e(Ci),Close:()=>e(Si),SetBackgroundColour:(i,n,o,t)=>e(xi,{r:i,g:n,b:o,a:t}),SetResizable:i=>e(Mi,{resizable:i}),Width:()=>e(Ai),Height:()=>e(vi),ZoomIn:()=>e(bi),ZoomOut:()=>e(Ri),ZoomReset:()=>e(Ei),GetZoomLevel:()=>e(Ui),SetZoomLevel:i=>e(yi,{zoomLevel:i})}}function U(e){return ie(l(d.Window,e))}function Oi(){r.Center()}function Pi(e){r.SetTitle(e)}function Ti(){r.Fullscreen()}function Bi(e,i){r.SetSize(e,i)}function Ii(){return r.Size()}function Fi(e,i){r.SetMaxSize(e,i)}function Li(e,i){r.SetMinSize(e,i)}function zi(e){r.SetAlwaysOnTop(e)}function ki(e,i){r.SetRelativePosition(e,i)}function Ni(){return r.RelativePosition()}function Hi(){return r.Screen()}function Vi(){r.Hide()}function _i(){r.Maximise()}function Zi(){r.UnMaximise()}function ji(){r.ToggleMaximise()}function Gi(){r.Minimise()}function Yi(){r.UnMinimise()}function Ki(){r.Restore()}function Xi(){r.Show()}function Qi(){r.Close()}function qi(e,i,n,o){r.SetBackgroundColour(e,i,n,o)}function Ji(e){r.SetResizable(e)}function $i(){return r.Width()}function en(){return r.Height()}function nn(){r.ZoomIn()}function on(){r.ZoomOut()}function tn(){r.ZoomReset()}function rn(){return r.GetZoomLevel()}function an(e){r.SetZoomLevel(e)}var K={};w(K,{Reload:()=>Y});var j={};w(j,{Emit:()=>Z,Off:()=>Wn,OffAll:()=>gn,On:()=>mn,OnMultiple:()=>_,Once:()=>un,Types:()=>dn,WailsEvent:()=>M,setup:()=>sn});var ne={Windows:{SystemThemeChanged:"windows:SystemThemeChanged",APMPowerStatusChange:"windows:APMPowerStatusChange",APMSuspend:"windows:APMSuspend",APMResumeAutomatic:"windows:APMResumeAutomatic",APMResumeSuspend:"windows:APMResumeSuspend",APMPowerSettingChange:"windows:APMPowerSettingChange",ApplicationStarted:"windows:ApplicationStarted",WebViewNavigationCompleted:"windows:WebViewNavigationCompleted",WindowInactive:"windows:WindowInactive",WindowActive:"windows:WindowActive",WindowClickActive:"windows:WindowClickActive",WindowMaximise:"windows:WindowMaximise",WindowUnMaximise:"windows:WindowUnMaximise",WindowFullscreen:"windows:WindowFullscreen",WindowUnFullscreen:"windows:WindowUnFullscreen",WindowRestore:"windows:WindowRestore",WindowMinimise:"windows:WindowMinimise",WindowUnMinimise:"windows:WindowUnMinimise",WindowClose:"windows:WindowClose",WindowSetFocus:"windows:WindowSetFocus",WindowKillFocus:"windows:WindowKillFocus",WindowDragDrop:"windows:WindowDragDrop",WindowDragEnter:"windows:WindowDragEnter",WindowDragLeave:"windows:WindowDragLeave",WindowDragOver:"windows:WindowDragOver"},Mac:{ApplicationDidBecomeActive:"mac:ApplicationDidBecomeActive",ApplicationDidChangeBackingProperties:"mac:ApplicationDidChangeBackingProperties",ApplicationDidChangeEffectiveAppearance:"mac:ApplicationDidChangeEffectiveAppearance",ApplicationDidChangeIcon:"mac:ApplicationDidChangeIcon",ApplicationDidChangeOcclusionState:"mac:ApplicationDidChangeOcclusionState",ApplicationDidChangeScreenParameters:"mac:ApplicationDidChangeScreenParameters",ApplicationDidChangeStatusBarFrame:"mac:ApplicationDidChangeStatusBarFrame",ApplicationDidChangeStatusBarOrientation:"mac:ApplicationDidChangeStatusBarOrientation",ApplicationDidFinishLaunching:"mac:ApplicationDidFinishLaunching",ApplicationDidHide:"mac:ApplicationDidHide",ApplicationDidResignActiveNotification:"mac:ApplicationDidResignActiveNotification",ApplicationDidUnhide:"mac:ApplicationDidUnhide",ApplicationDidUpdate:"mac:ApplicationDidUpdate",ApplicationWillBecomeActive:"mac:ApplicationWillBecomeActive",ApplicationWillFinishLaunching:"mac:ApplicationWillFinishLaunching",ApplicationWillHide:"mac:ApplicationWillHide",ApplicationWillResignActive:"mac:ApplicationWillResignActive",ApplicationWillTerminate:"mac:ApplicationWillTerminate",ApplicationWillUnhide:"mac:ApplicationWillUnhide",ApplicationWillUpdate:"mac:ApplicationWillUpdate",ApplicationDidChangeTheme:"mac:ApplicationDidChangeTheme!",ApplicationShouldHandleReopen:"mac:ApplicationShouldHandleReopen!",WindowDidBecomeKey:"mac:WindowDidBecomeKey",WindowDidBecomeMain:"mac:WindowDidBecomeMain",WindowDidBeginSheet:"mac:WindowDidBeginSheet",WindowDidChangeAlpha:"mac:WindowDidChangeAlpha",WindowDidChangeBackingLocation:"mac:WindowDidChangeBackingLocation",WindowDidChangeBackingProperties:"mac:WindowDidChangeBackingProperties",WindowDidChangeCollectionBehavior:"mac:WindowDidChangeCollectionBehavior",WindowDidChangeEffectiveAppearance:"mac:WindowDidChangeEffectiveAppearance",WindowDidChangeOcclusionState:"mac:WindowDidChangeOcclusionState",WindowDidChangeOrderingMode:"mac:WindowDidChangeOrderingMode",WindowDidChangeScreen:"mac:WindowDidChangeScreen",WindowDidChangeScreenParameters:"mac:WindowDidChangeScreenParameters",WindowDidChangeScreenProfile:"mac:WindowDidChangeScreenProfile",WindowDidChangeScreenSpace:"mac:WindowDidChangeScreenSpace",WindowDidChangeScreenSpaceProperties:"mac:WindowDidChangeScreenSpaceProperties",WindowDidChangeSharingType:"mac:WindowDidChangeSharingType",WindowDidChangeSpace:"mac:WindowDidChangeSpace",WindowDidChangeSpaceOrderingMode:"mac:WindowDidChangeSpaceOrderingMode",WindowDidChangeTitle:"mac:WindowDidChangeTitle",WindowDidChangeToolbar:"mac:WindowDidChangeToolbar",WindowDidChangeVisibility:"mac:WindowDidChangeVisibility",WindowDidDeminiaturize:"mac:WindowDidDeminiaturize",WindowDidEndSheet:"mac:WindowDidEndSheet",WindowDidEnterFullScreen:"mac:WindowDidEnterFullScreen",WindowDidEnterVersionBrowser:"mac:WindowDidEnterVersionBrowser",WindowDidExitFullScreen:"mac:WindowDidExitFullScreen",WindowDidExitVersionBrowser:"mac:WindowDidExitVersionBrowser",WindowDidExpose:"mac:WindowDidExpose",WindowDidFocus:"mac:WindowDidFocus",WindowDidMiniaturize:"mac:WindowDidMiniaturize",WindowDidMove:"mac:WindowDidMove",WindowDidOrderOffScreen:"mac:WindowDidOrderOffScreen",WindowDidOrderOnScreen:"mac:WindowDidOrderOnScreen",WindowDidResignKey:"mac:WindowDidResignKey",WindowDidResignMain:"mac:WindowDidResignMain",WindowDidResize:"mac:WindowDidResize",WindowDidUpdate:"mac:WindowDidUpdate",WindowDidUpdateAlpha:"mac:WindowDidUpdateAlpha",WindowDidUpdateCollectionBehavior:"mac:WindowDidUpdateCollectionBehavior",WindowDidUpdateCollectionProperties:"mac:WindowDidUpdateCollectionProperties",WindowDidUpdateShadow:"mac:WindowDidUpdateShadow",WindowDidUpdateTitle:"mac:WindowDidUpdateTitle",WindowDidUpdateToolbar:"mac:WindowDidUpdateToolbar",WindowDidUpdateVisibility:"mac:WindowDidUpdateVisibility",WindowShouldClose:"mac:WindowShouldClose!",WindowWillBecomeKey:"mac:WindowWillBecomeKey",WindowWillBecomeMain:"mac:WindowWillBecomeMain",WindowWillBeginSheet:"mac:WindowWillBeginSheet",WindowWillChangeOrderingMode:"mac:WindowWillChangeOrderingMode",WindowWillClose:"mac:WindowWillClose",WindowWillDeminiaturize:"mac:WindowWillDeminiaturize",WindowWillEnterFullScreen:"mac:WindowWillEnterFullScreen",WindowWillEnterVersionBrowser:"mac:WindowWillEnterVersionBrowser",WindowWillExitFullScreen:"mac:WindowWillExitFullScreen",WindowWillExitVersionBrowser:"mac:WindowWillExitVersionBrowser",WindowWillFocus:"mac:WindowWillFocus",WindowWillMiniaturize:"mac:WindowWillMiniaturize",WindowWillMove:"mac:WindowWillMove",WindowWillOrderOffScreen:"mac:WindowWillOrderOffScreen",WindowWillOrderOnScreen:"mac:WindowWillOrderOnScreen",WindowWillResignMain:"mac:WindowWillResignMain",WindowWillResize:"mac:WindowWillResize",WindowWillUnfocus:"mac:WindowWillUnfocus",WindowWillUpdate:"mac:WindowWillUpdate",WindowWillUpdateAlpha:"mac:WindowWillUpdateAlpha",WindowWillUpdateCollectionBehavior:"mac:WindowWillUpdateCollectionBehavior",WindowWillUpdateCollectionProperties:"mac:WindowWillUpdateCollectionProperties",WindowWillUpdateShadow:"mac:WindowWillUpdateShadow",WindowWillUpdateTitle:"mac:WindowWillUpdateTitle",WindowWillUpdateToolbar:"mac:WindowWillUpdateToolbar",WindowWillUpdateVisibility:"mac:WindowWillUpdateVisibility",WindowWillUseStandardFrame:"mac:WindowWillUseStandardFrame",MenuWillOpen:"mac:MenuWillOpen",MenuDidOpen:"mac:MenuDidOpen",MenuDidClose:"mac:MenuDidClose",MenuWillSendAction:"mac:MenuWillSendAction",MenuDidSendAction:"mac:MenuDidSendAction",MenuWillHighlightItem:"mac:MenuWillHighlightItem",MenuDidHighlightItem:"mac:MenuDidHighlightItem",MenuWillDisplayItem:"mac:MenuWillDisplayItem",MenuDidDisplayItem:"mac:MenuDidDisplayItem",MenuWillAddItem:"mac:MenuWillAddItem",MenuDidAddItem:"mac:MenuDidAddItem",MenuWillRemoveItem:"mac:MenuWillRemoveItem",MenuDidRemoveItem:"mac:MenuDidRemoveItem",MenuWillBeginTracking:"mac:MenuWillBeginTracking",MenuDidBeginTracking:"mac:MenuDidBeginTracking",MenuWillEndTracking:"mac:MenuWillEndTracking",MenuDidEndTracking:"mac:MenuDidEndTracking",MenuWillUpdate:"mac:MenuWillUpdate",MenuDidUpdate:"mac:MenuDidUpdate",MenuWillPopUp:"mac:MenuWillPopUp",MenuDidPopUp:"mac:MenuDidPopUp",MenuWillSendActionToItem:"mac:MenuWillSendActionToItem",MenuDidSendActionToItem:"mac:MenuDidSendActionToItem",WebViewDidStartProvisionalNavigation:"mac:WebViewDidStartProvisionalNavigation",WebViewDidReceiveServerRedirectForProvisionalNavigation:"mac:WebViewDidReceiveServerRedirectForProvisionalNavigation",WebViewDidFinishNavigation:"mac:WebViewDidFinishNavigation",WebViewDidCommitNavigation:"mac:WebViewDidCommitNavigation",WindowFileDraggingEntered:"mac:WindowFileDraggingEntered",WindowFileDraggingPerformed:"mac:WindowFileDraggingPerformed",WindowFileDraggingExited:"mac:WindowFileDraggingExited"},Linux:{SystemThemeChanged:"linux:SystemThemeChanged",WindowLoadChanged:"linux:WindowLoadChanged",WindowDeleteEvent:"linux:WindowDeleteEvent",WindowFocusIn:"linux:WindowFocusIn",WindowFocusOut:"linux:WindowFocusOut",ApplicationStartup:"linux:ApplicationStartup"},Common:{ApplicationStarted:"common:ApplicationStarted",WindowMaximise:"common:WindowMaximise",WindowUnMaximise:"common:WindowUnMaximise",WindowFullscreen:"common:WindowFullscreen",WindowUnFullscreen:"common:WindowUnFullscreen",WindowRestore:"common:WindowRestore",WindowMinimise:"common:WindowMinimise",WindowUnMinimise:"common:WindowUnMinimise",WindowClosing:"common:WindowClosing",WindowZoom:"common:WindowZoom",WindowZoomIn:"common:WindowZoomIn",WindowZoomOut:"common:WindowZoomOut",WindowZoomReset:"common:WindowZoomReset",WindowFocus:"common:WindowFocus",WindowLostFocus:"common:WindowLostFocus",WindowShow:"common:WindowShow",WindowHide:"common:WindowHide",WindowDPIChanged:"common:WindowDPIChanged",WindowFilesDropped:"common:WindowFilesDropped",WindowRuntimeReady:"common:WindowRuntimeReady",ThemeChanged:"common:ThemeChanged"}};var dn=ne;window._wails=window._wails||{};window._wails.dispatchWailsEvent=wn;var ln=l(d.Events,""),cn=0,m=new Map,V=class{constructor(i,n,o){this.eventName=i,this.maxCallbacks=o||-1,this.Callback=t=>(n(t),this.maxCallbacks===-1?!1:(this.maxCallbacks-=1,this.maxCallbacks===0))}},M=class{constructor(i,n=null){this.name=i,this.data=n}};function sn(){}function wn(e){let i=m.get(e.name);if(i){let n=i.filter(o=>{if(o.Callback(e))return!0});n.length>0&&(i=i.filter(o=>!n.includes(o)),i.length===0?m.delete(e.name):m.set(e.name,i))}}function _(e,i,n){let o=m.get(e)||[],t=new V(e,i,n);return o.push(t),m.set(e,o),()=>pn(t)}function mn(e,i){return _(e,i,-1)}function un(e,i){return _(e,i,1)}function pn(e){let i=e.eventName,n=m.get(i).filter(o=>o!==e);n.length===0?m.delete(i):m.set(i,n)}function Wn(e,...i){[e,...i].forEach(o=>m.delete(o))}function gn(){m.clear()}function Z(e){return ln(cn,e)}var G={};w(G,{Error:()=>Un,Info:()=>Rn,OpenFile:()=>yn,Question:()=>A,SaveFile:()=>On,Warning:()=>En});window._wails=window._wails||{};window._wails.dialogErrorCallback=bn;window._wails.dialogResultCallback=vn;var fn=0,hn=1,Dn=2,Cn=3,Sn=4,xn=5,Mn=l(d.Dialog,""),W=new Map;function An(){let e;do e=f();while(W.has(e));return e}function D(e,i={}){let n=An();return i["dialog-id"]=n,new Promise((o,t)=>{W.set(n,{resolve:o,reject:t}),Mn(e,i).catch(a=>{t(a),W.delete(n)})})}function vn(e,i,n){let o=W.get(e);o&&(n?o.resolve(JSON.parse(i)):o.resolve(i),W.delete(e))}function bn(e,i){let n=W.get(e);n&&(n.reject(i),W.delete(e))}var Rn=e=>D(fn,e),En=e=>D(hn,e),Un=e=>D(Dn,e),A=e=>D(Cn,e),yn=e=>D(Sn,e),On=e=>D(xn,e);function oe(e,i=null){let n=new M(e,i);Z(n)}function Pn(){document.querySelectorAll("[wml-event]").forEach(function(i){let n=i.getAttribute("wml-event"),o=i.getAttribute("wml-confirm"),t=i.getAttribute("wml-trigger")||"click",a=function(){if(o){A({Title:"Confirm",Message:o,Detached:!1,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(s){s!=="No"&&oe(n)});return}oe(n)};i.removeEventListener(t,a),i.addEventListener(t,a)})}function te(e,i){let n=U(e),o=In(n);o.has(i);try{o.get(i)()}catch{}}function Tn(){document.querySelectorAll("[wml-window]").forEach(function(i){let n=i.getAttribute("wml-window"),o=i.getAttribute("wml-confirm"),t=i.getAttribute("wml-trigger")||"click",a=i.getAttribute("wml-target-window")||"",s=function(){if(o){A({Title:"Confirm",Message:o,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(p){p!=="No"&&te(a,n)});return}te(a,n)};i.removeEventListener(t,s),i.addEventListener(t,s)})}function Bn(){document.querySelectorAll("[wml-openurl]").forEach(function(i){let n=i.getAttribute("wml-openurl"),o=i.getAttribute("wml-confirm"),t=i.getAttribute("wml-trigger")||"click",a=function(){if(o){A({Title:"Confirm",Message:o,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(s){s!=="No"&&b(n)});return}b(n)};i.removeEventListener(t,a),i.addEventListener(t,a)})}function Y(){Pn(),Tn(),Bn()}function In(e){let i=new Map;for(let n in e)typeof e[n]=="function"&&i.set(n,e[n]);return i}var X={};w(X,{ByID:()=>Vn,ByName:()=>Hn,Call:()=>Nn,Plugin:()=>_n});window._wails=window._wails||{};window._wails.callResultHandler=zn;window._wails.callErrorHandler=kn;var y=0,Fn=l(d.Call,""),v=new Map;function Ln(){let e;do e=f();while(v.has(e));return e}function zn(e,i,n){let o=re(e);o&&o.resolve(n?JSON.parse(i):i)}function kn(e,i){let n=re(e);n&&n.reject(i)}function re(e){let i=v.get(e);return v.delete(e),i}function O(e,i={}){return new Promise((n,o)=>{let t=Ln();i["call-id"]=t,v.set(t,{resolve:n,reject:o}),Fn(e,i).catch(a=>{o(a),v.delete(t)})})}function Nn(e){return O(y,e)}function Hn(e,...i){if(typeof e!="string"||e.split(".").length!==3)throw new Error("CallByName requires a string in the format 'package.struct.method'");let[n,o,t]=e.split(".");return O(y,{packageName:n,structName:o,methodName:t,args:i})}function Vn(e,...i){return O(y,{methodID:e,args:i})}function _n(e,i,...n){return O(y,{packageName:"wails-plugins",structName:e,methodName:i,args:n})}window._wails=window._wails||{};window._wails.invoke=h;window.wails=window.wails||{};window.wails.Application=T;window.wails.Browser=B;window.wails.Call=X;window.wails.Clipboard=I;window.wails.Dialogs=G;window.wails.Events=j;window.wails.Flags=z;window.wails.Screens=N;window.wails.System=L;window.wails.Window=H;window.wails.WML=K;var ae=!1;document.addEventListener("DOMContentLoaded",function(){ae=!0,window._wails.invoke("wails:runtime:ready")});function Zn(e){ae||document.readyState==="complete"?e():document.addEventListener("DOMContentLoaded",e)}Zn(()=>{Y()});})(); diff --git a/v3/examples/frameless/go.mod b/v3/examples/frameless/go.mod index ab2668fb5a8..358eb760227 100644 --- a/v3/examples/frameless/go.mod +++ b/v3/examples/frameless/go.mod @@ -39,11 +39,11 @@ require ( github.com/wailsapp/go-webview2 v1.0.9 // indirect github.com/wailsapp/mimetype v1.4.1 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect - golang.org/x/crypto v0.16.0 // indirect + golang.org/x/crypto v0.19.0 // indirect golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect golang.org/x/mod v0.12.0 // indirect golang.org/x/net v0.19.0 // indirect - golang.org/x/sys v0.15.0 // indirect + golang.org/x/sys v0.17.0 // indirect golang.org/x/tools v0.13.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect ) diff --git a/v3/examples/frameless/go.sum b/v3/examples/frameless/go.sum index 858cff35cf4..476b71ea3bd 100644 --- a/v3/examples/frameless/go.sum +++ b/v3/examples/frameless/go.sum @@ -110,8 +110,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= -golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df h1:UA2aFVmmsIlefxMk29Dp2juaUSth8Pyn3Tq5Y5mJGME= golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= @@ -150,15 +150,15 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= -golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= +golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= diff --git a/v3/examples/keybindings/main.go b/v3/examples/keybindings/main.go index a78068ac29a..ee9dee82568 100644 --- a/v3/examples/keybindings/main.go +++ b/v3/examples/keybindings/main.go @@ -26,7 +26,7 @@ func main() { URL: "https://wails.io", KeyBindings: map[string]func(window *application.WebviewWindow){ "F12": func(window *application.WebviewWindow) { - window.ToggleDevTools() + window.OpenDevTools() }, }, }) diff --git a/v3/examples/plugins/go.mod b/v3/examples/plugins/go.mod index e84c04d5326..a31d9eb8a9a 100644 --- a/v3/examples/plugins/go.mod +++ b/v3/examples/plugins/go.mod @@ -1,20 +1,20 @@ module plugin_demo -go 1.21 +go 1.21.1 -toolchain go1.21.0 +toolchain go1.22.0 require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 require ( - github.com/Microsoft/go-winio v0.4.16 // indirect + github.com/Microsoft/go-winio v0.6.1 // indirect github.com/bep/debounce v1.2.1 // indirect github.com/dustin/go-humanize v1.0.0 // indirect github.com/ebitengine/purego v0.4.0-alpha.4 // indirect - github.com/emirpasic/gods v1.12.0 // indirect - github.com/go-git/gcfg v1.5.0 // indirect - github.com/go-git/go-billy/v5 v5.2.0 // indirect - github.com/go-git/go-git/v5 v5.3.0 // indirect + github.com/emirpasic/gods v1.18.1 // indirect + github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect + github.com/go-git/go-billy/v5 v5.5.0 // indirect + github.com/go-git/go-git/v5 v5.11.0 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/godbus/dbus/v5 v5.1.0 // indirect github.com/google/uuid v1.3.0 // indirect @@ -23,11 +23,11 @@ require ( github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect - github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect + github.com/kevinburke/ssh_config v1.2.0 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/leaanthony/go-ansi-parser v1.6.1 // indirect github.com/leaanthony/u v1.1.0 // indirect - github.com/lmittmann/tint v1.0.0 // indirect + github.com/lmittmann/tint v1.0.3 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.19 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect @@ -37,19 +37,19 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/rivo/uniseg v0.4.4 // indirect - github.com/rogpeppe/go-internal v1.10.1-0.20230524175051-ec119421bb97 // indirect + github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/samber/lo v1.38.1 // indirect github.com/sergi/go-diff v1.2.0 // indirect github.com/stretchr/testify v1.8.4 // indirect github.com/wailsapp/go-webview2 v1.0.9 // indirect github.com/wailsapp/mimetype v1.4.1 // indirect - github.com/xanzy/ssh-agent v0.3.0 // indirect - golang.org/x/crypto v0.9.0 // indirect + github.com/xanzy/ssh-agent v0.3.3 // indirect + golang.org/x/crypto v0.19.0 // indirect golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect golang.org/x/mod v0.12.0 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/tools v0.6.0 // indirect + golang.org/x/net v0.19.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/tools v0.13.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect lukechampine.com/uint128 v1.2.0 // indirect modernc.org/cc/v3 v3.40.0 // indirect diff --git a/v3/examples/plugins/go.sum b/v3/examples/plugins/go.sum index 499a8e0ad92..cbc968c45ea 100644 --- a/v3/examples/plugins/go.sum +++ b/v3/examples/plugins/go.sum @@ -1,6 +1,8 @@ github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk= github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= +github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7 h1:uSoVVbwJiQipAclBbw+8quDsfcvFjOpI5iCf4p/cqCs= github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA= @@ -19,19 +21,23 @@ github.com/ebitengine/purego v0.4.0-alpha.4 h1:Y7yIV06Yo5M2BAdD7EVPhfp6LZ0tEcQo5 github.com/ebitengine/purego v0.4.0-alpha.4/go.mod h1:ah1In8AOtksoNK6yk5z1HTJeUkC1Ez4Wk2idgGslMwQ= github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= +github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= +github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= github.com/go-git/go-billy/v5 v5.0.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= github.com/go-git/go-billy/v5 v5.1.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= github.com/go-git/go-billy/v5 v5.2.0 h1:GcoouCP9J+5slw2uXAocL70z8ml4A8B/H8nEPt6CLPk= github.com/go-git/go-billy/v5 v5.2.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= +github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12 h1:PbKy9zOy4aAKrJ5pibIRpVO2BXnK1Tlcg+caKI7Ox5M= github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12/go.mod h1:m+ICp2rF3jDhFgEZ/8yziagdT1C+ZpZcrJjappBCDSw= github.com/go-git/go-git/v5 v5.3.0 h1:8WKMtJR2j8RntEXR/uvTKagfEt4GYlwQ7mntE4+0GWc= github.com/go-git/go-git/v5 v5.3.0/go.mod h1:xdX4bWJ48aOrdhnl2XqHYstHbbp6+LFS4r4X+lNVprw= +github.com/go-git/go-git/v5 v5.11.0/go.mod h1:6GFcX2P3NM7FPBfpePbpLd21XxsgdAt+lKqXmCUiUCY= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= @@ -57,6 +63,7 @@ github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNU github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 h1:DowS9hvgyYSX4TO5NpyC606/Z4SxnNYbT+WX27or6Ck= github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= +github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -72,6 +79,7 @@ github.com/leaanthony/u v1.1.0 h1:2n0d2BwPVXSUq5yhe8lJPHdxevE2qK5G99PMStMZMaI= github.com/leaanthony/u v1.1.0/go.mod h1:9+o6hejoRljvZ3BzdYlVL0JYCwtnAsVuN9pVTQcaRfI= github.com/lmittmann/tint v1.0.0 h1:fzEj70K1L58uyoePQxKe+ezDZJ5pybiWGdA0JeFvvyw= github.com/lmittmann/tint v1.0.0/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE= +github.com/lmittmann/tint v1.0.3/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE= github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= @@ -105,12 +113,14 @@ github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUc github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.1-0.20230524175051-ec119421bb97 h1:3RPlVWzZ/PDqmVuf/FKHARG5EMid/tl7cv54Sw/QRVY= github.com/rogpeppe/go-internal v1.10.1-0.20230524175051-ec119421bb97/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/samber/lo v1.38.1 h1:j2XEAqXKb09Am4ebOg31SpvzUTTs6EN3VfgeLUhPdXM= github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= @@ -124,10 +134,14 @@ github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhw github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI= github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= +github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df h1:UA2aFVmmsIlefxMk29Dp2juaUSth8Pyn3Tq5Y5mJGME= golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= @@ -135,24 +149,32 @@ golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= @@ -163,6 +185,7 @@ golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/v3/examples/screen/assets/index.html b/v3/examples/screen/assets/index.html index 4b385ada1fd..eafcfe1b9c2 100644 --- a/v3/examples/screen/assets/index.html +++ b/v3/examples/screen/assets/index.html @@ -43,6 +43,7 @@ text-align: -webkit-center; } + diff --git a/v3/examples/screen/assets/runtime.js b/v3/examples/screen/assets/runtime.js new file mode 100644 index 00000000000..baaccee0402 --- /dev/null +++ b/v3/examples/screen/assets/runtime.js @@ -0,0 +1 @@ +(()=>{var de=Object.defineProperty;var w=(e,i)=>{for(var n in i)de(e,n,{get:i[n],enumerable:!0})};var T={};w(T,{Hide:()=>We,Quit:()=>fe,Show:()=>ge});var le="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var f=(e=21)=>{let i="",n=e;for(;n--;)i+=le[Math.random()*64|0];return i};var ce=window.location.origin+"/wails/runtime",d={Call:0,Clipboard:1,Application:2,Events:3,ContextMenu:4,Dialog:5,Window:6,Screens:7,System:8,Browser:9},se=f();function l(e,i){return function(n,o=null){return we(e,n,i,o)}}function we(e,i,n,o){let t=new URL(ce);t.searchParams.append("object",e),t.searchParams.append("method",i);let a={headers:{}};return n&&(a.headers["x-wails-window-name"]=n),o&&t.searchParams.append("args",JSON.stringify(o)),a.headers["x-wails-client-id"]=se,new Promise((s,p)=>{fetch(t,a).then(c=>{if(c.ok)return c.headers.get("Content-Type")&&c.headers.get("Content-Type").indexOf("application/json")!==-1?c.json():c.text();p(Error(c.statusText))}).then(c=>s(c)).catch(c=>p(c))})}var P=l(d.Application,""),me=0,ue=1,pe=2;function We(){return P(me)}function ge(){return P(ue)}function fe(){return P(pe)}var B={};w(B,{OpenURL:()=>b});var he=l(d.Browser,""),De=0;function b(e){return he(De,{url:e})}var I={};w(I,{SetText:()=>xe,Text:()=>Me});var q=l(d.Clipboard,""),Ce=0,Se=1;function xe(e){return q(Ce,{text:e})}function Me(){return q(Se)}var L={};w(L,{Capabilities:()=>Re,Environment:()=>Ee,IsAMD64:()=>Oe,IsARM:()=>Pe,IsARM64:()=>Te,IsDarkMode:()=>be,IsDebug:()=>F,IsLinux:()=>Ue,IsMac:()=>ye,IsWindows:()=>R,invoke:()=>h});var J=l(d.System,""),Ae=0,ve=1;function h(e){return window.chrome?window.chrome.webview.postMessage(e):window.webkit.messageHandlers.external.postMessage(e)}function be(){return J(Ae)}function Re(){return fetch("/wails/capabilities").json()}function Ee(){return J(ve)}function R(){return window._wails.environment.OS==="windows"}function Ue(){return window._wails.environment.OS==="linux"}function ye(){return window._wails.environment.OS==="darwin"}function Oe(){return window._wails.environment.Arch==="amd64"}function Pe(){return window._wails.environment.Arch==="arm"}function Te(){return window._wails.environment.Arch==="arm64"}function F(){return window._wails.environment.Debug===!0}window.addEventListener("contextmenu",Le);var Be=l(d.ContextMenu,""),Ie=0;function Fe(e,i,n,o){Be(Ie,{id:e,x:i,y:n,data:o})}function Le(e){let i=e.target,n=window.getComputedStyle(i).getPropertyValue("--custom-contextmenu");if(n=n?n.trim():"",n){e.preventDefault();let o=window.getComputedStyle(i).getPropertyValue("--custom-contextmenu-data");Fe(n,e.clientX,e.clientY,o);return}ze(e)}function ze(e){if(F())return;let i=e.target;switch(window.getComputedStyle(i).getPropertyValue("--default-contextmenu").trim()){case"show":return;case"hide":e.preventDefault();return;default:if(i.isContentEditable)return;let t=window.getSelection(),a=t.toString().length>0;if(a)for(let s=0;sS});function S(e){try{return window._wails.flags[e]}catch(i){throw new Error("Unable to retrieve flag '"+e+"': "+i)}}window._wails=window._wails||{};window._wails.setResizable=He;window._wails.endDrag=ee;window.addEventListener("mousedown",_e);window.addEventListener("mousemove",Ge);window.addEventListener("mouseup",je);var x=!1,E=null,$=!1,ke="auto";function Ne(e){let i=window.getComputedStyle(e.target).getPropertyValue("--webkit-app-region");return!i||i===""||i.trim()!=="drag"||e.buttons!==1?!1:e.detail===1}function He(e){$=e}function ee(){document.body.style.cursor="default",x=!1}function Ve(){return E?(h(`resize:${E}`),!0):!1}function _e(e){(R()&&Ve()||Ne(e))&&(x=!!Ze(e))}function Ze(e){return!(e.offsetX>e.target.clientWidth||e.offsetY>e.target.clientHeight)}function je(e){(e.buttons!==void 0?e.buttons:e.which)>0&&ee()}function u(e=ke){document.documentElement.style.cursor=e,E=e}function Ge(e){x=Ye(e),R()&&$&&Ke(e)}function Ye(e){let i=e.buttons!==void 0?e.buttons:e.which;return x&&i>0?(h("drag"),!1):x}function Ke(e){let i=S("system.resizeHandleHeight")||5,n=S("system.resizeHandleWidth")||5,o=S("resizeCornerExtra")||10,t=window.outerWidth-e.clientXJe,GetCurrent:()=>ei,GetPrimary:()=>$e});var k=l(d.Screens,""),Xe=0,Qe=1,qe=2;function Je(){return k(Xe)}function $e(){return k(Qe)}function ei(){return k(qe)}var H={};w(H,{Center:()=>Oi,Close:()=>Qi,Fullscreen:()=>Ti,Get:()=>U,GetZoomLevel:()=>rn,Height:()=>en,Hide:()=>Vi,Maximise:()=>_i,Minimise:()=>Gi,RelativePosition:()=>Ni,Restore:()=>Ki,Screen:()=>Hi,SetAlwaysOnTop:()=>zi,SetBackgroundColour:()=>qi,SetMaxSize:()=>Fi,SetMinSize:()=>Li,SetRelativePosition:()=>ki,SetResizable:()=>Ji,SetSize:()=>Bi,SetTitle:()=>Pi,SetZoomLevel:()=>an,Show:()=>Xi,Size:()=>Ii,ToggleMaximise:()=>ji,UnMaximise:()=>Zi,UnMinimise:()=>Yi,Width:()=>$i,ZoomIn:()=>nn,ZoomOut:()=>on,ZoomReset:()=>tn});var ii=0,ni=1,oi=2,ti=3,ri=4,ai=5,di=6,li=7,ci=8,si=9,wi=10,mi=11,ui=12,pi=13,Wi=14,gi=15,fi=16,hi=17,Di=18,Ci=19,Si=20,xi=21,Mi=22,Ai=23,vi=24,bi=25,Ri=26,Ei=27,Ui=28,yi=29,r=U("");function ie(e){return{Get:i=>ie(l(d.Window,i)),Center:()=>e(ii),SetTitle:i=>e(ni,{title:i}),Fullscreen:()=>e(oi),UnFullscreen:()=>e(ti),SetSize:(i,n)=>e(ri,{width:i,height:n}),Size:()=>e(ai),SetMaxSize:(i,n)=>e(di,{width:i,height:n}),SetMinSize:(i,n)=>e(li,{width:i,height:n}),SetAlwaysOnTop:i=>e(ci,{alwaysOnTop:i}),SetRelativePosition:(i,n)=>e(si,{x:i,y:n}),RelativePosition:()=>e(wi),Screen:()=>e(mi),Hide:()=>e(ui),Maximise:()=>e(pi),UnMaximise:()=>e(Wi),ToggleMaximise:()=>e(gi),Minimise:()=>e(fi),UnMinimise:()=>e(hi),Restore:()=>e(Di),Show:()=>e(Ci),Close:()=>e(Si),SetBackgroundColour:(i,n,o,t)=>e(xi,{r:i,g:n,b:o,a:t}),SetResizable:i=>e(Mi,{resizable:i}),Width:()=>e(Ai),Height:()=>e(vi),ZoomIn:()=>e(bi),ZoomOut:()=>e(Ri),ZoomReset:()=>e(Ei),GetZoomLevel:()=>e(Ui),SetZoomLevel:i=>e(yi,{zoomLevel:i})}}function U(e){return ie(l(d.Window,e))}function Oi(){r.Center()}function Pi(e){r.SetTitle(e)}function Ti(){r.Fullscreen()}function Bi(e,i){r.SetSize(e,i)}function Ii(){return r.Size()}function Fi(e,i){r.SetMaxSize(e,i)}function Li(e,i){r.SetMinSize(e,i)}function zi(e){r.SetAlwaysOnTop(e)}function ki(e,i){r.SetRelativePosition(e,i)}function Ni(){return r.RelativePosition()}function Hi(){return r.Screen()}function Vi(){r.Hide()}function _i(){r.Maximise()}function Zi(){r.UnMaximise()}function ji(){r.ToggleMaximise()}function Gi(){r.Minimise()}function Yi(){r.UnMinimise()}function Ki(){r.Restore()}function Xi(){r.Show()}function Qi(){r.Close()}function qi(e,i,n,o){r.SetBackgroundColour(e,i,n,o)}function Ji(e){r.SetResizable(e)}function $i(){return r.Width()}function en(){return r.Height()}function nn(){r.ZoomIn()}function on(){r.ZoomOut()}function tn(){r.ZoomReset()}function rn(){return r.GetZoomLevel()}function an(e){r.SetZoomLevel(e)}var K={};w(K,{Reload:()=>Y});var j={};w(j,{Emit:()=>Z,Off:()=>Wn,OffAll:()=>gn,On:()=>mn,OnMultiple:()=>_,Once:()=>un,Types:()=>dn,WailsEvent:()=>M,setup:()=>sn});var ne={Windows:{SystemThemeChanged:"windows:SystemThemeChanged",APMPowerStatusChange:"windows:APMPowerStatusChange",APMSuspend:"windows:APMSuspend",APMResumeAutomatic:"windows:APMResumeAutomatic",APMResumeSuspend:"windows:APMResumeSuspend",APMPowerSettingChange:"windows:APMPowerSettingChange",ApplicationStarted:"windows:ApplicationStarted",WebViewNavigationCompleted:"windows:WebViewNavigationCompleted",WindowInactive:"windows:WindowInactive",WindowActive:"windows:WindowActive",WindowClickActive:"windows:WindowClickActive",WindowMaximise:"windows:WindowMaximise",WindowUnMaximise:"windows:WindowUnMaximise",WindowFullscreen:"windows:WindowFullscreen",WindowUnFullscreen:"windows:WindowUnFullscreen",WindowRestore:"windows:WindowRestore",WindowMinimise:"windows:WindowMinimise",WindowUnMinimise:"windows:WindowUnMinimise",WindowClose:"windows:WindowClose",WindowSetFocus:"windows:WindowSetFocus",WindowKillFocus:"windows:WindowKillFocus",WindowDragDrop:"windows:WindowDragDrop",WindowDragEnter:"windows:WindowDragEnter",WindowDragLeave:"windows:WindowDragLeave",WindowDragOver:"windows:WindowDragOver"},Mac:{ApplicationDidBecomeActive:"mac:ApplicationDidBecomeActive",ApplicationDidChangeBackingProperties:"mac:ApplicationDidChangeBackingProperties",ApplicationDidChangeEffectiveAppearance:"mac:ApplicationDidChangeEffectiveAppearance",ApplicationDidChangeIcon:"mac:ApplicationDidChangeIcon",ApplicationDidChangeOcclusionState:"mac:ApplicationDidChangeOcclusionState",ApplicationDidChangeScreenParameters:"mac:ApplicationDidChangeScreenParameters",ApplicationDidChangeStatusBarFrame:"mac:ApplicationDidChangeStatusBarFrame",ApplicationDidChangeStatusBarOrientation:"mac:ApplicationDidChangeStatusBarOrientation",ApplicationDidFinishLaunching:"mac:ApplicationDidFinishLaunching",ApplicationDidHide:"mac:ApplicationDidHide",ApplicationDidResignActiveNotification:"mac:ApplicationDidResignActiveNotification",ApplicationDidUnhide:"mac:ApplicationDidUnhide",ApplicationDidUpdate:"mac:ApplicationDidUpdate",ApplicationWillBecomeActive:"mac:ApplicationWillBecomeActive",ApplicationWillFinishLaunching:"mac:ApplicationWillFinishLaunching",ApplicationWillHide:"mac:ApplicationWillHide",ApplicationWillResignActive:"mac:ApplicationWillResignActive",ApplicationWillTerminate:"mac:ApplicationWillTerminate",ApplicationWillUnhide:"mac:ApplicationWillUnhide",ApplicationWillUpdate:"mac:ApplicationWillUpdate",ApplicationDidChangeTheme:"mac:ApplicationDidChangeTheme!",ApplicationShouldHandleReopen:"mac:ApplicationShouldHandleReopen!",WindowDidBecomeKey:"mac:WindowDidBecomeKey",WindowDidBecomeMain:"mac:WindowDidBecomeMain",WindowDidBeginSheet:"mac:WindowDidBeginSheet",WindowDidChangeAlpha:"mac:WindowDidChangeAlpha",WindowDidChangeBackingLocation:"mac:WindowDidChangeBackingLocation",WindowDidChangeBackingProperties:"mac:WindowDidChangeBackingProperties",WindowDidChangeCollectionBehavior:"mac:WindowDidChangeCollectionBehavior",WindowDidChangeEffectiveAppearance:"mac:WindowDidChangeEffectiveAppearance",WindowDidChangeOcclusionState:"mac:WindowDidChangeOcclusionState",WindowDidChangeOrderingMode:"mac:WindowDidChangeOrderingMode",WindowDidChangeScreen:"mac:WindowDidChangeScreen",WindowDidChangeScreenParameters:"mac:WindowDidChangeScreenParameters",WindowDidChangeScreenProfile:"mac:WindowDidChangeScreenProfile",WindowDidChangeScreenSpace:"mac:WindowDidChangeScreenSpace",WindowDidChangeScreenSpaceProperties:"mac:WindowDidChangeScreenSpaceProperties",WindowDidChangeSharingType:"mac:WindowDidChangeSharingType",WindowDidChangeSpace:"mac:WindowDidChangeSpace",WindowDidChangeSpaceOrderingMode:"mac:WindowDidChangeSpaceOrderingMode",WindowDidChangeTitle:"mac:WindowDidChangeTitle",WindowDidChangeToolbar:"mac:WindowDidChangeToolbar",WindowDidChangeVisibility:"mac:WindowDidChangeVisibility",WindowDidDeminiaturize:"mac:WindowDidDeminiaturize",WindowDidEndSheet:"mac:WindowDidEndSheet",WindowDidEnterFullScreen:"mac:WindowDidEnterFullScreen",WindowDidEnterVersionBrowser:"mac:WindowDidEnterVersionBrowser",WindowDidExitFullScreen:"mac:WindowDidExitFullScreen",WindowDidExitVersionBrowser:"mac:WindowDidExitVersionBrowser",WindowDidExpose:"mac:WindowDidExpose",WindowDidFocus:"mac:WindowDidFocus",WindowDidMiniaturize:"mac:WindowDidMiniaturize",WindowDidMove:"mac:WindowDidMove",WindowDidOrderOffScreen:"mac:WindowDidOrderOffScreen",WindowDidOrderOnScreen:"mac:WindowDidOrderOnScreen",WindowDidResignKey:"mac:WindowDidResignKey",WindowDidResignMain:"mac:WindowDidResignMain",WindowDidResize:"mac:WindowDidResize",WindowDidUpdate:"mac:WindowDidUpdate",WindowDidUpdateAlpha:"mac:WindowDidUpdateAlpha",WindowDidUpdateCollectionBehavior:"mac:WindowDidUpdateCollectionBehavior",WindowDidUpdateCollectionProperties:"mac:WindowDidUpdateCollectionProperties",WindowDidUpdateShadow:"mac:WindowDidUpdateShadow",WindowDidUpdateTitle:"mac:WindowDidUpdateTitle",WindowDidUpdateToolbar:"mac:WindowDidUpdateToolbar",WindowDidUpdateVisibility:"mac:WindowDidUpdateVisibility",WindowShouldClose:"mac:WindowShouldClose!",WindowWillBecomeKey:"mac:WindowWillBecomeKey",WindowWillBecomeMain:"mac:WindowWillBecomeMain",WindowWillBeginSheet:"mac:WindowWillBeginSheet",WindowWillChangeOrderingMode:"mac:WindowWillChangeOrderingMode",WindowWillClose:"mac:WindowWillClose",WindowWillDeminiaturize:"mac:WindowWillDeminiaturize",WindowWillEnterFullScreen:"mac:WindowWillEnterFullScreen",WindowWillEnterVersionBrowser:"mac:WindowWillEnterVersionBrowser",WindowWillExitFullScreen:"mac:WindowWillExitFullScreen",WindowWillExitVersionBrowser:"mac:WindowWillExitVersionBrowser",WindowWillFocus:"mac:WindowWillFocus",WindowWillMiniaturize:"mac:WindowWillMiniaturize",WindowWillMove:"mac:WindowWillMove",WindowWillOrderOffScreen:"mac:WindowWillOrderOffScreen",WindowWillOrderOnScreen:"mac:WindowWillOrderOnScreen",WindowWillResignMain:"mac:WindowWillResignMain",WindowWillResize:"mac:WindowWillResize",WindowWillUnfocus:"mac:WindowWillUnfocus",WindowWillUpdate:"mac:WindowWillUpdate",WindowWillUpdateAlpha:"mac:WindowWillUpdateAlpha",WindowWillUpdateCollectionBehavior:"mac:WindowWillUpdateCollectionBehavior",WindowWillUpdateCollectionProperties:"mac:WindowWillUpdateCollectionProperties",WindowWillUpdateShadow:"mac:WindowWillUpdateShadow",WindowWillUpdateTitle:"mac:WindowWillUpdateTitle",WindowWillUpdateToolbar:"mac:WindowWillUpdateToolbar",WindowWillUpdateVisibility:"mac:WindowWillUpdateVisibility",WindowWillUseStandardFrame:"mac:WindowWillUseStandardFrame",MenuWillOpen:"mac:MenuWillOpen",MenuDidOpen:"mac:MenuDidOpen",MenuDidClose:"mac:MenuDidClose",MenuWillSendAction:"mac:MenuWillSendAction",MenuDidSendAction:"mac:MenuDidSendAction",MenuWillHighlightItem:"mac:MenuWillHighlightItem",MenuDidHighlightItem:"mac:MenuDidHighlightItem",MenuWillDisplayItem:"mac:MenuWillDisplayItem",MenuDidDisplayItem:"mac:MenuDidDisplayItem",MenuWillAddItem:"mac:MenuWillAddItem",MenuDidAddItem:"mac:MenuDidAddItem",MenuWillRemoveItem:"mac:MenuWillRemoveItem",MenuDidRemoveItem:"mac:MenuDidRemoveItem",MenuWillBeginTracking:"mac:MenuWillBeginTracking",MenuDidBeginTracking:"mac:MenuDidBeginTracking",MenuWillEndTracking:"mac:MenuWillEndTracking",MenuDidEndTracking:"mac:MenuDidEndTracking",MenuWillUpdate:"mac:MenuWillUpdate",MenuDidUpdate:"mac:MenuDidUpdate",MenuWillPopUp:"mac:MenuWillPopUp",MenuDidPopUp:"mac:MenuDidPopUp",MenuWillSendActionToItem:"mac:MenuWillSendActionToItem",MenuDidSendActionToItem:"mac:MenuDidSendActionToItem",WebViewDidStartProvisionalNavigation:"mac:WebViewDidStartProvisionalNavigation",WebViewDidReceiveServerRedirectForProvisionalNavigation:"mac:WebViewDidReceiveServerRedirectForProvisionalNavigation",WebViewDidFinishNavigation:"mac:WebViewDidFinishNavigation",WebViewDidCommitNavigation:"mac:WebViewDidCommitNavigation",WindowFileDraggingEntered:"mac:WindowFileDraggingEntered",WindowFileDraggingPerformed:"mac:WindowFileDraggingPerformed",WindowFileDraggingExited:"mac:WindowFileDraggingExited"},Linux:{SystemThemeChanged:"linux:SystemThemeChanged",WindowLoadChanged:"linux:WindowLoadChanged",WindowDeleteEvent:"linux:WindowDeleteEvent",WindowFocusIn:"linux:WindowFocusIn",WindowFocusOut:"linux:WindowFocusOut",ApplicationStartup:"linux:ApplicationStartup"},Common:{ApplicationStarted:"common:ApplicationStarted",WindowMaximise:"common:WindowMaximise",WindowUnMaximise:"common:WindowUnMaximise",WindowFullscreen:"common:WindowFullscreen",WindowUnFullscreen:"common:WindowUnFullscreen",WindowRestore:"common:WindowRestore",WindowMinimise:"common:WindowMinimise",WindowUnMinimise:"common:WindowUnMinimise",WindowClosing:"common:WindowClosing",WindowZoom:"common:WindowZoom",WindowZoomIn:"common:WindowZoomIn",WindowZoomOut:"common:WindowZoomOut",WindowZoomReset:"common:WindowZoomReset",WindowFocus:"common:WindowFocus",WindowLostFocus:"common:WindowLostFocus",WindowShow:"common:WindowShow",WindowHide:"common:WindowHide",WindowDPIChanged:"common:WindowDPIChanged",WindowFilesDropped:"common:WindowFilesDropped",WindowRuntimeReady:"common:WindowRuntimeReady",ThemeChanged:"common:ThemeChanged"}};var dn=ne;window._wails=window._wails||{};window._wails.dispatchWailsEvent=wn;var ln=l(d.Events,""),cn=0,m=new Map,V=class{constructor(i,n,o){this.eventName=i,this.maxCallbacks=o||-1,this.Callback=t=>(n(t),this.maxCallbacks===-1?!1:(this.maxCallbacks-=1,this.maxCallbacks===0))}},M=class{constructor(i,n=null){this.name=i,this.data=n}};function sn(){}function wn(e){let i=m.get(e.name);if(i){let n=i.filter(o=>{if(o.Callback(e))return!0});n.length>0&&(i=i.filter(o=>!n.includes(o)),i.length===0?m.delete(e.name):m.set(e.name,i))}}function _(e,i,n){let o=m.get(e)||[],t=new V(e,i,n);return o.push(t),m.set(e,o),()=>pn(t)}function mn(e,i){return _(e,i,-1)}function un(e,i){return _(e,i,1)}function pn(e){let i=e.eventName,n=m.get(i).filter(o=>o!==e);n.length===0?m.delete(i):m.set(i,n)}function Wn(e,...i){[e,...i].forEach(o=>m.delete(o))}function gn(){m.clear()}function Z(e){return ln(cn,e)}var G={};w(G,{Error:()=>Un,Info:()=>Rn,OpenFile:()=>yn,Question:()=>A,SaveFile:()=>On,Warning:()=>En});window._wails=window._wails||{};window._wails.dialogErrorCallback=bn;window._wails.dialogResultCallback=vn;var fn=0,hn=1,Dn=2,Cn=3,Sn=4,xn=5,Mn=l(d.Dialog,""),W=new Map;function An(){let e;do e=f();while(W.has(e));return e}function D(e,i={}){let n=An();return i["dialog-id"]=n,new Promise((o,t)=>{W.set(n,{resolve:o,reject:t}),Mn(e,i).catch(a=>{t(a),W.delete(n)})})}function vn(e,i,n){let o=W.get(e);o&&(n?o.resolve(JSON.parse(i)):o.resolve(i),W.delete(e))}function bn(e,i){let n=W.get(e);n&&(n.reject(i),W.delete(e))}var Rn=e=>D(fn,e),En=e=>D(hn,e),Un=e=>D(Dn,e),A=e=>D(Cn,e),yn=e=>D(Sn,e),On=e=>D(xn,e);function oe(e,i=null){let n=new M(e,i);Z(n)}function Pn(){document.querySelectorAll("[wml-event]").forEach(function(i){let n=i.getAttribute("wml-event"),o=i.getAttribute("wml-confirm"),t=i.getAttribute("wml-trigger")||"click",a=function(){if(o){A({Title:"Confirm",Message:o,Detached:!1,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(s){s!=="No"&&oe(n)});return}oe(n)};i.removeEventListener(t,a),i.addEventListener(t,a)})}function te(e,i){let n=U(e),o=In(n);o.has(i);try{o.get(i)()}catch{}}function Tn(){document.querySelectorAll("[wml-window]").forEach(function(i){let n=i.getAttribute("wml-window"),o=i.getAttribute("wml-confirm"),t=i.getAttribute("wml-trigger")||"click",a=i.getAttribute("wml-target-window")||"",s=function(){if(o){A({Title:"Confirm",Message:o,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(p){p!=="No"&&te(a,n)});return}te(a,n)};i.removeEventListener(t,s),i.addEventListener(t,s)})}function Bn(){document.querySelectorAll("[wml-openurl]").forEach(function(i){let n=i.getAttribute("wml-openurl"),o=i.getAttribute("wml-confirm"),t=i.getAttribute("wml-trigger")||"click",a=function(){if(o){A({Title:"Confirm",Message:o,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(s){s!=="No"&&b(n)});return}b(n)};i.removeEventListener(t,a),i.addEventListener(t,a)})}function Y(){Pn(),Tn(),Bn()}function In(e){let i=new Map;for(let n in e)typeof e[n]=="function"&&i.set(n,e[n]);return i}var X={};w(X,{ByID:()=>Vn,ByName:()=>Hn,Call:()=>Nn,Plugin:()=>_n});window._wails=window._wails||{};window._wails.callResultHandler=zn;window._wails.callErrorHandler=kn;var y=0,Fn=l(d.Call,""),v=new Map;function Ln(){let e;do e=f();while(v.has(e));return e}function zn(e,i,n){let o=re(e);o&&o.resolve(n?JSON.parse(i):i)}function kn(e,i){let n=re(e);n&&n.reject(i)}function re(e){let i=v.get(e);return v.delete(e),i}function O(e,i={}){return new Promise((n,o)=>{let t=Ln();i["call-id"]=t,v.set(t,{resolve:n,reject:o}),Fn(e,i).catch(a=>{o(a),v.delete(t)})})}function Nn(e){return O(y,e)}function Hn(e,...i){if(typeof e!="string"||e.split(".").length!==3)throw new Error("CallByName requires a string in the format 'package.struct.method'");let[n,o,t]=e.split(".");return O(y,{packageName:n,structName:o,methodName:t,args:i})}function Vn(e,...i){return O(y,{methodID:e,args:i})}function _n(e,i,...n){return O(y,{packageName:"wails-plugins",structName:e,methodName:i,args:n})}window._wails=window._wails||{};window._wails.invoke=h;window.wails=window.wails||{};window.wails.Application=T;window.wails.Browser=B;window.wails.Call=X;window.wails.Clipboard=I;window.wails.Dialogs=G;window.wails.Events=j;window.wails.Flags=z;window.wails.Screens=N;window.wails.System=L;window.wails.Window=H;window.wails.WML=K;var ae=!1;document.addEventListener("DOMContentLoaded",function(){ae=!0,window._wails.invoke("wails:runtime:ready")});function Zn(e){ae||document.readyState==="complete"?e():document.addEventListener("DOMContentLoaded",e)}Zn(()=>{Y()});})(); diff --git a/v3/examples/server/go.mod b/v3/examples/server/go.mod index bf3a7c2037f..4ebf1edafab 100644 --- a/v3/examples/server/go.mod +++ b/v3/examples/server/go.mod @@ -1,19 +1,19 @@ module server_demo -go 1.21 +go 1.21.1 -toolchain go1.21.0 +toolchain go1.22.0 require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 require ( - github.com/Microsoft/go-winio v0.4.16 // indirect + github.com/Microsoft/go-winio v0.6.1 // indirect github.com/bep/debounce v1.2.1 // indirect github.com/ebitengine/purego v0.4.0-alpha.4 // indirect - github.com/emirpasic/gods v1.12.0 // indirect - github.com/go-git/gcfg v1.5.0 // indirect - github.com/go-git/go-billy/v5 v5.2.0 // indirect - github.com/go-git/go-git/v5 v5.3.0 // indirect + github.com/emirpasic/gods v1.18.1 // indirect + github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect + github.com/go-git/go-billy/v5 v5.5.0 // indirect + github.com/go-git/go-git/v5 v5.11.0 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/godbus/dbus/v5 v5.1.0 // indirect github.com/google/uuid v1.3.0 // indirect @@ -21,11 +21,11 @@ require ( github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect + github.com/kevinburke/ssh_config v1.2.0 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/leaanthony/go-ansi-parser v1.6.1 // indirect github.com/leaanthony/u v1.1.0 // indirect - github.com/lmittmann/tint v1.0.0 // indirect + github.com/lmittmann/tint v1.0.3 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.19 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect @@ -33,17 +33,17 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect github.com/rivo/uniseg v0.4.4 // indirect - github.com/rogpeppe/go-internal v1.10.1-0.20230524175051-ec119421bb97 // indirect + github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/samber/lo v1.38.1 // indirect github.com/sergi/go-diff v1.2.0 // indirect github.com/stretchr/testify v1.8.4 // indirect github.com/wailsapp/go-webview2 v1.0.9 // indirect github.com/wailsapp/mimetype v1.4.1 // indirect - github.com/xanzy/ssh-agent v0.3.0 // indirect - golang.org/x/crypto v0.9.0 // indirect + github.com/xanzy/ssh-agent v0.3.3 // indirect + golang.org/x/crypto v0.19.0 // indirect golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/sys v0.13.0 // indirect + golang.org/x/net v0.19.0 // indirect + golang.org/x/sys v0.17.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect ) diff --git a/v3/examples/server/go.sum b/v3/examples/server/go.sum index acb39d10195..817d628318a 100644 --- a/v3/examples/server/go.sum +++ b/v3/examples/server/go.sum @@ -1,6 +1,8 @@ github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk= github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= +github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7 h1:uSoVVbwJiQipAclBbw+8quDsfcvFjOpI5iCf4p/cqCs= github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA= @@ -17,19 +19,23 @@ github.com/ebitengine/purego v0.4.0-alpha.4 h1:Y7yIV06Yo5M2BAdD7EVPhfp6LZ0tEcQo5 github.com/ebitengine/purego v0.4.0-alpha.4/go.mod h1:ah1In8AOtksoNK6yk5z1HTJeUkC1Ez4Wk2idgGslMwQ= github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= +github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= +github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= github.com/go-git/go-billy/v5 v5.0.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= github.com/go-git/go-billy/v5 v5.1.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= github.com/go-git/go-billy/v5 v5.2.0 h1:GcoouCP9J+5slw2uXAocL70z8ml4A8B/H8nEPt6CLPk= github.com/go-git/go-billy/v5 v5.2.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= +github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12 h1:PbKy9zOy4aAKrJ5pibIRpVO2BXnK1Tlcg+caKI7Ox5M= github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12/go.mod h1:m+ICp2rF3jDhFgEZ/8yziagdT1C+ZpZcrJjappBCDSw= github.com/go-git/go-git/v5 v5.3.0 h1:8WKMtJR2j8RntEXR/uvTKagfEt4GYlwQ7mntE4+0GWc= github.com/go-git/go-git/v5 v5.3.0/go.mod h1:xdX4bWJ48aOrdhnl2XqHYstHbbp6+LFS4r4X+lNVprw= +github.com/go-git/go-git/v5 v5.11.0/go.mod h1:6GFcX2P3NM7FPBfpePbpLd21XxsgdAt+lKqXmCUiUCY= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= @@ -51,6 +57,7 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 h1:DowS9hvgyYSX4TO5NpyC606/Z4SxnNYbT+WX27or6Ck= github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= +github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -66,6 +73,7 @@ github.com/leaanthony/u v1.1.0 h1:2n0d2BwPVXSUq5yhe8lJPHdxevE2qK5G99PMStMZMaI= github.com/leaanthony/u v1.1.0/go.mod h1:9+o6hejoRljvZ3BzdYlVL0JYCwtnAsVuN9pVTQcaRfI= github.com/lmittmann/tint v1.0.0 h1:fzEj70K1L58uyoePQxKe+ezDZJ5pybiWGdA0JeFvvyw= github.com/lmittmann/tint v1.0.0/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE= +github.com/lmittmann/tint v1.0.3/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE= github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= @@ -94,12 +102,14 @@ github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUc github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.1-0.20230524175051-ec119421bb97 h1:3RPlVWzZ/PDqmVuf/FKHARG5EMid/tl7cv54Sw/QRVY= github.com/rogpeppe/go-internal v1.10.1-0.20230524175051-ec119421bb97/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/samber/lo v1.38.1 h1:j2XEAqXKb09Am4ebOg31SpvzUTTs6EN3VfgeLUhPdXM= github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= @@ -113,31 +123,43 @@ github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhw github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI= github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= +github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df h1:UA2aFVmmsIlefxMk29Dp2juaUSth8Pyn3Tq5Y5mJGME= golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= diff --git a/v3/examples/systray/main.go b/v3/examples/systray/main.go index 592ce58c109..c2853152051 100644 --- a/v3/examples/systray/main.go +++ b/v3/examples/systray/main.go @@ -2,7 +2,6 @@ package main import ( _ "embed" - "fmt" "log" "runtime" @@ -25,6 +24,7 @@ func main() { window := app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{ Width: 500, Height: 800, + Name: "Systray Demo Window", Frameless: true, AlwaysOnTop: true, Hidden: true, @@ -79,7 +79,6 @@ func main() { radioCallback := func(ctx *application.Context) { menuItem := ctx.ClickedMenuItem() menuItem.SetLabel(menuItem.Label() + "!") - fmt.Println("radioCallback: ") } // Radio groups are created implicitly by placing radio items next to each other in a menu diff --git a/v3/examples/video/go.mod b/v3/examples/video/go.mod index edfa98f91a3..fed31b83339 100644 --- a/v3/examples/video/go.mod +++ b/v3/examples/video/go.mod @@ -1,46 +1,50 @@ module frameless -go 1.21 +go 1.21.1 -toolchain go1.21.0 +toolchain go1.22.0 require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 require ( - github.com/Microsoft/go-winio v0.4.16 // indirect + dario.cat/mergo v1.0.0 // indirect + github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect github.com/bep/debounce v1.2.1 // indirect + github.com/cloudflare/circl v1.3.3 // indirect + github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/ebitengine/purego v0.4.0-alpha.4 // indirect - github.com/emirpasic/gods v1.12.0 // indirect - github.com/go-git/gcfg v1.5.0 // indirect - github.com/go-git/go-billy/v5 v5.2.0 // indirect - github.com/go-git/go-git/v5 v5.3.0 // indirect + github.com/emirpasic/gods v1.18.1 // indirect + github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect + github.com/go-git/go-billy/v5 v5.5.0 // indirect + github.com/go-git/go-git/v5 v5.11.0 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/godbus/dbus/v5 v5.1.0 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/google/uuid v1.3.0 // indirect - github.com/imdario/mergo v0.3.12 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e // indirect - github.com/json-iterator/go v1.1.12 // indirect - github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect + github.com/kevinburke/ssh_config v1.2.0 // indirect github.com/leaanthony/go-ansi-parser v1.6.1 // indirect github.com/leaanthony/u v1.1.0 // indirect - github.com/lmittmann/tint v1.0.0 // indirect + github.com/lmittmann/tint v1.0.3 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.19 // indirect - github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/pjbgf/sha1cd v0.3.0 // indirect github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect github.com/rivo/uniseg v0.4.4 // indirect github.com/samber/lo v1.38.1 // indirect github.com/sergi/go-diff v1.2.0 // indirect + github.com/skeema/knownhosts v1.2.1 // indirect github.com/wailsapp/go-webview2 v1.0.9 // indirect github.com/wailsapp/mimetype v1.4.1 // indirect - github.com/xanzy/ssh-agent v0.3.0 // indirect - golang.org/x/crypto v0.9.0 // indirect + github.com/xanzy/ssh-agent v0.3.3 // indirect + golang.org/x/crypto v0.19.0 // indirect golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/sys v0.13.0 // indirect + golang.org/x/mod v0.12.0 // indirect + golang.org/x/net v0.19.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/tools v0.13.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect ) diff --git a/v3/examples/video/go.sum b/v3/examples/video/go.sum index 169c421b948..476b71ea3bd 100644 --- a/v3/examples/video/go.sum +++ b/v3/examples/video/go.sum @@ -1,60 +1,59 @@ -github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= -github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk= -github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= -github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7 h1:uSoVVbwJiQipAclBbw+8quDsfcvFjOpI5iCf4p/cqCs= -github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= +dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= +dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 h1:kkhsdkhsCvIsutKu5zLMgWtgh9YxGCNAw8Ad8hjwfYg= +github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= +github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= +github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/bep/debounce v1.2.1 h1:v67fRdBA9UQu2NhLFXrSg0Brw7CexQekrBwDMM8bzeY= github.com/bep/debounce v1.2.1/go.mod h1:H8yggRPQKLUhUoqrJC1bO2xNya7vanpDl7xR3ISbCJ0= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= +github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= +github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= +github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= +github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/ebitengine/purego v0.4.0-alpha.4 h1:Y7yIV06Yo5M2BAdD7EVPhfp6LZ0tEcQo5770OhYUVes= github.com/ebitengine/purego v0.4.0-alpha.4/go.mod h1:ah1In8AOtksoNK6yk5z1HTJeUkC1Ez4Wk2idgGslMwQ= -github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= -github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= -github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= -github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0= -github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= -github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= -github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= -github.com/go-git/go-billy/v5 v5.0.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= -github.com/go-git/go-billy/v5 v5.1.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= -github.com/go-git/go-billy/v5 v5.2.0 h1:GcoouCP9J+5slw2uXAocL70z8ml4A8B/H8nEPt6CLPk= -github.com/go-git/go-billy/v5 v5.2.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= -github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12 h1:PbKy9zOy4aAKrJ5pibIRpVO2BXnK1Tlcg+caKI7Ox5M= -github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12/go.mod h1:m+ICp2rF3jDhFgEZ/8yziagdT1C+ZpZcrJjappBCDSw= -github.com/go-git/go-git/v5 v5.3.0 h1:8WKMtJR2j8RntEXR/uvTKagfEt4GYlwQ7mntE4+0GWc= -github.com/go-git/go-git/v5 v5.3.0/go.mod h1:xdX4bWJ48aOrdhnl2XqHYstHbbp6+LFS4r4X+lNVprw= +github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= +github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= +github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= +github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= +github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= +github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4= +github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= +github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= +github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= +github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= +github.com/go-git/go-git/v5 v5.11.0 h1:XIZc1p+8YzypNr34itUfSvYJcv+eYdTnTvOZ2vD3cA4= +github.com/go-git/go-git/v5 v5.11.0/go.mod h1:6GFcX2P3NM7FPBfpePbpLd21XxsgdAt+lKqXmCUiUCY= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= -github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e h1:Q3+PugElBCf4PFpxhErSzU3/PY5sFL5Z6rfv4AbGAck= github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e/go.mod h1:alcuEEnZsY1WQsagKhZDsoPCRoOijYqhZvPwLG0kzVs= -github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 h1:DowS9hvgyYSX4TO5NpyC606/Z4SxnNYbT+WX27or6Ck= -github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= +github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -63,8 +62,8 @@ github.com/leaanthony/go-ansi-parser v1.6.1 h1:xd8bzARK3dErqkPFtoF9F3/HgN8UQk0ed github.com/leaanthony/go-ansi-parser v1.6.1/go.mod h1:+vva/2y4alzVmmIEpk9QDhA7vLC5zKDTRwfZGOp3IWU= github.com/leaanthony/u v1.1.0 h1:2n0d2BwPVXSUq5yhe8lJPHdxevE2qK5G99PMStMZMaI= github.com/leaanthony/u v1.1.0/go.mod h1:9+o6hejoRljvZ3BzdYlVL0JYCwtnAsVuN9pVTQcaRfI= -github.com/lmittmann/tint v1.0.0 h1:fzEj70K1L58uyoePQxKe+ezDZJ5pybiWGdA0JeFvvyw= -github.com/lmittmann/tint v1.0.0/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE= +github.com/lmittmann/tint v1.0.3 h1:W5PHeA2D8bBJVvabNfQD/XW9HPLZK1XoPZH0cq8NouQ= +github.com/lmittmann/tint v1.0.3/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE= github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= @@ -72,16 +71,12 @@ github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovk github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= +github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= +github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= +github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -89,66 +84,104 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/samber/lo v1.38.1 h1:j2XEAqXKb09Am4ebOg31SpvzUTTs6EN3VfgeLUhPdXM= github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/skeema/knownhosts v1.2.1 h1:SHWdIUa82uGZz+F+47k8SY4QhhI291cXCpopT1lK2AQ= +github.com/skeema/knownhosts v1.2.1/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/wailsapp/go-webview2 v1.0.9 h1:lrU+q0cf1wgLdR69rN+ZnRtMJNaJRrcQ4ELxoO7/xjs= github.com/wailsapp/go-webview2 v1.0.9/go.mod h1:Uk2BePfCRzttBBjFrBmqKGJd41P6QIHeV9kTgIeOZNo= github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI= -github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= -golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= +github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df h1:UA2aFVmmsIlefxMk29Dp2juaUSth8Pyn3Tq5Y5mJGME= golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= +golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= -golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/v3/examples/window/main.go b/v3/examples/window/main.go index 9c0e390f35d..f427d44946a 100644 --- a/v3/examples/window/main.go +++ b/v3/examples/window/main.go @@ -24,7 +24,7 @@ func main() { ApplicationShouldTerminateAfterLastWindowClosed: false, }, }) - app.On(events.Mac.ApplicationDidFinishLaunching, func(event *application.Event) { + app.On(events.Common.ApplicationStarted, func(event *application.Event) { log.Println("ApplicationDidFinishLaunching") }) @@ -154,21 +154,23 @@ func main() { }).Show() windowCounter++ }) - myMenu.Add("New WebviewWindow (ignores mouse events"). - SetAccelerator("CmdOrCtrl+F"). - OnClick(func(ctx *application.Context) { - app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{ - HTML: "
", - X: rand.Intn(1000), - Y: rand.Intn(800), - IgnoreMouseEvents: true, - BackgroundType: application.BackgroundTypeTransparent, - Mac: application.MacWindow{ - InvisibleTitleBarHeight: 50, - }, - }).Show() - windowCounter++ - }) + if runtime.GOOS != "linux" { + myMenu.Add("New WebviewWindow (ignores mouse events)"). + SetAccelerator("CmdOrCtrl+F"). + OnClick(func(ctx *application.Context) { + app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{ + HTML: "
", + X: rand.Intn(1000), + Y: rand.Intn(800), + IgnoreMouseEvents: true, + BackgroundType: application.BackgroundTypeTransparent, + Mac: application.MacWindow{ + InvisibleTitleBarHeight: 50, + }, + }).Show() + windowCounter++ + }) + } if runtime.GOOS == "darwin" { myMenu.Add("New WebviewWindow (MacTitleBarHiddenInset)"). OnClick(func(ctx *application.Context) { @@ -437,12 +439,19 @@ func main() { w.SetEnabled(true) }) }) + stateMenu.Add("Open Dev Tools").OnClick(func(ctx *application.Context) { + currentWindow(func(w *application.WebviewWindow) { + w.OpenDevTools() + }) + }) - if runtime.GOOS == "windows" { - stateMenu.Add("Flash Start").OnClick(func(ctx *application.Context) { + if runtime.GOOS != "darwin" { + stateMenu.Add("Flash for 5s").OnClick(func(ctx *application.Context) { currentWindow(func(w *application.WebviewWindow) { time.Sleep(2 * time.Second) w.Flash(true) + time.Sleep(5 * time.Second) + w.Flash(false) }) }) } diff --git a/v3/examples/wml/assets/index.html b/v3/examples/wml/assets/index.html index 1dca07b22bc..bd5c61f8e8d 100644 --- a/v3/examples/wml/assets/index.html +++ b/v3/examples/wml/assets/index.html @@ -131,7 +131,7 @@ - +
Alpha
diff --git a/v3/examples/wml/assets/runtime.debug.js b/v3/examples/wml/assets/runtime.debug.js deleted file mode 100644 index 101f237755c..00000000000 --- a/v3/examples/wml/assets/runtime.debug.js +++ /dev/null @@ -1,963 +0,0 @@ -(() => { - var __defProp = Object.defineProperty; - var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); - }; - - // desktop/@wailsio/runtime/src/log.js - function debugLog(message) { - console.log( - "%c wails3 %c " + message + " ", - "background: #aa0000; color: #fff; border-radius: 3px 0px 0px 3px; padding: 1px; font-size: 0.7rem", - "background: #009900; color: #fff; border-radius: 0px 3px 3px 0px; padding: 1px; font-size: 0.7rem" - ); - } - - // desktop/@wailsio/runtime/src/application.js - var application_exports = {}; - __export(application_exports, { - Hide: () => Hide, - Quit: () => Quit, - Show: () => Show - }); - - // node_modules/nanoid/non-secure/index.js - var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"; - var nanoid = (size2 = 21) => { - let id = ""; - let i = size2; - while (i--) { - id += urlAlphabet[Math.random() * 64 | 0]; - } - return id; - }; - - // desktop/@wailsio/runtime/src/runtime.js - var runtimeURL = window.location.origin + "/wails/runtime"; - var objectNames = { - Call: 0, - Clipboard: 1, - Application: 2, - Events: 3, - ContextMenu: 4, - Dialog: 5, - Window: 6, - Screens: 7, - System: 8, - Browser: 9 - }; - var clientId = nanoid(); - function newRuntimeCallerWithID(object, windowName) { - return function(method, args = null) { - return runtimeCallWithID(object, method, windowName, args); - }; - } - function runtimeCallWithID(objectID, method, windowName, args) { - let url = new URL(runtimeURL); - url.searchParams.append("object", objectID); - url.searchParams.append("method", method); - let fetchOptions = { - headers: {} - }; - if (windowName) { - fetchOptions.headers["x-wails-window-name"] = windowName; - } - if (args) { - url.searchParams.append("args", JSON.stringify(args)); - } - fetchOptions.headers["x-wails-client-id"] = clientId; - return new Promise((resolve, reject) => { - fetch(url, fetchOptions).then((response) => { - if (response.ok) { - if (response.headers.get("Content-Type") && response.headers.get("Content-Type").indexOf("application/json") !== -1) { - return response.json(); - } else { - return response.text(); - } - } - reject(Error(response.statusText)); - }).then((data) => resolve(data)).catch((error) => reject(error)); - }); - } - - // desktop/@wailsio/runtime/src/application.js - var call = newRuntimeCallerWithID(objectNames.Application, ""); - var HideMethod = 0; - var ShowMethod = 1; - var QuitMethod = 2; - function Hide() { - return call(HideMethod); - } - function Show() { - return call(ShowMethod); - } - function Quit() { - return call(QuitMethod); - } - - // desktop/@wailsio/runtime/src/browser.js - var browser_exports = {}; - __export(browser_exports, { - OpenURL: () => OpenURL - }); - var call2 = newRuntimeCallerWithID(objectNames.Browser, ""); - var BrowserOpenURL = 0; - function OpenURL(url) { - return call2(BrowserOpenURL, { url }); - } - - // desktop/@wailsio/runtime/src/clipboard.js - var clipboard_exports = {}; - __export(clipboard_exports, { - SetText: () => SetText, - Text: () => Text - }); - var call3 = newRuntimeCallerWithID(objectNames.Clipboard, ""); - var ClipboardSetText = 0; - var ClipboardText = 1; - function SetText(text) { - return call3(ClipboardSetText, { text }); - } - function Text() { - return call3(ClipboardText); - } - - // desktop/@wailsio/runtime/src/flags.js - var flags_exports = {}; - __export(flags_exports, { - GetFlag: () => GetFlag - }); - function GetFlag(keyString) { - try { - return window._wails.flags[keyString]; - } catch (e) { - throw new Error("Unable to retrieve flag '" + keyString + "': " + e); - } - } - - // desktop/@wailsio/runtime/src/screens.js - var screens_exports = {}; - __export(screens_exports, { - GetAll: () => GetAll, - GetCurrent: () => GetCurrent, - GetPrimary: () => GetPrimary - }); - var call4 = newRuntimeCallerWithID(objectNames.Screens, ""); - var getAll = 0; - var getPrimary = 1; - var getCurrent = 2; - function GetAll() { - return call4(getAll); - } - function GetPrimary() { - return call4(getPrimary); - } - function GetCurrent() { - return call4(getCurrent); - } - - // desktop/@wailsio/runtime/src/system.js - var system_exports = {}; - __export(system_exports, { - Capabilities: () => Capabilities, - Environment: () => Environment, - IsAMD64: () => IsAMD64, - IsARM: () => IsARM, - IsARM64: () => IsARM64, - IsDarkMode: () => IsDarkMode, - IsDebug: () => IsDebug, - IsLinux: () => IsLinux, - IsMac: () => IsMac, - IsWindows: () => IsWindows, - invoke: () => invoke - }); - var call5 = newRuntimeCallerWithID(objectNames.System, ""); - var systemIsDarkMode = 0; - var environment = 1; - function invoke(msg) { - if (window.chrome) { - return window.chrome.webview.postMessage(msg); - } - return window.webkit.messageHandlers.external.postMessage; - } - function IsDarkMode() { - return call5(systemIsDarkMode); - } - function Capabilities() { - let response = fetch("/wails/capabilities"); - return response.json(); - } - function Environment() { - return call5(environment); - } - function IsWindows() { - return window._wails.environment.OS === "windows"; - } - function IsLinux() { - return window._wails.environment.OS === "linux"; - } - function IsMac() { - return window._wails.environment.OS === "darwin"; - } - function IsAMD64() { - return window._wails.environment.Arch === "amd64"; - } - function IsARM() { - return window._wails.environment.Arch === "arm"; - } - function IsARM64() { - return window._wails.environment.Arch === "arm64"; - } - function IsDebug() { - return window._wails.environment.Debug === true; - } - - // desktop/@wailsio/runtime/src/window.js - var window_exports = {}; - __export(window_exports, { - Center: () => Center, - Close: () => Close, - Fullscreen: () => Fullscreen, - Get: () => Get, - GetZoomLevel: () => GetZoomLevel, - Height: () => Height, - Hide: () => Hide2, - Maximise: () => Maximise, - Minimise: () => Minimise, - RelativePosition: () => RelativePosition, - Restore: () => Restore, - Screen: () => Screen, - SetAlwaysOnTop: () => SetAlwaysOnTop, - SetBackgroundColour: () => SetBackgroundColour, - SetMaxSize: () => SetMaxSize, - SetMinSize: () => SetMinSize, - SetRelativePosition: () => SetRelativePosition, - SetResizable: () => SetResizable, - SetSize: () => SetSize, - SetTitle: () => SetTitle, - SetZoomLevel: () => SetZoomLevel, - Show: () => Show2, - Size: () => Size, - ToggleMaximise: () => ToggleMaximise, - UnMaximise: () => UnMaximise, - UnMinimise: () => UnMinimise, - Width: () => Width, - ZoomIn: () => ZoomIn, - ZoomOut: () => ZoomOut, - ZoomReset: () => ZoomReset - }); - var center = 0; - var setTitle = 1; - var fullscreen = 2; - var unFullscreen = 3; - var setSize = 4; - var size = 5; - var setMaxSize = 6; - var setMinSize = 7; - var setAlwaysOnTop = 8; - var setRelativePosition = 9; - var relativePosition = 10; - var screen = 11; - var hide = 12; - var maximise = 13; - var unMaximise = 14; - var toggleMaximise = 15; - var minimise = 16; - var unMinimise = 17; - var restore = 18; - var show = 19; - var close = 20; - var setBackgroundColour = 21; - var setResizable = 22; - var width = 23; - var height = 24; - var zoomIn = 25; - var zoomOut = 26; - var zoomReset = 27; - var getZoomLevel = 28; - var setZoomLevel = 29; - var thisWindow = Get(""); - function createWindow(call9) { - return { - Get: (windowName) => createWindow(newRuntimeCallerWithID(objectNames.Window, windowName)), - Center: () => call9(center), - SetTitle: (title) => call9(setTitle, { title }), - Fullscreen: () => call9(fullscreen), - UnFullscreen: () => call9(unFullscreen), - SetSize: (width2, height2) => call9(setSize, { width: width2, height: height2 }), - Size: () => call9(size), - SetMaxSize: (width2, height2) => call9(setMaxSize, { width: width2, height: height2 }), - SetMinSize: (width2, height2) => call9(setMinSize, { width: width2, height: height2 }), - SetAlwaysOnTop: (onTop) => call9(setAlwaysOnTop, { alwaysOnTop: onTop }), - SetRelativePosition: (x, y) => call9(setRelativePosition, { x, y }), - RelativePosition: () => call9(relativePosition), - Screen: () => call9(screen), - Hide: () => call9(hide), - Maximise: () => call9(maximise), - UnMaximise: () => call9(unMaximise), - ToggleMaximise: () => call9(toggleMaximise), - Minimise: () => call9(minimise), - UnMinimise: () => call9(unMinimise), - Restore: () => call9(restore), - Show: () => call9(show), - Close: () => call9(close), - SetBackgroundColour: (r, g, b, a) => call9(setBackgroundColour, { r, g, b, a }), - SetResizable: (resizable) => call9(setResizable, { resizable }), - Width: () => call9(width), - Height: () => call9(height), - ZoomIn: () => call9(zoomIn), - ZoomOut: () => call9(zoomOut), - ZoomReset: () => call9(zoomReset), - GetZoomLevel: () => call9(getZoomLevel), - SetZoomLevel: (zoomLevel) => call9(setZoomLevel, { zoomLevel }) - }; - } - function Get(windowName) { - return createWindow(newRuntimeCallerWithID(objectNames.Window, windowName)); - } - function Center() { - thisWindow.Center(); - } - function SetTitle(title) { - thisWindow.SetTitle(title); - } - function Fullscreen() { - thisWindow.Fullscreen(); - } - function SetSize(width2, height2) { - thisWindow.SetSize(width2, height2); - } - function Size() { - return thisWindow.Size(); - } - function SetMaxSize(width2, height2) { - thisWindow.SetMaxSize(width2, height2); - } - function SetMinSize(width2, height2) { - thisWindow.SetMinSize(width2, height2); - } - function SetAlwaysOnTop(onTop) { - thisWindow.SetAlwaysOnTop(onTop); - } - function SetRelativePosition(x, y) { - thisWindow.SetRelativePosition(x, y); - } - function RelativePosition() { - return thisWindow.RelativePosition(); - } - function Screen() { - return thisWindow.Screen(); - } - function Hide2() { - thisWindow.Hide(); - } - function Maximise() { - thisWindow.Maximise(); - } - function UnMaximise() { - thisWindow.UnMaximise(); - } - function ToggleMaximise() { - thisWindow.ToggleMaximise(); - } - function Minimise() { - thisWindow.Minimise(); - } - function UnMinimise() { - thisWindow.UnMinimise(); - } - function Restore() { - thisWindow.Restore(); - } - function Show2() { - thisWindow.Show(); - } - function Close() { - thisWindow.Close(); - } - function SetBackgroundColour(r, g, b, a) { - thisWindow.SetBackgroundColour(r, g, b, a); - } - function SetResizable(resizable) { - thisWindow.SetResizable(resizable); - } - function Width() { - return thisWindow.Width(); - } - function Height() { - return thisWindow.Height(); - } - function ZoomIn() { - thisWindow.ZoomIn(); - } - function ZoomOut() { - thisWindow.ZoomOut(); - } - function ZoomReset() { - thisWindow.ZoomReset(); - } - function GetZoomLevel() { - return thisWindow.GetZoomLevel(); - } - function SetZoomLevel(zoomLevel) { - thisWindow.SetZoomLevel(zoomLevel); - } - - // desktop/@wailsio/runtime/src/wml.js - var wml_exports = {}; - __export(wml_exports, { - Reload: () => Reload - }); - - // desktop/@wailsio/runtime/src/events.js - var events_exports = {}; - __export(events_exports, { - Emit: () => Emit, - Off: () => Off, - OffAll: () => OffAll, - On: () => On, - OnMultiple: () => OnMultiple, - Once: () => Once, - Types: () => Types, - WailsEvent: () => WailsEvent, - setup: () => setup - }); - - // desktop/@wailsio/runtime/src/event_types.js - var EventTypes = { - Windows: { - SystemThemeChanged: "windows:SystemThemeChanged", - APMPowerStatusChange: "windows:APMPowerStatusChange", - APMSuspend: "windows:APMSuspend", - APMResumeAutomatic: "windows:APMResumeAutomatic", - APMResumeSuspend: "windows:APMResumeSuspend", - APMPowerSettingChange: "windows:APMPowerSettingChange", - ApplicationStarted: "windows:ApplicationStarted", - WebViewNavigationCompleted: "windows:WebViewNavigationCompleted", - WindowInactive: "windows:WindowInactive", - WindowActive: "windows:WindowActive", - WindowClickActive: "windows:WindowClickActive", - WindowMaximise: "windows:WindowMaximise", - WindowUnMaximise: "windows:WindowUnMaximise", - WindowFullscreen: "windows:WindowFullscreen", - WindowUnFullscreen: "windows:WindowUnFullscreen", - WindowRestore: "windows:WindowRestore", - WindowMinimise: "windows:WindowMinimise", - WindowUnMinimise: "windows:WindowUnMinimise", - WindowClose: "windows:WindowClose", - WindowSetFocus: "windows:WindowSetFocus", - WindowKillFocus: "windows:WindowKillFocus", - WindowDragDrop: "windows:WindowDragDrop", - WindowDragEnter: "windows:WindowDragEnter", - WindowDragLeave: "windows:WindowDragLeave", - WindowDragOver: "windows:WindowDragOver" - }, - Mac: { - ApplicationDidBecomeActive: "mac:ApplicationDidBecomeActive", - ApplicationDidChangeBackingProperties: "mac:ApplicationDidChangeBackingProperties", - ApplicationDidChangeEffectiveAppearance: "mac:ApplicationDidChangeEffectiveAppearance", - ApplicationDidChangeIcon: "mac:ApplicationDidChangeIcon", - ApplicationDidChangeOcclusionState: "mac:ApplicationDidChangeOcclusionState", - ApplicationDidChangeScreenParameters: "mac:ApplicationDidChangeScreenParameters", - ApplicationDidChangeStatusBarFrame: "mac:ApplicationDidChangeStatusBarFrame", - ApplicationDidChangeStatusBarOrientation: "mac:ApplicationDidChangeStatusBarOrientation", - ApplicationDidFinishLaunching: "mac:ApplicationDidFinishLaunching", - ApplicationDidHide: "mac:ApplicationDidHide", - ApplicationDidResignActiveNotification: "mac:ApplicationDidResignActiveNotification", - ApplicationDidUnhide: "mac:ApplicationDidUnhide", - ApplicationDidUpdate: "mac:ApplicationDidUpdate", - ApplicationWillBecomeActive: "mac:ApplicationWillBecomeActive", - ApplicationWillFinishLaunching: "mac:ApplicationWillFinishLaunching", - ApplicationWillHide: "mac:ApplicationWillHide", - ApplicationWillResignActive: "mac:ApplicationWillResignActive", - ApplicationWillTerminate: "mac:ApplicationWillTerminate", - ApplicationWillUnhide: "mac:ApplicationWillUnhide", - ApplicationWillUpdate: "mac:ApplicationWillUpdate", - ApplicationDidChangeTheme: "mac:ApplicationDidChangeTheme!", - ApplicationShouldHandleReopen: "mac:ApplicationShouldHandleReopen!", - WindowDidBecomeKey: "mac:WindowDidBecomeKey", - WindowDidBecomeMain: "mac:WindowDidBecomeMain", - WindowDidBeginSheet: "mac:WindowDidBeginSheet", - WindowDidChangeAlpha: "mac:WindowDidChangeAlpha", - WindowDidChangeBackingLocation: "mac:WindowDidChangeBackingLocation", - WindowDidChangeBackingProperties: "mac:WindowDidChangeBackingProperties", - WindowDidChangeCollectionBehavior: "mac:WindowDidChangeCollectionBehavior", - WindowDidChangeEffectiveAppearance: "mac:WindowDidChangeEffectiveAppearance", - WindowDidChangeOcclusionState: "mac:WindowDidChangeOcclusionState", - WindowDidChangeOrderingMode: "mac:WindowDidChangeOrderingMode", - WindowDidChangeScreen: "mac:WindowDidChangeScreen", - WindowDidChangeScreenParameters: "mac:WindowDidChangeScreenParameters", - WindowDidChangeScreenProfile: "mac:WindowDidChangeScreenProfile", - WindowDidChangeScreenSpace: "mac:WindowDidChangeScreenSpace", - WindowDidChangeScreenSpaceProperties: "mac:WindowDidChangeScreenSpaceProperties", - WindowDidChangeSharingType: "mac:WindowDidChangeSharingType", - WindowDidChangeSpace: "mac:WindowDidChangeSpace", - WindowDidChangeSpaceOrderingMode: "mac:WindowDidChangeSpaceOrderingMode", - WindowDidChangeTitle: "mac:WindowDidChangeTitle", - WindowDidChangeToolbar: "mac:WindowDidChangeToolbar", - WindowDidChangeVisibility: "mac:WindowDidChangeVisibility", - WindowDidDeminiaturize: "mac:WindowDidDeminiaturize", - WindowDidEndSheet: "mac:WindowDidEndSheet", - WindowDidEnterFullScreen: "mac:WindowDidEnterFullScreen", - WindowDidEnterVersionBrowser: "mac:WindowDidEnterVersionBrowser", - WindowDidExitFullScreen: "mac:WindowDidExitFullScreen", - WindowDidExitVersionBrowser: "mac:WindowDidExitVersionBrowser", - WindowDidExpose: "mac:WindowDidExpose", - WindowDidFocus: "mac:WindowDidFocus", - WindowDidMiniaturize: "mac:WindowDidMiniaturize", - WindowDidMove: "mac:WindowDidMove", - WindowDidOrderOffScreen: "mac:WindowDidOrderOffScreen", - WindowDidOrderOnScreen: "mac:WindowDidOrderOnScreen", - WindowDidResignKey: "mac:WindowDidResignKey", - WindowDidResignMain: "mac:WindowDidResignMain", - WindowDidResize: "mac:WindowDidResize", - WindowDidUpdate: "mac:WindowDidUpdate", - WindowDidUpdateAlpha: "mac:WindowDidUpdateAlpha", - WindowDidUpdateCollectionBehavior: "mac:WindowDidUpdateCollectionBehavior", - WindowDidUpdateCollectionProperties: "mac:WindowDidUpdateCollectionProperties", - WindowDidUpdateShadow: "mac:WindowDidUpdateShadow", - WindowDidUpdateTitle: "mac:WindowDidUpdateTitle", - WindowDidUpdateToolbar: "mac:WindowDidUpdateToolbar", - WindowDidUpdateVisibility: "mac:WindowDidUpdateVisibility", - WindowShouldClose: "mac:WindowShouldClose!", - WindowWillBecomeKey: "mac:WindowWillBecomeKey", - WindowWillBecomeMain: "mac:WindowWillBecomeMain", - WindowWillBeginSheet: "mac:WindowWillBeginSheet", - WindowWillChangeOrderingMode: "mac:WindowWillChangeOrderingMode", - WindowWillClose: "mac:WindowWillClose", - WindowWillDeminiaturize: "mac:WindowWillDeminiaturize", - WindowWillEnterFullScreen: "mac:WindowWillEnterFullScreen", - WindowWillEnterVersionBrowser: "mac:WindowWillEnterVersionBrowser", - WindowWillExitFullScreen: "mac:WindowWillExitFullScreen", - WindowWillExitVersionBrowser: "mac:WindowWillExitVersionBrowser", - WindowWillFocus: "mac:WindowWillFocus", - WindowWillMiniaturize: "mac:WindowWillMiniaturize", - WindowWillMove: "mac:WindowWillMove", - WindowWillOrderOffScreen: "mac:WindowWillOrderOffScreen", - WindowWillOrderOnScreen: "mac:WindowWillOrderOnScreen", - WindowWillResignMain: "mac:WindowWillResignMain", - WindowWillResize: "mac:WindowWillResize", - WindowWillUnfocus: "mac:WindowWillUnfocus", - WindowWillUpdate: "mac:WindowWillUpdate", - WindowWillUpdateAlpha: "mac:WindowWillUpdateAlpha", - WindowWillUpdateCollectionBehavior: "mac:WindowWillUpdateCollectionBehavior", - WindowWillUpdateCollectionProperties: "mac:WindowWillUpdateCollectionProperties", - WindowWillUpdateShadow: "mac:WindowWillUpdateShadow", - WindowWillUpdateTitle: "mac:WindowWillUpdateTitle", - WindowWillUpdateToolbar: "mac:WindowWillUpdateToolbar", - WindowWillUpdateVisibility: "mac:WindowWillUpdateVisibility", - WindowWillUseStandardFrame: "mac:WindowWillUseStandardFrame", - MenuWillOpen: "mac:MenuWillOpen", - MenuDidOpen: "mac:MenuDidOpen", - MenuDidClose: "mac:MenuDidClose", - MenuWillSendAction: "mac:MenuWillSendAction", - MenuDidSendAction: "mac:MenuDidSendAction", - MenuWillHighlightItem: "mac:MenuWillHighlightItem", - MenuDidHighlightItem: "mac:MenuDidHighlightItem", - MenuWillDisplayItem: "mac:MenuWillDisplayItem", - MenuDidDisplayItem: "mac:MenuDidDisplayItem", - MenuWillAddItem: "mac:MenuWillAddItem", - MenuDidAddItem: "mac:MenuDidAddItem", - MenuWillRemoveItem: "mac:MenuWillRemoveItem", - MenuDidRemoveItem: "mac:MenuDidRemoveItem", - MenuWillBeginTracking: "mac:MenuWillBeginTracking", - MenuDidBeginTracking: "mac:MenuDidBeginTracking", - MenuWillEndTracking: "mac:MenuWillEndTracking", - MenuDidEndTracking: "mac:MenuDidEndTracking", - MenuWillUpdate: "mac:MenuWillUpdate", - MenuDidUpdate: "mac:MenuDidUpdate", - MenuWillPopUp: "mac:MenuWillPopUp", - MenuDidPopUp: "mac:MenuDidPopUp", - MenuWillSendActionToItem: "mac:MenuWillSendActionToItem", - MenuDidSendActionToItem: "mac:MenuDidSendActionToItem", - WebViewDidStartProvisionalNavigation: "mac:WebViewDidStartProvisionalNavigation", - WebViewDidReceiveServerRedirectForProvisionalNavigation: "mac:WebViewDidReceiveServerRedirectForProvisionalNavigation", - WebViewDidFinishNavigation: "mac:WebViewDidFinishNavigation", - WebViewDidCommitNavigation: "mac:WebViewDidCommitNavigation", - WindowFileDraggingEntered: "mac:WindowFileDraggingEntered", - WindowFileDraggingPerformed: "mac:WindowFileDraggingPerformed", - WindowFileDraggingExited: "mac:WindowFileDraggingExited" - }, - Linux: { - SystemThemeChanged: "linux:SystemThemeChanged" - }, - Common: { - ApplicationStarted: "common:ApplicationStarted", - WindowMaximise: "common:WindowMaximise", - WindowUnMaximise: "common:WindowUnMaximise", - WindowFullscreen: "common:WindowFullscreen", - WindowUnFullscreen: "common:WindowUnFullscreen", - WindowRestore: "common:WindowRestore", - WindowMinimise: "common:WindowMinimise", - WindowUnMinimise: "common:WindowUnMinimise", - WindowClosing: "common:WindowClosing", - WindowZoom: "common:WindowZoom", - WindowZoomIn: "common:WindowZoomIn", - WindowZoomOut: "common:WindowZoomOut", - WindowZoomReset: "common:WindowZoomReset", - WindowFocus: "common:WindowFocus", - WindowLostFocus: "common:WindowLostFocus", - WindowShow: "common:WindowShow", - WindowHide: "common:WindowHide", - WindowDPIChanged: "common:WindowDPIChanged", - WindowFilesDropped: "common:WindowFilesDropped", - WindowRuntimeReady: "common:WindowRuntimeReady", - ThemeChanged: "common:ThemeChanged" - } - }; - - // desktop/@wailsio/runtime/src/events.js - var Types = EventTypes; - window._wails = window._wails || {}; - window._wails.dispatchWailsEvent = dispatchWailsEvent; - var call6 = newRuntimeCallerWithID(objectNames.Events, ""); - var EmitMethod = 0; - var eventListeners = /* @__PURE__ */ new Map(); - var Listener = class { - constructor(eventName, callback, maxCallbacks) { - this.eventName = eventName; - this.maxCallbacks = maxCallbacks || -1; - this.Callback = (data) => { - callback(data); - if (this.maxCallbacks === -1) - return false; - this.maxCallbacks -= 1; - return this.maxCallbacks === 0; - }; - } - }; - var WailsEvent = class { - constructor(name, data = null) { - this.name = name; - this.data = data; - } - }; - function setup() { - } - function dispatchWailsEvent(event) { - let listeners = eventListeners.get(event.name); - if (listeners) { - let toRemove = listeners.filter((listener) => { - let remove = listener.Callback(event); - if (remove) - return true; - }); - if (toRemove.length > 0) { - listeners = listeners.filter((l) => !toRemove.includes(l)); - if (listeners.length === 0) - eventListeners.delete(event.name); - else - eventListeners.set(event.name, listeners); - } - } - } - function OnMultiple(eventName, callback, maxCallbacks) { - let listeners = eventListeners.get(eventName) || []; - const thisListener = new Listener(eventName, callback, maxCallbacks); - listeners.push(thisListener); - eventListeners.set(eventName, listeners); - return () => listenerOff(thisListener); - } - function On(eventName, callback) { - return OnMultiple(eventName, callback, -1); - } - function Once(eventName, callback) { - return OnMultiple(eventName, callback, 1); - } - function listenerOff(listener) { - const eventName = listener.eventName; - let listeners = eventListeners.get(eventName).filter((l) => l !== listener); - if (listeners.length === 0) - eventListeners.delete(eventName); - else - eventListeners.set(eventName, listeners); - } - function Off(eventName, ...additionalEventNames) { - let eventsToRemove = [eventName, ...additionalEventNames]; - eventsToRemove.forEach((eventName2) => eventListeners.delete(eventName2)); - } - function OffAll() { - eventListeners.clear(); - } - function Emit(event) { - return call6(EmitMethod, event); - } - - // desktop/@wailsio/runtime/src/dialogs.js - var dialogs_exports = {}; - __export(dialogs_exports, { - Error: () => Error2, - Info: () => Info, - OpenFile: () => OpenFile, - Question: () => Question, - SaveFile: () => SaveFile, - Warning: () => Warning - }); - window._wails = window._wails || {}; - window._wails.dialogErrorCallback = dialogErrorCallback; - window._wails.dialogResultCallback = dialogResultCallback; - var DialogInfo = 0; - var DialogWarning = 1; - var DialogError = 2; - var DialogQuestion = 3; - var DialogOpenFile = 4; - var DialogSaveFile = 5; - var call7 = newRuntimeCallerWithID(objectNames.Dialog, ""); - var dialogResponses = /* @__PURE__ */ new Map(); - function generateID() { - let result; - do { - result = nanoid(); - } while (dialogResponses.has(result)); - return result; - } - function dialog(type, options = {}) { - const id = generateID(); - options["dialog-id"] = id; - return new Promise((resolve, reject) => { - dialogResponses.set(id, { resolve, reject }); - call7(type, options).catch((error) => { - reject(error); - dialogResponses.delete(id); - }); - }); - } - function dialogResultCallback(id, data, isJSON) { - let p = dialogResponses.get(id); - if (p) { - if (isJSON) { - p.resolve(JSON.parse(data)); - } else { - p.resolve(data); - } - dialogResponses.delete(id); - } - } - function dialogErrorCallback(id, message) { - let p = dialogResponses.get(id); - if (p) { - p.reject(message); - dialogResponses.delete(id); - } - } - var Info = (options) => dialog(DialogInfo, options); - var Warning = (options) => dialog(DialogWarning, options); - var Error2 = (options) => dialog(DialogError, options); - var Question = (options) => dialog(DialogQuestion, options); - var OpenFile = (options) => dialog(DialogOpenFile, options); - var SaveFile = (options) => dialog(DialogSaveFile, options); - - // desktop/@wailsio/runtime/src/wml.js - function sendEvent(eventName, data = null) { - let event = new WailsEvent(eventName, data); - Emit(event); - } - function addWMLEventListeners() { - const elements = document.querySelectorAll("[wml-event]"); - elements.forEach(function(element) { - const eventType = element.getAttribute("wml-event"); - const confirm = element.getAttribute("wml-confirm"); - const trigger = element.getAttribute("wml-trigger") || "click"; - let callback = function() { - if (confirm) { - Question({ Title: "Confirm", Message: confirm, Detached: false, Buttons: [{ Label: "Yes" }, { Label: "No", IsDefault: true }] }).then(function(result) { - if (result !== "No") { - sendEvent(eventType); - } - }); - return; - } - sendEvent(eventType); - }; - element.removeEventListener(trigger, callback); - element.addEventListener(trigger, callback); - }); - } - function callWindowMethod(windowName, method) { - let targetWindow = Get(windowName); - let methodMap = WindowMethods(targetWindow); - if (!methodMap.has(method)) { - console.log("Window method " + method + " not found"); - } - try { - methodMap.get(method)(); - } catch (e) { - console.error("Error calling window method '" + method + "': " + e); - } - } - function addWMLWindowListeners() { - const elements = document.querySelectorAll("[wml-window]"); - elements.forEach(function(element) { - const windowMethod = element.getAttribute("wml-window"); - const confirm = element.getAttribute("wml-confirm"); - const trigger = element.getAttribute("wml-trigger") || "click"; - const targetWindow = element.getAttribute("wml-target-window") || ""; - let callback = function() { - if (confirm) { - Question({ Title: "Confirm", Message: confirm, Buttons: [{ Label: "Yes" }, { Label: "No", IsDefault: true }] }).then(function(result) { - if (result !== "No") { - callWindowMethod(targetWindow, windowMethod); - } - }); - return; - } - callWindowMethod(targetWindow, windowMethod); - }; - element.removeEventListener(trigger, callback); - element.addEventListener(trigger, callback); - }); - } - function addWMLOpenBrowserListener() { - const elements = document.querySelectorAll("[wml-openurl]"); - elements.forEach(function(element) { - const url = element.getAttribute("wml-openurl"); - const confirm = element.getAttribute("wml-confirm"); - const trigger = element.getAttribute("wml-trigger") || "click"; - let callback = function() { - if (confirm) { - Question({ Title: "Confirm", Message: confirm, Buttons: [{ Label: "Yes" }, { Label: "No", IsDefault: true }] }).then(function(result) { - if (result !== "No") { - void OpenURL(url); - } - }); - return; - } - void OpenURL(url); - }; - element.removeEventListener(trigger, callback); - element.addEventListener(trigger, callback); - }); - } - function Reload() { - if (true) { - debugLog("Reloading WML"); - } - addWMLEventListeners(); - addWMLWindowListeners(); - addWMLOpenBrowserListener(); - } - function WindowMethods(targetWindow) { - let result = /* @__PURE__ */ new Map(); - for (let method in targetWindow) { - if (typeof targetWindow[method] === "function") { - result.set(method, targetWindow[method]); - } - } - return result; - } - - // desktop/@wailsio/runtime/src/calls.js - var calls_exports = {}; - __export(calls_exports, { - ByID: () => ByID, - ByName: () => ByName, - Call: () => Call, - Plugin: () => Plugin - }); - window._wails = window._wails || {}; - window._wails.callResultHandler = resultHandler; - window._wails.callErrorHandler = errorHandler; - var CallBinding = 0; - var call8 = newRuntimeCallerWithID(objectNames.Call, ""); - var callResponses = /* @__PURE__ */ new Map(); - function generateID2() { - let result; - do { - result = nanoid(); - } while (callResponses.has(result)); - return result; - } - function resultHandler(id, data, isJSON) { - const promiseHandler = getAndDeleteResponse(id); - if (promiseHandler) { - promiseHandler.resolve(isJSON ? JSON.parse(data) : data); - } - } - function errorHandler(id, message) { - const promiseHandler = getAndDeleteResponse(id); - if (promiseHandler) { - promiseHandler.reject(message); - } - } - function getAndDeleteResponse(id) { - const response = callResponses.get(id); - callResponses.delete(id); - return response; - } - function callBinding(type, options = {}) { - return new Promise((resolve, reject) => { - const id = generateID2(); - options["call-id"] = id; - callResponses.set(id, { resolve, reject }); - call8(type, options).catch((error) => { - reject(error); - callResponses.delete(id); - }); - }); - } - function Call(options) { - return callBinding(CallBinding, options); - } - function ByName(name, ...args) { - if (typeof name !== "string" || name.split(".").length !== 3) { - throw new Error("CallByName requires a string in the format 'package.struct.method'"); - } - let [packageName, structName, methodName] = name.split("."); - return callBinding(CallBinding, { - packageName, - structName, - methodName, - args - }); - } - function ByID(methodID, ...args) { - return callBinding(CallBinding, { - methodID, - args - }); - } - function Plugin(pluginName, methodName, ...args) { - return callBinding(CallBinding, { - packageName: "wails-plugins", - structName: pluginName, - methodName, - args - }); - } - - // desktop/compiled/main.js - window._wails = window._wails || {}; - window._wails.invoke = invoke; - window.wails = window.wails || {}; - window.wails.Application = application_exports; - window.wails.Browser = browser_exports; - window.wails.Call = calls_exports; - window.wails.Clipboard = clipboard_exports; - window.wails.Dialogs = dialogs_exports; - window.wails.Events = events_exports; - window.wails.Flags = flags_exports; - window.wails.Screens = screens_exports; - window.wails.System = system_exports; - window.wails.Window = window_exports; - window.wails.WML = wml_exports; - var isReady = false; - document.addEventListener("DOMContentLoaded", function() { - isReady = true; - window._wails.invoke("wails:runtime:ready"); - if (true) { - debugLog("Wails Runtime Loaded"); - } - }); - function whenReady(fn) { - if (isReady || document.readyState === "complete") { - fn(); - } else { - document.addEventListener("DOMContentLoaded", fn); - } - } - whenReady(() => { - Reload(); - }); -})(); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vLi4vcnVudGltZS9kZXNrdG9wL0B3YWlsc2lvL3J1bnRpbWUvc3JjL2xvZy5qcyIsICIuLi8uLi8uLi9ydW50aW1lL2Rlc2t0b3AvQHdhaWxzaW8vcnVudGltZS9zcmMvYXBwbGljYXRpb24uanMiLCAiLi4vLi4vLi4vcnVudGltZS9ub2RlX21vZHVsZXMvbmFub2lkL25vbi1zZWN1cmUvaW5kZXguanMiLCAiLi4vLi4vLi4vcnVudGltZS9kZXNrdG9wL0B3YWlsc2lvL3J1bnRpbWUvc3JjL3J1bnRpbWUuanMiLCAiLi4vLi4vLi4vcnVudGltZS9kZXNrdG9wL0B3YWlsc2lvL3J1bnRpbWUvc3JjL2Jyb3dzZXIuanMiLCAiLi4vLi4vLi4vcnVudGltZS9kZXNrdG9wL0B3YWlsc2lvL3J1bnRpbWUvc3JjL2NsaXBib2FyZC5qcyIsICIuLi8uLi8uLi9ydW50aW1lL2Rlc2t0b3AvQHdhaWxzaW8vcnVudGltZS9zcmMvZmxhZ3MuanMiLCAiLi4vLi4vLi4vcnVudGlt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GlvbnMpXHJcbiAgICAgICAgICAgIC50aGVuKHJlc3BvbnNlID0+IHtcclxuICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZS5vaykge1xyXG4gICAgICAgICAgICAgICAgICAgIC8vIGNoZWNrIGNvbnRlbnQgdHlwZVxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZS5oZWFkZXJzLmdldChcIkNvbnRlbnQtVHlwZVwiKSAmJiByZXNwb25zZS5oZWFkZXJzLmdldChcIkNvbnRlbnQtVHlwZVwiKS5pbmRleE9mKFwiYXBwbGljYXRpb24vanNvblwiKSAhPT0gLTEpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3BvbnNlLmpzb24oKTtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzcG9uc2UudGV4dCgpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIHJlamVjdChFcnJvcihyZXNwb25zZS5zdGF0dXNUZXh0KSk7XHJcbiAgICAgICAgICAgIH0pXHJcbiAgICAgICAgICAgIC50aGVuKGRhdGEgPT4gcmVzb2x2ZShkYXRhKSlcclxuICAgICAgICAgICAgLmNhdGNoKGVycm9yID0+IHJlamVjdChlcnJvcikpO1xyXG4gICAgfSk7XHJcbn1cclxuXHJcbmZ1bmN0aW9uIHJ1bnRpbWVDYWxsV2l0aElEKG9iamVjdElELCBtZXRob2QsIHdpbmRvd05hbWUsIGFyZ3MpIHtcclxuICAgIGxldCB1cmwgPSBuZXcgVVJMKHJ1bnRpbWVVUkwpO1xyXG4gICAgdXJsLnNlYXJjaFBhcmFtcy5hcHBlbmQoXCJvYmplY3RcIiwgb2JqZWN0SUQpO1xyXG4gICAgdXJsLnNlYXJjaFBhcmFtcy5hcHBlbmQoXCJtZXRob2RcIiwgbWV0aG9kKTtcclxuICAgIGxldCBmZXRjaE9wdGlvbnMgPSB7XHJcbiAgICAgICAgaGVhZGVyczoge30sXHJcbiAgICB9O1xyXG4gICAgaWYgKHdpbmRvd05hbWUpIHtcclxuICAgICAgICBmZXRjaE9wdGlvbnMuaGVhZGVyc1tcIngtd2FpbHMtd2luZG93LW5hbWVcIl0gPSB3aW5kb3dOYW1lO1xyXG4gICAgfVxyXG4gICAgaWYgKGFyZ3MpIHtcclxuICAgICAgICB1cmwuc2VhcmNoUGFyYW1zLmFwcGVuZChcImFyZ3NcIiwgSlNPTi5zdHJpbmdpZnkoYXJncykpO1xyXG4gICAgfVxyXG4gICAgZmV0Y2hPcHRpb25zLmhlYWRlcnNbXCJ4LXdhaWxzLWNsaWVudC1pZFwiXSA9IGNsaWVudElkO1xyXG4gICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcclxuICAgICAgICBmZXRjaCh1cmwsIGZldGNoT3B0aW9ucylcclxuICAgICAgICAgICAgLnRoZW4ocmVzcG9uc2UgPT4ge1xyXG4gICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLm9rKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gY2hlY2sgY29udGVudCB0eXBlXHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLmhlYWRlcnMuZ2V0KFwiQ29udGVudC1UeXBlXCIpICYmIHJlc3BvbnNlLmhlYWRlcnMuZ2V0KFwiQ29udGVudC1UeXBlXCIpLmluZGV4T2YoXCJhcHBsaWNhdGlvbi9qc29uXCIpICE9PSAtMSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzcG9uc2UuanNvbigpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXNwb25zZS50ZXh0KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4g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yJykgfHwgJ2NsaWNrJztcclxuICAgICAgICBjb25zdCB0YXJnZXRXaW5kb3cgPSBlbGVtZW50LmdldEF0dHJpYnV0ZSgnd21sLXRhcmdldC13aW5kb3cnKSB8fCAnJztcclxuXHJcbiAgICAgICAgbGV0IGNhbGxiYWNrID0gZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICBpZiAoY29uZmlybSkge1xyXG4gICAgICAgICAgICAgICAgUXVlc3Rpb24oe1RpdGxlOiBcIkNvbmZpcm1cIiwgTWVzc2FnZTpjb25maXJtLCBCdXR0b25zOlt7TGFiZWw6XCJZZXNcIn0se0xhYmVsOlwiTm9cIiwgSXNEZWZhdWx0OnRydWV9XX0pLnRoZW4oZnVuY3Rpb24gKHJlc3VsdCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChyZXN1bHQgIT09IFwiTm9cIikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjYWxsV2luZG93TWV0aG9kKHRhcmdldFdpbmRvdywgd2luZG93TWV0aG9kKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBjYWxsV2luZG93TWV0aG9kKHRhcmdldFdpbmRvdywgd2luZG93TWV0aG9kKTtcclxuICAgICAgICB9O1xyXG5cclxuICAgICAgICAvLyBSZW1vdmUgZXhpc3RpbmcgbGlzdGVuZXJzXHJcbiAgICAgICAgZWxlbWVudC5yZW1vdmVFdmVudExpc3RlbmVyKHRyaWdnZXIsIGNhbGxiYWNrKTtcclxuXHJcbiAgICAgICAgLy8gQWRkIG5ldyBsaXN0ZW5lclxyXG4gICAgICAgIGVsZW1lbnQuYWRkRXZlbnRMaXN0ZW5lcih0cmlnZ2VyLCBjYWxsYmFjayk7XHJcbiAgICB9KTtcclxufVxyXG5cclxuLyoqXHJcbiAqIEFkZHMgYSBsaXN0ZW5lciB0byBl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7QUFDdEIsU0FBTyxNQUFNLFFBQVE7QUFDckIsU0FBTyxNQUFNLFVBQVU7QUFDdkIsU0FBTyxNQUFNLFNBQVM7QUFDdEIsU0FBTyxNQUFNLFNBQVM7QUFDdEIsU0FBTyxNQUFNLE1BQU07QUFHbkIsTUFBSSxVQUFVO0FBQ2QsV0FBUyxpQkFBaUIsb0JBQW9CLFdBQVc7QUFDckQsY0FBVTtBQUNWLFdBQU8sT0FBTyxPQUFPLHFCQUFxQjtBQUMxQyxRQUFHLE1BQU87QUFDTixlQUFTLHNCQUFzQjtBQUFBLElBQ25DO0FBQUEsRUFDSixDQUFDO0FBRUQsV0FBUyxVQUFVLElBQUk7QUFDbkIsUUFBSSxXQUFXLFNBQVMsZUFBZSxZQUFZO0FBQy9DLFNBQUc7QUFBQSxJQUNQLE9BQU87QUFDSCxlQUFTLGlCQUFpQixvQkFBb0IsRUFBRTtBQUFBLElBQ3BEO0FBQUEsRUFDSjtBQUVBLFlBQVUsTUFBTTtBQUNaLElBQUksT0FBTztBQUFBLEVBQ2YsQ0FBQzsiLAogICJuYW1lcyI6IFsic2l6ZSIsICJjYWxsIiwgImNhbGwiLCAiY2FsbCIsICJjYWxsIiwgIkhpZGUiLCAiU2hvdyIsICJjYWxsIiwgIndpZHRoIiwgImhlaWdodCIsICJIaWRlIiwgIlNob3ciLCAiY2FsbCIsICJldmVudE5hbWUiLCAiRXJyb3IiLCAiY2FsbCIsICJFcnJvciIsICJjYWxsIiwgImdlbmVyYXRlSUQiXQp9Cg== diff --git a/v3/examples/wml/assets/runtime.js b/v3/examples/wml/assets/runtime.js index 2c7d16ed30b..baaccee0402 100644 --- a/v3/examples/wml/assets/runtime.js +++ b/v3/examples/wml/assets/runtime.js @@ -1 +1 @@ -(()=>{var le=Object.defineProperty;var w=(e,i)=>{for(var n in i)le(e,n,{get:i[n],enumerable:!0})};var T={};w(T,{Hide:()=>We,Quit:()=>fe,Show:()=>ge});var de="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var f=(e=21)=>{let i="",n=e;for(;n--;)i+=de[Math.random()*64|0];return i};var ce=window.location.origin+"/wails/runtime",l={Call:0,Clipboard:1,Application:2,Events:3,ContextMenu:4,Dialog:5,Window:6,Screens:7,System:8,Browser:9,CancelCall:10},se=f();function d(e,i){return function(n,o=null){return we(e,n,i,o)}}function we(e,i,n,o){let t=new URL(ce);t.searchParams.append("object",e),t.searchParams.append("method",i);let a={headers:{}};return n&&(a.headers["x-wails-window-name"]=n),o&&t.searchParams.append("args",JSON.stringify(o)),a.headers["x-wails-client-id"]=se,new Promise((s,m)=>{fetch(t,a).then(c=>{if(c.ok)return c.headers.get("Content-Type")&&c.headers.get("Content-Type").indexOf("application/json")!==-1?c.json():c.text();m(Error(c.statusText))}).then(c=>s(c)).catch(c=>m(c))})}var P=d(l.Application,""),me=0,ue=1,pe=2;function We(){return P(me)}function ge(){return P(ue)}function fe(){return P(pe)}var B={};w(B,{OpenURL:()=>b});var he=d(l.Browser,""),De=0;function b(e){return he(De,{url:e})}var I={};w(I,{SetText:()=>Me,Text:()=>xe});var Q=d(l.Clipboard,""),Ce=0,Se=1;function Me(e){return Q(Ce,{text:e})}function xe(){return Q(Se)}var L={};w(L,{Capabilities:()=>Re,Environment:()=>Ee,IsAMD64:()=>Oe,IsARM:()=>Pe,IsARM64:()=>Te,IsDarkMode:()=>be,IsDebug:()=>F,IsLinux:()=>Ue,IsMac:()=>ye,IsWindows:()=>R,invoke:()=>h});var J=d(l.System,""),Ae=0,ve=1;function h(e){return window.chrome?window.chrome.webview.postMessage(e):window.webkit.messageHandlers.external.postMessage(e)}function be(){return J(Ae)}function Re(){return fetch("/wails/capabilities").json()}function Ee(){return J(ve)}function R(){return window._wails.environment.OS==="windows"}function Ue(){return window._wails.environment.OS==="linux"}function ye(){return window._wails.environment.OS==="darwin"}function Oe(){return window._wails.environment.Arch==="amd64"}function Pe(){return window._wails.environment.Arch==="arm"}function Te(){return window._wails.environment.Arch==="arm64"}function F(){return window._wails.environment.Debug===!0}window.addEventListener("contextmenu",Le);var Be=d(l.ContextMenu,""),Ie=0;function Fe(e,i,n,o){Be(Ie,{id:e,x:i,y:n,data:o})}function Le(e){let i=e.target,n=window.getComputedStyle(i).getPropertyValue("--custom-contextmenu");if(n=n?n.trim():"",n){e.preventDefault();let o=window.getComputedStyle(i).getPropertyValue("--custom-contextmenu-data");Fe(n,e.clientX,e.clientY,o);return}ze(e)}function ze(e){if(F())return;let i=e.target;switch(window.getComputedStyle(i).getPropertyValue("--default-contextmenu").trim()){case"show":return;case"hide":e.preventDefault();return;default:if(i.isContentEditable)return;let t=window.getSelection(),a=t.toString().length>0;if(a)for(let s=0;sS});function S(e){try{return window._wails.flags[e]}catch(i){throw new Error("Unable to retrieve flag '"+e+"': "+i)}}window._wails=window._wails||{};window._wails.setResizable=He;window._wails.endDrag=ee;window.addEventListener("mousedown",_e);window.addEventListener("mousemove",Ge);window.addEventListener("mouseup",je);var M=!1,E=null,$=!1,ke="auto";function Ne(e){let i=window.getComputedStyle(e.target).getPropertyValue("--webkit-app-region");return!i||i===""||i.trim()!=="drag"||e.buttons!==1?!1:e.detail===1}function He(e){$=e}function ee(){document.body.style.cursor="default",M=!1}function Ve(){return E?(h(`resize:${E}`),!0):!1}function _e(e){(R()&&Ve()||Ne(e))&&(M=!!Ze(e))}function Ze(e){return!(e.offsetX>e.target.clientWidth||e.offsetY>e.target.clientHeight)}function je(e){(e.buttons!==void 0?e.buttons:e.which)>0&&ee()}function W(e=ke){document.documentElement.style.cursor=e,E=e}function Ge(e){M=Ye(e),R()&&$&&Ke(e)}function Ye(e){let i=e.buttons!==void 0?e.buttons:e.which;return M&&i>0?(h("drag"),!1):M}function Ke(e){let i=S("system.resizeHandleHeight")||5,n=S("system.resizeHandleWidth")||5,o=S("resizeCornerExtra")||10,t=window.outerWidth-e.clientXJe,GetCurrent:()=>ei,GetPrimary:()=>$e});var k=d(l.Screens,""),Xe=0,qe=1,Qe=2;function Je(){return k(Xe)}function $e(){return k(qe)}function ei(){return k(Qe)}var H={};w(H,{Center:()=>Oi,Close:()=>qi,Fullscreen:()=>Ti,Get:()=>U,GetZoomLevel:()=>rn,Height:()=>en,Hide:()=>Vi,Maximise:()=>_i,Minimise:()=>Gi,RelativePosition:()=>Ni,Restore:()=>Ki,Screen:()=>Hi,SetAlwaysOnTop:()=>zi,SetBackgroundColour:()=>Qi,SetMaxSize:()=>Fi,SetMinSize:()=>Li,SetRelativePosition:()=>ki,SetResizable:()=>Ji,SetSize:()=>Bi,SetTitle:()=>Pi,SetZoomLevel:()=>an,Show:()=>Xi,Size:()=>Ii,ToggleMaximise:()=>ji,UnMaximise:()=>Zi,UnMinimise:()=>Yi,Width:()=>$i,ZoomIn:()=>nn,ZoomOut:()=>on,ZoomReset:()=>tn});var ii=0,ni=1,oi=2,ti=3,ri=4,ai=5,li=6,di=7,ci=8,si=9,wi=10,mi=11,ui=12,pi=13,Wi=14,gi=15,fi=16,hi=17,Di=18,Ci=19,Si=20,Mi=21,xi=22,Ai=23,vi=24,bi=25,Ri=26,Ei=27,Ui=28,yi=29,r=U("");function ie(e){return{Get:i=>ie(d(l.Window,i)),Center:()=>e(ii),SetTitle:i=>e(ni,{title:i}),Fullscreen:()=>e(oi),UnFullscreen:()=>e(ti),SetSize:(i,n)=>e(ri,{width:i,height:n}),Size:()=>e(ai),SetMaxSize:(i,n)=>e(li,{width:i,height:n}),SetMinSize:(i,n)=>e(di,{width:i,height:n}),SetAlwaysOnTop:i=>e(ci,{alwaysOnTop:i}),SetRelativePosition:(i,n)=>e(si,{x:i,y:n}),RelativePosition:()=>e(wi),Screen:()=>e(mi),Hide:()=>e(ui),Maximise:()=>e(pi),UnMaximise:()=>e(Wi),ToggleMaximise:()=>e(gi),Minimise:()=>e(fi),UnMinimise:()=>e(hi),Restore:()=>e(Di),Show:()=>e(Ci),Close:()=>e(Si),SetBackgroundColour:(i,n,o,t)=>e(Mi,{r:i,g:n,b:o,a:t}),SetResizable:i=>e(xi,{resizable:i}),Width:()=>e(Ai),Height:()=>e(vi),ZoomIn:()=>e(bi),ZoomOut:()=>e(Ri),ZoomReset:()=>e(Ei),GetZoomLevel:()=>e(Ui),SetZoomLevel:i=>e(yi,{zoomLevel:i})}}function U(e){return ie(d(l.Window,e))}function Oi(){r.Center()}function Pi(e){r.SetTitle(e)}function Ti(){r.Fullscreen()}function Bi(e,i){r.SetSize(e,i)}function Ii(){return r.Size()}function Fi(e,i){r.SetMaxSize(e,i)}function Li(e,i){r.SetMinSize(e,i)}function zi(e){r.SetAlwaysOnTop(e)}function ki(e,i){r.SetRelativePosition(e,i)}function Ni(){return r.RelativePosition()}function Hi(){return r.Screen()}function Vi(){r.Hide()}function _i(){r.Maximise()}function Zi(){r.UnMaximise()}function ji(){r.ToggleMaximise()}function Gi(){r.Minimise()}function Yi(){r.UnMinimise()}function Ki(){r.Restore()}function Xi(){r.Show()}function qi(){r.Close()}function Qi(e,i,n,o){r.SetBackgroundColour(e,i,n,o)}function Ji(e){r.SetResizable(e)}function $i(){return r.Width()}function en(){return r.Height()}function nn(){r.ZoomIn()}function on(){r.ZoomOut()}function tn(){r.ZoomReset()}function rn(){return r.GetZoomLevel()}function an(e){r.SetZoomLevel(e)}var K={};w(K,{Reload:()=>Y});var j={};w(j,{Emit:()=>Z,Off:()=>Wn,OffAll:()=>gn,On:()=>mn,OnMultiple:()=>_,Once:()=>un,Types:()=>ln,WailsEvent:()=>x,setup:()=>sn});var ne={Windows:{SystemThemeChanged:"windows:SystemThemeChanged",APMPowerStatusChange:"windows:APMPowerStatusChange",APMSuspend:"windows:APMSuspend",APMResumeAutomatic:"windows:APMResumeAutomatic",APMResumeSuspend:"windows:APMResumeSuspend",APMPowerSettingChange:"windows:APMPowerSettingChange",ApplicationStarted:"windows:ApplicationStarted",WebViewNavigationCompleted:"windows:WebViewNavigationCompleted",WindowInactive:"windows:WindowInactive",WindowActive:"windows:WindowActive",WindowClickActive:"windows:WindowClickActive",WindowMaximise:"windows:WindowMaximise",WindowUnMaximise:"windows:WindowUnMaximise",WindowFullscreen:"windows:WindowFullscreen",WindowUnFullscreen:"windows:WindowUnFullscreen",WindowRestore:"windows:WindowRestore",WindowMinimise:"windows:WindowMinimise",WindowUnMinimise:"windows:WindowUnMinimise",WindowClose:"windows:WindowClose",WindowSetFocus:"windows:WindowSetFocus",WindowKillFocus:"windows:WindowKillFocus",WindowDragDrop:"windows:WindowDragDrop",WindowDragEnter:"windows:WindowDragEnter",WindowDragLeave:"windows:WindowDragLeave",WindowDragOver:"windows:WindowDragOver"},Mac:{ApplicationDidBecomeActive:"mac:ApplicationDidBecomeActive",ApplicationDidChangeBackingProperties:"mac:ApplicationDidChangeBackingProperties",ApplicationDidChangeEffectiveAppearance:"mac:ApplicationDidChangeEffectiveAppearance",ApplicationDidChangeIcon:"mac:ApplicationDidChangeIcon",ApplicationDidChangeOcclusionState:"mac:ApplicationDidChangeOcclusionState",ApplicationDidChangeScreenParameters:"mac:ApplicationDidChangeScreenParameters",ApplicationDidChangeStatusBarFrame:"mac:ApplicationDidChangeStatusBarFrame",ApplicationDidChangeStatusBarOrientation:"mac:ApplicationDidChangeStatusBarOrientation",ApplicationDidFinishLaunching:"mac:ApplicationDidFinishLaunching",ApplicationDidHide:"mac:ApplicationDidHide",ApplicationDidResignActiveNotification:"mac:ApplicationDidResignActiveNotification",ApplicationDidUnhide:"mac:ApplicationDidUnhide",ApplicationDidUpdate:"mac:ApplicationDidUpdate",ApplicationWillBecomeActive:"mac:ApplicationWillBecomeActive",ApplicationWillFinishLaunching:"mac:ApplicationWillFinishLaunching",ApplicationWillHide:"mac:ApplicationWillHide",ApplicationWillResignActive:"mac:ApplicationWillResignActive",ApplicationWillTerminate:"mac:ApplicationWillTerminate",ApplicationWillUnhide:"mac:ApplicationWillUnhide",ApplicationWillUpdate:"mac:ApplicationWillUpdate",ApplicationDidChangeTheme:"mac:ApplicationDidChangeTheme!",ApplicationShouldHandleReopen:"mac:ApplicationShouldHandleReopen!",WindowDidBecomeKey:"mac:WindowDidBecomeKey",WindowDidBecomeMain:"mac:WindowDidBecomeMain",WindowDidBeginSheet:"mac:WindowDidBeginSheet",WindowDidChangeAlpha:"mac:WindowDidChangeAlpha",WindowDidChangeBackingLocation:"mac:WindowDidChangeBackingLocation",WindowDidChangeBackingProperties:"mac:WindowDidChangeBackingProperties",WindowDidChangeCollectionBehavior:"mac:WindowDidChangeCollectionBehavior",WindowDidChangeEffectiveAppearance:"mac:WindowDidChangeEffectiveAppearance",WindowDidChangeOcclusionState:"mac:WindowDidChangeOcclusionState",WindowDidChangeOrderingMode:"mac:WindowDidChangeOrderingMode",WindowDidChangeScreen:"mac:WindowDidChangeScreen",WindowDidChangeScreenParameters:"mac:WindowDidChangeScreenParameters",WindowDidChangeScreenProfile:"mac:WindowDidChangeScreenProfile",WindowDidChangeScreenSpace:"mac:WindowDidChangeScreenSpace",WindowDidChangeScreenSpaceProperties:"mac:WindowDidChangeScreenSpaceProperties",WindowDidChangeSharingType:"mac:WindowDidChangeSharingType",WindowDidChangeSpace:"mac:WindowDidChangeSpace",WindowDidChangeSpaceOrderingMode:"mac:WindowDidChangeSpaceOrderingMode",WindowDidChangeTitle:"mac:WindowDidChangeTitle",WindowDidChangeToolbar:"mac:WindowDidChangeToolbar",WindowDidChangeVisibility:"mac:WindowDidChangeVisibility",WindowDidDeminiaturize:"mac:WindowDidDeminiaturize",WindowDidEndSheet:"mac:WindowDidEndSheet",WindowDidEnterFullScreen:"mac:WindowDidEnterFullScreen",WindowDidEnterVersionBrowser:"mac:WindowDidEnterVersionBrowser",WindowDidExitFullScreen:"mac:WindowDidExitFullScreen",WindowDidExitVersionBrowser:"mac:WindowDidExitVersionBrowser",WindowDidExpose:"mac:WindowDidExpose",WindowDidFocus:"mac:WindowDidFocus",WindowDidMiniaturize:"mac:WindowDidMiniaturize",WindowDidMove:"mac:WindowDidMove",WindowDidOrderOffScreen:"mac:WindowDidOrderOffScreen",WindowDidOrderOnScreen:"mac:WindowDidOrderOnScreen",WindowDidResignKey:"mac:WindowDidResignKey",WindowDidResignMain:"mac:WindowDidResignMain",WindowDidResize:"mac:WindowDidResize",WindowDidUpdate:"mac:WindowDidUpdate",WindowDidUpdateAlpha:"mac:WindowDidUpdateAlpha",WindowDidUpdateCollectionBehavior:"mac:WindowDidUpdateCollectionBehavior",WindowDidUpdateCollectionProperties:"mac:WindowDidUpdateCollectionProperties",WindowDidUpdateShadow:"mac:WindowDidUpdateShadow",WindowDidUpdateTitle:"mac:WindowDidUpdateTitle",WindowDidUpdateToolbar:"mac:WindowDidUpdateToolbar",WindowDidUpdateVisibility:"mac:WindowDidUpdateVisibility",WindowShouldClose:"mac:WindowShouldClose!",WindowWillBecomeKey:"mac:WindowWillBecomeKey",WindowWillBecomeMain:"mac:WindowWillBecomeMain",WindowWillBeginSheet:"mac:WindowWillBeginSheet",WindowWillChangeOrderingMode:"mac:WindowWillChangeOrderingMode",WindowWillClose:"mac:WindowWillClose",WindowWillDeminiaturize:"mac:WindowWillDeminiaturize",WindowWillEnterFullScreen:"mac:WindowWillEnterFullScreen",WindowWillEnterVersionBrowser:"mac:WindowWillEnterVersionBrowser",WindowWillExitFullScreen:"mac:WindowWillExitFullScreen",WindowWillExitVersionBrowser:"mac:WindowWillExitVersionBrowser",WindowWillFocus:"mac:WindowWillFocus",WindowWillMiniaturize:"mac:WindowWillMiniaturize",WindowWillMove:"mac:WindowWillMove",WindowWillOrderOffScreen:"mac:WindowWillOrderOffScreen",WindowWillOrderOnScreen:"mac:WindowWillOrderOnScreen",WindowWillResignMain:"mac:WindowWillResignMain",WindowWillResize:"mac:WindowWillResize",WindowWillUnfocus:"mac:WindowWillUnfocus",WindowWillUpdate:"mac:WindowWillUpdate",WindowWillUpdateAlpha:"mac:WindowWillUpdateAlpha",WindowWillUpdateCollectionBehavior:"mac:WindowWillUpdateCollectionBehavior",WindowWillUpdateCollectionProperties:"mac:WindowWillUpdateCollectionProperties",WindowWillUpdateShadow:"mac:WindowWillUpdateShadow",WindowWillUpdateTitle:"mac:WindowWillUpdateTitle",WindowWillUpdateToolbar:"mac:WindowWillUpdateToolbar",WindowWillUpdateVisibility:"mac:WindowWillUpdateVisibility",WindowWillUseStandardFrame:"mac:WindowWillUseStandardFrame",MenuWillOpen:"mac:MenuWillOpen",MenuDidOpen:"mac:MenuDidOpen",MenuDidClose:"mac:MenuDidClose",MenuWillSendAction:"mac:MenuWillSendAction",MenuDidSendAction:"mac:MenuDidSendAction",MenuWillHighlightItem:"mac:MenuWillHighlightItem",MenuDidHighlightItem:"mac:MenuDidHighlightItem",MenuWillDisplayItem:"mac:MenuWillDisplayItem",MenuDidDisplayItem:"mac:MenuDidDisplayItem",MenuWillAddItem:"mac:MenuWillAddItem",MenuDidAddItem:"mac:MenuDidAddItem",MenuWillRemoveItem:"mac:MenuWillRemoveItem",MenuDidRemoveItem:"mac:MenuDidRemoveItem",MenuWillBeginTracking:"mac:MenuWillBeginTracking",MenuDidBeginTracking:"mac:MenuDidBeginTracking",MenuWillEndTracking:"mac:MenuWillEndTracking",MenuDidEndTracking:"mac:MenuDidEndTracking",MenuWillUpdate:"mac:MenuWillUpdate",MenuDidUpdate:"mac:MenuDidUpdate",MenuWillPopUp:"mac:MenuWillPopUp",MenuDidPopUp:"mac:MenuDidPopUp",MenuWillSendActionToItem:"mac:MenuWillSendActionToItem",MenuDidSendActionToItem:"mac:MenuDidSendActionToItem",WebViewDidStartProvisionalNavigation:"mac:WebViewDidStartProvisionalNavigation",WebViewDidReceiveServerRedirectForProvisionalNavigation:"mac:WebViewDidReceiveServerRedirectForProvisionalNavigation",WebViewDidFinishNavigation:"mac:WebViewDidFinishNavigation",WebViewDidCommitNavigation:"mac:WebViewDidCommitNavigation",WindowFileDraggingEntered:"mac:WindowFileDraggingEntered",WindowFileDraggingPerformed:"mac:WindowFileDraggingPerformed",WindowFileDraggingExited:"mac:WindowFileDraggingExited"},Linux:{SystemThemeChanged:"linux:SystemThemeChanged"},Common:{ApplicationStarted:"common:ApplicationStarted",WindowMaximise:"common:WindowMaximise",WindowUnMaximise:"common:WindowUnMaximise",WindowFullscreen:"common:WindowFullscreen",WindowUnFullscreen:"common:WindowUnFullscreen",WindowRestore:"common:WindowRestore",WindowMinimise:"common:WindowMinimise",WindowUnMinimise:"common:WindowUnMinimise",WindowClosing:"common:WindowClosing",WindowZoom:"common:WindowZoom",WindowZoomIn:"common:WindowZoomIn",WindowZoomOut:"common:WindowZoomOut",WindowZoomReset:"common:WindowZoomReset",WindowFocus:"common:WindowFocus",WindowLostFocus:"common:WindowLostFocus",WindowShow:"common:WindowShow",WindowHide:"common:WindowHide",WindowDPIChanged:"common:WindowDPIChanged",WindowFilesDropped:"common:WindowFilesDropped",WindowRuntimeReady:"common:WindowRuntimeReady",ThemeChanged:"common:ThemeChanged"}};var ln=ne;window._wails=window._wails||{};window._wails.dispatchWailsEvent=wn;var dn=d(l.Events,""),cn=0,u=new Map,V=class{constructor(i,n,o){this.eventName=i,this.maxCallbacks=o||-1,this.Callback=t=>(n(t),this.maxCallbacks===-1?!1:(this.maxCallbacks-=1,this.maxCallbacks===0))}},x=class{constructor(i,n=null){this.name=i,this.data=n}};function sn(){}function wn(e){let i=u.get(e.name);if(i){let n=i.filter(o=>{if(o.Callback(e))return!0});n.length>0&&(i=i.filter(o=>!n.includes(o)),i.length===0?u.delete(e.name):u.set(e.name,i))}}function _(e,i,n){let o=u.get(e)||[],t=new V(e,i,n);return o.push(t),u.set(e,o),()=>pn(t)}function mn(e,i){return _(e,i,-1)}function un(e,i){return _(e,i,1)}function pn(e){let i=e.eventName,n=u.get(i).filter(o=>o!==e);n.length===0?u.delete(i):u.set(i,n)}function Wn(e,...i){[e,...i].forEach(o=>u.delete(o))}function gn(){u.clear()}function Z(e){return dn(cn,e)}var G={};w(G,{Error:()=>Un,Info:()=>Rn,OpenFile:()=>yn,Question:()=>A,SaveFile:()=>On,Warning:()=>En});window._wails=window._wails||{};window._wails.dialogErrorCallback=bn;window._wails.dialogResultCallback=vn;var fn=0,hn=1,Dn=2,Cn=3,Sn=4,Mn=5,xn=d(l.Dialog,""),g=new Map;function An(){let e;do e=f();while(g.has(e));return e}function D(e,i={}){let n=An();return i["dialog-id"]=n,new Promise((o,t)=>{g.set(n,{resolve:o,reject:t}),xn(e,i).catch(a=>{t(a),g.delete(n)})})}function vn(e,i,n){let o=g.get(e);o&&(n?o.resolve(JSON.parse(i)):o.resolve(i),g.delete(e))}function bn(e,i){let n=g.get(e);n&&(n.reject(i),g.delete(e))}var Rn=e=>D(fn,e),En=e=>D(hn,e),Un=e=>D(Dn,e),A=e=>D(Cn,e),yn=e=>D(Sn,e),On=e=>D(Mn,e);function oe(e,i=null){let n=new x(e,i);Z(n)}function Pn(){document.querySelectorAll("[wml-event]").forEach(function(i){let n=i.getAttribute("wml-event"),o=i.getAttribute("wml-confirm"),t=i.getAttribute("wml-trigger")||"click",a=function(){if(o){A({Title:"Confirm",Message:o,Detached:!1,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(s){s!=="No"&&oe(n)});return}oe(n)};i.removeEventListener(t,a),i.addEventListener(t,a)})}function te(e,i){let n=U(e),o=In(n);o.has(i);try{o.get(i)()}catch{}}function Tn(){document.querySelectorAll("[wml-window]").forEach(function(i){let n=i.getAttribute("wml-window"),o=i.getAttribute("wml-confirm"),t=i.getAttribute("wml-trigger")||"click",a=i.getAttribute("wml-target-window")||"",s=function(){if(o){A({Title:"Confirm",Message:o,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(m){m!=="No"&&te(a,n)});return}te(a,n)};i.removeEventListener(t,s),i.addEventListener(t,s)})}function Bn(){document.querySelectorAll("[wml-openurl]").forEach(function(i){let n=i.getAttribute("wml-openurl"),o=i.getAttribute("wml-confirm"),t=i.getAttribute("wml-trigger")||"click",a=function(){if(o){A({Title:"Confirm",Message:o,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(s){s!=="No"&&b(n)});return}b(n)};i.removeEventListener(t,a),i.addEventListener(t,a)})}function Y(){Pn(),Tn(),Bn()}function In(e){let i=new Map;for(let n in e)typeof e[n]=="function"&&i.set(n,e[n]);return i}var X={};w(X,{ByID:()=>_n,ByName:()=>Vn,Call:()=>Hn,Plugin:()=>Zn});window._wails=window._wails||{};window._wails.callResultHandler=kn;window._wails.callErrorHandler=Nn;var y=0,Fn=d(l.Call,""),Ln=d(l.CancelCall,""),v=new Map;function zn(){let e;do e=f();while(v.has(e));return e}function kn(e,i,n){let o=re(e);o&&o.resolve(n?JSON.parse(i):i)}function Nn(e,i){let n=re(e);n&&n.reject(i)}function re(e){let i=v.get(e);return v.delete(e),i}function O(e,i={}){let n=zn(),o=()=>{Ln(e,{"call-id":n})};var t=!1,a=!1,s=new Promise((m,c)=>{i["call-id"]=n,v.set(n,{resolve:m,reject:c}),Fn(e,i).then(p=>{a=!0,t&&o()}).catch(p=>{c(p),v.delete(n)})});return s.cancel=()=>{a?o():t=!0},s}function Hn(e){return O(y,e)}function Vn(e,...i){if(typeof e!="string"||e.split(".").length!==3)throw new Error("CallByName requires a string in the format 'package.struct.method'");let[n,o,t]=e.split(".");return O(y,{packageName:n,structName:o,methodName:t,args:i})}function _n(e,...i){return O(y,{methodID:e,args:i})}function Zn(e,i,...n){return O(y,{packageName:"wails-plugins",structName:e,methodName:i,args:n})}window._wails=window._wails||{};window._wails.invoke=h;window.wails=window.wails||{};window.wails.Application=T;window.wails.Browser=B;window.wails.Call=X;window.wails.Clipboard=I;window.wails.Dialogs=G;window.wails.Events=j;window.wails.Flags=z;window.wails.Screens=N;window.wails.System=L;window.wails.Window=H;window.wails.WML=K;var ae=!1;document.addEventListener("DOMContentLoaded",function(){ae=!0,window._wails.invoke("wails:runtime:ready")});function jn(e){ae||document.readyState==="complete"?e():document.addEventListener("DOMContentLoaded",e)}jn(()=>{Y()});})(); +(()=>{var de=Object.defineProperty;var w=(e,i)=>{for(var n in i)de(e,n,{get:i[n],enumerable:!0})};var T={};w(T,{Hide:()=>We,Quit:()=>fe,Show:()=>ge});var le="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var f=(e=21)=>{let i="",n=e;for(;n--;)i+=le[Math.random()*64|0];return i};var ce=window.location.origin+"/wails/runtime",d={Call:0,Clipboard:1,Application:2,Events:3,ContextMenu:4,Dialog:5,Window:6,Screens:7,System:8,Browser:9},se=f();function l(e,i){return function(n,o=null){return we(e,n,i,o)}}function we(e,i,n,o){let t=new URL(ce);t.searchParams.append("object",e),t.searchParams.append("method",i);let a={headers:{}};return n&&(a.headers["x-wails-window-name"]=n),o&&t.searchParams.append("args",JSON.stringify(o)),a.headers["x-wails-client-id"]=se,new Promise((s,p)=>{fetch(t,a).then(c=>{if(c.ok)return c.headers.get("Content-Type")&&c.headers.get("Content-Type").indexOf("application/json")!==-1?c.json():c.text();p(Error(c.statusText))}).then(c=>s(c)).catch(c=>p(c))})}var P=l(d.Application,""),me=0,ue=1,pe=2;function We(){return P(me)}function ge(){return P(ue)}function fe(){return P(pe)}var B={};w(B,{OpenURL:()=>b});var he=l(d.Browser,""),De=0;function b(e){return he(De,{url:e})}var I={};w(I,{SetText:()=>xe,Text:()=>Me});var q=l(d.Clipboard,""),Ce=0,Se=1;function xe(e){return q(Ce,{text:e})}function Me(){return q(Se)}var L={};w(L,{Capabilities:()=>Re,Environment:()=>Ee,IsAMD64:()=>Oe,IsARM:()=>Pe,IsARM64:()=>Te,IsDarkMode:()=>be,IsDebug:()=>F,IsLinux:()=>Ue,IsMac:()=>ye,IsWindows:()=>R,invoke:()=>h});var J=l(d.System,""),Ae=0,ve=1;function h(e){return window.chrome?window.chrome.webview.postMessage(e):window.webkit.messageHandlers.external.postMessage(e)}function be(){return J(Ae)}function Re(){return fetch("/wails/capabilities").json()}function Ee(){return J(ve)}function R(){return window._wails.environment.OS==="windows"}function Ue(){return window._wails.environment.OS==="linux"}function ye(){return window._wails.environment.OS==="darwin"}function Oe(){return window._wails.environment.Arch==="amd64"}function Pe(){return window._wails.environment.Arch==="arm"}function Te(){return window._wails.environment.Arch==="arm64"}function F(){return window._wails.environment.Debug===!0}window.addEventListener("contextmenu",Le);var Be=l(d.ContextMenu,""),Ie=0;function Fe(e,i,n,o){Be(Ie,{id:e,x:i,y:n,data:o})}function Le(e){let i=e.target,n=window.getComputedStyle(i).getPropertyValue("--custom-contextmenu");if(n=n?n.trim():"",n){e.preventDefault();let o=window.getComputedStyle(i).getPropertyValue("--custom-contextmenu-data");Fe(n,e.clientX,e.clientY,o);return}ze(e)}function ze(e){if(F())return;let i=e.target;switch(window.getComputedStyle(i).getPropertyValue("--default-contextmenu").trim()){case"show":return;case"hide":e.preventDefault();return;default:if(i.isContentEditable)return;let t=window.getSelection(),a=t.toString().length>0;if(a)for(let s=0;sS});function S(e){try{return window._wails.flags[e]}catch(i){throw new Error("Unable to retrieve flag '"+e+"': "+i)}}window._wails=window._wails||{};window._wails.setResizable=He;window._wails.endDrag=ee;window.addEventListener("mousedown",_e);window.addEventListener("mousemove",Ge);window.addEventListener("mouseup",je);var x=!1,E=null,$=!1,ke="auto";function Ne(e){let i=window.getComputedStyle(e.target).getPropertyValue("--webkit-app-region");return!i||i===""||i.trim()!=="drag"||e.buttons!==1?!1:e.detail===1}function He(e){$=e}function ee(){document.body.style.cursor="default",x=!1}function Ve(){return E?(h(`resize:${E}`),!0):!1}function _e(e){(R()&&Ve()||Ne(e))&&(x=!!Ze(e))}function Ze(e){return!(e.offsetX>e.target.clientWidth||e.offsetY>e.target.clientHeight)}function je(e){(e.buttons!==void 0?e.buttons:e.which)>0&&ee()}function u(e=ke){document.documentElement.style.cursor=e,E=e}function Ge(e){x=Ye(e),R()&&$&&Ke(e)}function Ye(e){let i=e.buttons!==void 0?e.buttons:e.which;return x&&i>0?(h("drag"),!1):x}function Ke(e){let i=S("system.resizeHandleHeight")||5,n=S("system.resizeHandleWidth")||5,o=S("resizeCornerExtra")||10,t=window.outerWidth-e.clientXJe,GetCurrent:()=>ei,GetPrimary:()=>$e});var k=l(d.Screens,""),Xe=0,Qe=1,qe=2;function Je(){return k(Xe)}function $e(){return k(Qe)}function ei(){return k(qe)}var H={};w(H,{Center:()=>Oi,Close:()=>Qi,Fullscreen:()=>Ti,Get:()=>U,GetZoomLevel:()=>rn,Height:()=>en,Hide:()=>Vi,Maximise:()=>_i,Minimise:()=>Gi,RelativePosition:()=>Ni,Restore:()=>Ki,Screen:()=>Hi,SetAlwaysOnTop:()=>zi,SetBackgroundColour:()=>qi,SetMaxSize:()=>Fi,SetMinSize:()=>Li,SetRelativePosition:()=>ki,SetResizable:()=>Ji,SetSize:()=>Bi,SetTitle:()=>Pi,SetZoomLevel:()=>an,Show:()=>Xi,Size:()=>Ii,ToggleMaximise:()=>ji,UnMaximise:()=>Zi,UnMinimise:()=>Yi,Width:()=>$i,ZoomIn:()=>nn,ZoomOut:()=>on,ZoomReset:()=>tn});var ii=0,ni=1,oi=2,ti=3,ri=4,ai=5,di=6,li=7,ci=8,si=9,wi=10,mi=11,ui=12,pi=13,Wi=14,gi=15,fi=16,hi=17,Di=18,Ci=19,Si=20,xi=21,Mi=22,Ai=23,vi=24,bi=25,Ri=26,Ei=27,Ui=28,yi=29,r=U("");function ie(e){return{Get:i=>ie(l(d.Window,i)),Center:()=>e(ii),SetTitle:i=>e(ni,{title:i}),Fullscreen:()=>e(oi),UnFullscreen:()=>e(ti),SetSize:(i,n)=>e(ri,{width:i,height:n}),Size:()=>e(ai),SetMaxSize:(i,n)=>e(di,{width:i,height:n}),SetMinSize:(i,n)=>e(li,{width:i,height:n}),SetAlwaysOnTop:i=>e(ci,{alwaysOnTop:i}),SetRelativePosition:(i,n)=>e(si,{x:i,y:n}),RelativePosition:()=>e(wi),Screen:()=>e(mi),Hide:()=>e(ui),Maximise:()=>e(pi),UnMaximise:()=>e(Wi),ToggleMaximise:()=>e(gi),Minimise:()=>e(fi),UnMinimise:()=>e(hi),Restore:()=>e(Di),Show:()=>e(Ci),Close:()=>e(Si),SetBackgroundColour:(i,n,o,t)=>e(xi,{r:i,g:n,b:o,a:t}),SetResizable:i=>e(Mi,{resizable:i}),Width:()=>e(Ai),Height:()=>e(vi),ZoomIn:()=>e(bi),ZoomOut:()=>e(Ri),ZoomReset:()=>e(Ei),GetZoomLevel:()=>e(Ui),SetZoomLevel:i=>e(yi,{zoomLevel:i})}}function U(e){return ie(l(d.Window,e))}function Oi(){r.Center()}function Pi(e){r.SetTitle(e)}function Ti(){r.Fullscreen()}function Bi(e,i){r.SetSize(e,i)}function Ii(){return r.Size()}function Fi(e,i){r.SetMaxSize(e,i)}function Li(e,i){r.SetMinSize(e,i)}function zi(e){r.SetAlwaysOnTop(e)}function ki(e,i){r.SetRelativePosition(e,i)}function Ni(){return r.RelativePosition()}function Hi(){return r.Screen()}function Vi(){r.Hide()}function _i(){r.Maximise()}function Zi(){r.UnMaximise()}function ji(){r.ToggleMaximise()}function Gi(){r.Minimise()}function Yi(){r.UnMinimise()}function Ki(){r.Restore()}function Xi(){r.Show()}function Qi(){r.Close()}function qi(e,i,n,o){r.SetBackgroundColour(e,i,n,o)}function Ji(e){r.SetResizable(e)}function $i(){return r.Width()}function en(){return r.Height()}function nn(){r.ZoomIn()}function on(){r.ZoomOut()}function tn(){r.ZoomReset()}function rn(){return r.GetZoomLevel()}function an(e){r.SetZoomLevel(e)}var K={};w(K,{Reload:()=>Y});var j={};w(j,{Emit:()=>Z,Off:()=>Wn,OffAll:()=>gn,On:()=>mn,OnMultiple:()=>_,Once:()=>un,Types:()=>dn,WailsEvent:()=>M,setup:()=>sn});var ne={Windows:{SystemThemeChanged:"windows:SystemThemeChanged",APMPowerStatusChange:"windows:APMPowerStatusChange",APMSuspend:"windows:APMSuspend",APMResumeAutomatic:"windows:APMResumeAutomatic",APMResumeSuspend:"windows:APMResumeSuspend",APMPowerSettingChange:"windows:APMPowerSettingChange",ApplicationStarted:"windows:ApplicationStarted",WebViewNavigationCompleted:"windows:WebViewNavigationCompleted",WindowInactive:"windows:WindowInactive",WindowActive:"windows:WindowActive",WindowClickActive:"windows:WindowClickActive",WindowMaximise:"windows:WindowMaximise",WindowUnMaximise:"windows:WindowUnMaximise",WindowFullscreen:"windows:WindowFullscreen",WindowUnFullscreen:"windows:WindowUnFullscreen",WindowRestore:"windows:WindowRestore",WindowMinimise:"windows:WindowMinimise",WindowUnMinimise:"windows:WindowUnMinimise",WindowClose:"windows:WindowClose",WindowSetFocus:"windows:WindowSetFocus",WindowKillFocus:"windows:WindowKillFocus",WindowDragDrop:"windows:WindowDragDrop",WindowDragEnter:"windows:WindowDragEnter",WindowDragLeave:"windows:WindowDragLeave",WindowDragOver:"windows:WindowDragOver"},Mac:{ApplicationDidBecomeActive:"mac:ApplicationDidBecomeActive",ApplicationDidChangeBackingProperties:"mac:ApplicationDidChangeBackingProperties",ApplicationDidChangeEffectiveAppearance:"mac:ApplicationDidChangeEffectiveAppearance",ApplicationDidChangeIcon:"mac:ApplicationDidChangeIcon",ApplicationDidChangeOcclusionState:"mac:ApplicationDidChangeOcclusionState",ApplicationDidChangeScreenParameters:"mac:ApplicationDidChangeScreenParameters",ApplicationDidChangeStatusBarFrame:"mac:ApplicationDidChangeStatusBarFrame",ApplicationDidChangeStatusBarOrientation:"mac:ApplicationDidChangeStatusBarOrientation",ApplicationDidFinishLaunching:"mac:ApplicationDidFinishLaunching",ApplicationDidHide:"mac:ApplicationDidHide",ApplicationDidResignActiveNotification:"mac:ApplicationDidResignActiveNotification",ApplicationDidUnhide:"mac:ApplicationDidUnhide",ApplicationDidUpdate:"mac:ApplicationDidUpdate",ApplicationWillBecomeActive:"mac:ApplicationWillBecomeActive",ApplicationWillFinishLaunching:"mac:ApplicationWillFinishLaunching",ApplicationWillHide:"mac:ApplicationWillHide",ApplicationWillResignActive:"mac:ApplicationWillResignActive",ApplicationWillTerminate:"mac:ApplicationWillTerminate",ApplicationWillUnhide:"mac:ApplicationWillUnhide",ApplicationWillUpdate:"mac:ApplicationWillUpdate",ApplicationDidChangeTheme:"mac:ApplicationDidChangeTheme!",ApplicationShouldHandleReopen:"mac:ApplicationShouldHandleReopen!",WindowDidBecomeKey:"mac:WindowDidBecomeKey",WindowDidBecomeMain:"mac:WindowDidBecomeMain",WindowDidBeginSheet:"mac:WindowDidBeginSheet",WindowDidChangeAlpha:"mac:WindowDidChangeAlpha",WindowDidChangeBackingLocation:"mac:WindowDidChangeBackingLocation",WindowDidChangeBackingProperties:"mac:WindowDidChangeBackingProperties",WindowDidChangeCollectionBehavior:"mac:WindowDidChangeCollectionBehavior",WindowDidChangeEffectiveAppearance:"mac:WindowDidChangeEffectiveAppearance",WindowDidChangeOcclusionState:"mac:WindowDidChangeOcclusionState",WindowDidChangeOrderingMode:"mac:WindowDidChangeOrderingMode",WindowDidChangeScreen:"mac:WindowDidChangeScreen",WindowDidChangeScreenParameters:"mac:WindowDidChangeScreenParameters",WindowDidChangeScreenProfile:"mac:WindowDidChangeScreenProfile",WindowDidChangeScreenSpace:"mac:WindowDidChangeScreenSpace",WindowDidChangeScreenSpaceProperties:"mac:WindowDidChangeScreenSpaceProperties",WindowDidChangeSharingType:"mac:WindowDidChangeSharingType",WindowDidChangeSpace:"mac:WindowDidChangeSpace",WindowDidChangeSpaceOrderingMode:"mac:WindowDidChangeSpaceOrderingMode",WindowDidChangeTitle:"mac:WindowDidChangeTitle",WindowDidChangeToolbar:"mac:WindowDidChangeToolbar",WindowDidChangeVisibility:"mac:WindowDidChangeVisibility",WindowDidDeminiaturize:"mac:WindowDidDeminiaturize",WindowDidEndSheet:"mac:WindowDidEndSheet",WindowDidEnterFullScreen:"mac:WindowDidEnterFullScreen",WindowDidEnterVersionBrowser:"mac:WindowDidEnterVersionBrowser",WindowDidExitFullScreen:"mac:WindowDidExitFullScreen",WindowDidExitVersionBrowser:"mac:WindowDidExitVersionBrowser",WindowDidExpose:"mac:WindowDidExpose",WindowDidFocus:"mac:WindowDidFocus",WindowDidMiniaturize:"mac:WindowDidMiniaturize",WindowDidMove:"mac:WindowDidMove",WindowDidOrderOffScreen:"mac:WindowDidOrderOffScreen",WindowDidOrderOnScreen:"mac:WindowDidOrderOnScreen",WindowDidResignKey:"mac:WindowDidResignKey",WindowDidResignMain:"mac:WindowDidResignMain",WindowDidResize:"mac:WindowDidResize",WindowDidUpdate:"mac:WindowDidUpdate",WindowDidUpdateAlpha:"mac:WindowDidUpdateAlpha",WindowDidUpdateCollectionBehavior:"mac:WindowDidUpdateCollectionBehavior",WindowDidUpdateCollectionProperties:"mac:WindowDidUpdateCollectionProperties",WindowDidUpdateShadow:"mac:WindowDidUpdateShadow",WindowDidUpdateTitle:"mac:WindowDidUpdateTitle",WindowDidUpdateToolbar:"mac:WindowDidUpdateToolbar",WindowDidUpdateVisibility:"mac:WindowDidUpdateVisibility",WindowShouldClose:"mac:WindowShouldClose!",WindowWillBecomeKey:"mac:WindowWillBecomeKey",WindowWillBecomeMain:"mac:WindowWillBecomeMain",WindowWillBeginSheet:"mac:WindowWillBeginSheet",WindowWillChangeOrderingMode:"mac:WindowWillChangeOrderingMode",WindowWillClose:"mac:WindowWillClose",WindowWillDeminiaturize:"mac:WindowWillDeminiaturize",WindowWillEnterFullScreen:"mac:WindowWillEnterFullScreen",WindowWillEnterVersionBrowser:"mac:WindowWillEnterVersionBrowser",WindowWillExitFullScreen:"mac:WindowWillExitFullScreen",WindowWillExitVersionBrowser:"mac:WindowWillExitVersionBrowser",WindowWillFocus:"mac:WindowWillFocus",WindowWillMiniaturize:"mac:WindowWillMiniaturize",WindowWillMove:"mac:WindowWillMove",WindowWillOrderOffScreen:"mac:WindowWillOrderOffScreen",WindowWillOrderOnScreen:"mac:WindowWillOrderOnScreen",WindowWillResignMain:"mac:WindowWillResignMain",WindowWillResize:"mac:WindowWillResize",WindowWillUnfocus:"mac:WindowWillUnfocus",WindowWillUpdate:"mac:WindowWillUpdate",WindowWillUpdateAlpha:"mac:WindowWillUpdateAlpha",WindowWillUpdateCollectionBehavior:"mac:WindowWillUpdateCollectionBehavior",WindowWillUpdateCollectionProperties:"mac:WindowWillUpdateCollectionProperties",WindowWillUpdateShadow:"mac:WindowWillUpdateShadow",WindowWillUpdateTitle:"mac:WindowWillUpdateTitle",WindowWillUpdateToolbar:"mac:WindowWillUpdateToolbar",WindowWillUpdateVisibility:"mac:WindowWillUpdateVisibility",WindowWillUseStandardFrame:"mac:WindowWillUseStandardFrame",MenuWillOpen:"mac:MenuWillOpen",MenuDidOpen:"mac:MenuDidOpen",MenuDidClose:"mac:MenuDidClose",MenuWillSendAction:"mac:MenuWillSendAction",MenuDidSendAction:"mac:MenuDidSendAction",MenuWillHighlightItem:"mac:MenuWillHighlightItem",MenuDidHighlightItem:"mac:MenuDidHighlightItem",MenuWillDisplayItem:"mac:MenuWillDisplayItem",MenuDidDisplayItem:"mac:MenuDidDisplayItem",MenuWillAddItem:"mac:MenuWillAddItem",MenuDidAddItem:"mac:MenuDidAddItem",MenuWillRemoveItem:"mac:MenuWillRemoveItem",MenuDidRemoveItem:"mac:MenuDidRemoveItem",MenuWillBeginTracking:"mac:MenuWillBeginTracking",MenuDidBeginTracking:"mac:MenuDidBeginTracking",MenuWillEndTracking:"mac:MenuWillEndTracking",MenuDidEndTracking:"mac:MenuDidEndTracking",MenuWillUpdate:"mac:MenuWillUpdate",MenuDidUpdate:"mac:MenuDidUpdate",MenuWillPopUp:"mac:MenuWillPopUp",MenuDidPopUp:"mac:MenuDidPopUp",MenuWillSendActionToItem:"mac:MenuWillSendActionToItem",MenuDidSendActionToItem:"mac:MenuDidSendActionToItem",WebViewDidStartProvisionalNavigation:"mac:WebViewDidStartProvisionalNavigation",WebViewDidReceiveServerRedirectForProvisionalNavigation:"mac:WebViewDidReceiveServerRedirectForProvisionalNavigation",WebViewDidFinishNavigation:"mac:WebViewDidFinishNavigation",WebViewDidCommitNavigation:"mac:WebViewDidCommitNavigation",WindowFileDraggingEntered:"mac:WindowFileDraggingEntered",WindowFileDraggingPerformed:"mac:WindowFileDraggingPerformed",WindowFileDraggingExited:"mac:WindowFileDraggingExited"},Linux:{SystemThemeChanged:"linux:SystemThemeChanged",WindowLoadChanged:"linux:WindowLoadChanged",WindowDeleteEvent:"linux:WindowDeleteEvent",WindowFocusIn:"linux:WindowFocusIn",WindowFocusOut:"linux:WindowFocusOut",ApplicationStartup:"linux:ApplicationStartup"},Common:{ApplicationStarted:"common:ApplicationStarted",WindowMaximise:"common:WindowMaximise",WindowUnMaximise:"common:WindowUnMaximise",WindowFullscreen:"common:WindowFullscreen",WindowUnFullscreen:"common:WindowUnFullscreen",WindowRestore:"common:WindowRestore",WindowMinimise:"common:WindowMinimise",WindowUnMinimise:"common:WindowUnMinimise",WindowClosing:"common:WindowClosing",WindowZoom:"common:WindowZoom",WindowZoomIn:"common:WindowZoomIn",WindowZoomOut:"common:WindowZoomOut",WindowZoomReset:"common:WindowZoomReset",WindowFocus:"common:WindowFocus",WindowLostFocus:"common:WindowLostFocus",WindowShow:"common:WindowShow",WindowHide:"common:WindowHide",WindowDPIChanged:"common:WindowDPIChanged",WindowFilesDropped:"common:WindowFilesDropped",WindowRuntimeReady:"common:WindowRuntimeReady",ThemeChanged:"common:ThemeChanged"}};var dn=ne;window._wails=window._wails||{};window._wails.dispatchWailsEvent=wn;var ln=l(d.Events,""),cn=0,m=new Map,V=class{constructor(i,n,o){this.eventName=i,this.maxCallbacks=o||-1,this.Callback=t=>(n(t),this.maxCallbacks===-1?!1:(this.maxCallbacks-=1,this.maxCallbacks===0))}},M=class{constructor(i,n=null){this.name=i,this.data=n}};function sn(){}function wn(e){let i=m.get(e.name);if(i){let n=i.filter(o=>{if(o.Callback(e))return!0});n.length>0&&(i=i.filter(o=>!n.includes(o)),i.length===0?m.delete(e.name):m.set(e.name,i))}}function _(e,i,n){let o=m.get(e)||[],t=new V(e,i,n);return o.push(t),m.set(e,o),()=>pn(t)}function mn(e,i){return _(e,i,-1)}function un(e,i){return _(e,i,1)}function pn(e){let i=e.eventName,n=m.get(i).filter(o=>o!==e);n.length===0?m.delete(i):m.set(i,n)}function Wn(e,...i){[e,...i].forEach(o=>m.delete(o))}function gn(){m.clear()}function Z(e){return ln(cn,e)}var G={};w(G,{Error:()=>Un,Info:()=>Rn,OpenFile:()=>yn,Question:()=>A,SaveFile:()=>On,Warning:()=>En});window._wails=window._wails||{};window._wails.dialogErrorCallback=bn;window._wails.dialogResultCallback=vn;var fn=0,hn=1,Dn=2,Cn=3,Sn=4,xn=5,Mn=l(d.Dialog,""),W=new Map;function An(){let e;do e=f();while(W.has(e));return e}function D(e,i={}){let n=An();return i["dialog-id"]=n,new Promise((o,t)=>{W.set(n,{resolve:o,reject:t}),Mn(e,i).catch(a=>{t(a),W.delete(n)})})}function vn(e,i,n){let o=W.get(e);o&&(n?o.resolve(JSON.parse(i)):o.resolve(i),W.delete(e))}function bn(e,i){let n=W.get(e);n&&(n.reject(i),W.delete(e))}var Rn=e=>D(fn,e),En=e=>D(hn,e),Un=e=>D(Dn,e),A=e=>D(Cn,e),yn=e=>D(Sn,e),On=e=>D(xn,e);function oe(e,i=null){let n=new M(e,i);Z(n)}function Pn(){document.querySelectorAll("[wml-event]").forEach(function(i){let n=i.getAttribute("wml-event"),o=i.getAttribute("wml-confirm"),t=i.getAttribute("wml-trigger")||"click",a=function(){if(o){A({Title:"Confirm",Message:o,Detached:!1,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(s){s!=="No"&&oe(n)});return}oe(n)};i.removeEventListener(t,a),i.addEventListener(t,a)})}function te(e,i){let n=U(e),o=In(n);o.has(i);try{o.get(i)()}catch{}}function Tn(){document.querySelectorAll("[wml-window]").forEach(function(i){let n=i.getAttribute("wml-window"),o=i.getAttribute("wml-confirm"),t=i.getAttribute("wml-trigger")||"click",a=i.getAttribute("wml-target-window")||"",s=function(){if(o){A({Title:"Confirm",Message:o,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(p){p!=="No"&&te(a,n)});return}te(a,n)};i.removeEventListener(t,s),i.addEventListener(t,s)})}function Bn(){document.querySelectorAll("[wml-openurl]").forEach(function(i){let n=i.getAttribute("wml-openurl"),o=i.getAttribute("wml-confirm"),t=i.getAttribute("wml-trigger")||"click",a=function(){if(o){A({Title:"Confirm",Message:o,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(s){s!=="No"&&b(n)});return}b(n)};i.removeEventListener(t,a),i.addEventListener(t,a)})}function Y(){Pn(),Tn(),Bn()}function In(e){let i=new Map;for(let n in e)typeof e[n]=="function"&&i.set(n,e[n]);return i}var X={};w(X,{ByID:()=>Vn,ByName:()=>Hn,Call:()=>Nn,Plugin:()=>_n});window._wails=window._wails||{};window._wails.callResultHandler=zn;window._wails.callErrorHandler=kn;var y=0,Fn=l(d.Call,""),v=new Map;function Ln(){let e;do e=f();while(v.has(e));return e}function zn(e,i,n){let o=re(e);o&&o.resolve(n?JSON.parse(i):i)}function kn(e,i){let n=re(e);n&&n.reject(i)}function re(e){let i=v.get(e);return v.delete(e),i}function O(e,i={}){return new Promise((n,o)=>{let t=Ln();i["call-id"]=t,v.set(t,{resolve:n,reject:o}),Fn(e,i).catch(a=>{o(a),v.delete(t)})})}function Nn(e){return O(y,e)}function Hn(e,...i){if(typeof e!="string"||e.split(".").length!==3)throw new Error("CallByName requires a string in the format 'package.struct.method'");let[n,o,t]=e.split(".");return O(y,{packageName:n,structName:o,methodName:t,args:i})}function Vn(e,...i){return O(y,{methodID:e,args:i})}function _n(e,i,...n){return O(y,{packageName:"wails-plugins",structName:e,methodName:i,args:n})}window._wails=window._wails||{};window._wails.invoke=h;window.wails=window.wails||{};window.wails.Application=T;window.wails.Browser=B;window.wails.Call=X;window.wails.Clipboard=I;window.wails.Dialogs=G;window.wails.Events=j;window.wails.Flags=z;window.wails.Screens=N;window.wails.System=L;window.wails.Window=H;window.wails.WML=K;var ae=!1;document.addEventListener("DOMContentLoaded",function(){ae=!0,window._wails.invoke("wails:runtime:ready")});function Zn(e){ae||document.readyState==="complete"?e():document.addEventListener("DOMContentLoaded",e)}Zn(()=>{Y()});})(); diff --git a/v3/go.mod b/v3/go.mod index ab75c4bcfb6..229b7ae81e7 100644 --- a/v3/go.mod +++ b/v3/go.mod @@ -1,8 +1,6 @@ module github.com/wailsapp/wails/v3 -go 1.21.1 - -toolchain go1.21.4 +go 1.22 require ( github.com/atterpac/refresh v0.6.2 @@ -36,7 +34,7 @@ require ( github.com/tc-hib/winres v0.1.6 github.com/wailsapp/go-webview2 v1.0.9 github.com/wailsapp/mimetype v1.4.1 - golang.org/x/sys v0.15.0 + golang.org/x/sys v0.18.0 modernc.org/sqlite v1.21.0 ) @@ -49,7 +47,8 @@ require ( github.com/Microsoft/go-winio v0.6.1 // indirect github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect github.com/StackExchange/wmi v1.2.1 // indirect - github.com/cloudflare/circl v1.3.3 // indirect + github.com/alexbrainman/ps v0.0.0-20171229230509-b3e1b4a15894 // indirect + github.com/cloudflare/circl v1.3.7 // indirect github.com/containerd/console v1.0.3 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/dustin/go-humanize v1.0.0 // indirect @@ -89,14 +88,14 @@ require ( github.com/xanzy/ssh-agent v0.3.3 // indirect github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 // indirect github.com/zeebo/xxh3 v1.0.2 // indirect - golang.org/x/crypto v0.16.0 // indirect + golang.org/x/crypto v0.21.0 // indirect golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect - golang.org/x/image v0.5.0 // indirect + golang.org/x/image v0.15.0 // indirect golang.org/x/mod v0.12.0 // indirect - golang.org/x/net v0.19.0 // indirect + golang.org/x/net v0.21.0 // indirect golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43 // indirect golang.org/x/sync v0.4.0 // indirect - golang.org/x/term v0.15.0 // indirect + golang.org/x/term v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/tools v0.13.0 // indirect google.golang.org/appengine v1.6.6 // indirect diff --git a/v3/go.sum b/v3/go.sum index 44c1e5294b7..15030fdfa21 100644 --- a/v3/go.sum +++ b/v3/go.sum @@ -77,8 +77,9 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= +github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= +github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw= github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= @@ -386,8 +387,8 @@ golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= -golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -404,8 +405,8 @@ golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMx golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20200430140353-33d19683fad8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20201208152932-35266b937fa6/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.5.0 h1:5JMiNunQeQw++mMOz48/ISeNu3Iweh/JaZU8ZLqHRrI= -golang.org/x/image v0.5.0/go.mod h1:FVC7BI/5Ym8R25iw5OLsgshdUBbT1h5jZTpA+mvAdZ4= +golang.org/x/image v0.15.0 h1:kOELfmgrmJlw4Cdb7g/QGuB3CvDrXbqEIww/pNtNBm8= +golang.org/x/image v0.15.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -462,8 +463,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= -golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -530,8 +531,8 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -539,8 +540,8 @@ golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuX golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= -golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= +golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/v3/internal/assetserver/webview/webkit2_36+.go b/v3/internal/assetserver/webview/webkit2.go similarity index 53% rename from v3/internal/assetserver/webview/webkit2_36+.go rename to v3/internal/assetserver/webview/webkit2.go index 2c1a79c4331..2682dc81f3a 100644 --- a/v3/internal/assetserver/webview/webkit2_36+.go +++ b/v3/internal/assetserver/webview/webkit2.go @@ -1,4 +1,4 @@ -//go:build linux && (webkit2_36 || webkit2_40) +//go:build linux package webview @@ -12,11 +12,15 @@ package webview import "C" import ( + "fmt" + "io" "net/http" "strings" "unsafe" ) +const Webkit2MinMinorVersion = 40 + func webkit_uri_scheme_request_get_http_method(req *C.WebKitURISchemeRequest) string { method := C.GoString(C.webkit_uri_scheme_request_get_http_method(req)) return strings.ToUpper(method) @@ -67,3 +71,67 @@ func webkit_uri_scheme_request_finish(req *C.WebKitURISchemeRequest, code int, h C.webkit_uri_scheme_request_finish_with_response(req, resp) return nil } + +func webkit_uri_scheme_request_get_http_body(req *C.WebKitURISchemeRequest) io.ReadCloser { + stream := C.webkit_uri_scheme_request_get_http_body(req) + if stream == nil { + return http.NoBody + } + return &webkitRequestBody{stream: stream} +} + +type webkitRequestBody struct { + stream *C.GInputStream + closed bool +} + +// Read implements io.Reader +func (r *webkitRequestBody) Read(p []byte) (int, error) { + if r.closed { + return 0, io.ErrClosedPipe + } + + var content unsafe.Pointer + var contentLen int + if p != nil { + content = unsafe.Pointer(&p[0]) + contentLen = len(p) + } + + var n C.gsize + var gErr *C.GError + res := C.g_input_stream_read_all(r.stream, content, C.gsize(contentLen), &n, nil, &gErr) + if res == 0 { + return 0, formatGError("stream read failed", gErr) + } else if n == 0 { + return 0, io.EOF + } + return int(n), nil +} + +func (r *webkitRequestBody) Close() error { + if r.closed { + return nil + } + r.closed = true + + // https://docs.gtk.org/gio/method.InputStream.close.html + // Streams will be automatically closed when the last reference is dropped, but you might want to call this function + // to make sure resources are released as early as possible. + var err error + var gErr *C.GError + if C.g_input_stream_close(r.stream, nil, &gErr) == 0 { + err = formatGError("stream close failed", gErr) + } + C.g_object_unref(C.gpointer(r.stream)) + r.stream = nil + return err +} + +func formatGError(msg string, gErr *C.GError, args ...any) error { + if gErr != nil && gErr.message != nil { + msg += ": " + C.GoString(gErr.message) + C.g_error_free(gErr) + } + return fmt.Errorf(msg, args...) +} diff --git a/v3/internal/assetserver/webview/webkit2_36.go b/v3/internal/assetserver/webview/webkit2_36.go deleted file mode 100644 index cd200af8eb6..00000000000 --- a/v3/internal/assetserver/webview/webkit2_36.go +++ /dev/null @@ -1,21 +0,0 @@ -//go:build linux && webkit2_36 - -package webview - -/* -#cgo linux pkg-config: webkit2gtk-4.0 - -#include "webkit2/webkit2.h" -*/ -import "C" - -import ( - "io" - "net/http" -) - -const Webkit2MinMinorVersion = 36 - -func webkit_uri_scheme_request_get_http_body(_ *C.WebKitURISchemeRequest) io.ReadCloser { - return http.NoBody -} diff --git a/v3/internal/assetserver/webview/webkit2_40+.go b/v3/internal/assetserver/webview/webkit2_40+.go deleted file mode 100644 index dceb0803d5d..00000000000 --- a/v3/internal/assetserver/webview/webkit2_40+.go +++ /dev/null @@ -1,83 +0,0 @@ -//go:build linux && webkit2_40 - -package webview - -/* -#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0 gio-unix-2.0 - -#include "gtk/gtk.h" -#include "webkit2/webkit2.h" -#include "gio/gunixinputstream.h" -*/ -import "C" - -import ( - "fmt" - "io" - "net/http" - "unsafe" -) - -func webkit_uri_scheme_request_get_http_body(req *C.WebKitURISchemeRequest) io.ReadCloser { - stream := C.webkit_uri_scheme_request_get_http_body(req) - if stream == nil { - return http.NoBody - } - return &webkitRequestBody{stream: stream} -} - -type webkitRequestBody struct { - stream *C.GInputStream - closed bool -} - -// Read implements io.Reader -func (r *webkitRequestBody) Read(p []byte) (int, error) { - if r.closed { - return 0, io.ErrClosedPipe - } - - var content unsafe.Pointer - var contentLen int - if p != nil { - content = unsafe.Pointer(&p[0]) - contentLen = len(p) - } - - var n C.gsize - var gErr *C.GError - res := C.g_input_stream_read_all(r.stream, content, C.gsize(contentLen), &n, nil, &gErr) - if res == 0 { - return 0, formatGError("stream read failed", gErr) - } else if n == 0 { - return 0, io.EOF - } - return int(n), nil -} - -func (r *webkitRequestBody) Close() error { - if r.closed { - return nil - } - r.closed = true - - // https://docs.gtk.org/gio/method.InputStream.close.html - // Streams will be automatically closed when the last reference is dropped, but you might want to call this function - // to make sure resources are released as early as possible. - var err error - var gErr *C.GError - if C.g_input_stream_close(r.stream, nil, &gErr) == 0 { - err = formatGError("stream close failed", gErr) - } - C.g_object_unref(C.gpointer(r.stream)) - r.stream = nil - return err -} - -func formatGError(msg string, gErr *C.GError, args ...any) error { - if gErr != nil && gErr.message != nil { - msg += ": " + C.GoString(gErr.message) - C.g_error_free(gErr) - } - return fmt.Errorf(msg, args...) -} diff --git a/v3/internal/assetserver/webview/webkit2_40+_purego.go b/v3/internal/assetserver/webview/webkit2_40+_purego.go deleted file mode 100644 index 1088be25e09..00000000000 --- a/v3/internal/assetserver/webview/webkit2_40+_purego.go +++ /dev/null @@ -1,74 +0,0 @@ -//go:build linux && webkit2_40 && purego - -package webview - -import ( - "fmt" - "io" - "net/http" - "unsafe" -) - -func webkit_uri_scheme_request_get_http_body(req *C.WebKitURISchemeRequest) io.ReadCloser { - stream := C.webkit_uri_scheme_request_get_http_body(req) - if stream == nil { - return http.NoBody - } - return &webkitRequestBody{stream: stream} -} - -type webkitRequestBody struct { - stream *C.GInputStream - closed bool -} - -// Read implements io.Reader -func (r *webkitRequestBody) Read(p []byte) (int, error) { - if r.closed { - return 0, io.ErrClosedPipe - } - - var content unsafe.Pointer - var contentLen int - if p != nil { - content = unsafe.Pointer(&p[0]) - contentLen = len(p) - } - - var n C.gsize - var gErr *C.GError - res := C.g_input_stream_read_all(r.stream, content, C.gsize(contentLen), &n, nil, &gErr) - if res == 0 { - return 0, formatGError("stream read failed", gErr) - } else if n == 0 { - return 0, io.EOF - } - return int(n), nil -} - -func (r *webkitRequestBody) Close() error { - if r.closed { - return nil - } - r.closed = true - - // https://docs.gtk.org/gio/method.InputStream.close.html - // Streams will be automatically closed when the last reference is dropped, but you might want to call this function - // to make sure resources are released as early as possible. - var err error - var gErr *C.GError - if C.g_input_stream_close(r.stream, nil, &gErr) == 0 { - err = formatGError("stream close failed", gErr) - } - C.g_object_unref(C.gpointer(r.stream)) - r.stream = nil - return err -} - -func formatGError(msg string, gErr *C.GError, args ...any) error { - if gErr != nil && gErr.message != nil { - msg += ": " + C.GoString(gErr.message) - C.g_error_free(gErr) - } - return fmt.Errorf(msg, args...) -} diff --git a/v3/internal/assetserver/webview/webkit2_40.go b/v3/internal/assetserver/webview/webkit2_40.go deleted file mode 100644 index 47b504383af..00000000000 --- a/v3/internal/assetserver/webview/webkit2_40.go +++ /dev/null @@ -1,5 +0,0 @@ -//go:build linux && webkit2_40 - -package webview - -const Webkit2MinMinorVersion = 40 diff --git a/v3/internal/assetserver/webview/webkit2_legacy.go b/v3/internal/assetserver/webview/webkit2_legacy.go deleted file mode 100644 index 1a87fe96aeb..00000000000 --- a/v3/internal/assetserver/webview/webkit2_legacy.go +++ /dev/null @@ -1,48 +0,0 @@ -//go:build linux && !(webkit2_36 || webkit2_40) - -package webview - -/* -#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0 - -#include "gtk/gtk.h" -#include "webkit2/webkit2.h" -*/ -import "C" - -import ( - "fmt" - "io" - "net/http" - "unsafe" -) - -const Webkit2MinMinorVersion = 0 - -func webkit_uri_scheme_request_get_http_method(_ *C.WebKitURISchemeRequest) string { - return http.MethodGet -} - -func webkit_uri_scheme_request_get_http_headers(_ *C.WebKitURISchemeRequest) http.Header { - // Fake some basic default headers that are needed if e.g. request are being proxied to the an external sever, like - // we do in the devserver. - h := http.Header{} - h.Add("Accept", "*/*") - h.Add("User-Agent", "wails.io/605.1.15") - return h -} - -func webkit_uri_scheme_request_get_http_body(_ *C.WebKitURISchemeRequest) io.ReadCloser { - return http.NoBody -} - -func webkit_uri_scheme_request_finish(req *C.WebKitURISchemeRequest, code int, header http.Header, stream *C.GInputStream, streamLength int64) error { - if code != http.StatusOK { - return fmt.Errorf("StatusCodes not supported: %d - %s", code, http.StatusText(code)) - } - - cMimeType := C.CString(header.Get(HeaderContentType)) - C.webkit_uri_scheme_request_finish(req, stream, C.gint64(streamLength), cMimeType) - C.free(unsafe.Pointer(cMimeType)) - return nil -} diff --git a/v3/internal/assetserver/webview/webkit2_legacy_purego.go b/v3/internal/assetserver/webview/webkit2_legacy_purego.go deleted file mode 100644 index 2e88864c8e8..00000000000 --- a/v3/internal/assetserver/webview/webkit2_legacy_purego.go +++ /dev/null @@ -1,36 +0,0 @@ -//go:build linux && !(webkit2_36 || webkit2_40) && purego - -package webview - -import ( - "fmt" - "io" - "net/http" - - "github.com/ebitengine/purego" -) - -const Webkit2MinMinorVersion = 0 - -func webkit_uri_scheme_request_get_http_method(_ uintptr) string { - return http.MethodGet -} - -func webkit_uri_scheme_request_get_http_headers(_ uintptr) http.Header { - return http.Header{} -} - -func webkit_uri_scheme_request_get_http_body(_ uintptr) io.ReadCloser { - return http.NoBody -} - -func webkit_uri_scheme_request_finish(req uintptr, code int, header http.Header, stream uintptr, streamLength int64) error { - if code != http.StatusOK { - return fmt.Errorf("StatusCodes not supported: %d - %s", code, http.StatusText(code)) - } - - var requestFinish func(uintptr, uintptr, int64, string) - purego.RegisterLibFunc(&requestFinish, webkit, "webkit_uri_scheme_request_finish") - requestFinish(req, stream, streamLength, header.Get(HeaderContentType)) - return nil -} diff --git a/v3/internal/assetserver/webview/webkit2_36+_purego.go b/v3/internal/assetserver/webview/webkit2_purego.go similarity index 62% rename from v3/internal/assetserver/webview/webkit2_36+_purego.go rename to v3/internal/assetserver/webview/webkit2_purego.go index 2386868c38f..28832c8bd95 100644 --- a/v3/internal/assetserver/webview/webkit2_36+_purego.go +++ b/v3/internal/assetserver/webview/webkit2_purego.go @@ -1,4 +1,4 @@ -//go:build linux && (webkit2_36 || webkit2_40) && purego +//go:build linux && purego package webview @@ -92,3 +92,67 @@ func webkit_uri_scheme_request_finish(req uintptr, code int, header http.Header, return nil } + +func webkit_uri_scheme_request_get_http_body(req *C.WebKitURISchemeRequest) io.ReadCloser { + stream := C.webkit_uri_scheme_request_get_http_body(req) + if stream == nil { + return http.NoBody + } + return &webkitRequestBody{stream: stream} +} + +type webkitRequestBody struct { + stream *C.GInputStream + closed bool +} + +// Read implements io.Reader +func (r *webkitRequestBody) Read(p []byte) (int, error) { + if r.closed { + return 0, io.ErrClosedPipe + } + + var content unsafe.Pointer + var contentLen int + if p != nil { + content = unsafe.Pointer(&p[0]) + contentLen = len(p) + } + + var n C.gsize + var gErr *C.GError + res := C.g_input_stream_read_all(r.stream, content, C.gsize(contentLen), &n, nil, &gErr) + if res == 0 { + return 0, formatGError("stream read failed", gErr) + } else if n == 0 { + return 0, io.EOF + } + return int(n), nil +} + +func (r *webkitRequestBody) Close() error { + if r.closed { + return nil + } + r.closed = true + + // https://docs.gtk.org/gio/method.InputStream.close.html + // Streams will be automatically closed when the last reference is dropped, but you might want to call this function + // to make sure resources are released as early as possible. + var err error + var gErr *C.GError + if C.g_input_stream_close(r.stream, nil, &gErr) == 0 { + err = formatGError("stream close failed", gErr) + } + C.g_object_unref(C.gpointer(r.stream)) + r.stream = nil + return err +} + +func formatGError(msg string, gErr *C.GError, args ...any) error { + if gErr != nil && gErr.message != nil { + msg += ": " + C.GoString(gErr.message) + C.g_error_free(gErr) + } + return fmt.Errorf(msg, args...) +} diff --git a/v3/internal/commands/build_assets/runtime/runtime.debug.js b/v3/internal/commands/build_assets/runtime/runtime.debug.js index cd19505891a..834309aac4c 100644 --- a/v3/internal/commands/build_assets/runtime/runtime.debug.js +++ b/v3/internal/commands/build_assets/runtime/runtime.debug.js @@ -736,7 +736,12 @@ WindowFileDraggingExited: "mac:WindowFileDraggingExited" }, Linux: { - SystemThemeChanged: "linux:SystemThemeChanged" + SystemThemeChanged: "linux:SystemThemeChanged", + WindowLoadChanged: "linux:WindowLoadChanged", + WindowDeleteEvent: "linux:WindowDeleteEvent", + WindowFocusIn: "linux:WindowFocusIn", + WindowFocusOut: "linux:WindowFocusOut", + ApplicationStartup: "linux:ApplicationStartup" }, Common: { ApplicationStarted: "common:ApplicationStarted", @@ -1131,4 +1136,4 @@ Reload(); }); })(); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vLi4vcnVudGltZS9kZXNrdG9wL0B3YWlsc2lvL3J1bnRpbWUvc3JjL2xvZy5qcyIsICIuLi8uLi8uLi9ydW50aW1lL2Rlc2t0b3AvQHdhaWxzaW8vcnVudGltZS9zcmMvYXBwbGljYXRpb24uanMiLCAiLi4vLi4vLi4vcnVudGltZS9ub2RlX21vZHVsZXMvbmFub2lkL25vbi1zZWN1cmUvaW5kZXguanMiLCA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IHVybC5zZWFyY2hQYXJhbXMuYXBwZW5kKFwiYXJnc1wiLCBKU09OLnN0cmluZ2lmeShhcmdzKSk7XG4gICAgfVxuICAgIGZldGNoT3B0aW9ucy5oZWFkZXJzW1wieC13YWlscy1jbGllbnQtaWRcIl0gPSBjbGllbnRJZDtcblxuICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG4gICAgICAgIGZldGNoKHVybCwgZmV0Y2hPcHRpb25zKVxuICAgICAgICAgICAgLnRoZW4ocmVzcG9uc2UgPT4ge1xuICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZS5vaykge1xuICAgICAgICAgICAgICAgICAgICAvLyBjaGVjayBjb250ZW50IHR5cGVcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLmhlYWRlcnMuZ2V0KFwiQ29udGVudC1UeXBlXCIpICYmIHJlc3BvbnNlLmhlYWRlcnMuZ2V0KFwiQ29udGVudC1UeXBlXCIpLmluZGV4T2YoXCJhcHBsaWNhdGlvbi9qc29uXCIpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3BvbnNlLmpzb24oKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXNwb25zZS50ZXh0KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmVqZWN0KEVycm9yKHJlc3BvbnNlLnN0YXR1c1RleHQpKTtcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAudGhlbihkYXRhID0+IHJlc29sdmUoZGF0YSkpXG4gICAgICAgICAgICAuY2F0Y2goZXJyb3IgPT4gcmVqZWN0KGVycm9yKSk7XG4gICAgfSk7XG59XG5cbmZ1bmN0aW9uIHJ1bnRpbWVDYWxsV2l0aElEKG9iamVjdElELCBtZXRob2QsIHdpbmRvd05hbWUsIGFyZ3MpIHtcbiAgICBsZXQgdXJsID0gbmV3IFVSTChydW50aW1lVVJMKTtcbiAgICB1cmwuc2VhcmNoUGFyYW1zLmFwcGVuZChcIm9iamVjdFwiLCBvYmplY3RJRCk7XG4gICAgdXJsLnNlYXJjaFBhcmFtcy5hcHBlbmQoXCJtZXRob2RcIiwgbWV0aG9kKTtcbiAgICBsZXQgZmV0Y2hPcHRpb25zID0ge1xuICAgICAgICBoZWFkZXJzOiB7fSxcbiAgICB9O1xuICAgIGlmICh3aW5kb3dOYW1lKSB7XG4gICAgICAgIGZldGNoT3B0aW9ucy5oZWFkZXJzW1wieC13YWlscy13aW5kb3ctbmFtZVwiXSA9IHdpbmRvd05hbWU7XG4gICAgfVxuICAgIGlmIChhcmdzKSB7XG4gICAgICAgIHVybC5zZWFyY2hQYXJhbXMuYXBwZW5kKFwiYXJnc1wiLCBKU09OLnN0cmluZ2lmeShhcmdzKSk7XG4gICAgfVxuICAgIGZldGNoT3B0aW9ucy5oZWFkZXJzW1wieC13YWlscy1jbGllbnQtaWRcIl0gPSBjbGllbnRJZDtcbiAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4ge1xuICAgICAgICBmZXRjaCh1cmwsIGZldGNoT3B0aW9ucylcbiAgICAgICAgICAgIC50aGVuKHJlc3BvbnNlID0+IHtcbiAgICAgICAgICAgICAgICBpZiAocmVzcG9uc2Uub2spIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gY2hlY2sgY29udGVudCB0eXBlXG4gICAgICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZS5oZWFkZXJzLmdldChcIkNvbnRlbnQtVHlwZVwiKSAmJiByZXNwb25zZS5oZWFkZXJzLmdldChcIkNvbnRlbnQtVHlwZVwiKS5pbmRleE9mKFwiYXBwbGljYXRpb24vanNvblwiKSAhPT0gLTEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXNwb25zZS5qc29uKCk7XG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24gPSB3aW5kb3cuZ2V0U2VsZWN0aW9uKCk7XG4gICAgICAgICAgICBjb25zdCBoYXNTZWxlY3Rpb24gPSAoc2VsZWN0aW9uLnRvU3RyaW5nKCkubGVuZ3RoID4gMClcbiAgICAgICAgICAgIGlmIChoYXNTZWxlY3Rpb24pIHtcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHNlbGVjdGlvbi5yYW5nZUNvdW50OyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcmFuZ2UgPSBzZWxlY3Rpb24uZ2V0UmFuZ2VBdChpKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcmVjdHMgPSByYW5nZS5nZXRDbGllbnRSZWN0cygpO1xuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBqID0gMDsgaiA8IHJlY3RzLmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCByZWN0ID0gcmVjdHNbal07XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZG9jdW1lbnQuZWxlbWVudEZyb21Qb2ludChyZWN0LmxlZnQsIHJlY3QudG9wKSA9PT0gZWxlbWVudCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIENoZWNrIGlmIHRhZ25hbWUgaXMgaW5wdXQgb3IgdGV4dGFyZWFcbiAgICAgICAgICAgIGlmIChlbGVtZW50LnRhZ05hbWUgPT09IFwiSU5QVVRcIiB8fCBlbGVtZW50LnRhZ05hbWUgPT09IFwiVEVYVEFSRUFcIikge1xuICAgICAgICAgICAgICAgIGlmIChoYXNTZWxlY3Rpb24gfHwgKCFlbGVtZW50LnJlYWRPbmx5ICYmICFlbGVtZW50LmRpc2FibGVkKSkge1xuICAgICAgICAg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7fSxcbiAgICB9O1xuICAgIGlmICh3aW5kb3dOYW1lKSB7XG4gICAgICAgIGZldGNoT3B0aW9ucy5oZWFkZXJzW1wieC13YWlscy13aW5kb3ctbmFtZVwiXSA9IHdpbmRvd05hbWU7XG4gICAgfVxuICAgIGlmIChhcmdzKSB7XG4gICAgICAgIHVybC5zZWFyY2hQYXJhbXMuYXBwZW5kKFwiYXJnc1wiLCBKU09OLnN0cmluZ2lmeShhcmdzKSk7XG4gICAgfVxuICAgIGZldGNoT3B0aW9ucy5oZWFkZXJzW1wieC13YWlscy1jbGllbnQtaWRcIl0gPSBjbGllbnRJZDtcblxuICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG4gICAgICAgIGZldGNoKHVybCwgZmV0Y2hPcHRpb25zKVxuICAgICAgICAgICAgLnRoZW4ocmVzcG9uc2UgPT4ge1xuICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZS5vaykge1xuICAgICAgICAgICAgICAgICAgICAvLyBjaGVjayBjb250ZW50IHR5cGVcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLmhlYWRlcnMuZ2V0KFwiQ29udGVudC1UeXBlXCIpICYmIHJlc3BvbnNlLmhlYWRlcnMuZ2V0KFwiQ29udGVudC1UeXBlXCIpLmluZGV4T2YoXCJhcHBsaWNhdGlvbi9qc29uXCIpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3BvbnNlLmpzb24oKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXNwb25zZS50ZXh0KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmVqZWN0KEVycm9yKHJlc3BvbnNlLnN0YXR1c1RleHQpKTtcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAudGhlbih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mlzQ29udGVudEVkaXRhYmxlKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBDaGVjayBpZiB0ZXh0IGhhcyBiZWVuIHNlbGVjdGVkXG4gICAgICAgICAgICBjb25zdCBzZWxlY3Rpb24gPSB3aW5kb3cuZ2V0U2VsZWN0aW9uKCk7XG4gICAgICAgICAgICBjb25zdCBoYXNTZWxlY3Rpb24gPSAoc2VsZWN0aW9uLnRvU3RyaW5nKCkubGVuZ3RoID4gMClcbiAgICAgICAgICAgIGlmIChoYXNTZWxlY3Rpb24pIHtcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHNlbGVjdGlvbi5yYW5nZUNvdW50OyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcmFuZ2UgPSBzZWxlY3Rpb24uZ2V0UmFuZ2VBdChpKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcmVjdHMgPSByYW5nZS5nZXRDbGllbnRSZWN0cygpO1xuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBqID0gMDsgaiA8IHJlY3RzLmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCByZWN0ID0gcmVjdHNbal07XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZG9jdW1lbnQuZWxlbWVudEZyb21Qb2ludChyZWN0LmxlZnQsIHJlY3QudG9wKSA9PT0gZWxlbWVudCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIENoZWNrIGlmIHRhZ25hbWUgaXMgaW5wdXQgb3IgdGV4dGFyZWFcbiAgICAgICAgICAgIGlmIChlbGVtZW50LnRhZ05hbWUgPT09IFwiS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csTUFBTztBQUNOLGVBQVMsc0JBQXNCO0FBQUEsSUFDbkM7QUFBQSxFQUNKLENBQUM7QUFFRCxXQUFTLFVBQVUsSUFBSTtBQUNuQixRQUFJLFdBQVcsU0FBUyxlQUFlLFlBQVk7QUFDL0MsU0FBRztBQUFBLElBQ1AsT0FBTztBQUNILGVBQVMsaUJBQWlCLG9CQUFvQixFQUFFO0FBQUEsSUFDcEQ7QUFBQSxFQUNKO0FBRUEsWUFBVSxNQUFNO0FBQ1osSUFBSSxPQUFPO0FBQUEsRUFDZixDQUFDOyIsCiAgIm5hbWVzIjogWyJzaXplIiwgImNhbGwiLCAiY2FsbCIsICJjYWxsIiwgImNhbGwiLCAiY2FsbCIsICJIaWRlIiwgIlNob3ciLCAic2V0UmVzaXphYmxlIiwgImNhbGwiLCAid2lkdGgiLCAiaGVpZ2h0IiwgInJlc2l6YWJsZSIsICJIaWRlIiwgIlNob3ciLCAiY2FsbCIsICJldmVudE5hbWUiLCAiRXJyb3IiLCAiY2FsbCIsICJFcnJvciIsICJjYWxsIiwgImdlbmVyYXRlSUQiXQp9Cg== diff --git a/v3/internal/commands/build_assets/runtime/runtime.js b/v3/internal/commands/build_assets/runtime/runtime.js index 2c7d16ed30b..baaccee0402 100644 --- a/v3/internal/commands/build_assets/runtime/runtime.js +++ b/v3/internal/commands/build_assets/runtime/runtime.js @@ -1 +1 @@ -(()=>{var le=Object.defineProperty;var w=(e,i)=>{for(var n in i)le(e,n,{get:i[n],enumerable:!0})};var T={};w(T,{Hide:()=>We,Quit:()=>fe,Show:()=>ge});var de="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var f=(e=21)=>{let i="",n=e;for(;n--;)i+=de[Math.random()*64|0];return i};var ce=window.location.origin+"/wails/runtime",l={Call:0,Clipboard:1,Application:2,Events:3,ContextMenu:4,Dialog:5,Window:6,Screens:7,System:8,Browser:9,CancelCall:10},se=f();function d(e,i){return function(n,o=null){return we(e,n,i,o)}}function we(e,i,n,o){let t=new URL(ce);t.searchParams.append("object",e),t.searchParams.append("method",i);let a={headers:{}};return n&&(a.headers["x-wails-window-name"]=n),o&&t.searchParams.append("args",JSON.stringify(o)),a.headers["x-wails-client-id"]=se,new Promise((s,m)=>{fetch(t,a).then(c=>{if(c.ok)return c.headers.get("Content-Type")&&c.headers.get("Content-Type").indexOf("application/json")!==-1?c.json():c.text();m(Error(c.statusText))}).then(c=>s(c)).catch(c=>m(c))})}var P=d(l.Application,""),me=0,ue=1,pe=2;function We(){return P(me)}function ge(){return P(ue)}function fe(){return P(pe)}var B={};w(B,{OpenURL:()=>b});var he=d(l.Browser,""),De=0;function b(e){return he(De,{url:e})}var I={};w(I,{SetText:()=>Me,Text:()=>xe});var Q=d(l.Clipboard,""),Ce=0,Se=1;function Me(e){return Q(Ce,{text:e})}function xe(){return Q(Se)}var L={};w(L,{Capabilities:()=>Re,Environment:()=>Ee,IsAMD64:()=>Oe,IsARM:()=>Pe,IsARM64:()=>Te,IsDarkMode:()=>be,IsDebug:()=>F,IsLinux:()=>Ue,IsMac:()=>ye,IsWindows:()=>R,invoke:()=>h});var J=d(l.System,""),Ae=0,ve=1;function h(e){return window.chrome?window.chrome.webview.postMessage(e):window.webkit.messageHandlers.external.postMessage(e)}function be(){return J(Ae)}function Re(){return fetch("/wails/capabilities").json()}function Ee(){return J(ve)}function R(){return window._wails.environment.OS==="windows"}function Ue(){return window._wails.environment.OS==="linux"}function ye(){return window._wails.environment.OS==="darwin"}function Oe(){return window._wails.environment.Arch==="amd64"}function Pe(){return window._wails.environment.Arch==="arm"}function Te(){return window._wails.environment.Arch==="arm64"}function F(){return window._wails.environment.Debug===!0}window.addEventListener("contextmenu",Le);var Be=d(l.ContextMenu,""),Ie=0;function Fe(e,i,n,o){Be(Ie,{id:e,x:i,y:n,data:o})}function Le(e){let i=e.target,n=window.getComputedStyle(i).getPropertyValue("--custom-contextmenu");if(n=n?n.trim():"",n){e.preventDefault();let o=window.getComputedStyle(i).getPropertyValue("--custom-contextmenu-data");Fe(n,e.clientX,e.clientY,o);return}ze(e)}function ze(e){if(F())return;let i=e.target;switch(window.getComputedStyle(i).getPropertyValue("--default-contextmenu").trim()){case"show":return;case"hide":e.preventDefault();return;default:if(i.isContentEditable)return;let t=window.getSelection(),a=t.toString().length>0;if(a)for(let s=0;sS});function S(e){try{return window._wails.flags[e]}catch(i){throw new Error("Unable to retrieve flag '"+e+"': "+i)}}window._wails=window._wails||{};window._wails.setResizable=He;window._wails.endDrag=ee;window.addEventListener("mousedown",_e);window.addEventListener("mousemove",Ge);window.addEventListener("mouseup",je);var M=!1,E=null,$=!1,ke="auto";function Ne(e){let i=window.getComputedStyle(e.target).getPropertyValue("--webkit-app-region");return!i||i===""||i.trim()!=="drag"||e.buttons!==1?!1:e.detail===1}function He(e){$=e}function ee(){document.body.style.cursor="default",M=!1}function Ve(){return E?(h(`resize:${E}`),!0):!1}function _e(e){(R()&&Ve()||Ne(e))&&(M=!!Ze(e))}function Ze(e){return!(e.offsetX>e.target.clientWidth||e.offsetY>e.target.clientHeight)}function je(e){(e.buttons!==void 0?e.buttons:e.which)>0&&ee()}function W(e=ke){document.documentElement.style.cursor=e,E=e}function Ge(e){M=Ye(e),R()&&$&&Ke(e)}function Ye(e){let i=e.buttons!==void 0?e.buttons:e.which;return M&&i>0?(h("drag"),!1):M}function Ke(e){let i=S("system.resizeHandleHeight")||5,n=S("system.resizeHandleWidth")||5,o=S("resizeCornerExtra")||10,t=window.outerWidth-e.clientXJe,GetCurrent:()=>ei,GetPrimary:()=>$e});var k=d(l.Screens,""),Xe=0,qe=1,Qe=2;function Je(){return k(Xe)}function $e(){return k(qe)}function ei(){return k(Qe)}var H={};w(H,{Center:()=>Oi,Close:()=>qi,Fullscreen:()=>Ti,Get:()=>U,GetZoomLevel:()=>rn,Height:()=>en,Hide:()=>Vi,Maximise:()=>_i,Minimise:()=>Gi,RelativePosition:()=>Ni,Restore:()=>Ki,Screen:()=>Hi,SetAlwaysOnTop:()=>zi,SetBackgroundColour:()=>Qi,SetMaxSize:()=>Fi,SetMinSize:()=>Li,SetRelativePosition:()=>ki,SetResizable:()=>Ji,SetSize:()=>Bi,SetTitle:()=>Pi,SetZoomLevel:()=>an,Show:()=>Xi,Size:()=>Ii,ToggleMaximise:()=>ji,UnMaximise:()=>Zi,UnMinimise:()=>Yi,Width:()=>$i,ZoomIn:()=>nn,ZoomOut:()=>on,ZoomReset:()=>tn});var ii=0,ni=1,oi=2,ti=3,ri=4,ai=5,li=6,di=7,ci=8,si=9,wi=10,mi=11,ui=12,pi=13,Wi=14,gi=15,fi=16,hi=17,Di=18,Ci=19,Si=20,Mi=21,xi=22,Ai=23,vi=24,bi=25,Ri=26,Ei=27,Ui=28,yi=29,r=U("");function ie(e){return{Get:i=>ie(d(l.Window,i)),Center:()=>e(ii),SetTitle:i=>e(ni,{title:i}),Fullscreen:()=>e(oi),UnFullscreen:()=>e(ti),SetSize:(i,n)=>e(ri,{width:i,height:n}),Size:()=>e(ai),SetMaxSize:(i,n)=>e(li,{width:i,height:n}),SetMinSize:(i,n)=>e(di,{width:i,height:n}),SetAlwaysOnTop:i=>e(ci,{alwaysOnTop:i}),SetRelativePosition:(i,n)=>e(si,{x:i,y:n}),RelativePosition:()=>e(wi),Screen:()=>e(mi),Hide:()=>e(ui),Maximise:()=>e(pi),UnMaximise:()=>e(Wi),ToggleMaximise:()=>e(gi),Minimise:()=>e(fi),UnMinimise:()=>e(hi),Restore:()=>e(Di),Show:()=>e(Ci),Close:()=>e(Si),SetBackgroundColour:(i,n,o,t)=>e(Mi,{r:i,g:n,b:o,a:t}),SetResizable:i=>e(xi,{resizable:i}),Width:()=>e(Ai),Height:()=>e(vi),ZoomIn:()=>e(bi),ZoomOut:()=>e(Ri),ZoomReset:()=>e(Ei),GetZoomLevel:()=>e(Ui),SetZoomLevel:i=>e(yi,{zoomLevel:i})}}function U(e){return ie(d(l.Window,e))}function Oi(){r.Center()}function Pi(e){r.SetTitle(e)}function Ti(){r.Fullscreen()}function Bi(e,i){r.SetSize(e,i)}function Ii(){return r.Size()}function Fi(e,i){r.SetMaxSize(e,i)}function Li(e,i){r.SetMinSize(e,i)}function zi(e){r.SetAlwaysOnTop(e)}function ki(e,i){r.SetRelativePosition(e,i)}function Ni(){return r.RelativePosition()}function Hi(){return r.Screen()}function Vi(){r.Hide()}function _i(){r.Maximise()}function Zi(){r.UnMaximise()}function ji(){r.ToggleMaximise()}function Gi(){r.Minimise()}function Yi(){r.UnMinimise()}function Ki(){r.Restore()}function Xi(){r.Show()}function qi(){r.Close()}function Qi(e,i,n,o){r.SetBackgroundColour(e,i,n,o)}function Ji(e){r.SetResizable(e)}function $i(){return r.Width()}function en(){return r.Height()}function nn(){r.ZoomIn()}function on(){r.ZoomOut()}function tn(){r.ZoomReset()}function rn(){return r.GetZoomLevel()}function an(e){r.SetZoomLevel(e)}var K={};w(K,{Reload:()=>Y});var j={};w(j,{Emit:()=>Z,Off:()=>Wn,OffAll:()=>gn,On:()=>mn,OnMultiple:()=>_,Once:()=>un,Types:()=>ln,WailsEvent:()=>x,setup:()=>sn});var ne={Windows:{SystemThemeChanged:"windows:SystemThemeChanged",APMPowerStatusChange:"windows:APMPowerStatusChange",APMSuspend:"windows:APMSuspend",APMResumeAutomatic:"windows:APMResumeAutomatic",APMResumeSuspend:"windows:APMResumeSuspend",APMPowerSettingChange:"windows:APMPowerSettingChange",ApplicationStarted:"windows:ApplicationStarted",WebViewNavigationCompleted:"windows:WebViewNavigationCompleted",WindowInactive:"windows:WindowInactive",WindowActive:"windows:WindowActive",WindowClickActive:"windows:WindowClickActive",WindowMaximise:"windows:WindowMaximise",WindowUnMaximise:"windows:WindowUnMaximise",WindowFullscreen:"windows:WindowFullscreen",WindowUnFullscreen:"windows:WindowUnFullscreen",WindowRestore:"windows:WindowRestore",WindowMinimise:"windows:WindowMinimise",WindowUnMinimise:"windows:WindowUnMinimise",WindowClose:"windows:WindowClose",WindowSetFocus:"windows:WindowSetFocus",WindowKillFocus:"windows:WindowKillFocus",WindowDragDrop:"windows:WindowDragDrop",WindowDragEnter:"windows:WindowDragEnter",WindowDragLeave:"windows:WindowDragLeave",WindowDragOver:"windows:WindowDragOver"},Mac:{ApplicationDidBecomeActive:"mac:ApplicationDidBecomeActive",ApplicationDidChangeBackingProperties:"mac:ApplicationDidChangeBackingProperties",ApplicationDidChangeEffectiveAppearance:"mac:ApplicationDidChangeEffectiveAppearance",ApplicationDidChangeIcon:"mac:ApplicationDidChangeIcon",ApplicationDidChangeOcclusionState:"mac:ApplicationDidChangeOcclusionState",ApplicationDidChangeScreenParameters:"mac:ApplicationDidChangeScreenParameters",ApplicationDidChangeStatusBarFrame:"mac:ApplicationDidChangeStatusBarFrame",ApplicationDidChangeStatusBarOrientation:"mac:ApplicationDidChangeStatusBarOrientation",ApplicationDidFinishLaunching:"mac:ApplicationDidFinishLaunching",ApplicationDidHide:"mac:ApplicationDidHide",ApplicationDidResignActiveNotification:"mac:ApplicationDidResignActiveNotification",ApplicationDidUnhide:"mac:ApplicationDidUnhide",ApplicationDidUpdate:"mac:ApplicationDidUpdate",ApplicationWillBecomeActive:"mac:ApplicationWillBecomeActive",ApplicationWillFinishLaunching:"mac:ApplicationWillFinishLaunching",ApplicationWillHide:"mac:ApplicationWillHide",ApplicationWillResignActive:"mac:ApplicationWillResignActive",ApplicationWillTerminate:"mac:ApplicationWillTerminate",ApplicationWillUnhide:"mac:ApplicationWillUnhide",ApplicationWillUpdate:"mac:ApplicationWillUpdate",ApplicationDidChangeTheme:"mac:ApplicationDidChangeTheme!",ApplicationShouldHandleReopen:"mac:ApplicationShouldHandleReopen!",WindowDidBecomeKey:"mac:WindowDidBecomeKey",WindowDidBecomeMain:"mac:WindowDidBecomeMain",WindowDidBeginSheet:"mac:WindowDidBeginSheet",WindowDidChangeAlpha:"mac:WindowDidChangeAlpha",WindowDidChangeBackingLocation:"mac:WindowDidChangeBackingLocation",WindowDidChangeBackingProperties:"mac:WindowDidChangeBackingProperties",WindowDidChangeCollectionBehavior:"mac:WindowDidChangeCollectionBehavior",WindowDidChangeEffectiveAppearance:"mac:WindowDidChangeEffectiveAppearance",WindowDidChangeOcclusionState:"mac:WindowDidChangeOcclusionState",WindowDidChangeOrderingMode:"mac:WindowDidChangeOrderingMode",WindowDidChangeScreen:"mac:WindowDidChangeScreen",WindowDidChangeScreenParameters:"mac:WindowDidChangeScreenParameters",WindowDidChangeScreenProfile:"mac:WindowDidChangeScreenProfile",WindowDidChangeScreenSpace:"mac:WindowDidChangeScreenSpace",WindowDidChangeScreenSpaceProperties:"mac:WindowDidChangeScreenSpaceProperties",WindowDidChangeSharingType:"mac:WindowDidChangeSharingType",WindowDidChangeSpace:"mac:WindowDidChangeSpace",WindowDidChangeSpaceOrderingMode:"mac:WindowDidChangeSpaceOrderingMode",WindowDidChangeTitle:"mac:WindowDidChangeTitle",WindowDidChangeToolbar:"mac:WindowDidChangeToolbar",WindowDidChangeVisibility:"mac:WindowDidChangeVisibility",WindowDidDeminiaturize:"mac:WindowDidDeminiaturize",WindowDidEndSheet:"mac:WindowDidEndSheet",WindowDidEnterFullScreen:"mac:WindowDidEnterFullScreen",WindowDidEnterVersionBrowser:"mac:WindowDidEnterVersionBrowser",WindowDidExitFullScreen:"mac:WindowDidExitFullScreen",WindowDidExitVersionBrowser:"mac:WindowDidExitVersionBrowser",WindowDidExpose:"mac:WindowDidExpose",WindowDidFocus:"mac:WindowDidFocus",WindowDidMiniaturize:"mac:WindowDidMiniaturize",WindowDidMove:"mac:WindowDidMove",WindowDidOrderOffScreen:"mac:WindowDidOrderOffScreen",WindowDidOrderOnScreen:"mac:WindowDidOrderOnScreen",WindowDidResignKey:"mac:WindowDidResignKey",WindowDidResignMain:"mac:WindowDidResignMain",WindowDidResize:"mac:WindowDidResize",WindowDidUpdate:"mac:WindowDidUpdate",WindowDidUpdateAlpha:"mac:WindowDidUpdateAlpha",WindowDidUpdateCollectionBehavior:"mac:WindowDidUpdateCollectionBehavior",WindowDidUpdateCollectionProperties:"mac:WindowDidUpdateCollectionProperties",WindowDidUpdateShadow:"mac:WindowDidUpdateShadow",WindowDidUpdateTitle:"mac:WindowDidUpdateTitle",WindowDidUpdateToolbar:"mac:WindowDidUpdateToolbar",WindowDidUpdateVisibility:"mac:WindowDidUpdateVisibility",WindowShouldClose:"mac:WindowShouldClose!",WindowWillBecomeKey:"mac:WindowWillBecomeKey",WindowWillBecomeMain:"mac:WindowWillBecomeMain",WindowWillBeginSheet:"mac:WindowWillBeginSheet",WindowWillChangeOrderingMode:"mac:WindowWillChangeOrderingMode",WindowWillClose:"mac:WindowWillClose",WindowWillDeminiaturize:"mac:WindowWillDeminiaturize",WindowWillEnterFullScreen:"mac:WindowWillEnterFullScreen",WindowWillEnterVersionBrowser:"mac:WindowWillEnterVersionBrowser",WindowWillExitFullScreen:"mac:WindowWillExitFullScreen",WindowWillExitVersionBrowser:"mac:WindowWillExitVersionBrowser",WindowWillFocus:"mac:WindowWillFocus",WindowWillMiniaturize:"mac:WindowWillMiniaturize",WindowWillMove:"mac:WindowWillMove",WindowWillOrderOffScreen:"mac:WindowWillOrderOffScreen",WindowWillOrderOnScreen:"mac:WindowWillOrderOnScreen",WindowWillResignMain:"mac:WindowWillResignMain",WindowWillResize:"mac:WindowWillResize",WindowWillUnfocus:"mac:WindowWillUnfocus",WindowWillUpdate:"mac:WindowWillUpdate",WindowWillUpdateAlpha:"mac:WindowWillUpdateAlpha",WindowWillUpdateCollectionBehavior:"mac:WindowWillUpdateCollectionBehavior",WindowWillUpdateCollectionProperties:"mac:WindowWillUpdateCollectionProperties",WindowWillUpdateShadow:"mac:WindowWillUpdateShadow",WindowWillUpdateTitle:"mac:WindowWillUpdateTitle",WindowWillUpdateToolbar:"mac:WindowWillUpdateToolbar",WindowWillUpdateVisibility:"mac:WindowWillUpdateVisibility",WindowWillUseStandardFrame:"mac:WindowWillUseStandardFrame",MenuWillOpen:"mac:MenuWillOpen",MenuDidOpen:"mac:MenuDidOpen",MenuDidClose:"mac:MenuDidClose",MenuWillSendAction:"mac:MenuWillSendAction",MenuDidSendAction:"mac:MenuDidSendAction",MenuWillHighlightItem:"mac:MenuWillHighlightItem",MenuDidHighlightItem:"mac:MenuDidHighlightItem",MenuWillDisplayItem:"mac:MenuWillDisplayItem",MenuDidDisplayItem:"mac:MenuDidDisplayItem",MenuWillAddItem:"mac:MenuWillAddItem",MenuDidAddItem:"mac:MenuDidAddItem",MenuWillRemoveItem:"mac:MenuWillRemoveItem",MenuDidRemoveItem:"mac:MenuDidRemoveItem",MenuWillBeginTracking:"mac:MenuWillBeginTracking",MenuDidBeginTracking:"mac:MenuDidBeginTracking",MenuWillEndTracking:"mac:MenuWillEndTracking",MenuDidEndTracking:"mac:MenuDidEndTracking",MenuWillUpdate:"mac:MenuWillUpdate",MenuDidUpdate:"mac:MenuDidUpdate",MenuWillPopUp:"mac:MenuWillPopUp",MenuDidPopUp:"mac:MenuDidPopUp",MenuWillSendActionToItem:"mac:MenuWillSendActionToItem",MenuDidSendActionToItem:"mac:MenuDidSendActionToItem",WebViewDidStartProvisionalNavigation:"mac:WebViewDidStartProvisionalNavigation",WebViewDidReceiveServerRedirectForProvisionalNavigation:"mac:WebViewDidReceiveServerRedirectForProvisionalNavigation",WebViewDidFinishNavigation:"mac:WebViewDidFinishNavigation",WebViewDidCommitNavigation:"mac:WebViewDidCommitNavigation",WindowFileDraggingEntered:"mac:WindowFileDraggingEntered",WindowFileDraggingPerformed:"mac:WindowFileDraggingPerformed",WindowFileDraggingExited:"mac:WindowFileDraggingExited"},Linux:{SystemThemeChanged:"linux:SystemThemeChanged"},Common:{ApplicationStarted:"common:ApplicationStarted",WindowMaximise:"common:WindowMaximise",WindowUnMaximise:"common:WindowUnMaximise",WindowFullscreen:"common:WindowFullscreen",WindowUnFullscreen:"common:WindowUnFullscreen",WindowRestore:"common:WindowRestore",WindowMinimise:"common:WindowMinimise",WindowUnMinimise:"common:WindowUnMinimise",WindowClosing:"common:WindowClosing",WindowZoom:"common:WindowZoom",WindowZoomIn:"common:WindowZoomIn",WindowZoomOut:"common:WindowZoomOut",WindowZoomReset:"common:WindowZoomReset",WindowFocus:"common:WindowFocus",WindowLostFocus:"common:WindowLostFocus",WindowShow:"common:WindowShow",WindowHide:"common:WindowHide",WindowDPIChanged:"common:WindowDPIChanged",WindowFilesDropped:"common:WindowFilesDropped",WindowRuntimeReady:"common:WindowRuntimeReady",ThemeChanged:"common:ThemeChanged"}};var ln=ne;window._wails=window._wails||{};window._wails.dispatchWailsEvent=wn;var dn=d(l.Events,""),cn=0,u=new Map,V=class{constructor(i,n,o){this.eventName=i,this.maxCallbacks=o||-1,this.Callback=t=>(n(t),this.maxCallbacks===-1?!1:(this.maxCallbacks-=1,this.maxCallbacks===0))}},x=class{constructor(i,n=null){this.name=i,this.data=n}};function sn(){}function wn(e){let i=u.get(e.name);if(i){let n=i.filter(o=>{if(o.Callback(e))return!0});n.length>0&&(i=i.filter(o=>!n.includes(o)),i.length===0?u.delete(e.name):u.set(e.name,i))}}function _(e,i,n){let o=u.get(e)||[],t=new V(e,i,n);return o.push(t),u.set(e,o),()=>pn(t)}function mn(e,i){return _(e,i,-1)}function un(e,i){return _(e,i,1)}function pn(e){let i=e.eventName,n=u.get(i).filter(o=>o!==e);n.length===0?u.delete(i):u.set(i,n)}function Wn(e,...i){[e,...i].forEach(o=>u.delete(o))}function gn(){u.clear()}function Z(e){return dn(cn,e)}var G={};w(G,{Error:()=>Un,Info:()=>Rn,OpenFile:()=>yn,Question:()=>A,SaveFile:()=>On,Warning:()=>En});window._wails=window._wails||{};window._wails.dialogErrorCallback=bn;window._wails.dialogResultCallback=vn;var fn=0,hn=1,Dn=2,Cn=3,Sn=4,Mn=5,xn=d(l.Dialog,""),g=new Map;function An(){let e;do e=f();while(g.has(e));return e}function D(e,i={}){let n=An();return i["dialog-id"]=n,new Promise((o,t)=>{g.set(n,{resolve:o,reject:t}),xn(e,i).catch(a=>{t(a),g.delete(n)})})}function vn(e,i,n){let o=g.get(e);o&&(n?o.resolve(JSON.parse(i)):o.resolve(i),g.delete(e))}function bn(e,i){let n=g.get(e);n&&(n.reject(i),g.delete(e))}var Rn=e=>D(fn,e),En=e=>D(hn,e),Un=e=>D(Dn,e),A=e=>D(Cn,e),yn=e=>D(Sn,e),On=e=>D(Mn,e);function oe(e,i=null){let n=new x(e,i);Z(n)}function Pn(){document.querySelectorAll("[wml-event]").forEach(function(i){let n=i.getAttribute("wml-event"),o=i.getAttribute("wml-confirm"),t=i.getAttribute("wml-trigger")||"click",a=function(){if(o){A({Title:"Confirm",Message:o,Detached:!1,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(s){s!=="No"&&oe(n)});return}oe(n)};i.removeEventListener(t,a),i.addEventListener(t,a)})}function te(e,i){let n=U(e),o=In(n);o.has(i);try{o.get(i)()}catch{}}function Tn(){document.querySelectorAll("[wml-window]").forEach(function(i){let n=i.getAttribute("wml-window"),o=i.getAttribute("wml-confirm"),t=i.getAttribute("wml-trigger")||"click",a=i.getAttribute("wml-target-window")||"",s=function(){if(o){A({Title:"Confirm",Message:o,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(m){m!=="No"&&te(a,n)});return}te(a,n)};i.removeEventListener(t,s),i.addEventListener(t,s)})}function Bn(){document.querySelectorAll("[wml-openurl]").forEach(function(i){let n=i.getAttribute("wml-openurl"),o=i.getAttribute("wml-confirm"),t=i.getAttribute("wml-trigger")||"click",a=function(){if(o){A({Title:"Confirm",Message:o,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(s){s!=="No"&&b(n)});return}b(n)};i.removeEventListener(t,a),i.addEventListener(t,a)})}function Y(){Pn(),Tn(),Bn()}function In(e){let i=new Map;for(let n in e)typeof e[n]=="function"&&i.set(n,e[n]);return i}var X={};w(X,{ByID:()=>_n,ByName:()=>Vn,Call:()=>Hn,Plugin:()=>Zn});window._wails=window._wails||{};window._wails.callResultHandler=kn;window._wails.callErrorHandler=Nn;var y=0,Fn=d(l.Call,""),Ln=d(l.CancelCall,""),v=new Map;function zn(){let e;do e=f();while(v.has(e));return e}function kn(e,i,n){let o=re(e);o&&o.resolve(n?JSON.parse(i):i)}function Nn(e,i){let n=re(e);n&&n.reject(i)}function re(e){let i=v.get(e);return v.delete(e),i}function O(e,i={}){let n=zn(),o=()=>{Ln(e,{"call-id":n})};var t=!1,a=!1,s=new Promise((m,c)=>{i["call-id"]=n,v.set(n,{resolve:m,reject:c}),Fn(e,i).then(p=>{a=!0,t&&o()}).catch(p=>{c(p),v.delete(n)})});return s.cancel=()=>{a?o():t=!0},s}function Hn(e){return O(y,e)}function Vn(e,...i){if(typeof e!="string"||e.split(".").length!==3)throw new Error("CallByName requires a string in the format 'package.struct.method'");let[n,o,t]=e.split(".");return O(y,{packageName:n,structName:o,methodName:t,args:i})}function _n(e,...i){return O(y,{methodID:e,args:i})}function Zn(e,i,...n){return O(y,{packageName:"wails-plugins",structName:e,methodName:i,args:n})}window._wails=window._wails||{};window._wails.invoke=h;window.wails=window.wails||{};window.wails.Application=T;window.wails.Browser=B;window.wails.Call=X;window.wails.Clipboard=I;window.wails.Dialogs=G;window.wails.Events=j;window.wails.Flags=z;window.wails.Screens=N;window.wails.System=L;window.wails.Window=H;window.wails.WML=K;var ae=!1;document.addEventListener("DOMContentLoaded",function(){ae=!0,window._wails.invoke("wails:runtime:ready")});function jn(e){ae||document.readyState==="complete"?e():document.addEventListener("DOMContentLoaded",e)}jn(()=>{Y()});})(); +(()=>{var de=Object.defineProperty;var w=(e,i)=>{for(var n in i)de(e,n,{get:i[n],enumerable:!0})};var T={};w(T,{Hide:()=>We,Quit:()=>fe,Show:()=>ge});var le="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var f=(e=21)=>{let i="",n=e;for(;n--;)i+=le[Math.random()*64|0];return i};var ce=window.location.origin+"/wails/runtime",d={Call:0,Clipboard:1,Application:2,Events:3,ContextMenu:4,Dialog:5,Window:6,Screens:7,System:8,Browser:9},se=f();function l(e,i){return function(n,o=null){return we(e,n,i,o)}}function we(e,i,n,o){let t=new URL(ce);t.searchParams.append("object",e),t.searchParams.append("method",i);let a={headers:{}};return n&&(a.headers["x-wails-window-name"]=n),o&&t.searchParams.append("args",JSON.stringify(o)),a.headers["x-wails-client-id"]=se,new Promise((s,p)=>{fetch(t,a).then(c=>{if(c.ok)return c.headers.get("Content-Type")&&c.headers.get("Content-Type").indexOf("application/json")!==-1?c.json():c.text();p(Error(c.statusText))}).then(c=>s(c)).catch(c=>p(c))})}var P=l(d.Application,""),me=0,ue=1,pe=2;function We(){return P(me)}function ge(){return P(ue)}function fe(){return P(pe)}var B={};w(B,{OpenURL:()=>b});var he=l(d.Browser,""),De=0;function b(e){return he(De,{url:e})}var I={};w(I,{SetText:()=>xe,Text:()=>Me});var q=l(d.Clipboard,""),Ce=0,Se=1;function xe(e){return q(Ce,{text:e})}function Me(){return q(Se)}var L={};w(L,{Capabilities:()=>Re,Environment:()=>Ee,IsAMD64:()=>Oe,IsARM:()=>Pe,IsARM64:()=>Te,IsDarkMode:()=>be,IsDebug:()=>F,IsLinux:()=>Ue,IsMac:()=>ye,IsWindows:()=>R,invoke:()=>h});var J=l(d.System,""),Ae=0,ve=1;function h(e){return window.chrome?window.chrome.webview.postMessage(e):window.webkit.messageHandlers.external.postMessage(e)}function be(){return J(Ae)}function Re(){return fetch("/wails/capabilities").json()}function Ee(){return J(ve)}function R(){return window._wails.environment.OS==="windows"}function Ue(){return window._wails.environment.OS==="linux"}function ye(){return window._wails.environment.OS==="darwin"}function Oe(){return window._wails.environment.Arch==="amd64"}function Pe(){return window._wails.environment.Arch==="arm"}function Te(){return window._wails.environment.Arch==="arm64"}function F(){return window._wails.environment.Debug===!0}window.addEventListener("contextmenu",Le);var Be=l(d.ContextMenu,""),Ie=0;function Fe(e,i,n,o){Be(Ie,{id:e,x:i,y:n,data:o})}function Le(e){let i=e.target,n=window.getComputedStyle(i).getPropertyValue("--custom-contextmenu");if(n=n?n.trim():"",n){e.preventDefault();let o=window.getComputedStyle(i).getPropertyValue("--custom-contextmenu-data");Fe(n,e.clientX,e.clientY,o);return}ze(e)}function ze(e){if(F())return;let i=e.target;switch(window.getComputedStyle(i).getPropertyValue("--default-contextmenu").trim()){case"show":return;case"hide":e.preventDefault();return;default:if(i.isContentEditable)return;let t=window.getSelection(),a=t.toString().length>0;if(a)for(let s=0;sS});function S(e){try{return window._wails.flags[e]}catch(i){throw new Error("Unable to retrieve flag '"+e+"': "+i)}}window._wails=window._wails||{};window._wails.setResizable=He;window._wails.endDrag=ee;window.addEventListener("mousedown",_e);window.addEventListener("mousemove",Ge);window.addEventListener("mouseup",je);var x=!1,E=null,$=!1,ke="auto";function Ne(e){let i=window.getComputedStyle(e.target).getPropertyValue("--webkit-app-region");return!i||i===""||i.trim()!=="drag"||e.buttons!==1?!1:e.detail===1}function He(e){$=e}function ee(){document.body.style.cursor="default",x=!1}function Ve(){return E?(h(`resize:${E}`),!0):!1}function _e(e){(R()&&Ve()||Ne(e))&&(x=!!Ze(e))}function Ze(e){return!(e.offsetX>e.target.clientWidth||e.offsetY>e.target.clientHeight)}function je(e){(e.buttons!==void 0?e.buttons:e.which)>0&&ee()}function u(e=ke){document.documentElement.style.cursor=e,E=e}function Ge(e){x=Ye(e),R()&&$&&Ke(e)}function Ye(e){let i=e.buttons!==void 0?e.buttons:e.which;return x&&i>0?(h("drag"),!1):x}function Ke(e){let i=S("system.resizeHandleHeight")||5,n=S("system.resizeHandleWidth")||5,o=S("resizeCornerExtra")||10,t=window.outerWidth-e.clientXJe,GetCurrent:()=>ei,GetPrimary:()=>$e});var k=l(d.Screens,""),Xe=0,Qe=1,qe=2;function Je(){return k(Xe)}function $e(){return k(Qe)}function ei(){return k(qe)}var H={};w(H,{Center:()=>Oi,Close:()=>Qi,Fullscreen:()=>Ti,Get:()=>U,GetZoomLevel:()=>rn,Height:()=>en,Hide:()=>Vi,Maximise:()=>_i,Minimise:()=>Gi,RelativePosition:()=>Ni,Restore:()=>Ki,Screen:()=>Hi,SetAlwaysOnTop:()=>zi,SetBackgroundColour:()=>qi,SetMaxSize:()=>Fi,SetMinSize:()=>Li,SetRelativePosition:()=>ki,SetResizable:()=>Ji,SetSize:()=>Bi,SetTitle:()=>Pi,SetZoomLevel:()=>an,Show:()=>Xi,Size:()=>Ii,ToggleMaximise:()=>ji,UnMaximise:()=>Zi,UnMinimise:()=>Yi,Width:()=>$i,ZoomIn:()=>nn,ZoomOut:()=>on,ZoomReset:()=>tn});var ii=0,ni=1,oi=2,ti=3,ri=4,ai=5,di=6,li=7,ci=8,si=9,wi=10,mi=11,ui=12,pi=13,Wi=14,gi=15,fi=16,hi=17,Di=18,Ci=19,Si=20,xi=21,Mi=22,Ai=23,vi=24,bi=25,Ri=26,Ei=27,Ui=28,yi=29,r=U("");function ie(e){return{Get:i=>ie(l(d.Window,i)),Center:()=>e(ii),SetTitle:i=>e(ni,{title:i}),Fullscreen:()=>e(oi),UnFullscreen:()=>e(ti),SetSize:(i,n)=>e(ri,{width:i,height:n}),Size:()=>e(ai),SetMaxSize:(i,n)=>e(di,{width:i,height:n}),SetMinSize:(i,n)=>e(li,{width:i,height:n}),SetAlwaysOnTop:i=>e(ci,{alwaysOnTop:i}),SetRelativePosition:(i,n)=>e(si,{x:i,y:n}),RelativePosition:()=>e(wi),Screen:()=>e(mi),Hide:()=>e(ui),Maximise:()=>e(pi),UnMaximise:()=>e(Wi),ToggleMaximise:()=>e(gi),Minimise:()=>e(fi),UnMinimise:()=>e(hi),Restore:()=>e(Di),Show:()=>e(Ci),Close:()=>e(Si),SetBackgroundColour:(i,n,o,t)=>e(xi,{r:i,g:n,b:o,a:t}),SetResizable:i=>e(Mi,{resizable:i}),Width:()=>e(Ai),Height:()=>e(vi),ZoomIn:()=>e(bi),ZoomOut:()=>e(Ri),ZoomReset:()=>e(Ei),GetZoomLevel:()=>e(Ui),SetZoomLevel:i=>e(yi,{zoomLevel:i})}}function U(e){return ie(l(d.Window,e))}function Oi(){r.Center()}function Pi(e){r.SetTitle(e)}function Ti(){r.Fullscreen()}function Bi(e,i){r.SetSize(e,i)}function Ii(){return r.Size()}function Fi(e,i){r.SetMaxSize(e,i)}function Li(e,i){r.SetMinSize(e,i)}function zi(e){r.SetAlwaysOnTop(e)}function ki(e,i){r.SetRelativePosition(e,i)}function Ni(){return r.RelativePosition()}function Hi(){return r.Screen()}function Vi(){r.Hide()}function _i(){r.Maximise()}function Zi(){r.UnMaximise()}function ji(){r.ToggleMaximise()}function Gi(){r.Minimise()}function Yi(){r.UnMinimise()}function Ki(){r.Restore()}function Xi(){r.Show()}function Qi(){r.Close()}function qi(e,i,n,o){r.SetBackgroundColour(e,i,n,o)}function Ji(e){r.SetResizable(e)}function $i(){return r.Width()}function en(){return r.Height()}function nn(){r.ZoomIn()}function on(){r.ZoomOut()}function tn(){r.ZoomReset()}function rn(){return r.GetZoomLevel()}function an(e){r.SetZoomLevel(e)}var K={};w(K,{Reload:()=>Y});var j={};w(j,{Emit:()=>Z,Off:()=>Wn,OffAll:()=>gn,On:()=>mn,OnMultiple:()=>_,Once:()=>un,Types:()=>dn,WailsEvent:()=>M,setup:()=>sn});var ne={Windows:{SystemThemeChanged:"windows:SystemThemeChanged",APMPowerStatusChange:"windows:APMPowerStatusChange",APMSuspend:"windows:APMSuspend",APMResumeAutomatic:"windows:APMResumeAutomatic",APMResumeSuspend:"windows:APMResumeSuspend",APMPowerSettingChange:"windows:APMPowerSettingChange",ApplicationStarted:"windows:ApplicationStarted",WebViewNavigationCompleted:"windows:WebViewNavigationCompleted",WindowInactive:"windows:WindowInactive",WindowActive:"windows:WindowActive",WindowClickActive:"windows:WindowClickActive",WindowMaximise:"windows:WindowMaximise",WindowUnMaximise:"windows:WindowUnMaximise",WindowFullscreen:"windows:WindowFullscreen",WindowUnFullscreen:"windows:WindowUnFullscreen",WindowRestore:"windows:WindowRestore",WindowMinimise:"windows:WindowMinimise",WindowUnMinimise:"windows:WindowUnMinimise",WindowClose:"windows:WindowClose",WindowSetFocus:"windows:WindowSetFocus",WindowKillFocus:"windows:WindowKillFocus",WindowDragDrop:"windows:WindowDragDrop",WindowDragEnter:"windows:WindowDragEnter",WindowDragLeave:"windows:WindowDragLeave",WindowDragOver:"windows:WindowDragOver"},Mac:{ApplicationDidBecomeActive:"mac:ApplicationDidBecomeActive",ApplicationDidChangeBackingProperties:"mac:ApplicationDidChangeBackingProperties",ApplicationDidChangeEffectiveAppearance:"mac:ApplicationDidChangeEffectiveAppearance",ApplicationDidChangeIcon:"mac:ApplicationDidChangeIcon",ApplicationDidChangeOcclusionState:"mac:ApplicationDidChangeOcclusionState",ApplicationDidChangeScreenParameters:"mac:ApplicationDidChangeScreenParameters",ApplicationDidChangeStatusBarFrame:"mac:ApplicationDidChangeStatusBarFrame",ApplicationDidChangeStatusBarOrientation:"mac:ApplicationDidChangeStatusBarOrientation",ApplicationDidFinishLaunching:"mac:ApplicationDidFinishLaunching",ApplicationDidHide:"mac:ApplicationDidHide",ApplicationDidResignActiveNotification:"mac:ApplicationDidResignActiveNotification",ApplicationDidUnhide:"mac:ApplicationDidUnhide",ApplicationDidUpdate:"mac:ApplicationDidUpdate",ApplicationWillBecomeActive:"mac:ApplicationWillBecomeActive",ApplicationWillFinishLaunching:"mac:ApplicationWillFinishLaunching",ApplicationWillHide:"mac:ApplicationWillHide",ApplicationWillResignActive:"mac:ApplicationWillResignActive",ApplicationWillTerminate:"mac:ApplicationWillTerminate",ApplicationWillUnhide:"mac:ApplicationWillUnhide",ApplicationWillUpdate:"mac:ApplicationWillUpdate",ApplicationDidChangeTheme:"mac:ApplicationDidChangeTheme!",ApplicationShouldHandleReopen:"mac:ApplicationShouldHandleReopen!",WindowDidBecomeKey:"mac:WindowDidBecomeKey",WindowDidBecomeMain:"mac:WindowDidBecomeMain",WindowDidBeginSheet:"mac:WindowDidBeginSheet",WindowDidChangeAlpha:"mac:WindowDidChangeAlpha",WindowDidChangeBackingLocation:"mac:WindowDidChangeBackingLocation",WindowDidChangeBackingProperties:"mac:WindowDidChangeBackingProperties",WindowDidChangeCollectionBehavior:"mac:WindowDidChangeCollectionBehavior",WindowDidChangeEffectiveAppearance:"mac:WindowDidChangeEffectiveAppearance",WindowDidChangeOcclusionState:"mac:WindowDidChangeOcclusionState",WindowDidChangeOrderingMode:"mac:WindowDidChangeOrderingMode",WindowDidChangeScreen:"mac:WindowDidChangeScreen",WindowDidChangeScreenParameters:"mac:WindowDidChangeScreenParameters",WindowDidChangeScreenProfile:"mac:WindowDidChangeScreenProfile",WindowDidChangeScreenSpace:"mac:WindowDidChangeScreenSpace",WindowDidChangeScreenSpaceProperties:"mac:WindowDidChangeScreenSpaceProperties",WindowDidChangeSharingType:"mac:WindowDidChangeSharingType",WindowDidChangeSpace:"mac:WindowDidChangeSpace",WindowDidChangeSpaceOrderingMode:"mac:WindowDidChangeSpaceOrderingMode",WindowDidChangeTitle:"mac:WindowDidChangeTitle",WindowDidChangeToolbar:"mac:WindowDidChangeToolbar",WindowDidChangeVisibility:"mac:WindowDidChangeVisibility",WindowDidDeminiaturize:"mac:WindowDidDeminiaturize",WindowDidEndSheet:"mac:WindowDidEndSheet",WindowDidEnterFullScreen:"mac:WindowDidEnterFullScreen",WindowDidEnterVersionBrowser:"mac:WindowDidEnterVersionBrowser",WindowDidExitFullScreen:"mac:WindowDidExitFullScreen",WindowDidExitVersionBrowser:"mac:WindowDidExitVersionBrowser",WindowDidExpose:"mac:WindowDidExpose",WindowDidFocus:"mac:WindowDidFocus",WindowDidMiniaturize:"mac:WindowDidMiniaturize",WindowDidMove:"mac:WindowDidMove",WindowDidOrderOffScreen:"mac:WindowDidOrderOffScreen",WindowDidOrderOnScreen:"mac:WindowDidOrderOnScreen",WindowDidResignKey:"mac:WindowDidResignKey",WindowDidResignMain:"mac:WindowDidResignMain",WindowDidResize:"mac:WindowDidResize",WindowDidUpdate:"mac:WindowDidUpdate",WindowDidUpdateAlpha:"mac:WindowDidUpdateAlpha",WindowDidUpdateCollectionBehavior:"mac:WindowDidUpdateCollectionBehavior",WindowDidUpdateCollectionProperties:"mac:WindowDidUpdateCollectionProperties",WindowDidUpdateShadow:"mac:WindowDidUpdateShadow",WindowDidUpdateTitle:"mac:WindowDidUpdateTitle",WindowDidUpdateToolbar:"mac:WindowDidUpdateToolbar",WindowDidUpdateVisibility:"mac:WindowDidUpdateVisibility",WindowShouldClose:"mac:WindowShouldClose!",WindowWillBecomeKey:"mac:WindowWillBecomeKey",WindowWillBecomeMain:"mac:WindowWillBecomeMain",WindowWillBeginSheet:"mac:WindowWillBeginSheet",WindowWillChangeOrderingMode:"mac:WindowWillChangeOrderingMode",WindowWillClose:"mac:WindowWillClose",WindowWillDeminiaturize:"mac:WindowWillDeminiaturize",WindowWillEnterFullScreen:"mac:WindowWillEnterFullScreen",WindowWillEnterVersionBrowser:"mac:WindowWillEnterVersionBrowser",WindowWillExitFullScreen:"mac:WindowWillExitFullScreen",WindowWillExitVersionBrowser:"mac:WindowWillExitVersionBrowser",WindowWillFocus:"mac:WindowWillFocus",WindowWillMiniaturize:"mac:WindowWillMiniaturize",WindowWillMove:"mac:WindowWillMove",WindowWillOrderOffScreen:"mac:WindowWillOrderOffScreen",WindowWillOrderOnScreen:"mac:WindowWillOrderOnScreen",WindowWillResignMain:"mac:WindowWillResignMain",WindowWillResize:"mac:WindowWillResize",WindowWillUnfocus:"mac:WindowWillUnfocus",WindowWillUpdate:"mac:WindowWillUpdate",WindowWillUpdateAlpha:"mac:WindowWillUpdateAlpha",WindowWillUpdateCollectionBehavior:"mac:WindowWillUpdateCollectionBehavior",WindowWillUpdateCollectionProperties:"mac:WindowWillUpdateCollectionProperties",WindowWillUpdateShadow:"mac:WindowWillUpdateShadow",WindowWillUpdateTitle:"mac:WindowWillUpdateTitle",WindowWillUpdateToolbar:"mac:WindowWillUpdateToolbar",WindowWillUpdateVisibility:"mac:WindowWillUpdateVisibility",WindowWillUseStandardFrame:"mac:WindowWillUseStandardFrame",MenuWillOpen:"mac:MenuWillOpen",MenuDidOpen:"mac:MenuDidOpen",MenuDidClose:"mac:MenuDidClose",MenuWillSendAction:"mac:MenuWillSendAction",MenuDidSendAction:"mac:MenuDidSendAction",MenuWillHighlightItem:"mac:MenuWillHighlightItem",MenuDidHighlightItem:"mac:MenuDidHighlightItem",MenuWillDisplayItem:"mac:MenuWillDisplayItem",MenuDidDisplayItem:"mac:MenuDidDisplayItem",MenuWillAddItem:"mac:MenuWillAddItem",MenuDidAddItem:"mac:MenuDidAddItem",MenuWillRemoveItem:"mac:MenuWillRemoveItem",MenuDidRemoveItem:"mac:MenuDidRemoveItem",MenuWillBeginTracking:"mac:MenuWillBeginTracking",MenuDidBeginTracking:"mac:MenuDidBeginTracking",MenuWillEndTracking:"mac:MenuWillEndTracking",MenuDidEndTracking:"mac:MenuDidEndTracking",MenuWillUpdate:"mac:MenuWillUpdate",MenuDidUpdate:"mac:MenuDidUpdate",MenuWillPopUp:"mac:MenuWillPopUp",MenuDidPopUp:"mac:MenuDidPopUp",MenuWillSendActionToItem:"mac:MenuWillSendActionToItem",MenuDidSendActionToItem:"mac:MenuDidSendActionToItem",WebViewDidStartProvisionalNavigation:"mac:WebViewDidStartProvisionalNavigation",WebViewDidReceiveServerRedirectForProvisionalNavigation:"mac:WebViewDidReceiveServerRedirectForProvisionalNavigation",WebViewDidFinishNavigation:"mac:WebViewDidFinishNavigation",WebViewDidCommitNavigation:"mac:WebViewDidCommitNavigation",WindowFileDraggingEntered:"mac:WindowFileDraggingEntered",WindowFileDraggingPerformed:"mac:WindowFileDraggingPerformed",WindowFileDraggingExited:"mac:WindowFileDraggingExited"},Linux:{SystemThemeChanged:"linux:SystemThemeChanged",WindowLoadChanged:"linux:WindowLoadChanged",WindowDeleteEvent:"linux:WindowDeleteEvent",WindowFocusIn:"linux:WindowFocusIn",WindowFocusOut:"linux:WindowFocusOut",ApplicationStartup:"linux:ApplicationStartup"},Common:{ApplicationStarted:"common:ApplicationStarted",WindowMaximise:"common:WindowMaximise",WindowUnMaximise:"common:WindowUnMaximise",WindowFullscreen:"common:WindowFullscreen",WindowUnFullscreen:"common:WindowUnFullscreen",WindowRestore:"common:WindowRestore",WindowMinimise:"common:WindowMinimise",WindowUnMinimise:"common:WindowUnMinimise",WindowClosing:"common:WindowClosing",WindowZoom:"common:WindowZoom",WindowZoomIn:"common:WindowZoomIn",WindowZoomOut:"common:WindowZoomOut",WindowZoomReset:"common:WindowZoomReset",WindowFocus:"common:WindowFocus",WindowLostFocus:"common:WindowLostFocus",WindowShow:"common:WindowShow",WindowHide:"common:WindowHide",WindowDPIChanged:"common:WindowDPIChanged",WindowFilesDropped:"common:WindowFilesDropped",WindowRuntimeReady:"common:WindowRuntimeReady",ThemeChanged:"common:ThemeChanged"}};var dn=ne;window._wails=window._wails||{};window._wails.dispatchWailsEvent=wn;var ln=l(d.Events,""),cn=0,m=new Map,V=class{constructor(i,n,o){this.eventName=i,this.maxCallbacks=o||-1,this.Callback=t=>(n(t),this.maxCallbacks===-1?!1:(this.maxCallbacks-=1,this.maxCallbacks===0))}},M=class{constructor(i,n=null){this.name=i,this.data=n}};function sn(){}function wn(e){let i=m.get(e.name);if(i){let n=i.filter(o=>{if(o.Callback(e))return!0});n.length>0&&(i=i.filter(o=>!n.includes(o)),i.length===0?m.delete(e.name):m.set(e.name,i))}}function _(e,i,n){let o=m.get(e)||[],t=new V(e,i,n);return o.push(t),m.set(e,o),()=>pn(t)}function mn(e,i){return _(e,i,-1)}function un(e,i){return _(e,i,1)}function pn(e){let i=e.eventName,n=m.get(i).filter(o=>o!==e);n.length===0?m.delete(i):m.set(i,n)}function Wn(e,...i){[e,...i].forEach(o=>m.delete(o))}function gn(){m.clear()}function Z(e){return ln(cn,e)}var G={};w(G,{Error:()=>Un,Info:()=>Rn,OpenFile:()=>yn,Question:()=>A,SaveFile:()=>On,Warning:()=>En});window._wails=window._wails||{};window._wails.dialogErrorCallback=bn;window._wails.dialogResultCallback=vn;var fn=0,hn=1,Dn=2,Cn=3,Sn=4,xn=5,Mn=l(d.Dialog,""),W=new Map;function An(){let e;do e=f();while(W.has(e));return e}function D(e,i={}){let n=An();return i["dialog-id"]=n,new Promise((o,t)=>{W.set(n,{resolve:o,reject:t}),Mn(e,i).catch(a=>{t(a),W.delete(n)})})}function vn(e,i,n){let o=W.get(e);o&&(n?o.resolve(JSON.parse(i)):o.resolve(i),W.delete(e))}function bn(e,i){let n=W.get(e);n&&(n.reject(i),W.delete(e))}var Rn=e=>D(fn,e),En=e=>D(hn,e),Un=e=>D(Dn,e),A=e=>D(Cn,e),yn=e=>D(Sn,e),On=e=>D(xn,e);function oe(e,i=null){let n=new M(e,i);Z(n)}function Pn(){document.querySelectorAll("[wml-event]").forEach(function(i){let n=i.getAttribute("wml-event"),o=i.getAttribute("wml-confirm"),t=i.getAttribute("wml-trigger")||"click",a=function(){if(o){A({Title:"Confirm",Message:o,Detached:!1,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(s){s!=="No"&&oe(n)});return}oe(n)};i.removeEventListener(t,a),i.addEventListener(t,a)})}function te(e,i){let n=U(e),o=In(n);o.has(i);try{o.get(i)()}catch{}}function Tn(){document.querySelectorAll("[wml-window]").forEach(function(i){let n=i.getAttribute("wml-window"),o=i.getAttribute("wml-confirm"),t=i.getAttribute("wml-trigger")||"click",a=i.getAttribute("wml-target-window")||"",s=function(){if(o){A({Title:"Confirm",Message:o,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(p){p!=="No"&&te(a,n)});return}te(a,n)};i.removeEventListener(t,s),i.addEventListener(t,s)})}function Bn(){document.querySelectorAll("[wml-openurl]").forEach(function(i){let n=i.getAttribute("wml-openurl"),o=i.getAttribute("wml-confirm"),t=i.getAttribute("wml-trigger")||"click",a=function(){if(o){A({Title:"Confirm",Message:o,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(s){s!=="No"&&b(n)});return}b(n)};i.removeEventListener(t,a),i.addEventListener(t,a)})}function Y(){Pn(),Tn(),Bn()}function In(e){let i=new Map;for(let n in e)typeof e[n]=="function"&&i.set(n,e[n]);return i}var X={};w(X,{ByID:()=>Vn,ByName:()=>Hn,Call:()=>Nn,Plugin:()=>_n});window._wails=window._wails||{};window._wails.callResultHandler=zn;window._wails.callErrorHandler=kn;var y=0,Fn=l(d.Call,""),v=new Map;function Ln(){let e;do e=f();while(v.has(e));return e}function zn(e,i,n){let o=re(e);o&&o.resolve(n?JSON.parse(i):i)}function kn(e,i){let n=re(e);n&&n.reject(i)}function re(e){let i=v.get(e);return v.delete(e),i}function O(e,i={}){return new Promise((n,o)=>{let t=Ln();i["call-id"]=t,v.set(t,{resolve:n,reject:o}),Fn(e,i).catch(a=>{o(a),v.delete(t)})})}function Nn(e){return O(y,e)}function Hn(e,...i){if(typeof e!="string"||e.split(".").length!==3)throw new Error("CallByName requires a string in the format 'package.struct.method'");let[n,o,t]=e.split(".");return O(y,{packageName:n,structName:o,methodName:t,args:i})}function Vn(e,...i){return O(y,{methodID:e,args:i})}function _n(e,i,...n){return O(y,{packageName:"wails-plugins",structName:e,methodName:i,args:n})}window._wails=window._wails||{};window._wails.invoke=h;window.wails=window.wails||{};window.wails.Application=T;window.wails.Browser=B;window.wails.Call=X;window.wails.Clipboard=I;window.wails.Dialogs=G;window.wails.Events=j;window.wails.Flags=z;window.wails.Screens=N;window.wails.System=L;window.wails.Window=H;window.wails.WML=K;var ae=!1;document.addEventListener("DOMContentLoaded",function(){ae=!0,window._wails.invoke("wails:runtime:ready")});function Zn(e){ae||document.readyState==="complete"?e():document.addEventListener("DOMContentLoaded",e)}Zn(()=>{Y()});})(); diff --git a/v3/internal/operatingsystem/webkit_linux.go b/v3/internal/operatingsystem/webkit_linux.go index 70085d8fa1b..a13f6eebfdf 100644 --- a/v3/internal/operatingsystem/webkit_linux.go +++ b/v3/internal/operatingsystem/webkit_linux.go @@ -1,7 +1,7 @@ package operatingsystem /* -#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0 javascriptcoregtk-4.1 +#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0 #include */ import "C" diff --git a/v3/internal/runtime/Taskfile.yaml b/v3/internal/runtime/Taskfile.yaml index 875375d1cd4..794769b2856 100644 --- a/v3/internal/runtime/Taskfile.yaml +++ b/v3/internal/runtime/Taskfile.yaml @@ -38,8 +38,10 @@ tasks: - cmd: wails3 tool cp ../commands/build_assets/runtime/runtime.js ../../examples/binding/assets/runtime.js - cmd: wails3 tool cp ../commands/build_assets/runtime/runtime.js ../../examples/frameless/assets/runtime.js - cmd: wails3 tool cp ../commands/build_assets/runtime/runtime.js ../../examples/window-api/assets/runtime.js + - cmd: wails3 tool cp ../commands/build_assets/runtime/runtime.js ../../examples/contextmenus/assets/runtime.js - cmd: wails3 tool cp ../commands/build_assets/runtime/runtime.js ../../examples/wml/assets/runtime.js - cmd: wails3 tool cp ../commands/build_assets/runtime/runtime.js ../../internal/commands/build_assets/runtime/runtime.js + - cmd: wails3 tool cp ../commands/build_assets/runtime/runtime.js ../../examples/screen/assets/runtime.js - cmd: wails3 tool cp ../commands/build_assets/runtime/runtime.js ../../pkg/application/assets/alpha/runtime.js - cmd: echo "Build Complete." diff --git a/v3/internal/runtime/desktop/@wailsio/runtime/src/event_types.js b/v3/internal/runtime/desktop/@wailsio/runtime/src/event_types.js index 76aa8135e74..f39ec6a908d 100644 --- a/v3/internal/runtime/desktop/@wailsio/runtime/src/event_types.js +++ b/v3/internal/runtime/desktop/@wailsio/runtime/src/event_types.js @@ -155,6 +155,11 @@ export const EventTypes = { }, Linux: { SystemThemeChanged: "linux:SystemThemeChanged", + WindowLoadChanged: "linux:WindowLoadChanged", + WindowDeleteEvent: "linux:WindowDeleteEvent", + WindowFocusIn: "linux:WindowFocusIn", + WindowFocusOut: "linux:WindowFocusOut", + ApplicationStartup: "linux:ApplicationStartup", }, Common: { ApplicationStarted: "common:ApplicationStarted", diff --git a/v3/internal/runtime/desktop/@wailsio/runtime/types/event_types.d.ts b/v3/internal/runtime/desktop/@wailsio/runtime/types/event_types.d.ts index 6c04c9e6be3..744bb437b91 100644 --- a/v3/internal/runtime/desktop/@wailsio/runtime/types/event_types.d.ts +++ b/v3/internal/runtime/desktop/@wailsio/runtime/types/event_types.d.ts @@ -155,6 +155,11 @@ export declare const EventTypes: { }, Linux: { SystemThemeChanged: string, + WindowLoadChanged: string, + WindowDeleteEvent: string, + WindowFocusIn: string, + WindowFocusOut: string, + ApplicationStartup: string, }, Common: { ApplicationStarted: string, diff --git a/v3/pkg/application/application_darwin_delegate.m b/v3/pkg/application/application_darwin_delegate.m index aae5b0bd7d4..2b91eb4d2f1 100644 --- a/v3/pkg/application/application_darwin_delegate.m +++ b/v3/pkg/application/application_darwin_delegate.m @@ -4,7 +4,6 @@ extern bool hasListeners(unsigned int); extern bool shouldQuitApplication(); extern void cleanup(); - @implementation AppDelegate - (void)dealloc { diff --git a/v3/pkg/application/application_linux.go b/v3/pkg/application/application_linux.go index f098a1fc4b2..4db23d058c1 100644 --- a/v3/pkg/application/application_linux.go +++ b/v3/pkg/application/application_linux.go @@ -2,6 +2,7 @@ package application +import "C" import ( "fmt" "log" @@ -21,20 +22,19 @@ func init() { } type linuxApp struct { - application pointer - applicationMenu pointer - parent *App + application pointer + parent *App startupActions []func() // Native -> uint - windows map[windowPointer]uint - windowsLock sync.Mutex + windowMap map[windowPointer]uint + windowMapLock sync.Mutex theme string } -func (m *linuxApp) GetFlags(options Options) map[string]any { +func (a *linuxApp) GetFlags(options Options) map[string]any { if options.Flags == nil { options.Flags = make(map[string]any) } @@ -45,32 +45,27 @@ func getNativeApplication() *linuxApp { return globalApplication.impl.(*linuxApp) } -func (m *linuxApp) hide() { - hideAllWindows(m.application) +func (a *linuxApp) hide() { + a.hideAllWindows() } -func (m *linuxApp) show() { - showAllWindows(m.application) +func (a *linuxApp) show() { + a.showAllWindows() } -func (m *linuxApp) on(eventID uint) { - // TODO: What do we need to do here? - log.Println("linuxApp.on()", eventID) +func (a *linuxApp) on(eventID uint) { + // TODO: Test register/unregister events + //C.registerApplicationEvent(l.application, C.uint(eventID)) } -func (m *linuxApp) setIcon(icon []byte) { - +func (a *linuxApp) setIcon(icon []byte) { log.Println("linuxApp.setIcon", "not implemented") } -func (m *linuxApp) name() string { +func (a *linuxApp) name() string { return appName() } -func (m *linuxApp) getCurrentWindowID() uint { - return getCurrentWindowID(m.application, m.windows) -} - type rnr struct { f func() } @@ -79,22 +74,7 @@ func (r rnr) run() { r.f() } -func (m *linuxApp) getApplicationMenu() pointer { - if m.applicationMenu != nilPointer { - return m.applicationMenu - } - - menu := globalApplication.ApplicationMenu - if menu != nil { - InvokeSync(func() { - menu.Update() - }) - m.applicationMenu = (menu.impl).(*linuxMenu).native - } - return m.applicationMenu -} - -func (m *linuxApp) setApplicationMenu(menu *Menu) { +func (a *linuxApp) setApplicationMenu(menu *Menu) { // FIXME: How do we avoid putting a menu? if menu == nil { // Create a default menu @@ -103,46 +83,55 @@ func (m *linuxApp) setApplicationMenu(menu *Menu) { } } -func (m *linuxApp) run() error { +func (a *linuxApp) run() error { - // Add a hook to the ApplicationDidFinishLaunching event - // FIXME: add Wails specific events - i.e. Shouldn't platform specific ones be translated to Wails events? - m.parent.On(events.Mac.ApplicationDidFinishLaunching, func(evt *Event) { - // Do we need to do anything now? - fmt.Println("events.Mac.ApplicationDidFinishLaunching received!") + a.parent.On(events.Linux.ApplicationStartup, func(evt *Event) { + fmt.Println("events.Linux.ApplicationStartup received!") }) - m.monitorThemeChanges() - return appRun(m.application) + a.setupCommonEvents() + a.monitorThemeChanges() + return appRun(a.application) } -func (m *linuxApp) destroy() { +func (a *linuxApp) unregisterWindow(w windowPointer) { + a.windowMapLock.Lock() + delete(a.windowMap, w) + a.windowMapLock.Unlock() + + // If this was the last window... + if len(a.windowMap) == 0 && !a.parent.options.Linux.DisableQuitOnLastWindowClosed { + a.destroy() + } +} + +func (a *linuxApp) destroy() { if !globalApplication.shouldQuit() { return } globalApplication.cleanup() - appDestroy(m.application) + appDestroy(a.application) } -func (m *linuxApp) isOnMainThread() bool { +func (a *linuxApp) isOnMainThread() bool { return isOnMainThread() } // register our window to our parent mapping -func (m *linuxApp) registerWindow(window pointer, id uint) { - m.windowsLock.Lock() - m.windows[windowPointer(window)] = id - m.windowsLock.Unlock() +func (a *linuxApp) registerWindow(window pointer, id uint) { + a.windowMapLock.Lock() + a.windowMap[windowPointer(window)] = id + a.windowMapLock.Unlock() } -func (m *linuxApp) isDarkMode() bool { - return strings.Contains(m.theme, "dark") +func (a *linuxApp) isDarkMode() bool { + return strings.Contains(a.theme, "dark") } -func (m *linuxApp) monitorThemeChanges() { +func (a *linuxApp) monitorThemeChanges() { go func() { conn, err := dbus.ConnectSessionBus() if err != nil { - m.parent.info("[WARNING] Failed to connect to session bus; monitoring for theme changes will not function:", err) + a.parent.info("[WARNING] Failed to connect to session bus; monitoring for theme changes will not function:", err) return } defer conn.Close() @@ -175,10 +164,10 @@ func (m *linuxApp) monitorThemeChanges() { continue } - if theme != m.theme { - m.theme = theme + if theme != a.theme { + a.theme = theme event := newApplicationEvent(events.Common.ThemeChanged) - event.Context().setIsDarkMode(m.isDarkMode()) + event.Context().setIsDarkMode(a.isDarkMode()) applicationEvents <- event } @@ -187,6 +176,7 @@ func (m *linuxApp) monitorThemeChanges() { } func newPlatformApp(parent *App) *linuxApp { + name := strings.ToLower(strings.Replace(parent.options.Name, " ", "", -1)) if name == "" { name = "undefined" @@ -194,7 +184,7 @@ func newPlatformApp(parent *App) *linuxApp { app := &linuxApp{ parent: parent, application: appNew(name), - windows: map[windowPointer]uint{}, + windowMap: map[windowPointer]uint{}, } return app } @@ -213,3 +203,11 @@ func (a *App) logPlatformInfo() { a.info("Platform Info:", platformInfo...) } + +//export processWindowEvent +func processWindowEvent(windowID C.uint, eventID C.uint) { + windowEvents <- &windowEvent{ + WindowID: uint(windowID), + EventID: uint(eventID), + } +} diff --git a/v3/pkg/application/options_application.go b/v3/pkg/application/application_options.go similarity index 62% rename from v3/pkg/application/options_application.go rename to v3/pkg/application/application_options.go index 10bf75188eb..e786c66a541 100644 --- a/v3/pkg/application/options_application.go +++ b/v3/pkg/application/application_options.go @@ -24,6 +24,9 @@ type Options struct { // Windows is the Windows specific configuration for Windows builds Windows WindowsOptions + // Linux is the Linux specific configuration for Linux builds + Linux LinuxOptions + // Bind allows you to bind Go methods to the frontend. Bind []any @@ -111,3 +114,56 @@ func ChainMiddleware(middleware ...Middleware) Middleware { func AssetFileServerFS(assets fs.FS) http.Handler { return assetserver.NewAssetFileServer(assets) } + +/******** Mac Options ********/ + +// ActivationPolicy is the activation policy for the application. +type ActivationPolicy int + +const ( + // ActivationPolicyRegular is used for applications that have a user interface, + ActivationPolicyRegular ActivationPolicy = iota + // ActivationPolicyAccessory is used for applications that do not have a main window, + // such as system tray applications or background applications. + ActivationPolicyAccessory + ActivationPolicyProhibited +) + +// MacOptions contains options for macOS applications. +type MacOptions struct { + // ActivationPolicy is the activation policy for the application. Defaults to + // applicationActivationPolicyRegular. + ActivationPolicy ActivationPolicy + // If set to true, the application will terminate when the last window is closed. + ApplicationShouldTerminateAfterLastWindowClosed bool +} + +/****** Windows Options *******/ + +// WindowsOptions contains options for Windows applications. +type WindowsOptions struct { + + // WndProcInterceptor is a function that will be called for every message sent in the application. + // Use this to hook into the main message loop. This is useful for handling custom window messages. + // If `shouldReturn` is `true` then `returnCode` will be returned by the main message loop. + // If `shouldReturn` is `false` then returnCode will be ignored and the message will be processed by the main message loop. + WndProcInterceptor func(hwnd uintptr, msg uint32, wParam, lParam uintptr) (returnCode uintptr, shouldReturn bool) + + // DisableQuitOnLastWindowClosed disables the auto quit of the application if the last window has been closed. + DisableQuitOnLastWindowClosed bool + + // Path where the WebView2 stores the user data. If empty %APPDATA%\[BinaryName.exe] will be used. + // If the path is not valid, a messagebox will be displayed with the error and the app will exit with error code. + WebviewUserDataPath string + + // Path to the directory with WebView2 executables. If empty WebView2 installed in the system will be used. + WebviewBrowserPath string +} + +/********* Linux Options *********/ + +// LinuxOptions contains options for Linux applications. +type LinuxOptions struct { + // DisableQuitOnLastWindowClosed disables the auto quit of the application if the last window has been closed. + DisableQuitOnLastWindowClosed bool +} diff --git a/v3/pkg/application/assets/alpha/runtime.js b/v3/pkg/application/assets/alpha/runtime.js index 2c7d16ed30b..baaccee0402 100644 --- a/v3/pkg/application/assets/alpha/runtime.js +++ b/v3/pkg/application/assets/alpha/runtime.js @@ -1 +1 @@ -(()=>{var le=Object.defineProperty;var w=(e,i)=>{for(var n in i)le(e,n,{get:i[n],enumerable:!0})};var T={};w(T,{Hide:()=>We,Quit:()=>fe,Show:()=>ge});var de="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var f=(e=21)=>{let i="",n=e;for(;n--;)i+=de[Math.random()*64|0];return i};var ce=window.location.origin+"/wails/runtime",l={Call:0,Clipboard:1,Application:2,Events:3,ContextMenu:4,Dialog:5,Window:6,Screens:7,System:8,Browser:9,CancelCall:10},se=f();function d(e,i){return function(n,o=null){return we(e,n,i,o)}}function we(e,i,n,o){let t=new URL(ce);t.searchParams.append("object",e),t.searchParams.append("method",i);let a={headers:{}};return n&&(a.headers["x-wails-window-name"]=n),o&&t.searchParams.append("args",JSON.stringify(o)),a.headers["x-wails-client-id"]=se,new Promise((s,m)=>{fetch(t,a).then(c=>{if(c.ok)return c.headers.get("Content-Type")&&c.headers.get("Content-Type").indexOf("application/json")!==-1?c.json():c.text();m(Error(c.statusText))}).then(c=>s(c)).catch(c=>m(c))})}var P=d(l.Application,""),me=0,ue=1,pe=2;function We(){return P(me)}function ge(){return P(ue)}function fe(){return P(pe)}var B={};w(B,{OpenURL:()=>b});var he=d(l.Browser,""),De=0;function b(e){return he(De,{url:e})}var I={};w(I,{SetText:()=>Me,Text:()=>xe});var Q=d(l.Clipboard,""),Ce=0,Se=1;function Me(e){return Q(Ce,{text:e})}function xe(){return Q(Se)}var L={};w(L,{Capabilities:()=>Re,Environment:()=>Ee,IsAMD64:()=>Oe,IsARM:()=>Pe,IsARM64:()=>Te,IsDarkMode:()=>be,IsDebug:()=>F,IsLinux:()=>Ue,IsMac:()=>ye,IsWindows:()=>R,invoke:()=>h});var J=d(l.System,""),Ae=0,ve=1;function h(e){return window.chrome?window.chrome.webview.postMessage(e):window.webkit.messageHandlers.external.postMessage(e)}function be(){return J(Ae)}function Re(){return fetch("/wails/capabilities").json()}function Ee(){return J(ve)}function R(){return window._wails.environment.OS==="windows"}function Ue(){return window._wails.environment.OS==="linux"}function ye(){return window._wails.environment.OS==="darwin"}function Oe(){return window._wails.environment.Arch==="amd64"}function Pe(){return window._wails.environment.Arch==="arm"}function Te(){return window._wails.environment.Arch==="arm64"}function F(){return window._wails.environment.Debug===!0}window.addEventListener("contextmenu",Le);var Be=d(l.ContextMenu,""),Ie=0;function Fe(e,i,n,o){Be(Ie,{id:e,x:i,y:n,data:o})}function Le(e){let i=e.target,n=window.getComputedStyle(i).getPropertyValue("--custom-contextmenu");if(n=n?n.trim():"",n){e.preventDefault();let o=window.getComputedStyle(i).getPropertyValue("--custom-contextmenu-data");Fe(n,e.clientX,e.clientY,o);return}ze(e)}function ze(e){if(F())return;let i=e.target;switch(window.getComputedStyle(i).getPropertyValue("--default-contextmenu").trim()){case"show":return;case"hide":e.preventDefault();return;default:if(i.isContentEditable)return;let t=window.getSelection(),a=t.toString().length>0;if(a)for(let s=0;sS});function S(e){try{return window._wails.flags[e]}catch(i){throw new Error("Unable to retrieve flag '"+e+"': "+i)}}window._wails=window._wails||{};window._wails.setResizable=He;window._wails.endDrag=ee;window.addEventListener("mousedown",_e);window.addEventListener("mousemove",Ge);window.addEventListener("mouseup",je);var M=!1,E=null,$=!1,ke="auto";function Ne(e){let i=window.getComputedStyle(e.target).getPropertyValue("--webkit-app-region");return!i||i===""||i.trim()!=="drag"||e.buttons!==1?!1:e.detail===1}function He(e){$=e}function ee(){document.body.style.cursor="default",M=!1}function Ve(){return E?(h(`resize:${E}`),!0):!1}function _e(e){(R()&&Ve()||Ne(e))&&(M=!!Ze(e))}function Ze(e){return!(e.offsetX>e.target.clientWidth||e.offsetY>e.target.clientHeight)}function je(e){(e.buttons!==void 0?e.buttons:e.which)>0&&ee()}function W(e=ke){document.documentElement.style.cursor=e,E=e}function Ge(e){M=Ye(e),R()&&$&&Ke(e)}function Ye(e){let i=e.buttons!==void 0?e.buttons:e.which;return M&&i>0?(h("drag"),!1):M}function Ke(e){let i=S("system.resizeHandleHeight")||5,n=S("system.resizeHandleWidth")||5,o=S("resizeCornerExtra")||10,t=window.outerWidth-e.clientXJe,GetCurrent:()=>ei,GetPrimary:()=>$e});var k=d(l.Screens,""),Xe=0,qe=1,Qe=2;function Je(){return k(Xe)}function $e(){return k(qe)}function ei(){return k(Qe)}var H={};w(H,{Center:()=>Oi,Close:()=>qi,Fullscreen:()=>Ti,Get:()=>U,GetZoomLevel:()=>rn,Height:()=>en,Hide:()=>Vi,Maximise:()=>_i,Minimise:()=>Gi,RelativePosition:()=>Ni,Restore:()=>Ki,Screen:()=>Hi,SetAlwaysOnTop:()=>zi,SetBackgroundColour:()=>Qi,SetMaxSize:()=>Fi,SetMinSize:()=>Li,SetRelativePosition:()=>ki,SetResizable:()=>Ji,SetSize:()=>Bi,SetTitle:()=>Pi,SetZoomLevel:()=>an,Show:()=>Xi,Size:()=>Ii,ToggleMaximise:()=>ji,UnMaximise:()=>Zi,UnMinimise:()=>Yi,Width:()=>$i,ZoomIn:()=>nn,ZoomOut:()=>on,ZoomReset:()=>tn});var ii=0,ni=1,oi=2,ti=3,ri=4,ai=5,li=6,di=7,ci=8,si=9,wi=10,mi=11,ui=12,pi=13,Wi=14,gi=15,fi=16,hi=17,Di=18,Ci=19,Si=20,Mi=21,xi=22,Ai=23,vi=24,bi=25,Ri=26,Ei=27,Ui=28,yi=29,r=U("");function ie(e){return{Get:i=>ie(d(l.Window,i)),Center:()=>e(ii),SetTitle:i=>e(ni,{title:i}),Fullscreen:()=>e(oi),UnFullscreen:()=>e(ti),SetSize:(i,n)=>e(ri,{width:i,height:n}),Size:()=>e(ai),SetMaxSize:(i,n)=>e(li,{width:i,height:n}),SetMinSize:(i,n)=>e(di,{width:i,height:n}),SetAlwaysOnTop:i=>e(ci,{alwaysOnTop:i}),SetRelativePosition:(i,n)=>e(si,{x:i,y:n}),RelativePosition:()=>e(wi),Screen:()=>e(mi),Hide:()=>e(ui),Maximise:()=>e(pi),UnMaximise:()=>e(Wi),ToggleMaximise:()=>e(gi),Minimise:()=>e(fi),UnMinimise:()=>e(hi),Restore:()=>e(Di),Show:()=>e(Ci),Close:()=>e(Si),SetBackgroundColour:(i,n,o,t)=>e(Mi,{r:i,g:n,b:o,a:t}),SetResizable:i=>e(xi,{resizable:i}),Width:()=>e(Ai),Height:()=>e(vi),ZoomIn:()=>e(bi),ZoomOut:()=>e(Ri),ZoomReset:()=>e(Ei),GetZoomLevel:()=>e(Ui),SetZoomLevel:i=>e(yi,{zoomLevel:i})}}function U(e){return ie(d(l.Window,e))}function Oi(){r.Center()}function Pi(e){r.SetTitle(e)}function Ti(){r.Fullscreen()}function Bi(e,i){r.SetSize(e,i)}function Ii(){return r.Size()}function Fi(e,i){r.SetMaxSize(e,i)}function Li(e,i){r.SetMinSize(e,i)}function zi(e){r.SetAlwaysOnTop(e)}function ki(e,i){r.SetRelativePosition(e,i)}function Ni(){return r.RelativePosition()}function Hi(){return r.Screen()}function Vi(){r.Hide()}function _i(){r.Maximise()}function Zi(){r.UnMaximise()}function ji(){r.ToggleMaximise()}function Gi(){r.Minimise()}function Yi(){r.UnMinimise()}function Ki(){r.Restore()}function Xi(){r.Show()}function qi(){r.Close()}function Qi(e,i,n,o){r.SetBackgroundColour(e,i,n,o)}function Ji(e){r.SetResizable(e)}function $i(){return r.Width()}function en(){return r.Height()}function nn(){r.ZoomIn()}function on(){r.ZoomOut()}function tn(){r.ZoomReset()}function rn(){return r.GetZoomLevel()}function an(e){r.SetZoomLevel(e)}var K={};w(K,{Reload:()=>Y});var j={};w(j,{Emit:()=>Z,Off:()=>Wn,OffAll:()=>gn,On:()=>mn,OnMultiple:()=>_,Once:()=>un,Types:()=>ln,WailsEvent:()=>x,setup:()=>sn});var ne={Windows:{SystemThemeChanged:"windows:SystemThemeChanged",APMPowerStatusChange:"windows:APMPowerStatusChange",APMSuspend:"windows:APMSuspend",APMResumeAutomatic:"windows:APMResumeAutomatic",APMResumeSuspend:"windows:APMResumeSuspend",APMPowerSettingChange:"windows:APMPowerSettingChange",ApplicationStarted:"windows:ApplicationStarted",WebViewNavigationCompleted:"windows:WebViewNavigationCompleted",WindowInactive:"windows:WindowInactive",WindowActive:"windows:WindowActive",WindowClickActive:"windows:WindowClickActive",WindowMaximise:"windows:WindowMaximise",WindowUnMaximise:"windows:WindowUnMaximise",WindowFullscreen:"windows:WindowFullscreen",WindowUnFullscreen:"windows:WindowUnFullscreen",WindowRestore:"windows:WindowRestore",WindowMinimise:"windows:WindowMinimise",WindowUnMinimise:"windows:WindowUnMinimise",WindowClose:"windows:WindowClose",WindowSetFocus:"windows:WindowSetFocus",WindowKillFocus:"windows:WindowKillFocus",WindowDragDrop:"windows:WindowDragDrop",WindowDragEnter:"windows:WindowDragEnter",WindowDragLeave:"windows:WindowDragLeave",WindowDragOver:"windows:WindowDragOver"},Mac:{ApplicationDidBecomeActive:"mac:ApplicationDidBecomeActive",ApplicationDidChangeBackingProperties:"mac:ApplicationDidChangeBackingProperties",ApplicationDidChangeEffectiveAppearance:"mac:ApplicationDidChangeEffectiveAppearance",ApplicationDidChangeIcon:"mac:ApplicationDidChangeIcon",ApplicationDidChangeOcclusionState:"mac:ApplicationDidChangeOcclusionState",ApplicationDidChangeScreenParameters:"mac:ApplicationDidChangeScreenParameters",ApplicationDidChangeStatusBarFrame:"mac:ApplicationDidChangeStatusBarFrame",ApplicationDidChangeStatusBarOrientation:"mac:ApplicationDidChangeStatusBarOrientation",ApplicationDidFinishLaunching:"mac:ApplicationDidFinishLaunching",ApplicationDidHide:"mac:ApplicationDidHide",ApplicationDidResignActiveNotification:"mac:ApplicationDidResignActiveNotification",ApplicationDidUnhide:"mac:ApplicationDidUnhide",ApplicationDidUpdate:"mac:ApplicationDidUpdate",ApplicationWillBecomeActive:"mac:ApplicationWillBecomeActive",ApplicationWillFinishLaunching:"mac:ApplicationWillFinishLaunching",ApplicationWillHide:"mac:ApplicationWillHide",ApplicationWillResignActive:"mac:ApplicationWillResignActive",ApplicationWillTerminate:"mac:ApplicationWillTerminate",ApplicationWillUnhide:"mac:ApplicationWillUnhide",ApplicationWillUpdate:"mac:ApplicationWillUpdate",ApplicationDidChangeTheme:"mac:ApplicationDidChangeTheme!",ApplicationShouldHandleReopen:"mac:ApplicationShouldHandleReopen!",WindowDidBecomeKey:"mac:WindowDidBecomeKey",WindowDidBecomeMain:"mac:WindowDidBecomeMain",WindowDidBeginSheet:"mac:WindowDidBeginSheet",WindowDidChangeAlpha:"mac:WindowDidChangeAlpha",WindowDidChangeBackingLocation:"mac:WindowDidChangeBackingLocation",WindowDidChangeBackingProperties:"mac:WindowDidChangeBackingProperties",WindowDidChangeCollectionBehavior:"mac:WindowDidChangeCollectionBehavior",WindowDidChangeEffectiveAppearance:"mac:WindowDidChangeEffectiveAppearance",WindowDidChangeOcclusionState:"mac:WindowDidChangeOcclusionState",WindowDidChangeOrderingMode:"mac:WindowDidChangeOrderingMode",WindowDidChangeScreen:"mac:WindowDidChangeScreen",WindowDidChangeScreenParameters:"mac:WindowDidChangeScreenParameters",WindowDidChangeScreenProfile:"mac:WindowDidChangeScreenProfile",WindowDidChangeScreenSpace:"mac:WindowDidChangeScreenSpace",WindowDidChangeScreenSpaceProperties:"mac:WindowDidChangeScreenSpaceProperties",WindowDidChangeSharingType:"mac:WindowDidChangeSharingType",WindowDidChangeSpace:"mac:WindowDidChangeSpace",WindowDidChangeSpaceOrderingMode:"mac:WindowDidChangeSpaceOrderingMode",WindowDidChangeTitle:"mac:WindowDidChangeTitle",WindowDidChangeToolbar:"mac:WindowDidChangeToolbar",WindowDidChangeVisibility:"mac:WindowDidChangeVisibility",WindowDidDeminiaturize:"mac:WindowDidDeminiaturize",WindowDidEndSheet:"mac:WindowDidEndSheet",WindowDidEnterFullScreen:"mac:WindowDidEnterFullScreen",WindowDidEnterVersionBrowser:"mac:WindowDidEnterVersionBrowser",WindowDidExitFullScreen:"mac:WindowDidExitFullScreen",WindowDidExitVersionBrowser:"mac:WindowDidExitVersionBrowser",WindowDidExpose:"mac:WindowDidExpose",WindowDidFocus:"mac:WindowDidFocus",WindowDidMiniaturize:"mac:WindowDidMiniaturize",WindowDidMove:"mac:WindowDidMove",WindowDidOrderOffScreen:"mac:WindowDidOrderOffScreen",WindowDidOrderOnScreen:"mac:WindowDidOrderOnScreen",WindowDidResignKey:"mac:WindowDidResignKey",WindowDidResignMain:"mac:WindowDidResignMain",WindowDidResize:"mac:WindowDidResize",WindowDidUpdate:"mac:WindowDidUpdate",WindowDidUpdateAlpha:"mac:WindowDidUpdateAlpha",WindowDidUpdateCollectionBehavior:"mac:WindowDidUpdateCollectionBehavior",WindowDidUpdateCollectionProperties:"mac:WindowDidUpdateCollectionProperties",WindowDidUpdateShadow:"mac:WindowDidUpdateShadow",WindowDidUpdateTitle:"mac:WindowDidUpdateTitle",WindowDidUpdateToolbar:"mac:WindowDidUpdateToolbar",WindowDidUpdateVisibility:"mac:WindowDidUpdateVisibility",WindowShouldClose:"mac:WindowShouldClose!",WindowWillBecomeKey:"mac:WindowWillBecomeKey",WindowWillBecomeMain:"mac:WindowWillBecomeMain",WindowWillBeginSheet:"mac:WindowWillBeginSheet",WindowWillChangeOrderingMode:"mac:WindowWillChangeOrderingMode",WindowWillClose:"mac:WindowWillClose",WindowWillDeminiaturize:"mac:WindowWillDeminiaturize",WindowWillEnterFullScreen:"mac:WindowWillEnterFullScreen",WindowWillEnterVersionBrowser:"mac:WindowWillEnterVersionBrowser",WindowWillExitFullScreen:"mac:WindowWillExitFullScreen",WindowWillExitVersionBrowser:"mac:WindowWillExitVersionBrowser",WindowWillFocus:"mac:WindowWillFocus",WindowWillMiniaturize:"mac:WindowWillMiniaturize",WindowWillMove:"mac:WindowWillMove",WindowWillOrderOffScreen:"mac:WindowWillOrderOffScreen",WindowWillOrderOnScreen:"mac:WindowWillOrderOnScreen",WindowWillResignMain:"mac:WindowWillResignMain",WindowWillResize:"mac:WindowWillResize",WindowWillUnfocus:"mac:WindowWillUnfocus",WindowWillUpdate:"mac:WindowWillUpdate",WindowWillUpdateAlpha:"mac:WindowWillUpdateAlpha",WindowWillUpdateCollectionBehavior:"mac:WindowWillUpdateCollectionBehavior",WindowWillUpdateCollectionProperties:"mac:WindowWillUpdateCollectionProperties",WindowWillUpdateShadow:"mac:WindowWillUpdateShadow",WindowWillUpdateTitle:"mac:WindowWillUpdateTitle",WindowWillUpdateToolbar:"mac:WindowWillUpdateToolbar",WindowWillUpdateVisibility:"mac:WindowWillUpdateVisibility",WindowWillUseStandardFrame:"mac:WindowWillUseStandardFrame",MenuWillOpen:"mac:MenuWillOpen",MenuDidOpen:"mac:MenuDidOpen",MenuDidClose:"mac:MenuDidClose",MenuWillSendAction:"mac:MenuWillSendAction",MenuDidSendAction:"mac:MenuDidSendAction",MenuWillHighlightItem:"mac:MenuWillHighlightItem",MenuDidHighlightItem:"mac:MenuDidHighlightItem",MenuWillDisplayItem:"mac:MenuWillDisplayItem",MenuDidDisplayItem:"mac:MenuDidDisplayItem",MenuWillAddItem:"mac:MenuWillAddItem",MenuDidAddItem:"mac:MenuDidAddItem",MenuWillRemoveItem:"mac:MenuWillRemoveItem",MenuDidRemoveItem:"mac:MenuDidRemoveItem",MenuWillBeginTracking:"mac:MenuWillBeginTracking",MenuDidBeginTracking:"mac:MenuDidBeginTracking",MenuWillEndTracking:"mac:MenuWillEndTracking",MenuDidEndTracking:"mac:MenuDidEndTracking",MenuWillUpdate:"mac:MenuWillUpdate",MenuDidUpdate:"mac:MenuDidUpdate",MenuWillPopUp:"mac:MenuWillPopUp",MenuDidPopUp:"mac:MenuDidPopUp",MenuWillSendActionToItem:"mac:MenuWillSendActionToItem",MenuDidSendActionToItem:"mac:MenuDidSendActionToItem",WebViewDidStartProvisionalNavigation:"mac:WebViewDidStartProvisionalNavigation",WebViewDidReceiveServerRedirectForProvisionalNavigation:"mac:WebViewDidReceiveServerRedirectForProvisionalNavigation",WebViewDidFinishNavigation:"mac:WebViewDidFinishNavigation",WebViewDidCommitNavigation:"mac:WebViewDidCommitNavigation",WindowFileDraggingEntered:"mac:WindowFileDraggingEntered",WindowFileDraggingPerformed:"mac:WindowFileDraggingPerformed",WindowFileDraggingExited:"mac:WindowFileDraggingExited"},Linux:{SystemThemeChanged:"linux:SystemThemeChanged"},Common:{ApplicationStarted:"common:ApplicationStarted",WindowMaximise:"common:WindowMaximise",WindowUnMaximise:"common:WindowUnMaximise",WindowFullscreen:"common:WindowFullscreen",WindowUnFullscreen:"common:WindowUnFullscreen",WindowRestore:"common:WindowRestore",WindowMinimise:"common:WindowMinimise",WindowUnMinimise:"common:WindowUnMinimise",WindowClosing:"common:WindowClosing",WindowZoom:"common:WindowZoom",WindowZoomIn:"common:WindowZoomIn",WindowZoomOut:"common:WindowZoomOut",WindowZoomReset:"common:WindowZoomReset",WindowFocus:"common:WindowFocus",WindowLostFocus:"common:WindowLostFocus",WindowShow:"common:WindowShow",WindowHide:"common:WindowHide",WindowDPIChanged:"common:WindowDPIChanged",WindowFilesDropped:"common:WindowFilesDropped",WindowRuntimeReady:"common:WindowRuntimeReady",ThemeChanged:"common:ThemeChanged"}};var ln=ne;window._wails=window._wails||{};window._wails.dispatchWailsEvent=wn;var dn=d(l.Events,""),cn=0,u=new Map,V=class{constructor(i,n,o){this.eventName=i,this.maxCallbacks=o||-1,this.Callback=t=>(n(t),this.maxCallbacks===-1?!1:(this.maxCallbacks-=1,this.maxCallbacks===0))}},x=class{constructor(i,n=null){this.name=i,this.data=n}};function sn(){}function wn(e){let i=u.get(e.name);if(i){let n=i.filter(o=>{if(o.Callback(e))return!0});n.length>0&&(i=i.filter(o=>!n.includes(o)),i.length===0?u.delete(e.name):u.set(e.name,i))}}function _(e,i,n){let o=u.get(e)||[],t=new V(e,i,n);return o.push(t),u.set(e,o),()=>pn(t)}function mn(e,i){return _(e,i,-1)}function un(e,i){return _(e,i,1)}function pn(e){let i=e.eventName,n=u.get(i).filter(o=>o!==e);n.length===0?u.delete(i):u.set(i,n)}function Wn(e,...i){[e,...i].forEach(o=>u.delete(o))}function gn(){u.clear()}function Z(e){return dn(cn,e)}var G={};w(G,{Error:()=>Un,Info:()=>Rn,OpenFile:()=>yn,Question:()=>A,SaveFile:()=>On,Warning:()=>En});window._wails=window._wails||{};window._wails.dialogErrorCallback=bn;window._wails.dialogResultCallback=vn;var fn=0,hn=1,Dn=2,Cn=3,Sn=4,Mn=5,xn=d(l.Dialog,""),g=new Map;function An(){let e;do e=f();while(g.has(e));return e}function D(e,i={}){let n=An();return i["dialog-id"]=n,new Promise((o,t)=>{g.set(n,{resolve:o,reject:t}),xn(e,i).catch(a=>{t(a),g.delete(n)})})}function vn(e,i,n){let o=g.get(e);o&&(n?o.resolve(JSON.parse(i)):o.resolve(i),g.delete(e))}function bn(e,i){let n=g.get(e);n&&(n.reject(i),g.delete(e))}var Rn=e=>D(fn,e),En=e=>D(hn,e),Un=e=>D(Dn,e),A=e=>D(Cn,e),yn=e=>D(Sn,e),On=e=>D(Mn,e);function oe(e,i=null){let n=new x(e,i);Z(n)}function Pn(){document.querySelectorAll("[wml-event]").forEach(function(i){let n=i.getAttribute("wml-event"),o=i.getAttribute("wml-confirm"),t=i.getAttribute("wml-trigger")||"click",a=function(){if(o){A({Title:"Confirm",Message:o,Detached:!1,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(s){s!=="No"&&oe(n)});return}oe(n)};i.removeEventListener(t,a),i.addEventListener(t,a)})}function te(e,i){let n=U(e),o=In(n);o.has(i);try{o.get(i)()}catch{}}function Tn(){document.querySelectorAll("[wml-window]").forEach(function(i){let n=i.getAttribute("wml-window"),o=i.getAttribute("wml-confirm"),t=i.getAttribute("wml-trigger")||"click",a=i.getAttribute("wml-target-window")||"",s=function(){if(o){A({Title:"Confirm",Message:o,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(m){m!=="No"&&te(a,n)});return}te(a,n)};i.removeEventListener(t,s),i.addEventListener(t,s)})}function Bn(){document.querySelectorAll("[wml-openurl]").forEach(function(i){let n=i.getAttribute("wml-openurl"),o=i.getAttribute("wml-confirm"),t=i.getAttribute("wml-trigger")||"click",a=function(){if(o){A({Title:"Confirm",Message:o,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(s){s!=="No"&&b(n)});return}b(n)};i.removeEventListener(t,a),i.addEventListener(t,a)})}function Y(){Pn(),Tn(),Bn()}function In(e){let i=new Map;for(let n in e)typeof e[n]=="function"&&i.set(n,e[n]);return i}var X={};w(X,{ByID:()=>_n,ByName:()=>Vn,Call:()=>Hn,Plugin:()=>Zn});window._wails=window._wails||{};window._wails.callResultHandler=kn;window._wails.callErrorHandler=Nn;var y=0,Fn=d(l.Call,""),Ln=d(l.CancelCall,""),v=new Map;function zn(){let e;do e=f();while(v.has(e));return e}function kn(e,i,n){let o=re(e);o&&o.resolve(n?JSON.parse(i):i)}function Nn(e,i){let n=re(e);n&&n.reject(i)}function re(e){let i=v.get(e);return v.delete(e),i}function O(e,i={}){let n=zn(),o=()=>{Ln(e,{"call-id":n})};var t=!1,a=!1,s=new Promise((m,c)=>{i["call-id"]=n,v.set(n,{resolve:m,reject:c}),Fn(e,i).then(p=>{a=!0,t&&o()}).catch(p=>{c(p),v.delete(n)})});return s.cancel=()=>{a?o():t=!0},s}function Hn(e){return O(y,e)}function Vn(e,...i){if(typeof e!="string"||e.split(".").length!==3)throw new Error("CallByName requires a string in the format 'package.struct.method'");let[n,o,t]=e.split(".");return O(y,{packageName:n,structName:o,methodName:t,args:i})}function _n(e,...i){return O(y,{methodID:e,args:i})}function Zn(e,i,...n){return O(y,{packageName:"wails-plugins",structName:e,methodName:i,args:n})}window._wails=window._wails||{};window._wails.invoke=h;window.wails=window.wails||{};window.wails.Application=T;window.wails.Browser=B;window.wails.Call=X;window.wails.Clipboard=I;window.wails.Dialogs=G;window.wails.Events=j;window.wails.Flags=z;window.wails.Screens=N;window.wails.System=L;window.wails.Window=H;window.wails.WML=K;var ae=!1;document.addEventListener("DOMContentLoaded",function(){ae=!0,window._wails.invoke("wails:runtime:ready")});function jn(e){ae||document.readyState==="complete"?e():document.addEventListener("DOMContentLoaded",e)}jn(()=>{Y()});})(); +(()=>{var de=Object.defineProperty;var w=(e,i)=>{for(var n in i)de(e,n,{get:i[n],enumerable:!0})};var T={};w(T,{Hide:()=>We,Quit:()=>fe,Show:()=>ge});var le="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var f=(e=21)=>{let i="",n=e;for(;n--;)i+=le[Math.random()*64|0];return i};var ce=window.location.origin+"/wails/runtime",d={Call:0,Clipboard:1,Application:2,Events:3,ContextMenu:4,Dialog:5,Window:6,Screens:7,System:8,Browser:9},se=f();function l(e,i){return function(n,o=null){return we(e,n,i,o)}}function we(e,i,n,o){let t=new URL(ce);t.searchParams.append("object",e),t.searchParams.append("method",i);let a={headers:{}};return n&&(a.headers["x-wails-window-name"]=n),o&&t.searchParams.append("args",JSON.stringify(o)),a.headers["x-wails-client-id"]=se,new Promise((s,p)=>{fetch(t,a).then(c=>{if(c.ok)return c.headers.get("Content-Type")&&c.headers.get("Content-Type").indexOf("application/json")!==-1?c.json():c.text();p(Error(c.statusText))}).then(c=>s(c)).catch(c=>p(c))})}var P=l(d.Application,""),me=0,ue=1,pe=2;function We(){return P(me)}function ge(){return P(ue)}function fe(){return P(pe)}var B={};w(B,{OpenURL:()=>b});var he=l(d.Browser,""),De=0;function b(e){return he(De,{url:e})}var I={};w(I,{SetText:()=>xe,Text:()=>Me});var q=l(d.Clipboard,""),Ce=0,Se=1;function xe(e){return q(Ce,{text:e})}function Me(){return q(Se)}var L={};w(L,{Capabilities:()=>Re,Environment:()=>Ee,IsAMD64:()=>Oe,IsARM:()=>Pe,IsARM64:()=>Te,IsDarkMode:()=>be,IsDebug:()=>F,IsLinux:()=>Ue,IsMac:()=>ye,IsWindows:()=>R,invoke:()=>h});var J=l(d.System,""),Ae=0,ve=1;function h(e){return window.chrome?window.chrome.webview.postMessage(e):window.webkit.messageHandlers.external.postMessage(e)}function be(){return J(Ae)}function Re(){return fetch("/wails/capabilities").json()}function Ee(){return J(ve)}function R(){return window._wails.environment.OS==="windows"}function Ue(){return window._wails.environment.OS==="linux"}function ye(){return window._wails.environment.OS==="darwin"}function Oe(){return window._wails.environment.Arch==="amd64"}function Pe(){return window._wails.environment.Arch==="arm"}function Te(){return window._wails.environment.Arch==="arm64"}function F(){return window._wails.environment.Debug===!0}window.addEventListener("contextmenu",Le);var Be=l(d.ContextMenu,""),Ie=0;function Fe(e,i,n,o){Be(Ie,{id:e,x:i,y:n,data:o})}function Le(e){let i=e.target,n=window.getComputedStyle(i).getPropertyValue("--custom-contextmenu");if(n=n?n.trim():"",n){e.preventDefault();let o=window.getComputedStyle(i).getPropertyValue("--custom-contextmenu-data");Fe(n,e.clientX,e.clientY,o);return}ze(e)}function ze(e){if(F())return;let i=e.target;switch(window.getComputedStyle(i).getPropertyValue("--default-contextmenu").trim()){case"show":return;case"hide":e.preventDefault();return;default:if(i.isContentEditable)return;let t=window.getSelection(),a=t.toString().length>0;if(a)for(let s=0;sS});function S(e){try{return window._wails.flags[e]}catch(i){throw new Error("Unable to retrieve flag '"+e+"': "+i)}}window._wails=window._wails||{};window._wails.setResizable=He;window._wails.endDrag=ee;window.addEventListener("mousedown",_e);window.addEventListener("mousemove",Ge);window.addEventListener("mouseup",je);var x=!1,E=null,$=!1,ke="auto";function Ne(e){let i=window.getComputedStyle(e.target).getPropertyValue("--webkit-app-region");return!i||i===""||i.trim()!=="drag"||e.buttons!==1?!1:e.detail===1}function He(e){$=e}function ee(){document.body.style.cursor="default",x=!1}function Ve(){return E?(h(`resize:${E}`),!0):!1}function _e(e){(R()&&Ve()||Ne(e))&&(x=!!Ze(e))}function Ze(e){return!(e.offsetX>e.target.clientWidth||e.offsetY>e.target.clientHeight)}function je(e){(e.buttons!==void 0?e.buttons:e.which)>0&&ee()}function u(e=ke){document.documentElement.style.cursor=e,E=e}function Ge(e){x=Ye(e),R()&&$&&Ke(e)}function Ye(e){let i=e.buttons!==void 0?e.buttons:e.which;return x&&i>0?(h("drag"),!1):x}function Ke(e){let i=S("system.resizeHandleHeight")||5,n=S("system.resizeHandleWidth")||5,o=S("resizeCornerExtra")||10,t=window.outerWidth-e.clientXJe,GetCurrent:()=>ei,GetPrimary:()=>$e});var k=l(d.Screens,""),Xe=0,Qe=1,qe=2;function Je(){return k(Xe)}function $e(){return k(Qe)}function ei(){return k(qe)}var H={};w(H,{Center:()=>Oi,Close:()=>Qi,Fullscreen:()=>Ti,Get:()=>U,GetZoomLevel:()=>rn,Height:()=>en,Hide:()=>Vi,Maximise:()=>_i,Minimise:()=>Gi,RelativePosition:()=>Ni,Restore:()=>Ki,Screen:()=>Hi,SetAlwaysOnTop:()=>zi,SetBackgroundColour:()=>qi,SetMaxSize:()=>Fi,SetMinSize:()=>Li,SetRelativePosition:()=>ki,SetResizable:()=>Ji,SetSize:()=>Bi,SetTitle:()=>Pi,SetZoomLevel:()=>an,Show:()=>Xi,Size:()=>Ii,ToggleMaximise:()=>ji,UnMaximise:()=>Zi,UnMinimise:()=>Yi,Width:()=>$i,ZoomIn:()=>nn,ZoomOut:()=>on,ZoomReset:()=>tn});var ii=0,ni=1,oi=2,ti=3,ri=4,ai=5,di=6,li=7,ci=8,si=9,wi=10,mi=11,ui=12,pi=13,Wi=14,gi=15,fi=16,hi=17,Di=18,Ci=19,Si=20,xi=21,Mi=22,Ai=23,vi=24,bi=25,Ri=26,Ei=27,Ui=28,yi=29,r=U("");function ie(e){return{Get:i=>ie(l(d.Window,i)),Center:()=>e(ii),SetTitle:i=>e(ni,{title:i}),Fullscreen:()=>e(oi),UnFullscreen:()=>e(ti),SetSize:(i,n)=>e(ri,{width:i,height:n}),Size:()=>e(ai),SetMaxSize:(i,n)=>e(di,{width:i,height:n}),SetMinSize:(i,n)=>e(li,{width:i,height:n}),SetAlwaysOnTop:i=>e(ci,{alwaysOnTop:i}),SetRelativePosition:(i,n)=>e(si,{x:i,y:n}),RelativePosition:()=>e(wi),Screen:()=>e(mi),Hide:()=>e(ui),Maximise:()=>e(pi),UnMaximise:()=>e(Wi),ToggleMaximise:()=>e(gi),Minimise:()=>e(fi),UnMinimise:()=>e(hi),Restore:()=>e(Di),Show:()=>e(Ci),Close:()=>e(Si),SetBackgroundColour:(i,n,o,t)=>e(xi,{r:i,g:n,b:o,a:t}),SetResizable:i=>e(Mi,{resizable:i}),Width:()=>e(Ai),Height:()=>e(vi),ZoomIn:()=>e(bi),ZoomOut:()=>e(Ri),ZoomReset:()=>e(Ei),GetZoomLevel:()=>e(Ui),SetZoomLevel:i=>e(yi,{zoomLevel:i})}}function U(e){return ie(l(d.Window,e))}function Oi(){r.Center()}function Pi(e){r.SetTitle(e)}function Ti(){r.Fullscreen()}function Bi(e,i){r.SetSize(e,i)}function Ii(){return r.Size()}function Fi(e,i){r.SetMaxSize(e,i)}function Li(e,i){r.SetMinSize(e,i)}function zi(e){r.SetAlwaysOnTop(e)}function ki(e,i){r.SetRelativePosition(e,i)}function Ni(){return r.RelativePosition()}function Hi(){return r.Screen()}function Vi(){r.Hide()}function _i(){r.Maximise()}function Zi(){r.UnMaximise()}function ji(){r.ToggleMaximise()}function Gi(){r.Minimise()}function Yi(){r.UnMinimise()}function Ki(){r.Restore()}function Xi(){r.Show()}function Qi(){r.Close()}function qi(e,i,n,o){r.SetBackgroundColour(e,i,n,o)}function Ji(e){r.SetResizable(e)}function $i(){return r.Width()}function en(){return r.Height()}function nn(){r.ZoomIn()}function on(){r.ZoomOut()}function tn(){r.ZoomReset()}function rn(){return r.GetZoomLevel()}function an(e){r.SetZoomLevel(e)}var K={};w(K,{Reload:()=>Y});var j={};w(j,{Emit:()=>Z,Off:()=>Wn,OffAll:()=>gn,On:()=>mn,OnMultiple:()=>_,Once:()=>un,Types:()=>dn,WailsEvent:()=>M,setup:()=>sn});var ne={Windows:{SystemThemeChanged:"windows:SystemThemeChanged",APMPowerStatusChange:"windows:APMPowerStatusChange",APMSuspend:"windows:APMSuspend",APMResumeAutomatic:"windows:APMResumeAutomatic",APMResumeSuspend:"windows:APMResumeSuspend",APMPowerSettingChange:"windows:APMPowerSettingChange",ApplicationStarted:"windows:ApplicationStarted",WebViewNavigationCompleted:"windows:WebViewNavigationCompleted",WindowInactive:"windows:WindowInactive",WindowActive:"windows:WindowActive",WindowClickActive:"windows:WindowClickActive",WindowMaximise:"windows:WindowMaximise",WindowUnMaximise:"windows:WindowUnMaximise",WindowFullscreen:"windows:WindowFullscreen",WindowUnFullscreen:"windows:WindowUnFullscreen",WindowRestore:"windows:WindowRestore",WindowMinimise:"windows:WindowMinimise",WindowUnMinimise:"windows:WindowUnMinimise",WindowClose:"windows:WindowClose",WindowSetFocus:"windows:WindowSetFocus",WindowKillFocus:"windows:WindowKillFocus",WindowDragDrop:"windows:WindowDragDrop",WindowDragEnter:"windows:WindowDragEnter",WindowDragLeave:"windows:WindowDragLeave",WindowDragOver:"windows:WindowDragOver"},Mac:{ApplicationDidBecomeActive:"mac:ApplicationDidBecomeActive",ApplicationDidChangeBackingProperties:"mac:ApplicationDidChangeBackingProperties",ApplicationDidChangeEffectiveAppearance:"mac:ApplicationDidChangeEffectiveAppearance",ApplicationDidChangeIcon:"mac:ApplicationDidChangeIcon",ApplicationDidChangeOcclusionState:"mac:ApplicationDidChangeOcclusionState",ApplicationDidChangeScreenParameters:"mac:ApplicationDidChangeScreenParameters",ApplicationDidChangeStatusBarFrame:"mac:ApplicationDidChangeStatusBarFrame",ApplicationDidChangeStatusBarOrientation:"mac:ApplicationDidChangeStatusBarOrientation",ApplicationDidFinishLaunching:"mac:ApplicationDidFinishLaunching",ApplicationDidHide:"mac:ApplicationDidHide",ApplicationDidResignActiveNotification:"mac:ApplicationDidResignActiveNotification",ApplicationDidUnhide:"mac:ApplicationDidUnhide",ApplicationDidUpdate:"mac:ApplicationDidUpdate",ApplicationWillBecomeActive:"mac:ApplicationWillBecomeActive",ApplicationWillFinishLaunching:"mac:ApplicationWillFinishLaunching",ApplicationWillHide:"mac:ApplicationWillHide",ApplicationWillResignActive:"mac:ApplicationWillResignActive",ApplicationWillTerminate:"mac:ApplicationWillTerminate",ApplicationWillUnhide:"mac:ApplicationWillUnhide",ApplicationWillUpdate:"mac:ApplicationWillUpdate",ApplicationDidChangeTheme:"mac:ApplicationDidChangeTheme!",ApplicationShouldHandleReopen:"mac:ApplicationShouldHandleReopen!",WindowDidBecomeKey:"mac:WindowDidBecomeKey",WindowDidBecomeMain:"mac:WindowDidBecomeMain",WindowDidBeginSheet:"mac:WindowDidBeginSheet",WindowDidChangeAlpha:"mac:WindowDidChangeAlpha",WindowDidChangeBackingLocation:"mac:WindowDidChangeBackingLocation",WindowDidChangeBackingProperties:"mac:WindowDidChangeBackingProperties",WindowDidChangeCollectionBehavior:"mac:WindowDidChangeCollectionBehavior",WindowDidChangeEffectiveAppearance:"mac:WindowDidChangeEffectiveAppearance",WindowDidChangeOcclusionState:"mac:WindowDidChangeOcclusionState",WindowDidChangeOrderingMode:"mac:WindowDidChangeOrderingMode",WindowDidChangeScreen:"mac:WindowDidChangeScreen",WindowDidChangeScreenParameters:"mac:WindowDidChangeScreenParameters",WindowDidChangeScreenProfile:"mac:WindowDidChangeScreenProfile",WindowDidChangeScreenSpace:"mac:WindowDidChangeScreenSpace",WindowDidChangeScreenSpaceProperties:"mac:WindowDidChangeScreenSpaceProperties",WindowDidChangeSharingType:"mac:WindowDidChangeSharingType",WindowDidChangeSpace:"mac:WindowDidChangeSpace",WindowDidChangeSpaceOrderingMode:"mac:WindowDidChangeSpaceOrderingMode",WindowDidChangeTitle:"mac:WindowDidChangeTitle",WindowDidChangeToolbar:"mac:WindowDidChangeToolbar",WindowDidChangeVisibility:"mac:WindowDidChangeVisibility",WindowDidDeminiaturize:"mac:WindowDidDeminiaturize",WindowDidEndSheet:"mac:WindowDidEndSheet",WindowDidEnterFullScreen:"mac:WindowDidEnterFullScreen",WindowDidEnterVersionBrowser:"mac:WindowDidEnterVersionBrowser",WindowDidExitFullScreen:"mac:WindowDidExitFullScreen",WindowDidExitVersionBrowser:"mac:WindowDidExitVersionBrowser",WindowDidExpose:"mac:WindowDidExpose",WindowDidFocus:"mac:WindowDidFocus",WindowDidMiniaturize:"mac:WindowDidMiniaturize",WindowDidMove:"mac:WindowDidMove",WindowDidOrderOffScreen:"mac:WindowDidOrderOffScreen",WindowDidOrderOnScreen:"mac:WindowDidOrderOnScreen",WindowDidResignKey:"mac:WindowDidResignKey",WindowDidResignMain:"mac:WindowDidResignMain",WindowDidResize:"mac:WindowDidResize",WindowDidUpdate:"mac:WindowDidUpdate",WindowDidUpdateAlpha:"mac:WindowDidUpdateAlpha",WindowDidUpdateCollectionBehavior:"mac:WindowDidUpdateCollectionBehavior",WindowDidUpdateCollectionProperties:"mac:WindowDidUpdateCollectionProperties",WindowDidUpdateShadow:"mac:WindowDidUpdateShadow",WindowDidUpdateTitle:"mac:WindowDidUpdateTitle",WindowDidUpdateToolbar:"mac:WindowDidUpdateToolbar",WindowDidUpdateVisibility:"mac:WindowDidUpdateVisibility",WindowShouldClose:"mac:WindowShouldClose!",WindowWillBecomeKey:"mac:WindowWillBecomeKey",WindowWillBecomeMain:"mac:WindowWillBecomeMain",WindowWillBeginSheet:"mac:WindowWillBeginSheet",WindowWillChangeOrderingMode:"mac:WindowWillChangeOrderingMode",WindowWillClose:"mac:WindowWillClose",WindowWillDeminiaturize:"mac:WindowWillDeminiaturize",WindowWillEnterFullScreen:"mac:WindowWillEnterFullScreen",WindowWillEnterVersionBrowser:"mac:WindowWillEnterVersionBrowser",WindowWillExitFullScreen:"mac:WindowWillExitFullScreen",WindowWillExitVersionBrowser:"mac:WindowWillExitVersionBrowser",WindowWillFocus:"mac:WindowWillFocus",WindowWillMiniaturize:"mac:WindowWillMiniaturize",WindowWillMove:"mac:WindowWillMove",WindowWillOrderOffScreen:"mac:WindowWillOrderOffScreen",WindowWillOrderOnScreen:"mac:WindowWillOrderOnScreen",WindowWillResignMain:"mac:WindowWillResignMain",WindowWillResize:"mac:WindowWillResize",WindowWillUnfocus:"mac:WindowWillUnfocus",WindowWillUpdate:"mac:WindowWillUpdate",WindowWillUpdateAlpha:"mac:WindowWillUpdateAlpha",WindowWillUpdateCollectionBehavior:"mac:WindowWillUpdateCollectionBehavior",WindowWillUpdateCollectionProperties:"mac:WindowWillUpdateCollectionProperties",WindowWillUpdateShadow:"mac:WindowWillUpdateShadow",WindowWillUpdateTitle:"mac:WindowWillUpdateTitle",WindowWillUpdateToolbar:"mac:WindowWillUpdateToolbar",WindowWillUpdateVisibility:"mac:WindowWillUpdateVisibility",WindowWillUseStandardFrame:"mac:WindowWillUseStandardFrame",MenuWillOpen:"mac:MenuWillOpen",MenuDidOpen:"mac:MenuDidOpen",MenuDidClose:"mac:MenuDidClose",MenuWillSendAction:"mac:MenuWillSendAction",MenuDidSendAction:"mac:MenuDidSendAction",MenuWillHighlightItem:"mac:MenuWillHighlightItem",MenuDidHighlightItem:"mac:MenuDidHighlightItem",MenuWillDisplayItem:"mac:MenuWillDisplayItem",MenuDidDisplayItem:"mac:MenuDidDisplayItem",MenuWillAddItem:"mac:MenuWillAddItem",MenuDidAddItem:"mac:MenuDidAddItem",MenuWillRemoveItem:"mac:MenuWillRemoveItem",MenuDidRemoveItem:"mac:MenuDidRemoveItem",MenuWillBeginTracking:"mac:MenuWillBeginTracking",MenuDidBeginTracking:"mac:MenuDidBeginTracking",MenuWillEndTracking:"mac:MenuWillEndTracking",MenuDidEndTracking:"mac:MenuDidEndTracking",MenuWillUpdate:"mac:MenuWillUpdate",MenuDidUpdate:"mac:MenuDidUpdate",MenuWillPopUp:"mac:MenuWillPopUp",MenuDidPopUp:"mac:MenuDidPopUp",MenuWillSendActionToItem:"mac:MenuWillSendActionToItem",MenuDidSendActionToItem:"mac:MenuDidSendActionToItem",WebViewDidStartProvisionalNavigation:"mac:WebViewDidStartProvisionalNavigation",WebViewDidReceiveServerRedirectForProvisionalNavigation:"mac:WebViewDidReceiveServerRedirectForProvisionalNavigation",WebViewDidFinishNavigation:"mac:WebViewDidFinishNavigation",WebViewDidCommitNavigation:"mac:WebViewDidCommitNavigation",WindowFileDraggingEntered:"mac:WindowFileDraggingEntered",WindowFileDraggingPerformed:"mac:WindowFileDraggingPerformed",WindowFileDraggingExited:"mac:WindowFileDraggingExited"},Linux:{SystemThemeChanged:"linux:SystemThemeChanged",WindowLoadChanged:"linux:WindowLoadChanged",WindowDeleteEvent:"linux:WindowDeleteEvent",WindowFocusIn:"linux:WindowFocusIn",WindowFocusOut:"linux:WindowFocusOut",ApplicationStartup:"linux:ApplicationStartup"},Common:{ApplicationStarted:"common:ApplicationStarted",WindowMaximise:"common:WindowMaximise",WindowUnMaximise:"common:WindowUnMaximise",WindowFullscreen:"common:WindowFullscreen",WindowUnFullscreen:"common:WindowUnFullscreen",WindowRestore:"common:WindowRestore",WindowMinimise:"common:WindowMinimise",WindowUnMinimise:"common:WindowUnMinimise",WindowClosing:"common:WindowClosing",WindowZoom:"common:WindowZoom",WindowZoomIn:"common:WindowZoomIn",WindowZoomOut:"common:WindowZoomOut",WindowZoomReset:"common:WindowZoomReset",WindowFocus:"common:WindowFocus",WindowLostFocus:"common:WindowLostFocus",WindowShow:"common:WindowShow",WindowHide:"common:WindowHide",WindowDPIChanged:"common:WindowDPIChanged",WindowFilesDropped:"common:WindowFilesDropped",WindowRuntimeReady:"common:WindowRuntimeReady",ThemeChanged:"common:ThemeChanged"}};var dn=ne;window._wails=window._wails||{};window._wails.dispatchWailsEvent=wn;var ln=l(d.Events,""),cn=0,m=new Map,V=class{constructor(i,n,o){this.eventName=i,this.maxCallbacks=o||-1,this.Callback=t=>(n(t),this.maxCallbacks===-1?!1:(this.maxCallbacks-=1,this.maxCallbacks===0))}},M=class{constructor(i,n=null){this.name=i,this.data=n}};function sn(){}function wn(e){let i=m.get(e.name);if(i){let n=i.filter(o=>{if(o.Callback(e))return!0});n.length>0&&(i=i.filter(o=>!n.includes(o)),i.length===0?m.delete(e.name):m.set(e.name,i))}}function _(e,i,n){let o=m.get(e)||[],t=new V(e,i,n);return o.push(t),m.set(e,o),()=>pn(t)}function mn(e,i){return _(e,i,-1)}function un(e,i){return _(e,i,1)}function pn(e){let i=e.eventName,n=m.get(i).filter(o=>o!==e);n.length===0?m.delete(i):m.set(i,n)}function Wn(e,...i){[e,...i].forEach(o=>m.delete(o))}function gn(){m.clear()}function Z(e){return ln(cn,e)}var G={};w(G,{Error:()=>Un,Info:()=>Rn,OpenFile:()=>yn,Question:()=>A,SaveFile:()=>On,Warning:()=>En});window._wails=window._wails||{};window._wails.dialogErrorCallback=bn;window._wails.dialogResultCallback=vn;var fn=0,hn=1,Dn=2,Cn=3,Sn=4,xn=5,Mn=l(d.Dialog,""),W=new Map;function An(){let e;do e=f();while(W.has(e));return e}function D(e,i={}){let n=An();return i["dialog-id"]=n,new Promise((o,t)=>{W.set(n,{resolve:o,reject:t}),Mn(e,i).catch(a=>{t(a),W.delete(n)})})}function vn(e,i,n){let o=W.get(e);o&&(n?o.resolve(JSON.parse(i)):o.resolve(i),W.delete(e))}function bn(e,i){let n=W.get(e);n&&(n.reject(i),W.delete(e))}var Rn=e=>D(fn,e),En=e=>D(hn,e),Un=e=>D(Dn,e),A=e=>D(Cn,e),yn=e=>D(Sn,e),On=e=>D(xn,e);function oe(e,i=null){let n=new M(e,i);Z(n)}function Pn(){document.querySelectorAll("[wml-event]").forEach(function(i){let n=i.getAttribute("wml-event"),o=i.getAttribute("wml-confirm"),t=i.getAttribute("wml-trigger")||"click",a=function(){if(o){A({Title:"Confirm",Message:o,Detached:!1,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(s){s!=="No"&&oe(n)});return}oe(n)};i.removeEventListener(t,a),i.addEventListener(t,a)})}function te(e,i){let n=U(e),o=In(n);o.has(i);try{o.get(i)()}catch{}}function Tn(){document.querySelectorAll("[wml-window]").forEach(function(i){let n=i.getAttribute("wml-window"),o=i.getAttribute("wml-confirm"),t=i.getAttribute("wml-trigger")||"click",a=i.getAttribute("wml-target-window")||"",s=function(){if(o){A({Title:"Confirm",Message:o,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(p){p!=="No"&&te(a,n)});return}te(a,n)};i.removeEventListener(t,s),i.addEventListener(t,s)})}function Bn(){document.querySelectorAll("[wml-openurl]").forEach(function(i){let n=i.getAttribute("wml-openurl"),o=i.getAttribute("wml-confirm"),t=i.getAttribute("wml-trigger")||"click",a=function(){if(o){A({Title:"Confirm",Message:o,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(s){s!=="No"&&b(n)});return}b(n)};i.removeEventListener(t,a),i.addEventListener(t,a)})}function Y(){Pn(),Tn(),Bn()}function In(e){let i=new Map;for(let n in e)typeof e[n]=="function"&&i.set(n,e[n]);return i}var X={};w(X,{ByID:()=>Vn,ByName:()=>Hn,Call:()=>Nn,Plugin:()=>_n});window._wails=window._wails||{};window._wails.callResultHandler=zn;window._wails.callErrorHandler=kn;var y=0,Fn=l(d.Call,""),v=new Map;function Ln(){let e;do e=f();while(v.has(e));return e}function zn(e,i,n){let o=re(e);o&&o.resolve(n?JSON.parse(i):i)}function kn(e,i){let n=re(e);n&&n.reject(i)}function re(e){let i=v.get(e);return v.delete(e),i}function O(e,i={}){return new Promise((n,o)=>{let t=Ln();i["call-id"]=t,v.set(t,{resolve:n,reject:o}),Fn(e,i).catch(a=>{o(a),v.delete(t)})})}function Nn(e){return O(y,e)}function Hn(e,...i){if(typeof e!="string"||e.split(".").length!==3)throw new Error("CallByName requires a string in the format 'package.struct.method'");let[n,o,t]=e.split(".");return O(y,{packageName:n,structName:o,methodName:t,args:i})}function Vn(e,...i){return O(y,{methodID:e,args:i})}function _n(e,i,...n){return O(y,{packageName:"wails-plugins",structName:e,methodName:i,args:n})}window._wails=window._wails||{};window._wails.invoke=h;window.wails=window.wails||{};window.wails.Application=T;window.wails.Browser=B;window.wails.Call=X;window.wails.Clipboard=I;window.wails.Dialogs=G;window.wails.Events=j;window.wails.Flags=z;window.wails.Screens=N;window.wails.System=L;window.wails.Window=H;window.wails.WML=K;var ae=!1;document.addEventListener("DOMContentLoaded",function(){ae=!0,window._wails.invoke("wails:runtime:ready")});function Zn(e){ae||document.readyState==="complete"?e():document.addEventListener("DOMContentLoaded",e)}Zn(()=>{Y()});})(); diff --git a/v3/pkg/application/dialogs_linux.go b/v3/pkg/application/dialogs_linux.go index 4943766f0af..be480d17677 100644 --- a/v3/pkg/application/dialogs_linux.go +++ b/v3/pkg/application/dialogs_linux.go @@ -1,7 +1,7 @@ package application -func (m *linuxApp) showAboutDialog(title string, message string, icon []byte) { - window := globalApplication.getWindowForID(m.getCurrentWindowID()) +func (a *linuxApp) showAboutDialog(title string, message string, icon []byte) { + window := globalApplication.getWindowForID(a.getCurrentWindowID()) var parent uintptr if window != nil { parent, _ = window.(*WebviewWindow).NativeWindowHandle() diff --git a/v3/pkg/application/events_common_linux.go b/v3/pkg/application/events_common_linux.go new file mode 100644 index 00000000000..e06fb8cfefc --- /dev/null +++ b/v3/pkg/application/events_common_linux.go @@ -0,0 +1,21 @@ +//go:build linux + +package application + +import "github.com/wailsapp/wails/v3/pkg/events" + +var commonApplicationEventMap = map[events.ApplicationEventType]events.ApplicationEventType{ + events.Linux.ApplicationStartup: events.Common.ApplicationStarted, + events.Linux.SystemThemeChanged: events.Common.ThemeChanged, +} + +func (a *linuxApp) setupCommonEvents() { + for sourceEvent, targetEvent := range commonApplicationEventMap { + sourceEvent := sourceEvent + targetEvent := targetEvent + a.parent.On(sourceEvent, func(event *Event) { + event.Id = uint(targetEvent) + applicationEvents <- event + }) + } +} diff --git a/v3/pkg/application/keys.go b/v3/pkg/application/keys.go index 4a6fc0e6494..b366c10665e 100644 --- a/v3/pkg/application/keys.go +++ b/v3/pkg/application/keys.go @@ -70,6 +70,11 @@ type accelerator struct { Modifiers []modifier } +func (a *accelerator) clone() *accelerator { + result := *a + return &result +} + func (a *accelerator) String() string { var result []string // Sort modifiers diff --git a/v3/pkg/application/linux_cgo.go b/v3/pkg/application/linux_cgo.go index a669fe84c52..a7ce902ae49 100644 --- a/v3/pkg/application/linux_cgo.go +++ b/v3/pkg/application/linux_cgo.go @@ -6,16 +6,17 @@ import ( "fmt" "regexp" "strings" + "sync" "unsafe" "github.com/wailsapp/wails/v3/internal/assetserver/webview" + "github.com/wailsapp/wails/v3/pkg/events" ) /* -#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0 javascriptcoregtk-4.1 +#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0 gdk-3.0 -#include #include #include #include @@ -58,8 +59,11 @@ typedef struct WindowEvent { // exported below void activateLinux(gpointer data); extern void emit(WindowEvent* data); +extern gboolean handleDeleteEvent(GtkWidget*, GdkEvent*, uintptr_t); +extern gboolean handleFocusEvent(GtkWidget*, GdkEvent*, uintptr_t); +extern void handleLoadChanged(WebKitWebView*, WebKitLoadEvent, uintptr_t); void handleClick(void*); -extern gboolean onButtonEvent(GtkWidget *widget, GdkEventButton *event, gpointer user_data); +extern gboolean onButtonEvent(GtkWidget *widget, GdkEventButton *event, uintptr_t user_data); extern void onDragNDrop( void *target, GdkDragContext* context, @@ -69,8 +73,8 @@ extern void onDragNDrop( guint info, guint time, gpointer data); -extern gboolean onKeyPressEvent (GtkWidget *widget, GdkEventKey *event, gpointer user_data); -extern void onProcessRequest(void *request, gpointer user_data); +extern gboolean onKeyPressEvent (GtkWidget *widget, GdkEventKey *event, uintptr_t user_data); +extern void onProcessRequest(WebKitURISchemeRequest *request, uintptr_t user_data); extern void sendMessageToBackend(WebKitUserContentManager *contentManager, WebKitJavascriptResult *result, void *data); // exported below (end) @@ -79,6 +83,10 @@ static void signal_connect(void *widget, char *event, void *cb, void* data) { g_signal_connect(widget, event, cb, data); } +static WebKitWebView* webkit_web_view(GtkWidget *webview) { + return WEBKIT_WEB_VIEW(webview); +} + static void* new_message_dialog(GtkWindow *parent, const gchar *msg, int dialogType, bool hasButtons) { // gtk_message_dialog_new is variadic! Can't call from cgo directly GtkWidget *dialog; @@ -138,6 +146,65 @@ typedef struct Screen { bool isPrimary; } Screen; +// CREDIT: https://github.com/rainycape/magick +#include +#include +#include +#include + +static void fix_signal(int signum) { + struct sigaction st; + + if (sigaction(signum, NULL, &st) < 0) { + goto fix_signal_error; + } + st.sa_flags |= SA_ONSTACK; + if (sigaction(signum, &st, NULL) < 0) { + goto fix_signal_error; + } + return; +fix_signal_error: + fprintf(stderr, "error fixing handler for signal %d, please " + "report this issue to " + "https://github.com/wailsapp/wails: %s\n", + signum, strerror(errno)); +} + +static void install_signal_handlers() { + #if defined(SIGCHLD) + fix_signal(SIGCHLD); + #endif + #if defined(SIGHUP) + fix_signal(SIGHUP); + #endif + #if defined(SIGINT) + fix_signal(SIGINT); + #endif + #if defined(SIGQUIT) + fix_signal(SIGQUIT); + #endif + #if defined(SIGABRT) + fix_signal(SIGABRT); + #endif + #if defined(SIGFPE) + fix_signal(SIGFPE); + #endif + #if defined(SIGTERM) + fix_signal(SIGTERM); + #endif + #if defined(SIGBUS) + fix_signal(SIGBUS); + #endif + #if defined(SIGSEGV) + fix_signal(SIGSEGV); + #endif + #if defined(SIGXCPU) + fix_signal(SIGXCPU); + #endif + #if defined(SIGXFSZ) + fix_signal(SIGXFSZ); + #endif +} static int GetNumScreens(){ return 0; @@ -145,6 +212,31 @@ static int GetNumScreens(){ */ import "C" +// Calloc handles alloc/dealloc of C data +type Calloc struct { + pool []unsafe.Pointer +} + +// NewCalloc creates a new allocator +func NewCalloc() Calloc { + return Calloc{} +} + +// String creates a new C string and retains a reference to it +func (c Calloc) String(in string) *C.char { + result := C.CString(in) + c.pool = append(c.pool, unsafe.Pointer(result)) + return result +} + +// Free frees all allocated C memory +func (c Calloc) Free() { + for _, str := range c.pool { + C.free(str) + } + c.pool = []unsafe.Pointer{} +} + type windowPointer *C.GtkWindow type identifier C.uint type pointer unsafe.Pointer @@ -161,6 +253,8 @@ var ( mainThreadId *C.GThread ) +var registerURIScheme sync.Once + func init() { gtkSignalToMenuItem = map[uint]*MenuItem{} @@ -179,7 +273,36 @@ func dispatchOnMainThreadCallback(callbackID C.uint) { //export activateLinux func activateLinux(data pointer) { - // NOOP: Callback for now + processApplicationEvent(C.uint(events.Linux.ApplicationStartup), data) +} + +//export processApplicationEvent +func processApplicationEvent(eventID C.uint, data pointer) { + event := newApplicationEvent(events.ApplicationEventType(eventID)) + + //if data != nil { + // dataCStrJSON := C.serializationNSDictionary(data) + // if dataCStrJSON != nil { + // defer C.free(unsafe.Pointer(dataCStrJSON)) + // + // dataJSON := C.GoString(dataCStrJSON) + // var result map[string]any + // err := json.Unmarshal([]byte(dataJSON), &result) + // + // if err != nil { + // panic(err) + // } + // + // event.Context().setData(result) + // } + //} + + switch event.Id { + case uint(events.Linux.SystemThemeChanged): + isDark := globalApplication.IsDarkMode() + event.Context().setIsDarkMode(isDark) + } + applicationEvents <- event } func isOnMainThread() bool { @@ -195,6 +318,8 @@ func appName() string { } func appNew(name string) pointer { + C.install_signal_handlers() + // prevent leading number if matched, _ := regexp.MatchString(`^\d+`, name); matched { name = fmt.Sprintf("_%s", name) @@ -209,17 +334,12 @@ func appNew(name string) pointer { func appRun(app pointer) error { application := (*C.GApplication)(app) + //TODO: Only set this if we configure it to do so C.g_application_hold(application) // allows it to run without a window signal := C.CString("activate") defer C.free(unsafe.Pointer(signal)) - C.g_signal_connect_data( - C.gpointer(application), - signal, - C.GCallback(C.activateLinux), - nil, - nil, - 0) + C.signal_connect(unsafe.Pointer(application), signal, C.activateLinux, nil) status := C.g_application_run(application, 0, nil) C.g_application_release(application) C.g_object_unref(C.gpointer(app)) @@ -235,13 +355,13 @@ func appDestroy(application pointer) { C.g_application_quit((*C.GApplication)(application)) } -func contextMenuShow(window pointer, menu pointer, data *ContextMenuData) { +func (w *linuxWebviewWindow) contextMenuShow(menu pointer, data *ContextMenuData) { geometry := C.GdkRectangle{ x: C.int(data.X), y: C.int(data.Y), } event := C.GdkEvent{} - gdkWindow := C.gtk_widget_get_window((*C.GtkWidget)(window)) + gdkWindow := C.gtk_widget_get_window(w.gtkWidget()) C.gtk_menu_popup_at_rect( (*C.GtkMenu)(menu), gdkWindow, @@ -252,13 +372,13 @@ func contextMenuShow(window pointer, menu pointer, data *ContextMenuData) { ) } -func getCurrentWindowID(application pointer, windows map[windowPointer]uint) uint { +func (a *linuxApp) getCurrentWindowID() uint { // TODO: Add extra metadata to window and use it! - window := (*C.GtkWindow)(C.gtk_application_get_active_window((*C.GtkApplication)(application))) + window := (*C.GtkWindow)(C.gtk_application_get_active_window((*C.GtkApplication)(a.application))) if window == nil { return uint(1) } - identifier, ok := windows[window] + identifier, ok := a.windowMap[window] if ok { return identifier } @@ -266,9 +386,9 @@ func getCurrentWindowID(application pointer, windows map[windowPointer]uint) uin return uint(1) } -func getWindows(application pointer) []pointer { +func (a *linuxApp) getWindows() []pointer { result := []pointer{} - windows := C.gtk_application_get_windows((*C.GtkApplication)(application)) + windows := C.gtk_application_get_windows((*C.GtkApplication)(a.application)) for { result = append(result, pointer(windows.data)) windows = windows.next @@ -278,14 +398,14 @@ func getWindows(application pointer) []pointer { } } -func hideAllWindows(application pointer) { - for _, window := range getWindows(application) { +func (a *linuxApp) hideAllWindows() { + for _, window := range a.getWindows() { C.gtk_widget_hide((*C.GtkWidget)(window)) } } -func showAllWindows(application pointer) { - for _, window := range getWindows(application) { +func (a *linuxApp) showAllWindows() { + for _, window := range a.getWindows() { C.gtk_window_present((*C.GtkWindow)(window)) } } @@ -560,9 +680,10 @@ func getScreenByIndex(display *C.struct__GdkDisplay, index int) *Screen { if C.gdk_monitor_is_primary(monitor) == 1 { primary = true } + name := C.gdk_monitor_get_model(monitor) return &Screen{ ID: fmt.Sprintf("%d", index), - Name: fmt.Sprintf("Screen %d", index), + Name: C.GoString(name), IsPrimary: primary, Scale: float32(C.gdk_monitor_get_scale_factor(monitor)), X: int(geometry.x), @@ -593,13 +714,14 @@ func getScreens(app pointer) ([]*Screen, error) { } // widgets -func widgetSetSensitive(widget pointer, enabled bool) { - value := C.int(0) + +func (w *linuxWebviewWindow) setEnabled(enabled bool) { + var value C.int if enabled { value = C.int(1) } - C.gtk_widget_set_sensitive((*C.GtkWidget)(widget), value) + C.gtk_widget_set_sensitive(w.gtkWidget(), value) } func widgetSetVisible(widget pointer, hidden bool) { @@ -610,26 +732,27 @@ func widgetSetVisible(widget pointer, hidden bool) { } } -// window related functions -func windowClose(window pointer) { - C.gtk_window_close((*C.GtkWindow)(window)) +func (w *linuxWebviewWindow) close() { + C.gtk_widget_destroy(w.gtkWidget()) + getNativeApplication().unregisterWindow(windowPointer(w.window)) } -func windowEnableDND(id uint, webview pointer) { +func (w *linuxWebviewWindow) enableDND() { + id := w.parent.id dnd := C.CString("text/uri-list") defer C.free(unsafe.Pointer(dnd)) targetentry := C.gtk_target_entry_new(dnd, 0, C.guint(id)) defer C.gtk_target_entry_free(targetentry) - C.gtk_drag_dest_set((*C.GtkWidget)(webview), C.GTK_DEST_DEFAULT_DROP, targetentry, 1, C.GDK_ACTION_COPY) + C.gtk_drag_dest_set((*C.GtkWidget)(w.webview), C.GTK_DEST_DEFAULT_DROP, targetentry, 1, C.GDK_ACTION_COPY) event := C.CString("drag-data-received") defer C.free(unsafe.Pointer(event)) windowId := C.uint(id) - C.signal_connect(unsafe.Pointer(webview), event, C.onDragNDrop, unsafe.Pointer(C.gpointer(&windowId))) + C.signal_connect(unsafe.Pointer(w.webview), event, C.onDragNDrop, unsafe.Pointer(C.gpointer(&windowId))) } -func windowExecJS(webview pointer, js string) { +func (w *linuxWebviewWindow) execJS(js string) { value := C.CString(js) - C.webkit_web_view_evaluate_javascript((*C.WebKitWebView)(webview), + C.webkit_web_view_evaluate_javascript(w.webKitWebView(), value, C.long(len(js)), nil, @@ -640,28 +763,86 @@ func windowExecJS(webview pointer, js string) { C.free(unsafe.Pointer(value)) } -func windowDestroy(window pointer) { - // Should this truly 'destroy' ? - C.gtk_window_close((*C.GtkWindow)(window)) - //C.gtk_widget_destroy((*C.GtkWidget)(window)) -} - -func windowFullscreen(window pointer) { - C.gtk_window_fullscreen((*C.GtkWindow)(window)) +func getMousePosition() (int, int, *Screen) { + var x, y C.gint + var screen *C.GdkScreen + defaultDisplay := C.gdk_display_get_default() + device := C.gdk_seat_get_pointer(C.gdk_display_get_default_seat(defaultDisplay)) + C.gdk_device_get_position(device, &screen, &x, &y) + // Get Monitor for screen + monitor := C.gdk_display_get_monitor_at_point(defaultDisplay, x, y) + geometry := C.GdkRectangle{} + C.gdk_monitor_get_geometry(monitor, &geometry) + scale := int(C.gdk_monitor_get_scale_factor(monitor)) + return int(x), int(y), &Screen{ + ID: fmt.Sprintf("%d", 0), // A unique identifier for the display + Name: C.GoString(C.gdk_monitor_get_model(monitor)), // The name of the display + Scale: float32(scale), // The scale factor of the display + X: int(geometry.x), // The x-coordinate of the top-left corner of the rectangle + Y: int(geometry.y), // The y-coordinate of the top-left corner of the rectangle + Size: Size{Width: int(geometry.width), Height: int(geometry.height)}, // The size of the display + Bounds: Rect{}, // The bounds of the display + WorkArea: Rect{}, // The work area of the display + IsPrimary: false, // Whether this is the primary display + Rotation: 0.0, // The rotation of the display + } +} + +func (w *linuxWebviewWindow) destroy() { + w.parent.markAsDestroyed() + // Free menu + if w.gtkmenu != nil { + C.gtk_widget_destroy((*C.GtkWidget)(w.gtkmenu)) + w.gtkmenu = nil + } + // Free window + C.gtk_widget_destroy(w.gtkWidget()) +} + +func (w *linuxWebviewWindow) fullscreen() { + w.maximise() + //w.lastWidth, w.lastHeight = w.size() + x, y, width, height, scale := w.getCurrentMonitorGeometry() + if x == -1 && y == -1 && width == -1 && height == -1 { + return + } + w.setMinMaxSize(0, 0, width*scale, height*scale) + w.setSize(width*scale, height*scale) + C.gtk_window_fullscreen(w.gtkWindow()) + w.setRelativePosition(0, 0) } -func windowGetCurrentMonitor(window pointer) *C.GdkMonitor { +func (w *linuxWebviewWindow) getCurrentMonitor() *C.GdkMonitor { // Get the monitor that the window is currently on - display := C.gtk_widget_get_display((*C.GtkWidget)(window)) - gdk_window := C.gtk_widget_get_window((*C.GtkWidget)(window)) - if gdk_window == nil { + display := C.gtk_widget_get_display(w.gtkWidget()) + gdkWindow := C.gtk_widget_get_window(w.gtkWidget()) + if gdkWindow == nil { return nil } - return C.gdk_display_get_monitor_at_window(display, gdk_window) + return C.gdk_display_get_monitor_at_window(display, gdkWindow) } -func windowGetCurrentMonitorGeometry(window pointer) (x int, y int, width int, height int, scale int) { - monitor := windowGetCurrentMonitor(window) +func (w *linuxWebviewWindow) getScreen() (*Screen, error) { + // Get the current screen for the window + monitor := w.getCurrentMonitor() + name := C.gdk_monitor_get_model(monitor) + mx, my, width, height, scale := w.getCurrentMonitorGeometry() + return &Screen{ + ID: fmt.Sprintf("%d", w.id), // A unique identifier for the display + Name: C.GoString(name), // The name of the display + Scale: float32(scale), // The scale factor of the display + X: mx, // The x-coordinate of the top-left corner of the rectangle + Y: my, // The y-coordinate of the top-left corner of the rectangle + Size: Size{Width: width, Height: height}, // The size of the display + Bounds: Rect{}, // The bounds of the display + WorkArea: Rect{}, // The work area of the display + IsPrimary: false, // Whether this is the primary display + Rotation: 0.0, // The rotation of the display + }, nil +} + +func (w *linuxWebviewWindow) getCurrentMonitorGeometry() (x int, y int, width int, height int, scale int) { + monitor := w.getCurrentMonitor() if monitor == nil { return -1, -1, -1, -1, 1 } @@ -671,25 +852,18 @@ func windowGetCurrentMonitorGeometry(window pointer) (x int, y int, width int, h return int(result.x), int(result.y), int(result.width), int(result.height), scale } -func windowGetAbsolutePosition(window pointer) (int, int) { - var x C.int - var y C.int - C.gtk_window_get_position((*C.GtkWindow)(window), &x, &y) - return int(x), int(y) -} - -func windowGetSize(window pointer) (int, int) { +func (w *linuxWebviewWindow) size() (int, int) { var windowWidth C.int var windowHeight C.int - C.gtk_window_get_size((*C.GtkWindow)(window), &windowWidth, &windowHeight) + C.gtk_window_get_size(w.gtkWindow(), &windowWidth, &windowHeight) return int(windowWidth), int(windowHeight) } -func windowGetRelativePosition(window pointer) (int, int) { - x, y := windowGetAbsolutePosition(window) +func (w *linuxWebviewWindow) relativePosition() (int, int) { + x, y := w.absolutePosition() // The position must be relative to the screen it is on // We need to get the screen it is on - monitor := windowGetCurrentMonitor(window) + monitor := w.getCurrentMonitor() geometry := C.GdkRectangle{} C.gdk_monitor_get_geometry(monitor, &geometry) x = x - int(geometry.x) @@ -700,49 +874,55 @@ func windowGetRelativePosition(window pointer) (int, int) { return x, y } -func windowHide(window pointer) { - C.gtk_widget_hide((*C.GtkWidget)(window)) +func (w *linuxWebviewWindow) gtkWidget() *C.GtkWidget { + return (*C.GtkWidget)(w.window) } -func windowIsFullscreen(window pointer) bool { - gdkwindow := C.gtk_widget_get_window((*C.GtkWidget)(window)) - state := C.gdk_window_get_state(gdkwindow) +func (w *linuxWebviewWindow) hide() { + // save position + w.lastX, w.lastY = w.absolutePosition() + C.gtk_widget_hide(w.gtkWidget()) +} + +func (w *linuxWebviewWindow) isFullscreen() bool { + gdkWindow := C.gtk_widget_get_window(w.gtkWidget()) + state := C.gdk_window_get_state(gdkWindow) return state&C.GDK_WINDOW_STATE_FULLSCREEN > 0 } -func windowIsFocused(window pointer) bool { +func (w *linuxWebviewWindow) isFocused() bool { // returns true if window is focused - return C.gtk_window_has_toplevel_focus((*C.GtkWindow)(window)) == 1 + return C.gtk_window_has_toplevel_focus(w.gtkWindow()) == 1 } -func windowIsMaximized(window pointer) bool { - gdkwindow := C.gtk_widget_get_window((*C.GtkWidget)(window)) +func (w *linuxWebviewWindow) isMaximised() bool { + gdkwindow := C.gtk_widget_get_window(w.gtkWidget()) state := C.gdk_window_get_state(gdkwindow) return state&C.GDK_WINDOW_STATE_MAXIMIZED > 0 && state&C.GDK_WINDOW_STATE_FULLSCREEN == 0 } -func windowIsMinimized(window pointer) bool { - gdkwindow := C.gtk_widget_get_window((*C.GtkWidget)(window)) +func (w *linuxWebviewWindow) isMinimised() bool { + gdkwindow := C.gtk_widget_get_window(w.gtkWidget()) state := C.gdk_window_get_state(gdkwindow) return state&C.GDK_WINDOW_STATE_ICONIFIED > 0 } -func windowIsVisible(window pointer) bool { - if C.gtk_widget_is_visible((*C.GtkWidget)(window)) == 1 { +func (w *linuxWebviewWindow) isVisible() bool { + if C.gtk_widget_is_visible(w.gtkWidget()) == 1 { return true } return false } -func windowMaximize(window pointer) { - C.gtk_window_maximize((*C.GtkWindow)(window)) +func (w *linuxWebviewWindow) maximise() { + C.gtk_window_maximize(w.gtkWindow()) } -func windowMinimize(window pointer) { - C.gtk_window_iconify((*C.GtkWindow)(window)) +func (w *linuxWebviewWindow) minimise() { + C.gtk_window_iconify(w.gtkWindow()) } -func windowNew(application pointer, menu pointer, windowId uint, gpuPolicy int) (window, webview, vbox pointer) { +func windowNew(application pointer, menu pointer, windowId uint, gpuPolicy WebviewGpuPolicy) (window, webview, vbox pointer) { window = pointer(C.gtk_application_window_new((*C.GtkApplication)(application))) C.g_object_ref_sink(C.gpointer(window)) webview = windowNewWebview(windowId, gpuPolicy) @@ -759,78 +939,97 @@ func windowNew(application pointer, menu pointer, windowId uint, gpuPolicy int) return } -func windowNewWebview(parentId uint, gpuPolicy int) pointer { +func windowNewWebview(parentId uint, gpuPolicy WebviewGpuPolicy) pointer { + c := NewCalloc() + defer c.Free() manager := C.webkit_user_content_manager_new() - external := C.CString("external") - C.webkit_user_content_manager_register_script_message_handler(manager, external) - C.free(unsafe.Pointer(external)) - webview := C.webkit_web_view_new_with_user_content_manager(manager) - id := C.uint(parentId) - if !registered { - wails := C.CString("wails") + C.webkit_user_content_manager_register_script_message_handler(manager, c.String("external")) + webView := C.webkit_web_view_new_with_user_content_manager(manager) + winID := unsafe.Pointer(uintptr(C.uint(parentId))) + + // attach window id to both the webview and contentmanager + C.g_object_set_data((*C.GObject)(unsafe.Pointer(webView)), c.String("windowid"), C.gpointer(winID)) + C.g_object_set_data((*C.GObject)(unsafe.Pointer(manager)), c.String("windowid"), C.gpointer(winID)) + + registerURIScheme.Do(func() { + context := C.webkit_web_view_get_context(C.webkit_web_view(webView)) C.webkit_web_context_register_uri_scheme( - C.webkit_web_context_get_default(), - wails, + context, + c.String("wails"), C.WebKitURISchemeRequestCallback(C.onProcessRequest), - C.gpointer(&id), + nil, nil) - registered = true - C.free(unsafe.Pointer(wails)) - } - settings := C.webkit_web_view_get_settings((*C.WebKitWebView)(unsafe.Pointer(webview))) - wails_io := C.CString("wails.io") - empty := C.CString("") - defer C.free(unsafe.Pointer(wails_io)) - defer C.free(unsafe.Pointer(empty)) - C.webkit_settings_set_user_agent_with_application_details(settings, wails_io, empty) + }) + settings := C.webkit_web_view_get_settings((*C.WebKitWebView)(unsafe.Pointer(webView))) + C.webkit_settings_set_user_agent_with_application_details(settings, c.String("wails.io"), c.String("")) switch gpuPolicy { - case 0: + case WebviewGpuPolicyAlways: C.webkit_settings_set_hardware_acceleration_policy(settings, C.WEBKIT_HARDWARE_ACCELERATION_POLICY_ALWAYS) break - case 1: + case WebviewGpuPolicyOnDemand: C.webkit_settings_set_hardware_acceleration_policy(settings, C.WEBKIT_HARDWARE_ACCELERATION_POLICY_ON_DEMAND) break - case 2: + case WebviewGpuPolicyNever: C.webkit_settings_set_hardware_acceleration_policy(settings, C.WEBKIT_HARDWARE_ACCELERATION_POLICY_NEVER) break default: C.webkit_settings_set_hardware_acceleration_policy(settings, C.WEBKIT_HARDWARE_ACCELERATION_POLICY_ON_DEMAND) } - return pointer(webview) + return pointer(webView) } -func windowPresent(window pointer) { - C.gtk_window_present((*C.GtkWindow)(window)) - // gtk_window_unminimize ((*C.GtkWindow)(w.window)) /// gtk4 +func (w *linuxWebviewWindow) present() { + C.gtk_window_present(w.gtkWindow()) + // gtk_window_unminimize (w.gtkWindow()) /// gtk4 } -func windowReload(webview pointer, address string) { - uri := C.CString(address) - C.webkit_web_view_load_uri((*C.WebKitWebView)(webview), uri) - C.free(unsafe.Pointer(uri)) -} - -func windowResize(window pointer, width, height int) { +func (w *linuxWebviewWindow) setSize(width, height int) { C.gtk_window_resize( - (*C.GtkWindow)(window), + w.gtkWindow(), C.gint(width), C.gint(height)) } -func windowShow(window pointer) { - C.gtk_widget_show_all((*C.GtkWidget)(window)) +func (w *linuxWebviewWindow) show() { + if w.gtkWidget() == nil { + return + } + C.gtk_widget_show_all(w.gtkWidget()) + //w.setAbsolutePosition(w.lastX, w.lastY) +} + +func windowIgnoreMouseEvents(window pointer, webview pointer, ignore bool) { + var enable C.int + if ignore { + enable = 1 + } + gdkWindow := (*C.GdkWindow)(window) + C.gdk_window_set_pass_through(gdkWindow, enable) + C.webkit_web_view_set_editable((*C.WebKitWebView)(webview), C.gboolean(enable)) +} + +func (w *linuxWebviewWindow) webKitWebView() *C.WebKitWebView { + return (*C.WebKitWebView)(w.webview) +} + +func (w *linuxWebviewWindow) setBorderless(borderless bool) { + C.gtk_window_set_decorated(w.gtkWindow(), gtkBool(!borderless)) } -func windowSetBackgroundColour(vbox, webview pointer, colour RGBA) { +func (w *linuxWebviewWindow) setResizable(resizable bool) { + C.gtk_window_set_resizable(w.gtkWindow(), gtkBool(resizable)) +} + +func (w *linuxWebviewWindow) setBackgroundColour(colour RGBA) { rgba := C.GdkRGBA{C.double(colour.Red) / 255.0, C.double(colour.Green) / 255.0, C.double(colour.Blue) / 255.0, C.double(colour.Alpha) / 255.0} - C.webkit_web_view_set_background_color((*C.WebKitWebView)(webview), &rgba) + C.webkit_web_view_set_background_color((*C.WebKitWebView)(w.webview), &rgba) colour.Alpha = 255 cssStr := C.CString(fmt.Sprintf("#webview-box {background-color: rgba(%d, %d, %d, %1.1f);}", colour.Red, colour.Green, colour.Blue, float32(colour.Alpha)/255.0)) provider := C.gtk_css_provider_new() C.gtk_style_context_add_provider( - C.gtk_widget_get_style_context((*C.GtkWidget)(vbox)), + C.gtk_widget_get_style_context((*C.GtkWidget)(w.vbox)), (*C.GtkStyleProvider)(unsafe.Pointer(provider)), C.GTK_STYLE_PROVIDER_PRIORITY_USER) C.g_object_unref(C.gpointer(provider)) @@ -838,6 +1037,34 @@ func windowSetBackgroundColour(vbox, webview pointer, colour RGBA) { C.free(unsafe.Pointer(cssStr)) } +func getPrimaryScreen() (*Screen, error) { + display := C.gdk_display_get_default() + monitor := C.gdk_display_get_primary_monitor(display) + geometry := C.GdkRectangle{} + C.gdk_monitor_get_geometry(monitor, &geometry) + scale := int(C.gdk_monitor_get_scale_factor(monitor)) + // get the name for the screen + name := C.gdk_monitor_get_model(monitor) + return &Screen{ + ID: "0", + Name: C.GoString(name), + IsPrimary: true, + X: int(geometry.x), + Y: int(geometry.y), + Size: Size{ + Height: int(geometry.height), + Width: int(geometry.width), + }, + Bounds: Rect{ + X: int(geometry.x), + Y: int(geometry.y), + Height: int(geometry.height), + Width: int(geometry.width), + }, + Scale: float32(scale), + }, nil +} + func windowSetGeometryHints(window pointer, minWidth, minHeight, maxWidth, maxHeight int) { size := C.GdkGeometry{ min_width: C.int(minWidth), @@ -848,14 +1075,14 @@ func windowSetGeometryHints(window pointer, minWidth, minHeight, maxWidth, maxHe C.gtk_window_set_geometry_hints((*C.GtkWindow)(window), nil, &size, C.GDK_HINT_MAX_SIZE|C.GDK_HINT_MIN_SIZE) } -func windowSetFrameless(window pointer, frameless bool) { - C.gtk_window_set_decorated((*C.GtkWindow)(window), gtkBool(!frameless)) +func (w *linuxWebviewWindow) setFrameless(frameless bool) { + C.gtk_window_set_decorated(w.gtkWindow(), gtkBool(!frameless)) // TODO: Deal with transparency for the titlebar if possible when !frameless // Perhaps we just make it undecorated and add a menu bar inside? } // TODO: confirm this is working properly -func windowSetHTML(webview pointer, html string) { +func (w *linuxWebviewWindow) setHTML(html string) { cHTML := C.CString(html) uri := C.CString("wails://") empty := C.CString("") @@ -863,39 +1090,45 @@ func windowSetHTML(webview pointer, html string) { defer C.free(unsafe.Pointer(uri)) defer C.free(unsafe.Pointer(empty)) C.webkit_web_view_load_alternate_html( - (*C.WebKitWebView)(webview), + w.webKitWebView(), cHTML, uri, empty) } -func windowSetKeepAbove(window pointer, alwaysOnTop bool) { - C.gtk_window_set_keep_above((*C.GtkWindow)(window), gtkBool(alwaysOnTop)) +func (w *linuxWebviewWindow) setAlwaysOnTop(alwaysOnTop bool) { + C.gtk_window_set_keep_above(w.gtkWindow(), gtkBool(alwaysOnTop)) +} + +func (w *linuxWebviewWindow) flash(_ bool) { + // Not supported on Linux } -func windowSetResizable(window pointer, resizable bool) { - C.gtk_window_set_resizable((*C.GtkWindow)(window), gtkBool(resizable)) +func (w *linuxWebviewWindow) setTitle(title string) { + if !w.parent.options.Frameless { + cTitle := C.CString(title) + C.gtk_window_set_title(w.gtkWindow(), cTitle) + C.free(unsafe.Pointer(cTitle)) + } } -func windowSetTitle(window pointer, title string) { - cTitle := C.CString(title) - C.gtk_window_set_title((*C.GtkWindow)(window), cTitle) - C.free(unsafe.Pointer(cTitle)) +func (w *linuxWebviewWindow) gtkWindow() *C.GtkWindow { + return (*C.GtkWindow)(w.window) } -func windowSetTransparent(window pointer) { - screen := C.gtk_widget_get_screen((*C.GtkWidget)(window)) +func (w *linuxWebviewWindow) setTransparent() { + screen := C.gtk_widget_get_screen(w.gtkWidget()) visual := C.gdk_screen_get_rgba_visual(screen) if visual != nil && C.gdk_screen_is_composited(screen) == C.int(1) { - C.gtk_widget_set_app_paintable((*C.GtkWidget)(window), C.gboolean(1)) - C.gtk_widget_set_visual((*C.GtkWidget)(window), visual) + C.gtk_widget_set_app_paintable(w.gtkWidget(), C.gboolean(1)) + C.gtk_widget_set_visual(w.gtkWidget(), visual) } } -func windowSetURL(webview pointer, uri string) { +func (w *linuxWebviewWindow) setURL(uri string) { target := C.CString(uri) - C.webkit_web_view_load_uri((*C.WebKitWebView)(webview), target) + C.webkit_web_view_load_uri(w.webKitWebView(), target) C.free(unsafe.Pointer(target)) } @@ -910,53 +1143,77 @@ func emit(we *C.WindowEvent) { } } -func windowSetupSignalHandlers(windowId uint, window, webview pointer, emit func(e events.WindowEventType)) { - event := C.CString("delete-event") - defer C.free(unsafe.Pointer(event)) - wEvent := C.WindowEvent{ - id: C.uint(windowId), - event: C.uint(events.Common.WindowClosing), +//export handleDeleteEvent +func handleDeleteEvent(widget *C.GtkWidget, event *C.GdkEvent, data C.uintptr_t) C.gboolean { + processWindowEvent(C.uint(data), C.uint(events.Linux.WindowDeleteEvent)) + return C.gboolean(1) +} + +//export handleFocusEvent +func handleFocusEvent(widget *C.GtkWidget, event *C.GdkEvent, data C.uintptr_t) C.gboolean { + focusEvent := (*C.GdkEventFocus)(unsafe.Pointer(event)) + if focusEvent._type == C.GDK_FOCUS_CHANGE { + if focusEvent.in == C.TRUE { + processWindowEvent(C.uint(data), C.uint(events.Linux.WindowFocusIn)) + } else { + processWindowEvent(C.uint(data), C.uint(events.Linux.WindowFocusOut)) + } } - C.signal_connect(unsafe.Pointer(window), event, C.emit, unsafe.Pointer(&wEvent)) + return C.gboolean(0) +} - contentManager := C.webkit_web_view_get_user_content_manager((*C.WebKitWebView)(webview)) - event = C.CString("script-message-received::external") - defer C.free(unsafe.Pointer(event)) - C.signal_connect(unsafe.Pointer(contentManager), event, C.sendMessageToBackend, nil) +//export handleLoadChanged +func handleLoadChanged(webview *C.WebKitWebView, event C.WebKitLoadEvent, data C.uintptr_t) { + switch event { + case C.WEBKIT_LOAD_FINISHED: + processWindowEvent(C.uint(data), C.uint(events.Linux.WindowLoadChanged)) + } +} - /* - event = C.CString("load-changed") - defer C.free(unsafe.Pointer(event)) - C.signal_connect(webview, event, C.webviewLoadChanged, unsafe.Pointer(&w.parent.id)) - */ - id := C.uint(windowId) - event = C.CString("button-press-event") - C.signal_connect(unsafe.Pointer(webview), event, C.onButtonEvent, unsafe.Pointer(&id)) - C.free(unsafe.Pointer(event)) - event = C.CString("button-release-event") - defer C.free(unsafe.Pointer(event)) - C.signal_connect(unsafe.Pointer(webview), event, C.onButtonEvent, unsafe.Pointer(&id)) +func (w *linuxWebviewWindow) setupSignalHandlers(emit func(e events.WindowEventType)) { - event = C.CString("key-press-event") - defer C.free(unsafe.Pointer(event)) - C.signal_connect(unsafe.Pointer(webview), event, C.onKeyPressEvent, unsafe.Pointer(&id)) + c := NewCalloc() + defer c.Free() + + winID := unsafe.Pointer(uintptr(C.uint(w.parent.ID()))) + + // Set up the window close event + wv := unsafe.Pointer(w.webview) + C.signal_connect(unsafe.Pointer(w.window), c.String("delete-event"), C.handleDeleteEvent, winID) + C.signal_connect(unsafe.Pointer(w.window), c.String("focus-out-event"), C.handleFocusEvent, winID) + C.signal_connect(wv, c.String("load-changed"), C.handleLoadChanged, winID) + + contentManager := C.webkit_web_view_get_user_content_manager(w.webKitWebView()) + C.signal_connect(unsafe.Pointer(contentManager), c.String("script-message-received::external"), C.sendMessageToBackend, nil) + C.signal_connect(wv, c.String("button-press-event"), C.onButtonEvent, winID) + C.signal_connect(wv, c.String("button-release-event"), C.onButtonEvent, winID) + C.signal_connect(wv, c.String("key-press-event"), C.onKeyPressEvent, winID) } -func windowShowDevTools(webview pointer) { +func getMouseButtons() (bool, bool, bool) { + var pointer *C.GdkDevice + var state C.GdkModifierType + pointer = C.gdk_seat_get_pointer(C.gdk_display_get_default_seat(C.gdk_display_get_default())) + C.gdk_device_get_state(pointer, nil, nil, &state) + return state&C.GDK_BUTTON1_MASK > 0, state&C.GDK_BUTTON2_MASK > 0, state&C.GDK_BUTTON3_MASK > 0 +} + +func openDevTools(webview pointer) { inspector := C.webkit_web_view_get_inspector((*C.WebKitWebView)(webview)) C.webkit_web_inspector_show(inspector) } -func windowStartDrag(window pointer, button uint, xroot int, yroot int, dragTime uint32) { +func (w *linuxWebviewWindow) startDrag() error { C.gtk_window_begin_move_drag( - (*C.GtkWindow)(window), - C.int(button), - C.int(xroot), - C.int(yroot), - C.uint32_t(dragTime)) + (*C.GtkWindow)(w.window), + C.int(w.drag.MouseButton), + C.int(w.drag.XRoot), + C.int(w.drag.YRoot), + C.uint32_t(w.drag.DragTime)) + return nil } -func windowToggleDevTools(webview pointer) { +func enableDevTools(webview pointer) { settings := C.webkit_web_view_get_settings((*C.WebKitWebView)(webview)) enabled := C.webkit_settings_get_enable_developer_extras(settings) switch enabled { @@ -968,49 +1225,69 @@ func windowToggleDevTools(webview pointer) { C.webkit_settings_set_enable_developer_extras(settings, enabled) } -func windowUnfullscreen(window pointer) { - C.gtk_window_unfullscreen((*C.GtkWindow)(window)) +func (w *linuxWebviewWindow) unfullscreen() { + C.gtk_window_unfullscreen((*C.GtkWindow)(w.window)) + w.unmaximise() } -func windowUnmaximize(window pointer) { - C.gtk_window_unmaximize((*C.GtkWindow)(window)) +func (w *linuxWebviewWindow) unmaximise() { + C.gtk_window_unmaximize((*C.GtkWindow)(w.window)) } -func windowZoom(webview pointer) float64 { - return float64(C.webkit_web_view_get_zoom_level((*C.WebKitWebView)(webview))) +func (w *linuxWebviewWindow) getZoom() float64 { + return float64(C.webkit_web_view_get_zoom_level(w.webKitWebView())) } -// FIXME: ZoomIn/Out is assumed to be incorrect! -func windowZoomIn(webview pointer) { +func (w *linuxWebviewWindow) zoomIn() { + // FIXME: ZoomIn/Out is assumed to be incorrect! ZoomInFactor := 1.10 - windowZoomSet(webview, windowZoom(webview)*ZoomInFactor) + w.setZoom(w.getZoom() * ZoomInFactor) } -func windowZoomOut(webview pointer) { - ZoomOutFactor := -1.10 - windowZoomSet(webview, windowZoom(webview)*ZoomOutFactor) + +func (w *linuxWebviewWindow) zoomOut() { + ZoomInFactor := -1.10 + w.setZoom(w.getZoom() * ZoomInFactor) } -func windowZoomSet(webview pointer, zoom float64) { +func (w *linuxWebviewWindow) zoomReset() { + w.setZoom(1.0) +} + +func (w *linuxWebviewWindow) reload() { + uri := C.CString("wails://") + C.webkit_web_view_load_uri(w.webKitWebView(), uri) + C.free(unsafe.Pointer(uri)) +} + +func (w *linuxWebviewWindow) setZoom(zoom float64) { if zoom < 1 { // 1.0 is the smallest allowable zoom = 1 } - C.webkit_web_view_set_zoom_level((*C.WebKitWebView)(webview), C.double(zoom)) + C.webkit_web_view_set_zoom_level(w.webKitWebView(), C.double(zoom)) +} + +func (w *linuxWebviewWindow) move(x, y int) { + // Move the window to these coordinates + C.gtk_window_move(w.gtkWindow(), C.int(x), C.int(y)) } -func windowMove(window pointer, x, y int) { - C.gtk_window_move((*C.GtkWindow)(window), C.int(x), C.int(y)) +func (w *linuxWebviewWindow) absolutePosition() (int, int) { + var x C.int + var y C.int + C.gtk_window_get_position((*C.GtkWindow)(w.window), &x, &y) + return int(x), int(y) } // FIXME Change this to reflect mouse button! // //export onButtonEvent -func onButtonEvent(_ *C.GtkWidget, event *C.GdkEventButton, data unsafe.Pointer) C.gboolean { +func onButtonEvent(_ *C.GtkWidget, event *C.GdkEventButton, data C.uintptr_t) C.gboolean { // Constants (defined here to be easier to use with purego) GdkButtonPress := C.GDK_BUTTON_PRESS // 4 Gdk2ButtonPress := C.GDK_2BUTTON_PRESS // 5 for double-click GdkButtonRelease := C.GDK_BUTTON_RELEASE // 7 - windowId := uint(*((*C.uint)(data))) + windowId := uint(C.uint(data)) window := globalApplication.getWindowForID(windowId) if window == nil { return C.gboolean(0) @@ -1068,17 +1345,15 @@ func onDragNDrop(target unsafe.Pointer, context *C.GdkDragContext, x C.gint, y C } //export onKeyPressEvent -func onKeyPressEvent(widget *C.GtkWidget, event *C.GdkEventKey, userData unsafe.Pointer) C.gboolean { - windowID := uint(*((*C.uint)(userData))) - accelerator, ok := getKeyboardState(event) - if !ok { - return C.gboolean(1) - } - windowKeyEvents <- &windowKeyEvent{ - windowId: windowID, - acceleratorString: accelerator, +func onKeyPressEvent(widget *C.GtkWidget, event *C.GdkEventKey, userData C.uintptr_t) C.gboolean { + windowID := uint(C.uint(userData)) + if accelerator, ok := getKeyboardState(event); ok { + windowKeyEvents <- &windowKeyEvent{ + windowId: windowID, + acceleratorString: accelerator, + } } - return C.gboolean(1) + return C.gboolean(0) } func getKeyboardState(event *C.GdkEventKey) (string, bool) { @@ -1109,10 +1384,11 @@ func getKeyboardState(event *C.GdkEventKey) (string, bool) { } //export onProcessRequest -func onProcessRequest(request unsafe.Pointer, data unsafe.Pointer) { - windowId := uint(*((*C.uint)(data))) +func onProcessRequest(request *C.WebKitURISchemeRequest, data C.uintptr_t) { + webView := C.webkit_uri_scheme_request_get_web_view(request) + windowId := uint(uintptr(C.g_object_get_data((*C.GObject)(unsafe.Pointer(webView)), C.CString("windowid")))) webviewRequests <- &webViewAssetRequest{ - Request: webview.NewRequest(request), + Request: webview.NewRequest(unsafe.Pointer(request)), windowId: windowId, windowName: globalApplication.getWindowForID(windowId).Name(), } @@ -1122,13 +1398,16 @@ func onProcessRequest(request unsafe.Pointer, data unsafe.Pointer) { func sendMessageToBackend(contentManager *C.WebKitUserContentManager, result *C.WebKitJavascriptResult, data unsafe.Pointer) { + // Get the windowID from the contentManager + windowID := uint(uintptr(C.g_object_get_data((*C.GObject)(unsafe.Pointer(contentManager)), C.CString("windowid")))) + var msg string value := C.webkit_javascript_result_get_js_value(result) message := C.jsc_value_to_string(value) msg = C.GoString(message) defer C.g_free(C.gpointer(message)) windowMessageBuffer <- &windowMessage{ - windowId: uint(windowID), + windowId: windowID, message: msg, } } @@ -1187,7 +1466,7 @@ func runChooserDialog(window pointer, allowMultiple, createFolders, showHidden b gtkFilters := []*C.GtkFileFilter{} for _, filter := range filters { - f := (C.gtk_file_filter_new()) + f := C.gtk_file_filter_new() displayStr := C.CString(filter.DisplayName) C.gtk_file_filter_set_name(f, displayStr) C.free(unsafe.Pointer(displayStr)) diff --git a/v3/pkg/application/linux_purego.go b/v3/pkg/application/linux_purego.go index 682bf195eda..5c58ae57854 100644 --- a/v3/pkg/application/linux_purego.go +++ b/v3/pkg/application/linux_purego.go @@ -976,7 +976,7 @@ func windowSetupSignalHandlers(windowId uint, window, webview pointer, emit func */ } -func windowToggleDevTools(webview pointer) { +func windowOpenDevTools(webview pointer) { settings := webkitWebViewGetSettings(pointer(webview)) webkitSettingsSetEnableDeveloperExtras( settings, diff --git a/v3/pkg/application/mainthread_linux.go b/v3/pkg/application/mainthread_linux.go index 572b081be3e..a718688bc4f 100644 --- a/v3/pkg/application/mainthread_linux.go +++ b/v3/pkg/application/mainthread_linux.go @@ -2,7 +2,7 @@ package application -func (m *linuxApp) dispatchOnMainThread(id uint) { +func (a *linuxApp) dispatchOnMainThread(id uint) { dispatchOnMainThread(id) } diff --git a/v3/pkg/application/menu.go b/v3/pkg/application/menu.go index f4a18f39a08..ae75c00ad9f 100644 --- a/v3/pkg/application/menu.go +++ b/v3/pkg/application/menu.go @@ -95,6 +95,21 @@ func (m *Menu) setContextData(data *ContextMenuData) { } } +// Clone recursively clones the menu and all its submenus. +func (m *Menu) clone() *Menu { + result := &Menu{ + label: m.label, + } + for _, item := range m.items { + result.items = append(result.items, item.clone()) + } + return result +} + +func (m *Menu) Append(in *Menu) { + m.items = append(m.items, in.items...) +} + func (a *App) NewMenu() *Menu { return &Menu{} } diff --git a/v3/pkg/application/menuitem.go b/v3/pkg/application/menuitem.go index f363fb7409e..1f05874e8c6 100644 --- a/v3/pkg/application/menuitem.go +++ b/v3/pkg/application/menuitem.go @@ -167,8 +167,8 @@ func newRole(role Role) *MenuItem { return newForceReloadMenuItem() case ToggleFullscreen: return newToggleFullscreenMenuItem() - case ShowDevTools: - return newShowDevToolsMenuItem() + case OpenDevTools: + return newOpenDevToolsMenuItem() case ResetZoom: return newZoomResetMenuItem() case ZoomIn: @@ -332,3 +332,29 @@ func (m *MenuItem) setContextData(data *ContextMenuData) { m.submenu.setContextData(data) } } + +// clone returns a deep copy of the MenuItem +func (m *MenuItem) clone() *MenuItem { + result := &MenuItem{ + id: m.id, + label: m.label, + tooltip: m.tooltip, + disabled: m.disabled, + checked: m.checked, + hidden: m.hidden, + bitmap: m.bitmap, + callback: m.callback, + itemType: m.itemType, + role: m.role, + } + if m.submenu != nil { + result.submenu = m.submenu.clone() + } + if m.accelerator != nil { + result.accelerator = m.accelerator.clone() + } + if m.contextMenuData != nil { + result.contextMenuData = m.contextMenuData.clone() + } + return result +} diff --git a/v3/pkg/application/menuitem_darwin.go b/v3/pkg/application/menuitem_darwin.go index 714851bb533..3b25b56e2e7 100644 --- a/v3/pkg/application/menuitem_darwin.go +++ b/v3/pkg/application/menuitem_darwin.go @@ -576,17 +576,6 @@ func newToggleFullscreenMenuItem() *MenuItem { return result } -func newToggleDevToolsMenuItem() *MenuItem { - return newMenuItem("Toggle Developer Tools"). - SetAccelerator("Alt+Command+I"). - OnClick(func(ctx *Context) { - currentWindow := globalApplication.CurrentWindow() - if currentWindow != nil { - currentWindow.ToggleDevTools() - } - }) -} - func newZoomResetMenuItem() *MenuItem { // reset zoom menu item return newMenuItem("Actual Size"). diff --git a/v3/pkg/application/menuitem_dev.go b/v3/pkg/application/menuitem_dev.go index 23b0395cd18..7375b117dfe 100644 --- a/v3/pkg/application/menuitem_dev.go +++ b/v3/pkg/application/menuitem_dev.go @@ -2,13 +2,13 @@ package application -func newShowDevToolsMenuItem() *MenuItem { - return newMenuItem("Show Developer Tools"). +func newOpenDevToolsMenuItem() *MenuItem { + return newMenuItem("Open Developer Tools"). SetAccelerator("Alt+Command+I"). OnClick(func(ctx *Context) { currentWindow := globalApplication.CurrentWindow() if currentWindow != nil { - currentWindow.ToggleDevTools() + currentWindow.OpenDevTools() } }) } diff --git a/v3/pkg/application/menuitem_linux.go b/v3/pkg/application/menuitem_linux.go index 058b586092d..abdd8fe0551 100644 --- a/v3/pkg/application/menuitem_linux.go +++ b/v3/pkg/application/menuitem_linux.go @@ -294,17 +294,6 @@ func newToggleFullscreenMenuItem() *MenuItem { return result } -func newToggleDevToolsMenuItem() *MenuItem { - return newMenuItem("Toggle Developer Tools"). - SetAccelerator("Alt+Command+I"). - OnClick(func(ctx *Context) { - currentWindow := globalApplication.CurrentWindow() - if currentWindow != nil { - currentWindow.ToggleDevTools() - } - }) -} - func newZoomResetMenuItem() *MenuItem { // reset zoom menu item return newMenuItem("Actual Size"). diff --git a/v3/pkg/application/menuitem_production.go b/v3/pkg/application/menuitem_production.go index 553338e879f..387b9d06cb1 100644 --- a/v3/pkg/application/menuitem_production.go +++ b/v3/pkg/application/menuitem_production.go @@ -2,6 +2,6 @@ package application -func newShowDevToolsMenuItem() *MenuItem { +func newOpenDevToolsMenuItem() *MenuItem { return nil } diff --git a/v3/pkg/application/messageprocessor_contextmenu.go b/v3/pkg/application/messageprocessor_contextmenu.go index c7c8a86a892..0d7f2e8948b 100644 --- a/v3/pkg/application/messageprocessor_contextmenu.go +++ b/v3/pkg/application/messageprocessor_contextmenu.go @@ -11,6 +11,15 @@ type ContextMenuData struct { Data any `json:"data"` } +func (d ContextMenuData) clone() *ContextMenuData { + return &ContextMenuData{ + Id: d.Id, + X: d.X, + Y: d.Y, + Data: d.Data, + } +} + const ( ContextMenuOpen = 0 ) diff --git a/v3/pkg/application/options_application_mac.go b/v3/pkg/application/options_application_mac.go deleted file mode 100644 index ddfbc80e65b..00000000000 --- a/v3/pkg/application/options_application_mac.go +++ /dev/null @@ -1,22 +0,0 @@ -package application - -// ActivationPolicy is the activation policy for the application. -type ActivationPolicy int - -const ( - // ActivationPolicyRegular is used for applications that have a user interface, - ActivationPolicyRegular ActivationPolicy = iota - // ActivationPolicyAccessory is used for applications that do not have a main window, - // such as system tray applications or background applications. - ActivationPolicyAccessory - ActivationPolicyProhibited -) - -// MacOptions contains options for macOS applications. -type MacOptions struct { - // ActivationPolicy is the activation policy for the application. Defaults to - // applicationActivationPolicyRegular. - ActivationPolicy ActivationPolicy - // If set to true, the application will terminate when the last window is closed. - ApplicationShouldTerminateAfterLastWindowClosed bool -} diff --git a/v3/pkg/application/options_application_win.go b/v3/pkg/application/options_application_win.go deleted file mode 100644 index b5a7afdb7ec..00000000000 --- a/v3/pkg/application/options_application_win.go +++ /dev/null @@ -1,21 +0,0 @@ -package application - -// WindowsOptions contains options for Windows applications. -type WindowsOptions struct { - - // WndProcInterceptor is a function that will be called for every message sent in the application. - // Use this to hook into the main message loop. This is useful for handling custom window messages. - // If `shouldReturn` is `true` then `returnCode` will be returned by the main message loop. - // If `shouldReturn` is `false` then returnCode will be ignored and the message will be processed by the main message loop. - WndProcInterceptor func(hwnd uintptr, msg uint32, wParam, lParam uintptr) (returnCode uintptr, shouldReturn bool) - - // DisableQuitOnLastWindowClosed disables the auto quit of the application if the last window has been closed. - DisableQuitOnLastWindowClosed bool - - // Path where the WebView2 stores the user data. If empty %APPDATA%\[BinaryName.exe] will be used. - // If the path is not valid, a messagebox will be displayed with the error and the app will exit with error code. - WebviewUserDataPath string - - // Path to the directory with WebView2 executables. If empty WebView2 installed in the system will be used. - WebviewBrowserPath string -} diff --git a/v3/pkg/application/options_linux.go b/v3/pkg/application/options_linux.go deleted file mode 100644 index bf3d0c308f4..00000000000 --- a/v3/pkg/application/options_linux.go +++ /dev/null @@ -1,6 +0,0 @@ -package application - -// LinuxWindow contains macOS specific options -type LinuxWindow struct { - ShowApplicationMenu bool -} diff --git a/v3/pkg/application/options_mac.go b/v3/pkg/application/options_mac.go deleted file mode 100644 index 6255cc5cec1..00000000000 --- a/v3/pkg/application/options_mac.go +++ /dev/null @@ -1,165 +0,0 @@ -package application - -import ( - "github.com/leaanthony/u" - "github.com/wailsapp/wails/v3/pkg/events" -) - -// MacBackdrop is the backdrop type for macOS -type MacBackdrop int - -const ( - // MacBackdropNormal - The default value. The window will have a normal opaque background. - MacBackdropNormal MacBackdrop = iota - // MacBackdropTransparent - The window will have a transparent background, with the content underneath it being visible - MacBackdropTransparent - // MacBackdropTranslucent - The window will have a translucent background, with the content underneath it being "fuzzy" or "frosted" - MacBackdropTranslucent -) - -// MacToolbarStyle is the style of toolbar for macOS -type MacToolbarStyle int - -const ( - // MacToolbarStyleAutomatic - The default value. The style will be determined by the window's given configuration - MacToolbarStyleAutomatic MacToolbarStyle = iota - // MacToolbarStyleExpanded - The toolbar will appear below the window title - MacToolbarStyleExpanded - // MacToolbarStylePreference - The toolbar will appear below the window title and the items in the toolbar will attempt to have equal widths when possible - MacToolbarStylePreference - // MacToolbarStyleUnified - The window title will appear inline with the toolbar when visible - MacToolbarStyleUnified - // MacToolbarStyleUnifiedCompact - Same as MacToolbarStyleUnified, but with reduced margins in the toolbar allowing more focus to be on the contents of the window - MacToolbarStyleUnifiedCompact -) - -// MacWindow contains macOS specific options for Webview Windows -type MacWindow struct { - // Backdrop is the backdrop type for the window - Backdrop MacBackdrop - // DisableShadow will disable the window shadow - DisableShadow bool - // TitleBar contains options for the Mac titlebar - TitleBar MacTitleBar - // Appearance is the appearance type for the window - Appearance MacAppearanceType - // InvisibleTitleBarHeight defines the height of an invisible titlebar which responds to dragging - InvisibleTitleBarHeight int - // Maps events from platform specific to common event types - EventMapping map[events.WindowEventType]events.WindowEventType - - // EnableFraudulentWebsiteWarnings will enable warnings for fraudulent websites. - // Default: false - EnableFraudulentWebsiteWarnings bool - - // WebviewPreferences contains preferences for the webview - WebviewPreferences MacWebviewPreferences - - // Disables the minimise button - DisableMinimiseButton bool - - // Disables the maximise button - DisableMaximiseButton bool - - // Disables the close button - DisableCloseButton bool -} - -// MacWebviewPreferences contains preferences for the Mac webview -type MacWebviewPreferences struct { - // TabFocusesLinks will enable tabbing to links - TabFocusesLinks u.Bool - // TextInteractionEnabled will enable text interaction - TextInteractionEnabled u.Bool - // FullscreenEnabled will enable fullscreen - FullscreenEnabled u.Bool -} - -// MacTitleBar contains options for the Mac titlebar -type MacTitleBar struct { - // AppearsTransparent will make the titlebar transparent - AppearsTransparent bool - // Hide will hide the titlebar - Hide bool - // HideTitle will hide the title - HideTitle bool - // FullSizeContent will extend the window content to the full size of the window - FullSizeContent bool - // UseToolbar will use a toolbar instead of a titlebar - UseToolbar bool - // HideToolbarSeparator will hide the toolbar separator - HideToolbarSeparator bool - // ShowToolbarWhenFullscreen will keep the toolbar visible when the window is in fullscreen mode - ShowToolbarWhenFullscreen bool - // ToolbarStyle is the style of toolbar to use - ToolbarStyle MacToolbarStyle -} - -// MacTitleBarDefault results in the default Mac MacTitleBar -var MacTitleBarDefault = MacTitleBar{ - AppearsTransparent: false, - Hide: false, - HideTitle: false, - FullSizeContent: false, - UseToolbar: false, - HideToolbarSeparator: false, -} - -// Credit: Comments from Electron site - -// MacTitleBarHidden results in a hidden title bar and a full size content window, -// yet the title bar still has the standard window controls (“traffic lights”) -// in the top left. -var MacTitleBarHidden = MacTitleBar{ - AppearsTransparent: true, - Hide: false, - HideTitle: true, - FullSizeContent: true, - UseToolbar: false, - HideToolbarSeparator: false, -} - -// MacTitleBarHiddenInset results in a hidden title bar with an alternative look where -// the traffic light buttons are slightly more inset from the window edge. -var MacTitleBarHiddenInset = MacTitleBar{ - AppearsTransparent: true, - Hide: false, - HideTitle: true, - FullSizeContent: true, - UseToolbar: true, - HideToolbarSeparator: true, -} - -// MacTitleBarHiddenInsetUnified results in a hidden title bar with an alternative look where -// the traffic light buttons are even more inset from the window edge. -var MacTitleBarHiddenInsetUnified = MacTitleBar{ - AppearsTransparent: true, - Hide: false, - HideTitle: true, - FullSizeContent: true, - UseToolbar: true, - HideToolbarSeparator: true, - ToolbarStyle: MacToolbarStyleUnified, -} - -// MacAppearanceType is a type of Appearance for Cocoa windows -type MacAppearanceType string - -const ( - // DefaultAppearance uses the default system value - DefaultAppearance MacAppearanceType = "" - // NSAppearanceNameAqua - The standard light system appearance. - NSAppearanceNameAqua MacAppearanceType = "NSAppearanceNameAqua" - // NSAppearanceNameDarkAqua - The standard dark system appearance. - NSAppearanceNameDarkAqua MacAppearanceType = "NSAppearanceNameDarkAqua" - // NSAppearanceNameVibrantLight - The light vibrant appearance - NSAppearanceNameVibrantLight MacAppearanceType = "NSAppearanceNameVibrantLight" - // NSAppearanceNameAccessibilityHighContrastAqua - A high-contrast version of the standard light system appearance. - NSAppearanceNameAccessibilityHighContrastAqua MacAppearanceType = "NSAppearanceNameAccessibilityHighContrastAqua" - // NSAppearanceNameAccessibilityHighContrastDarkAqua - A high-contrast version of the standard dark system appearance. - NSAppearanceNameAccessibilityHighContrastDarkAqua MacAppearanceType = "NSAppearanceNameAccessibilityHighContrastDarkAqua" - // NSAppearanceNameAccessibilityHighContrastVibrantLight - A high-contrast version of the light vibrant appearance. - NSAppearanceNameAccessibilityHighContrastVibrantLight MacAppearanceType = "NSAppearanceNameAccessibilityHighContrastVibrantLight" - // NSAppearanceNameAccessibilityHighContrastVibrantDark - A high-contrast version of the dark vibrant appearance. - NSAppearanceNameAccessibilityHighContrastVibrantDark MacAppearanceType = "NSAppearanceNameAccessibilityHighContrastVibrantDark" -) diff --git a/v3/pkg/application/options_webview_window.go b/v3/pkg/application/options_webview_window.go deleted file mode 100644 index d2bccba4573..00000000000 --- a/v3/pkg/application/options_webview_window.go +++ /dev/null @@ -1,161 +0,0 @@ -package application - -type WindowState int - -const ( - WindowStateNormal WindowState = iota - WindowStateMinimised - WindowStateMaximised - WindowStateFullscreen -) - -type WebviewWindowOptions struct { - // Name is a unique identifier that can be given to a window. - Name string - - // Title is the title of the window. - Title string - - // Width is the starting width of the window. - Width int - - // Height is the starting height of the window. - Height int - - // AlwaysOnTop will make the window float above other windows. - AlwaysOnTop bool - - // URL is the URL to load in the window. - URL string - - // DisableResize will disable the ability to resize the window. - DisableResize bool - - // Frameless will remove the window frame. - Frameless bool - - // MinWidth is the minimum width of the window. - MinWidth int - - // MinHeight is the minimum height of the window. - MinHeight int - - // MaxWidth is the maximum width of the window. - MaxWidth int - - // MaxHeight is the maximum height of the window. - MaxHeight int - - // StartState indicates the state of the window when it is first shown. - // Default: WindowStateNormal - StartState WindowState - - // Centered will center the window on the screen. - Centered bool - - // BackgroundType is the type of background to use for the window. - // Default: BackgroundTypeSolid - BackgroundType BackgroundType - - // BackgroundColour is the colour to use for the window background. - BackgroundColour RGBA - - // HTML is the HTML to load in the window. - HTML string - - // JS is the JavaScript to load in the window. - JS string - - // CSS is the CSS to load in the window. - CSS string - - // X is the starting X position of the window. - X int - - // Y is the starting Y position of the window. - Y int - - // TransparentTitlebar will make the titlebar transparent. - // TODO: Move to mac window options - FullscreenButtonEnabled bool - - // Hidden will hide the window when it is first created. - Hidden bool - - // Zoom is the zoom level of the window. - Zoom float64 - - // ZoomControlEnabled will enable the zoom control. - ZoomControlEnabled bool - - // EnableDragAndDrop will enable drag and drop. - EnableDragAndDrop bool - - // OpenInspectorOnStartup will open the inspector when the window is first shown. - OpenInspectorOnStartup bool - - // Mac options - Mac MacWindow - - // Windows options - Windows WindowsWindow - - // ShouldClose is called when the window is about to close. - // Return true to allow the window to close, or false to prevent it from closing. - ShouldClose func(window *WebviewWindow) bool - - // If true, the window's devtools will be available (default true in builds without the `production` build tag) - DevToolsEnabled bool - - // If true, the window's default context menu will be disabled (default false) - DefaultContextMenuDisabled bool - - // KeyBindings is a map of key bindings to functions - KeyBindings map[string]func(window *WebviewWindow) - - // IgnoreMouseEvents will ignore mouse events in the window - IgnoreMouseEvents bool -} - -var WebviewWindowDefaults = &WebviewWindowOptions{ - Title: "", - Width: 800, - Height: 600, - URL: "", - BackgroundColour: RGBA{ - Red: 255, - Green: 255, - Blue: 255, - Alpha: 255, - }, -} - -type RGBA struct { - Red, Green, Blue, Alpha uint8 -} - -func NewRGBA(red, green, blue, alpha uint8) RGBA { - return RGBA{ - Red: red, - Green: green, - Blue: blue, - Alpha: alpha, - } -} - -func NewRGB(red, green, blue uint8) RGBA { - return RGBA{ - Red: red, - Green: green, - Blue: blue, - Alpha: 255, - } -} - -type BackgroundType int - -const ( - BackgroundTypeSolid BackgroundType = iota - BackgroundTypeTransparent - BackgroundTypeTranslucent -) diff --git a/v3/pkg/application/options_webview_window_win.go b/v3/pkg/application/options_webview_window_win.go deleted file mode 100644 index 9c51219a481..00000000000 --- a/v3/pkg/application/options_webview_window_win.go +++ /dev/null @@ -1,154 +0,0 @@ -package application - -import ( - "github.com/wailsapp/wails/v3/pkg/events" -) - -type BackdropType int32 -type DragEffect int32 - -const ( - // DragEffectNone is used to indicate that the drop target cannot accept the data. - DragEffectNone DragEffect = 1 - // DragEffectCopy is used to indicate that the data is copied to the drop target. - DragEffectCopy DragEffect = 2 - // DragEffectMove is used to indicate that the data is removed from the drag source. - DragEffectMove DragEffect = 3 - // DragEffectLink is used to indicate that a link to the original data is established. - DragEffectLink DragEffect = 4 - // DragEffectScroll is used to indicate that the target can be scrolled while dragging to locate a drop position that is not currently visible in the target. - -) - -const ( - Auto BackdropType = 0 - None BackdropType = 1 - Mica BackdropType = 2 - Acrylic BackdropType = 3 - Tabbed BackdropType = 4 -) - -type CoreWebView2PermissionKind uint32 - -const ( - CoreWebView2PermissionKindUnknownPermission CoreWebView2PermissionKind = iota - CoreWebView2PermissionKindMicrophone - CoreWebView2PermissionKindCamera - CoreWebView2PermissionKindGeolocation - CoreWebView2PermissionKindNotifications - CoreWebView2PermissionKindOtherSensors - CoreWebView2PermissionKindClipboardRead -) - -type CoreWebView2PermissionState uint32 - -const ( - CoreWebView2PermissionStateDefault CoreWebView2PermissionState = iota - CoreWebView2PermissionStateAllow - CoreWebView2PermissionStateDeny -) - -type WindowsWindow struct { - // Select the type of translucent backdrop. Requires Windows 11 22621 or later. - // Only used when window's `BackgroundType` is set to `BackgroundTypeTranslucent`. - // Default: Auto - BackdropType BackdropType - - // Disable the icon in the titlebar - // Default: false - DisableIcon bool - - // Theme (Dark / Light / SystemDefault) - // Default: SystemDefault - The application will follow system theme changes. - Theme Theme - - // Specify custom colours to use for dark/light mode - // Default: nil - CustomTheme *ThemeSettings - - // Disable all window decorations in Frameless mode, which means no "Aero Shadow" and no "Rounded Corner" will be shown. - // "Rounded Corners" are only available on Windows 11. - // Default: false - DisableFramelessWindowDecorations bool - - // WindowMask is used to set the window shape. Use a PNG with an alpha channel to create a custom shape. - // Default: nil - WindowMask []byte - - // WindowMaskDraggable is used to make the window draggable by clicking on the window mask. - // Default: false - WindowMaskDraggable bool - - // WebviewGpuIsDisabled is used to enable / disable GPU acceleration for the webview - // Default: false - WebviewGpuIsDisabled bool - - // ResizeDebounceMS is the amount of time to debounce redraws of webview2 - // when resizing the window - // Default: 0 - ResizeDebounceMS uint16 - - // Disable the menu bar for this window - // Default: false - DisableMenu bool - - // Event mapping for the window. This allows you to define a translation from one event to another. - // Default: nil - EventMapping map[events.WindowEventType]events.WindowEventType - - // HiddenOnTaskbar hides the window from the taskbar - // Default: false - HiddenOnTaskbar bool - - // EnableSwipeGestures enables swipe gestures for the window - // Default: false - EnableSwipeGestures bool - - // EnableFraudulentWebsiteWarnings will enable warnings for fraudulent websites. - // Default: false - EnableFraudulentWebsiteWarnings bool - - // Menu is the menu to use for the window. - Menu *Menu - - // Drag Cursor Effects - OnEnterEffect DragEffect - OnOverEffect DragEffect - - // Permissions map for WebView2. If empty, default permissions will be granted. - Permissions map[CoreWebView2PermissionKind]CoreWebView2PermissionState - - // Disables the minimise button - DisableMinimiseButton bool - - // Disables the maximise button - DisableMaximiseButton bool -} - -type Theme int - -const ( - // SystemDefault will use whatever the system theme is. The application will follow system theme changes. - SystemDefault Theme = 0 - // Dark Mode - Dark Theme = 1 - // Light Mode - Light Theme = 2 -) - -// ThemeSettings defines custom colours to use in dark or light mode. -// They may be set using the hex values: 0x00BBGGRR -type ThemeSettings struct { - DarkModeTitleBar int32 - DarkModeTitleBarInactive int32 - DarkModeTitleText int32 - DarkModeTitleTextInactive int32 - DarkModeBorder int32 - DarkModeBorderInactive int32 - LightModeTitleBar int32 - LightModeTitleBarInactive int32 - LightModeTitleText int32 - LightModeTitleTextInactive int32 - LightModeBorder int32 - LightModeBorderInactive int32 -} diff --git a/v3/pkg/application/roles.go b/v3/pkg/application/roles.go index c096092735d..bce6b5c2c68 100644 --- a/v3/pkg/application/roles.go +++ b/v3/pkg/application/roles.go @@ -36,7 +36,7 @@ const ( Close Role = iota Reload Role = iota ForceReload Role = iota - ShowDevTools Role = iota + OpenDevTools Role = iota ResetZoom Role = iota ZoomIn Role = iota ZoomOut Role = iota diff --git a/v3/pkg/application/roles_dev.go b/v3/pkg/application/roles_dev.go index 6b0b1acc480..1c03e398dd7 100644 --- a/v3/pkg/application/roles_dev.go +++ b/v3/pkg/application/roles_dev.go @@ -3,5 +3,5 @@ package application func addDevToolMenuItem(viewMenu *Menu) { - viewMenu.AddRole(ShowDevTools) + viewMenu.AddRole(OpenDevTools) } diff --git a/v3/pkg/application/screen_linux.go b/v3/pkg/application/screen_linux.go index 36411045486..f6dfdf59d36 100644 --- a/v3/pkg/application/screen_linux.go +++ b/v3/pkg/application/screen_linux.go @@ -3,21 +3,29 @@ package application import ( - "fmt" "sync" ) -func (m *linuxApp) getPrimaryScreen() (*Screen, error) { - return nil, fmt.Errorf("not implemented") +func (a *linuxApp) getPrimaryScreen() (*Screen, error) { + var wg sync.WaitGroup + var screen *Screen + var err error + wg.Add(1) + InvokeSync(func() { + screen, err = getPrimaryScreen() + wg.Done() + }) + wg.Wait() + return screen, err } -func (m *linuxApp) getScreens() ([]*Screen, error) { +func (a *linuxApp) getScreens() ([]*Screen, error) { var wg sync.WaitGroup var screens []*Screen var err error wg.Add(1) InvokeSync(func() { - screens, err = getScreens(m.application) + screens, err = getScreens(a.application) wg.Done() }) wg.Wait() diff --git a/v3/pkg/application/systemtray_linux.go b/v3/pkg/application/systemtray_linux.go index 43501c95290..2468e7ff18a 100644 --- a/v3/pkg/application/systemtray_linux.go +++ b/v3/pkg/application/systemtray_linux.go @@ -24,6 +24,8 @@ const ( ) type linuxSystemTray struct { + parent *SystemTray + id uint label string icon []byte @@ -41,6 +43,11 @@ type linuxSystemTray struct { itemMap map[int32]*systrayMenuItem } +func (s *linuxSystemTray) getScreen() (*Screen, error) { + _, _, result := getMousePosition() + return result, nil +} + // dbusMenu is a named struct to map into generated bindings. // It represents the layout of a menu item type dbusMenu = struct { @@ -182,6 +189,22 @@ func (s *linuxSystemTray) refresh() { } func (s *linuxSystemTray) setMenu(menu *Menu) { + if s.parent.attachedWindow.Window != nil { + temp := menu + menu = NewMenu() + title := "Open" + if s.parent.attachedWindow.Window.Name() != "" { + title += " " + s.parent.attachedWindow.Window.Name() + } else { + title += " window" + } + openMenuItem := menu.Add(title) + openMenuItem.OnClick(func(*Context) { + s.parent.clickHandler() + }) + menu.AddSeparator() + menu.Append(temp) + } s.itemMap = map[int32]*systrayMenuItem{} // our root menu element s.itemMap[0] = &systrayMenuItem{ @@ -198,16 +221,47 @@ func (s *linuxSystemTray) setMenu(menu *Menu) { } func (s *linuxSystemTray) positionWindow(window *WebviewWindow, offset int) error { - return nil -} + // Get the mouse location on the screen + mouseX, mouseY, currentScreen := getMousePosition() + screenBounds := currentScreen.Size -func (s *linuxSystemTray) getScreen() (*Screen, error) { - // FIXME: How do we get the screen we are on? - return &Screen{}, nil + // Calculate new X position + newX := mouseX - (window.Width() / 2) + + // Check if the window goes out of the screen bounds on the left side + if newX < 0 { + newX = 0 + } + + // Check if the window goes out of the screen bounds on the right side + if newX+window.Width() > screenBounds.Width { + newX = screenBounds.Width - window.Width() + } + + // Calculate new Y position + newY := mouseY - (window.Height() / 2) + + // Check if the window goes out of the screen bounds on the top + if newY < 0 { + newY = 0 + } + + // Check if the window goes out of the screen bounds on the bottom + if newY+window.Height() > screenBounds.Height { + newY = screenBounds.Height - window.Height() - offset + } + + // Set the new position of the window + window.SetAbsolutePosition(newX, newY) + return nil } func (s *linuxSystemTray) bounds() (*Rect, error) { + + // Best effort guess at the screen bounds + return &Rect{}, nil + } func (s *linuxSystemTray) run() { @@ -354,6 +408,7 @@ func newSystemTrayImpl(s *SystemTray) systemTrayImpl { } return &linuxSystemTray{ + parent: s, id: s.id, label: label, icon: s.icon, @@ -572,6 +627,16 @@ func (s *linuxSystemTray) Event(id int32, eventID string, data dbus.Variant, tim InvokeAsync(item.menuItem.handleClick) } } + if eventID == "opened" { + if s.parent.onMenuOpen != nil { + s.parent.onMenuOpen() + } + } + if eventID == "closed" { + if s.parent.onMenuClose != nil { + s.parent.onMenuClose() + } + } return } @@ -583,6 +648,7 @@ func (s *linuxSystemTray) EventGroup(events []struct { V3 uint32 }) (idErrors []int32, err *dbus.Error) { for _, event := range events { + fmt.Printf("EventGroup: %v, %v, %v, %v\n", event.V0, event.V1, event.V2, event.V3) if event.V1 == "clicked" { item, ok := s.itemMap[event.V0] if ok { diff --git a/v3/pkg/application/webview_window.go b/v3/pkg/application/webview_window.go index 833ba7a91d8..5503c29b744 100644 --- a/v3/pkg/application/webview_window.go +++ b/v3/pkg/application/webview_window.go @@ -40,7 +40,7 @@ type ( destroy() reload() forceReload() - toggleDevTools() + openDevTools() zoomReset() zoomIn() zoomOut() @@ -64,6 +64,8 @@ type ( isVisible() bool isFocused() bool setFullscreenButtonEnabled(enabled bool) + setMinimiseButtonEnabled(enabled bool) + setMaximiseButtonEnabled(enabled bool) focus() show() hide() @@ -498,7 +500,7 @@ func (w *WebviewWindow) SetMaxSize(maxWidth, maxHeight int) Window { } // ExecJS executes the given javascript in the context of the window. -func (w *WebviewWindow) ExecJS(_callID, js string) { +func (w *WebviewWindow) ExecJS(js string) { if w.impl == nil && !w.isDestroyed() { return } @@ -532,6 +534,26 @@ func (w *WebviewWindow) SetFullscreenButtonEnabled(enabled bool) Window { return w } +func (w *WebviewWindow) SetMinimiseButtonEnabled(enabled bool) Window { + w.options.FullscreenButtonEnabled = enabled + if w.impl != nil { + InvokeSync(func() { + w.impl.setMinimiseButtonEnabled(enabled) + }) + } + return w +} + +func (w *WebviewWindow) SetMaximiseButtonEnabled(enabled bool) Window { + w.options.FullscreenButtonEnabled = enabled + if w.impl != nil { + InvokeSync(func() { + w.impl.setMaximiseButtonEnabled(enabled) + }) + } + return w +} + // Flash flashes the window's taskbar button/icon. // Useful to indicate that attention is required. Windows only. func (w *WebviewWindow) Flash(enabled bool) { @@ -635,7 +657,7 @@ func (w *WebviewWindow) HandleMessage(message string) { w.runtimeLoaded = true w.SetResizable(!w.options.DisableResize) for _, js := range w.pendingJS { - w.ExecJS("", js) + w.ExecJS(js) } } } @@ -817,11 +839,11 @@ func (w *WebviewWindow) ToggleMaximise() { }) } -func (w *WebviewWindow) ToggleDevTools() { +func (w *WebviewWindow) OpenDevTools() { if w.impl == nil && !w.isDestroyed() { return } - InvokeSync(w.impl.toggleDevTools) + InvokeSync(w.impl.openDevTools) } // ZoomReset resets the zoom level of the webview content to 100% @@ -1020,7 +1042,7 @@ func (w *WebviewWindow) SetFrameless(frameless bool) Window { func (w *WebviewWindow) DispatchWailsEvent(event *WailsEvent) { msg := fmt.Sprintf("_wails.dispatchWailsEvent(%s);", event.ToJSON()) - w.ExecJS("", msg) + w.ExecJS(msg) } func (w *WebviewWindow) dispatchWindowEvent(id uint) { diff --git a/v3/pkg/application/webview_window_darwin.go b/v3/pkg/application/webview_window_darwin.go index 156dba789f6..f6ba3038237 100644 --- a/v3/pkg/application/webview_window_darwin.go +++ b/v3/pkg/application/webview_window_darwin.go @@ -761,8 +761,6 @@ import ( "github.com/wailsapp/wails/v3/pkg/events" ) -var showDevTools = func(window unsafe.Pointer) {} - type macosWebviewWindow struct { nsWindow unsafe.Pointer parent *WebviewWindow @@ -906,10 +904,6 @@ func (w *macosWebviewWindow) zoomReset() { C.windowZoomReset(w.nsWindow) } -func (w *macosWebviewWindow) toggleDevTools() { - showDevTools(w.nsWindow) -} - func (w *macosWebviewWindow) reload() { //TODO: Implement globalApplication.debug("reload called on WebviewWindow", "parentID", w.parent.id) @@ -1134,13 +1128,13 @@ func (w *macosWebviewWindow) run() { } if macOptions.DisableMinimiseButton { - C.enableMinimiseButton(w.nsWindow, C.bool(false)) + w.setMinimiseButtonEnabled(false) } if macOptions.DisableMaximiseButton { - C.enableMaximiseButton(w.nsWindow, C.bool(false)) + w.setMaximiseButtonEnabled(false) } if macOptions.DisableCloseButton { - C.enableCloseButton(w.nsWindow, C.bool(false)) + w.setCloseButtonEnabled(false) } if options.IgnoreMouseEvents { @@ -1271,3 +1265,15 @@ func (w *macosWebviewWindow) startDrag() error { C.startDrag(w.nsWindow) return nil } + +func (w *macosWebviewWindow) setMinimiseButtonEnabled(enabled bool) { + C.enableMinimiseButton(w.nsWindow, C.bool(enabled)) +} + +func (w *macosWebviewWindow) setMaximiseButtonEnabled(enabled bool) { + C.enableMaximiseButton(w.nsWindow, C.bool(enabled)) +} + +func (w *macosWebviewWindow) setCloseButtonEnabled(enabled bool) { + C.enableCloseButton(w.nsWindow, C.bool(enabled)) +} diff --git a/v3/pkg/application/webview_window_darwin_dev.go b/v3/pkg/application/webview_window_darwin_dev.go index 4e76c5a57b0..c16746239ad 100644 --- a/v3/pkg/application/webview_window_darwin_dev.go +++ b/v3/pkg/application/webview_window_darwin_dev.go @@ -19,15 +19,7 @@ package application - (_WKInspector *)_inspector; @end -//void showDevTools(void *window) { -// // get main window -// WebviewWindow* nsWindow = (WebviewWindow*)window; -// dispatch_async(dispatch_get_main_queue(), ^{ -// [nsWindow.webView._inspector show]; -// }); -//} - -void showDevTools(void *window) { +void openDevTools(void *window) { #if MAC_OS_X_VERSION_MAX_ALLOWED >= 120000 dispatch_async(dispatch_get_main_queue(), ^{ if (@available(macOS 12.0, *)) { @@ -55,12 +47,9 @@ void windowEnableDevTools(void* nsWindow) { */ import "C" -import "unsafe" -func init() { - showDevTools = func(window unsafe.Pointer) { - C.showDevTools(window) - } +func (w *macosWebviewWindow) openDevTools() { + C.openDevTools(w.nsWindow) } func (w *macosWebviewWindow) enableDevTools() { diff --git a/v3/pkg/application/webview_window_darwin_production.go b/v3/pkg/application/webview_window_darwin_production.go index e0a5576e5ac..96e2de74ce9 100644 --- a/v3/pkg/application/webview_window_darwin_production.go +++ b/v3/pkg/application/webview_window_darwin_production.go @@ -3,3 +3,4 @@ package application func (w *macosWebviewWindow) enableDevTools() {} +func (w *macosWebviewWindow) openDevTools() {} diff --git a/v3/pkg/application/webview_window_linux.go b/v3/pkg/application/webview_window_linux.go index 748d8a6a40e..a1a171e1b6e 100644 --- a/v3/pkg/application/webview_window_linux.go +++ b/v3/pkg/application/webview_window_linux.go @@ -2,15 +2,16 @@ package application +import "C" import ( "fmt" + "github.com/wailsapp/wails/v3/internal/assetserver" "github.com/wailsapp/wails/v3/internal/capabilities" + "github.com/wailsapp/wails/v3/internal/runtime" "github.com/wailsapp/wails/v3/pkg/events" ) -var showDevTools = func(window pointer) {} - type dragInfo struct { XRoot int YRoot int @@ -19,44 +20,37 @@ type dragInfo struct { } type linuxWebviewWindow struct { - id uint - application pointer - window pointer - webview pointer - parent *WebviewWindow - menubar pointer - vbox pointer - menu *Menu - accels pointer - lastWidth int - lastHeight int - drag dragInfo + id uint + application pointer + window pointer + webview pointer + parent *WebviewWindow + menubar pointer + vbox pointer + menu *Menu + accels pointer + lastWidth int + lastHeight int + drag dragInfo + lastX, lastY int + gtkmenu pointer } var ( registered bool = false // avoid 'already registered message' about 'wails://' ) -func (w *linuxWebviewWindow) startDrag() error { - windowStartDrag(w.window, w.drag.MouseButton, w.drag.XRoot, w.drag.YRoot, w.drag.DragTime) - return nil -} - func (w *linuxWebviewWindow) endDrag(button uint, x, y int) { w.drag.XRoot = 0.0 w.drag.YRoot = 0.0 w.drag.DragTime = 0 } -func (w *linuxWebviewWindow) enableDND() { - windowEnableDND(w.parent.id, w.webview) -} - func (w *linuxWebviewWindow) connectSignals() { cb := func(e events.WindowEventType) { w.parent.emit(e) } - windowSetupSignalHandlers(w.parent.id, w.window, w.webview, cb) + w.setupSignalHandlers(cb) } func (w *linuxWebviewWindow) openContextMenu(menu *Menu, data *ContextMenuData) { @@ -70,109 +64,44 @@ func (w *linuxWebviewWindow) openContextMenu(menu *Menu, data *ContextMenuData) } native := ctxMenu.menu.impl.(*linuxMenu).native - contextMenuShow(w.window, native, data) -} - -func (w *linuxWebviewWindow) getZoom() float64 { - return windowZoom(w.webview) -} - -func (w *linuxWebviewWindow) setZoom(zoom float64) { - windowZoomSet(w.webview, zoom) -} - -func (w *linuxWebviewWindow) setFrameless(frameless bool) { - windowSetFrameless(w.window, frameless) -} - -func (w *linuxWebviewWindow) getScreen() (*Screen, error) { - mx, my, width, height, scale := windowGetCurrentMonitorGeometry(w.window) - return &Screen{ - ID: fmt.Sprintf("%d", w.id), // A unique identifier for the display - Name: w.parent.Name(), // The name of the display - Scale: float32(scale), // The scale factor of the display - X: mx, // The x-coordinate of the top-left corner of the rectangle - Y: my, // The y-coordinate of the top-left corner of the rectangle - Size: Size{Width: width, Height: height}, // The size of the display - Bounds: Rect{}, // The bounds of the display - WorkArea: Rect{}, // The work area of the display - IsPrimary: false, // Whether this is the primary display - Rotation: 0.0, // The rotation of the display - }, nil + w.contextMenuShow(native, data) } func (w *linuxWebviewWindow) focus() { - windowPresent(w.window) -} - -func (w *linuxWebviewWindow) show() { - windowShow(w.window) -} - -func (w *linuxWebviewWindow) hide() { - windowHide(w.window) + w.present() } func (w *linuxWebviewWindow) isNormal() bool { return !w.isMinimised() && !w.isMaximised() && !w.isFullscreen() } -func (w *linuxWebviewWindow) isVisible() bool { - return windowIsVisible(w.window) +func (w *linuxWebviewWindow) setCloseButtonEnabled(enabled bool) { + // C.enableCloseButton(w.nsWindow, C.bool(enabled)) } func (w *linuxWebviewWindow) setFullscreenButtonEnabled(enabled bool) { - // C.setFullscreenButtonEnabled(w.nsWindow, C.bool(enabled)) - fmt.Println("setFullscreenButtonEnabled - not implemented") + // Not implemented } -func (w *linuxWebviewWindow) disableSizeConstraints() { - x, y, width, height, scale := windowGetCurrentMonitorGeometry(w.window) - w.setMinMaxSize(x, y, width*scale, height*scale) +func (w *linuxWebviewWindow) setMinimiseButtonEnabled(enabled bool) { + //C.enableMinimiseButton(w.nsWindow, C.bool(enabled)) } -func (w *linuxWebviewWindow) unfullscreen() { - windowUnfullscreen(w.window) - w.unmaximise() +func (w *linuxWebviewWindow) setMaximiseButtonEnabled(enabled bool) { + //C.enableMaximiseButton(w.nsWindow, C.bool(enabled)) } -func (w *linuxWebviewWindow) fullscreen() { - w.maximise() - w.lastWidth, w.lastHeight = w.size() - x, y, width, height, scale := windowGetCurrentMonitorGeometry(w.window) - if x == -1 && y == -1 && width == -1 && height == -1 { - return - } - w.setMinMaxSize(0, 0, width*scale, height*scale) - w.setSize(width*scale, height*scale) - windowFullscreen(w.window) - w.setRelativePosition(0, 0) +func (w *linuxWebviewWindow) disableSizeConstraints() { + x, y, width, height, scale := w.getCurrentMonitorGeometry() + w.setMinMaxSize(x, y, width*scale, height*scale) } func (w *linuxWebviewWindow) unminimise() { - windowPresent(w.window) -} - -func (w *linuxWebviewWindow) unmaximise() { - windowUnmaximize(w.window) -} - -func (w *linuxWebviewWindow) maximise() { - windowMaximize(w.window) -} - -func (w *linuxWebviewWindow) minimise() { - windowMinimize(w.window) -} - -func (w *linuxWebviewWindow) flash(enabled bool) { - // Not supported on linux + w.present() } func (w *linuxWebviewWindow) on(eventID uint) { - // Don't think this is correct! - // GTK Events are strings - fmt.Println("on()", eventID) + // TODO: Test register/unregister listener for linux events //C.registerListener(C.uint(eventID)) } @@ -184,58 +113,22 @@ func (w *linuxWebviewWindow) windowZoom() { w.zoom() // FIXME> This should be removed } -func (w *linuxWebviewWindow) close() { - windowClose(w.window) -} - -func (w *linuxWebviewWindow) zoomIn() { - windowZoomIn(w.webview) -} - -func (w *linuxWebviewWindow) zoomOut() { - windowZoomOut(w.webview) -} - -func (w *linuxWebviewWindow) zoomReset() { - windowZoomSet(w.webview, 1.0) -} - -func (w *linuxWebviewWindow) reload() { - windowReload(w.webview, "wails://") -} - func (w *linuxWebviewWindow) forceReload() { w.reload() } func (w *linuxWebviewWindow) center() { - x, y, width, height, _ := windowGetCurrentMonitorGeometry(w.window) + x, y, width, height, _ := w.getCurrentMonitorGeometry() if x == -1 && y == -1 && width == -1 && height == -1 { return } - windowWidth, windowHeight := windowGetSize(w.window) + windowWidth, windowHeight := w.size() - newX := ((width - int(windowWidth)) / 2) + x - newY := ((height - int(windowHeight)) / 2) + y + newX := ((width - windowWidth) / 2) + x + newY := ((height - windowHeight) / 2) + y // Place the window at the center of the monitor - windowMove(w.window, newX, newY) -} - -func (w *linuxWebviewWindow) isMinimised() bool { - return windowIsMinimized(w.window) -} - -func (w *linuxWebviewWindow) isMaximised() bool { - return windowIsMaximized(w.window) -} - -func (w *linuxWebviewWindow) isFocused() bool { - return windowIsFocused(w.window) -} - -func (w *linuxWebviewWindow) isFullscreen() bool { - return windowIsFullscreen(w.window) + w.move(newX, newY) } func (w *linuxWebviewWindow) restore() { @@ -243,50 +136,25 @@ func (w *linuxWebviewWindow) restore() { // FIXME: never called! - remove from webviewImpl interface } -func (w *linuxWebviewWindow) execJS(js string) { - windowExecJS(w.webview, js) -} - -func (w *linuxWebviewWindow) setURL(uri string) { - windowSetURL(w.webview, uri) -} - -func (w *linuxWebviewWindow) setAlwaysOnTop(alwaysOnTop bool) { - windowSetKeepAbove(w.window, alwaysOnTop) -} - func newWindowImpl(parent *WebviewWindow) *linuxWebviewWindow { // (*C.struct__GtkWidget)(m.native) //var menubar *C.struct__GtkWidget - return &linuxWebviewWindow{ + result := &linuxWebviewWindow{ application: getNativeApplication().application, parent: parent, // menubar: menubar, } -} - -func (w *linuxWebviewWindow) setTitle(title string) { - if !w.parent.options.Frameless { - windowSetTitle(w.window, title) - } -} - -func (w *linuxWebviewWindow) setSize(width, height int) { - windowResize(w.window, width, height) + return result } func (w *linuxWebviewWindow) setMinMaxSize(minWidth, minHeight, maxWidth, maxHeight int) { - if minWidth == 0 { - minWidth = -1 - } - if minHeight == 0 { - minHeight = -1 - } + // Get current screen for window + _, _, monitorwidth, monitorheight, _ := w.getCurrentMonitorGeometry() if maxWidth == 0 { - maxWidth = -1 + maxWidth = monitorwidth } if maxHeight == 0 { - maxHeight = -1 + maxHeight = monitorheight } windowSetGeometryHints(w.window, minWidth, minHeight, maxWidth, maxHeight) } @@ -299,25 +167,9 @@ func (w *linuxWebviewWindow) setMaxSize(width, height int) { w.setMinMaxSize(w.parent.options.MinWidth, w.parent.options.MinHeight, width, height) } -func (w *linuxWebviewWindow) setResizable(resizable bool) { - windowSetResizable(w.window, resizable) -} - -func (w *linuxWebviewWindow) showDevTools() { - windowShowDevTools(w.webview) -} - -func (w *linuxWebviewWindow) toggleDevTools() { - showDevTools(w.webview) -} - -func (w *linuxWebviewWindow) size() (int, int) { - return windowGetSize(w.window) -} - func (w *linuxWebviewWindow) setRelativePosition(x, y int) { - mx, my, _, _, _ := windowGetCurrentMonitorGeometry(w.window) - windowMove(w.window, x+mx, y+my) + mx, my, _, _, _ := w.getCurrentMonitorGeometry() + w.move(x+mx, y+my) } func (w *linuxWebviewWindow) width() int { @@ -332,13 +184,7 @@ func (w *linuxWebviewWindow) height() int { func (w *linuxWebviewWindow) setAbsolutePosition(x int, y int) { // Set the window's absolute position - windowMove(w.window, x, y) -} - -func (w *linuxWebviewWindow) absolutePosition() (int, int) { - var x, y int - x, y = windowGetAbsolutePosition(w.window) - return x, y + w.move(x, y) } func (w *linuxWebviewWindow) run() { @@ -351,8 +197,19 @@ func (w *linuxWebviewWindow) run() { app := getNativeApplication() - menu := app.getApplicationMenu() - w.window, w.webview, w.vbox = windowNew(app.application, menu, w.parent.id, 1) + var menu = w.menu + if menu == nil && globalApplication.ApplicationMenu != nil { + menu = globalApplication.ApplicationMenu.clone() + } + if menu != nil { + InvokeSync(func() { + menu.Update() + }) + w.menu = menu + w.gtkmenu = (menu.impl).(*linuxMenu).native + } + + w.window, w.webview, w.vbox = windowNew(app.application, w.gtkmenu, w.parent.id, w.parent.options.Linux.WebviewGpuPolicy) app.registerWindow(w.window, w.parent.id) // record our mapping w.connectSignals() if w.parent.options.EnableDragAndDrop { @@ -385,7 +242,6 @@ func (w *linuxWebviewWindow) run() { if w.parent.options.X != 0 || w.parent.options.Y != 0 { w.setRelativePosition(w.parent.options.X, w.parent.options.Y) } else { - fmt.Println("attempting to set in the center") w.center() } switch w.parent.options.StartState { @@ -395,17 +251,20 @@ func (w *linuxWebviewWindow) run() { w.minimise() case WindowStateFullscreen: w.fullscreen() + case WindowStateNormal: } + //if w.parent.options.IgnoreMouseEvents { + // windowIgnoreMouseEvents(w.window, w.webview, true) + //} + startURL, err := assetserver.GetStartURL(w.parent.options.URL) if err != nil { globalApplication.fatal(err.Error()) } w.setURL(startURL) - // We need to wait for the HTML to load before we can execute the javascript - // FIXME: What event is this? DomReady? - w.parent.On(events.Mac.WebViewDidFinishNavigation, func(_ *WindowEvent) { + w.parent.On(events.Linux.WindowLoadChanged, func(_ *WindowEvent) { if w.parent.options.JS != "" { w.execJS(w.parent.options.JS) } @@ -414,6 +273,18 @@ func (w *linuxWebviewWindow) run() { w.execJS(js) } }) + w.parent.On(events.Linux.WindowFocusIn, func(e *WindowEvent) { + w.parent.emit(events.Common.WindowFocus) + }) + w.parent.On(events.Linux.WindowFocusOut, func(e *WindowEvent) { + w.parent.emit(events.Common.WindowLostFocus) + }) + w.parent.On(events.Linux.WindowDeleteEvent, func(e *WindowEvent) { + w.parent.emit(events.Common.WindowClosing) + }) + w.parent.RegisterHook(events.Linux.WindowLoadChanged, func(e *WindowEvent) { + w.execJS(runtime.Core()) + }) if w.parent.options.HTML != "" { w.setHTML(w.parent.options.HTML) } @@ -426,40 +297,13 @@ func (w *linuxWebviewWindow) run() { } } if w.parent.options.DevToolsEnabled || globalApplication.isDebugMode { - w.toggleDevTools() + w.enableDevTools() if w.parent.options.OpenInspectorOnStartup { - w.showDevTools() + w.openDevTools() } } } -func (w *linuxWebviewWindow) setTransparent() { - windowSetTransparent(w.window) -} - -func (w *linuxWebviewWindow) setBackgroundColour(colour RGBA) { - windowSetBackgroundColour(w.vbox, w.webview, colour) -} - -func (w *linuxWebviewWindow) relativePosition() (int, int) { - var x, y int - x, y = windowGetRelativePosition(w.window) - return x, y -} - -func (w *linuxWebviewWindow) destroy() { - w.parent.markAsDestroyed() - windowDestroy(w.window) -} - -func (w *linuxWebviewWindow) setEnabled(enabled bool) { - widgetSetSensitive(w.window, enabled) -} - -func (w *linuxWebviewWindow) setHTML(html string) { - windowSetHTML(w.webview, html) -} - func (w *linuxWebviewWindow) startResize(border string) error { // FIXME: what do we need to do here? return nil diff --git a/v3/pkg/application/webview_window_linux_dev.go b/v3/pkg/application/webview_window_linux_dev.go new file mode 100644 index 00000000000..3f34a6e64b1 --- /dev/null +++ b/v3/pkg/application/webview_window_linux_dev.go @@ -0,0 +1,11 @@ +//go:build linux && !production + +package application + +func (w *linuxWebviewWindow) openDevTools() { + openDevTools(w.webview) +} + +func (w *linuxWebviewWindow) enableDevTools() { + enableDevTools(w.webview) +} diff --git a/v3/pkg/application/webview_window_linux_devtools.go b/v3/pkg/application/webview_window_linux_devtools.go deleted file mode 100644 index eb883ae24fc..00000000000 --- a/v3/pkg/application/webview_window_linux_devtools.go +++ /dev/null @@ -1,9 +0,0 @@ -//go:build linux && !production - -package application - -func init() { - showDevTools = func(wv pointer) { - windowToggleDevTools(wv) - } -} diff --git a/v3/pkg/application/webview_window_linux_production.go b/v3/pkg/application/webview_window_linux_production.go new file mode 100644 index 00000000000..c65520b8ee3 --- /dev/null +++ b/v3/pkg/application/webview_window_linux_production.go @@ -0,0 +1,7 @@ +//go:build linux && production && !devtools + +package application + +func (w *linuxWebviewWindow) openDevTools() {} + +func (w *linuxWebviewWindow) enableDevTools() {} diff --git a/v3/pkg/application/webview_window_options.go b/v3/pkg/application/webview_window_options.go new file mode 100644 index 00000000000..d84bce87443 --- /dev/null +++ b/v3/pkg/application/webview_window_options.go @@ -0,0 +1,525 @@ +package application + +import ( + "github.com/leaanthony/u" + "github.com/wailsapp/wails/v3/pkg/events" +) + +type WindowState int + +const ( + WindowStateNormal WindowState = iota + WindowStateMinimised + WindowStateMaximised + WindowStateFullscreen +) + +type WebviewWindowOptions struct { + // Name is a unique identifier that can be given to a window. + Name string + + // Title is the title of the window. + Title string + + // Width is the starting width of the window. + Width int + + // Height is the starting height of the window. + Height int + + // AlwaysOnTop will make the window float above other windows. + AlwaysOnTop bool + + // URL is the URL to load in the window. + URL string + + // DisableResize will disable the ability to resize the window. + DisableResize bool + + // Frameless will remove the window frame. + Frameless bool + + // MinWidth is the minimum width of the window. + MinWidth int + + // MinHeight is the minimum height of the window. + MinHeight int + + // MaxWidth is the maximum width of the window. + MaxWidth int + + // MaxHeight is the maximum height of the window. + MaxHeight int + + // StartState indicates the state of the window when it is first shown. + // Default: WindowStateNormal + StartState WindowState + + // Centered will center the window on the screen. + Centered bool + + // BackgroundType is the type of background to use for the window. + // Default: BackgroundTypeSolid + BackgroundType BackgroundType + + // BackgroundColour is the colour to use for the window background. + BackgroundColour RGBA + + // HTML is the HTML to load in the window. + HTML string + + // JS is the JavaScript to load in the window. + JS string + + // CSS is the CSS to load in the window. + CSS string + + // X is the starting X position of the window. + X int + + // Y is the starting Y position of the window. + Y int + + // TransparentTitlebar will make the titlebar transparent. + // TODO: Move to mac window options + FullscreenButtonEnabled bool + + // Hidden will hide the window when it is first created. + Hidden bool + + // Zoom is the zoom level of the window. + Zoom float64 + + // ZoomControlEnabled will enable the zoom control. + ZoomControlEnabled bool + + // EnableDragAndDrop will enable drag and drop. + EnableDragAndDrop bool + + // OpenInspectorOnStartup will open the inspector when the window is first shown. + OpenInspectorOnStartup bool + + // Mac options + Mac MacWindow + + // Windows options + Windows WindowsWindow + + // Linux options + Linux LinuxWindow + + // ShouldClose is called when the window is about to close. + // Return true to allow the window to close, or false to prevent it from closing. + ShouldClose func(window *WebviewWindow) bool + + // If true, the window's devtools will be available (default true in builds without the `production` build tag) + DevToolsEnabled bool + + // If true, the window's default context menu will be disabled (default false) + DefaultContextMenuDisabled bool + + // KeyBindings is a map of key bindings to functions + KeyBindings map[string]func(window *WebviewWindow) + + // IgnoreMouseEvents will ignore mouse events in the window (Windows + Mac only) + IgnoreMouseEvents bool +} + +var WebviewWindowDefaults = &WebviewWindowOptions{ + Title: "", + Width: 800, + Height: 600, + URL: "", + BackgroundColour: RGBA{ + Red: 255, + Green: 255, + Blue: 255, + Alpha: 255, + }, +} + +type RGBA struct { + Red, Green, Blue, Alpha uint8 +} + +func NewRGBA(red, green, blue, alpha uint8) RGBA { + return RGBA{ + Red: red, + Green: green, + Blue: blue, + Alpha: alpha, + } +} + +func NewRGB(red, green, blue uint8) RGBA { + return RGBA{ + Red: red, + Green: green, + Blue: blue, + Alpha: 255, + } +} + +type BackgroundType int + +const ( + BackgroundTypeSolid BackgroundType = iota + BackgroundTypeTransparent + BackgroundTypeTranslucent +) + +/******* Windows Options *******/ + +type BackdropType int32 +type DragEffect int32 + +const ( + // DragEffectNone is used to indicate that the drop target cannot accept the data. + DragEffectNone DragEffect = 1 + // DragEffectCopy is used to indicate that the data is copied to the drop target. + DragEffectCopy DragEffect = 2 + // DragEffectMove is used to indicate that the data is removed from the drag source. + DragEffectMove DragEffect = 3 + // DragEffectLink is used to indicate that a link to the original data is established. + DragEffectLink DragEffect = 4 + // DragEffectScroll is used to indicate that the target can be scrolled while dragging to locate a drop position that is not currently visible in the target. + +) + +const ( + Auto BackdropType = 0 + None BackdropType = 1 + Mica BackdropType = 2 + Acrylic BackdropType = 3 + Tabbed BackdropType = 4 +) + +type CoreWebView2PermissionKind uint32 + +const ( + CoreWebView2PermissionKindUnknownPermission CoreWebView2PermissionKind = iota + CoreWebView2PermissionKindMicrophone + CoreWebView2PermissionKindCamera + CoreWebView2PermissionKindGeolocation + CoreWebView2PermissionKindNotifications + CoreWebView2PermissionKindOtherSensors + CoreWebView2PermissionKindClipboardRead +) + +type CoreWebView2PermissionState uint32 + +const ( + CoreWebView2PermissionStateDefault CoreWebView2PermissionState = iota + CoreWebView2PermissionStateAllow + CoreWebView2PermissionStateDeny +) + +type WindowsWindow struct { + // Select the type of translucent backdrop. Requires Windows 11 22621 or later. + // Only used when window's `BackgroundType` is set to `BackgroundTypeTranslucent`. + // Default: Auto + BackdropType BackdropType + + // Disable the icon in the titlebar + // Default: false + DisableIcon bool + + // Theme (Dark / Light / SystemDefault) + // Default: SystemDefault - The application will follow system theme changes. + Theme Theme + + // Specify custom colours to use for dark/light mode + // Default: nil + CustomTheme *ThemeSettings + + // Disable all window decorations in Frameless mode, which means no "Aero Shadow" and no "Rounded Corner" will be shown. + // "Rounded Corners" are only available on Windows 11. + // Default: false + DisableFramelessWindowDecorations bool + + // WindowMask is used to set the window shape. Use a PNG with an alpha channel to create a custom shape. + // Default: nil + WindowMask []byte + + // WindowMaskDraggable is used to make the window draggable by clicking on the window mask. + // Default: false + WindowMaskDraggable bool + + // WebviewGpuIsDisabled is used to enable / disable GPU acceleration for the webview + // Default: false + WebviewGpuIsDisabled bool + + // ResizeDebounceMS is the amount of time to debounce redraws of webview2 + // when resizing the window + // Default: 0 + ResizeDebounceMS uint16 + + // Disable the menu bar for this window + // Default: false + DisableMenu bool + + // Event mapping for the window. This allows you to define a translation from one event to another. + // Default: nil + EventMapping map[events.WindowEventType]events.WindowEventType + + // HiddenOnTaskbar hides the window from the taskbar + // Default: false + HiddenOnTaskbar bool + + // EnableSwipeGestures enables swipe gestures for the window + // Default: false + EnableSwipeGestures bool + + // EnableFraudulentWebsiteWarnings will enable warnings for fraudulent websites. + // Default: false + EnableFraudulentWebsiteWarnings bool + + // Menu is the menu to use for the window. + Menu *Menu + + // Drag Cursor Effects + OnEnterEffect DragEffect + OnOverEffect DragEffect + + // Permissions map for WebView2. If empty, default permissions will be granted. + Permissions map[CoreWebView2PermissionKind]CoreWebView2PermissionState + + // Disables the minimise button + DisableMinimiseButton bool + + // Disables the maximise button + DisableMaximiseButton bool +} + +type Theme int + +const ( + // SystemDefault will use whatever the system theme is. The application will follow system theme changes. + SystemDefault Theme = 0 + // Dark Mode + Dark Theme = 1 + // Light Mode + Light Theme = 2 +) + +// ThemeSettings defines custom colours to use in dark or light mode. +// They may be set using the hex values: 0x00BBGGRR +type ThemeSettings struct { + DarkModeTitleBar int32 + DarkModeTitleBarInactive int32 + DarkModeTitleText int32 + DarkModeTitleTextInactive int32 + DarkModeBorder int32 + DarkModeBorderInactive int32 + LightModeTitleBar int32 + LightModeTitleBarInactive int32 + LightModeTitleText int32 + LightModeTitleTextInactive int32 + LightModeBorder int32 + LightModeBorderInactive int32 +} + +/****** Mac Options *******/ + +// MacBackdrop is the backdrop type for macOS +type MacBackdrop int + +const ( + // MacBackdropNormal - The default value. The window will have a normal opaque background. + MacBackdropNormal MacBackdrop = iota + // MacBackdropTransparent - The window will have a transparent background, with the content underneath it being visible + MacBackdropTransparent + // MacBackdropTranslucent - The window will have a translucent background, with the content underneath it being "fuzzy" or "frosted" + MacBackdropTranslucent +) + +// MacToolbarStyle is the style of toolbar for macOS +type MacToolbarStyle int + +const ( + // MacToolbarStyleAutomatic - The default value. The style will be determined by the window's given configuration + MacToolbarStyleAutomatic MacToolbarStyle = iota + // MacToolbarStyleExpanded - The toolbar will appear below the window title + MacToolbarStyleExpanded + // MacToolbarStylePreference - The toolbar will appear below the window title and the items in the toolbar will attempt to have equal widths when possible + MacToolbarStylePreference + // MacToolbarStyleUnified - The window title will appear inline with the toolbar when visible + MacToolbarStyleUnified + // MacToolbarStyleUnifiedCompact - Same as MacToolbarStyleUnified, but with reduced margins in the toolbar allowing more focus to be on the contents of the window + MacToolbarStyleUnifiedCompact +) + +// MacWindow contains macOS specific options for Webview Windows +type MacWindow struct { + // Backdrop is the backdrop type for the window + Backdrop MacBackdrop + // DisableShadow will disable the window shadow + DisableShadow bool + // TitleBar contains options for the Mac titlebar + TitleBar MacTitleBar + // Appearance is the appearance type for the window + Appearance MacAppearanceType + // InvisibleTitleBarHeight defines the height of an invisible titlebar which responds to dragging + InvisibleTitleBarHeight int + // Maps events from platform specific to common event types + EventMapping map[events.WindowEventType]events.WindowEventType + + // EnableFraudulentWebsiteWarnings will enable warnings for fraudulent websites. + // Default: false + EnableFraudulentWebsiteWarnings bool + + // WebviewPreferences contains preferences for the webview + WebviewPreferences MacWebviewPreferences + + // Disables the minimise button + DisableMinimiseButton bool + + // Disables the maximise button + DisableMaximiseButton bool + + // Disables the close button + DisableCloseButton bool +} + +// MacWebviewPreferences contains preferences for the Mac webview +type MacWebviewPreferences struct { + // TabFocusesLinks will enable tabbing to links + TabFocusesLinks u.Bool + // TextInteractionEnabled will enable text interaction + TextInteractionEnabled u.Bool + // FullscreenEnabled will enable fullscreen + FullscreenEnabled u.Bool +} + +// MacTitleBar contains options for the Mac titlebar +type MacTitleBar struct { + // AppearsTransparent will make the titlebar transparent + AppearsTransparent bool + // Hide will hide the titlebar + Hide bool + // HideTitle will hide the title + HideTitle bool + // FullSizeContent will extend the window content to the full size of the window + FullSizeContent bool + // UseToolbar will use a toolbar instead of a titlebar + UseToolbar bool + // HideToolbarSeparator will hide the toolbar separator + HideToolbarSeparator bool + // ShowToolbarWhenFullscreen will keep the toolbar visible when the window is in fullscreen mode + ShowToolbarWhenFullscreen bool + // ToolbarStyle is the style of toolbar to use + ToolbarStyle MacToolbarStyle +} + +// MacTitleBarDefault results in the default Mac MacTitleBar +var MacTitleBarDefault = MacTitleBar{ + AppearsTransparent: false, + Hide: false, + HideTitle: false, + FullSizeContent: false, + UseToolbar: false, + HideToolbarSeparator: false, +} + +// Credit: Comments from Electron site + +// MacTitleBarHidden results in a hidden title bar and a full size content window, +// yet the title bar still has the standard window controls (“traffic lights”) +// in the top left. +var MacTitleBarHidden = MacTitleBar{ + AppearsTransparent: true, + Hide: false, + HideTitle: true, + FullSizeContent: true, + UseToolbar: false, + HideToolbarSeparator: false, +} + +// MacTitleBarHiddenInset results in a hidden title bar with an alternative look where +// the traffic light buttons are slightly more inset from the window edge. +var MacTitleBarHiddenInset = MacTitleBar{ + AppearsTransparent: true, + Hide: false, + HideTitle: true, + FullSizeContent: true, + UseToolbar: true, + HideToolbarSeparator: true, +} + +// MacTitleBarHiddenInsetUnified results in a hidden title bar with an alternative look where +// the traffic light buttons are even more inset from the window edge. +var MacTitleBarHiddenInsetUnified = MacTitleBar{ + AppearsTransparent: true, + Hide: false, + HideTitle: true, + FullSizeContent: true, + UseToolbar: true, + HideToolbarSeparator: true, + ToolbarStyle: MacToolbarStyleUnified, +} + +// MacAppearanceType is a type of Appearance for Cocoa windows +type MacAppearanceType string + +const ( + // DefaultAppearance uses the default system value + DefaultAppearance MacAppearanceType = "" + // NSAppearanceNameAqua - The standard light system appearance. + NSAppearanceNameAqua MacAppearanceType = "NSAppearanceNameAqua" + // NSAppearanceNameDarkAqua - The standard dark system appearance. + NSAppearanceNameDarkAqua MacAppearanceType = "NSAppearanceNameDarkAqua" + // NSAppearanceNameVibrantLight - The light vibrant appearance + NSAppearanceNameVibrantLight MacAppearanceType = "NSAppearanceNameVibrantLight" + // NSAppearanceNameAccessibilityHighContrastAqua - A high-contrast version of the standard light system appearance. + NSAppearanceNameAccessibilityHighContrastAqua MacAppearanceType = "NSAppearanceNameAccessibilityHighContrastAqua" + // NSAppearanceNameAccessibilityHighContrastDarkAqua - A high-contrast version of the standard dark system appearance. + NSAppearanceNameAccessibilityHighContrastDarkAqua MacAppearanceType = "NSAppearanceNameAccessibilityHighContrastDarkAqua" + // NSAppearanceNameAccessibilityHighContrastVibrantLight - A high-contrast version of the light vibrant appearance. + NSAppearanceNameAccessibilityHighContrastVibrantLight MacAppearanceType = "NSAppearanceNameAccessibilityHighContrastVibrantLight" + // NSAppearanceNameAccessibilityHighContrastVibrantDark - A high-contrast version of the dark vibrant appearance. + NSAppearanceNameAccessibilityHighContrastVibrantDark MacAppearanceType = "NSAppearanceNameAccessibilityHighContrastVibrantDark" +) + +/******** Linux Options ********/ + +// WebviewGpuPolicy values used for determining the webview's hardware acceleration policy. +type WebviewGpuPolicy int + +const ( + // WebviewGpuPolicyAlways Hardware acceleration is always enabled. + WebviewGpuPolicyAlways WebviewGpuPolicy = iota + // WebviewGpuPolicyOnDemand Hardware acceleration is enabled/disabled as request by web contents. + WebviewGpuPolicyOnDemand + // WebviewGpuPolicyNever Hardware acceleration is always disabled. + WebviewGpuPolicyNever +) + +// LinuxWindow specific to Linux windows +type LinuxWindow struct { + // Icon Sets up the icon representing the window. This icon is used when the window is minimized + // (also known as iconified). + Icon []byte + + // WindowIsTranslucent sets the window's background to transparent when enabled. + WindowIsTranslucent bool + + // WebviewGpuPolicy used for determining the hardware acceleration policy for the webview. + // - WebviewGpuPolicyAlways + // - WebviewGpuPolicyOnDemand + // - WebviewGpuPolicyNever + // + // Due to https://github.com/wailsapp/wails/issues/2977, if options.Linux is nil + // in the call to wails.Run(), WebviewGpuPolicy is set by default to WebviewGpuPolicyNever. + // Client code may override this behavior by passing a non-nil Options and set + // WebviewGpuPolicy as needed. + WebviewGpuPolicy WebviewGpuPolicy + + // ProgramName is used to set the program's name for the window manager via GTK's g_set_prgname(). + //This name should not be localized. [see the docs] + // + //When a .desktop file is created this value helps with window grouping and desktop icons when the .desktop file's Name + //property differs form the executable's filename. + // + //[see the docs]: https://docs.gtk.org/glib/func.set_prgname.html + ProgramName string +} diff --git a/v3/pkg/application/webview_window_windows.go b/v3/pkg/application/webview_window_windows.go index 642feef28f9..5d2e164945c 100644 --- a/v3/pkg/application/webview_window_windows.go +++ b/v3/pkg/application/webview_window_windows.go @@ -238,8 +238,12 @@ func (w *windowsWebviewWindow) run() { w.setSize(options.Width, options.Height) // Min/max buttons - w.setStyle(!options.Windows.DisableMinimiseButton, w32.WS_MINIMIZEBOX) - w.setStyle(!options.Windows.DisableMaximiseButton, w32.WS_MAXIMIZEBOX) + if !options.Windows.DisableMinimiseButton { + w.setMinimiseButtonEnabled(false) + } + if !options.Windows.DisableMaximiseButton { + w.setMaximiseButtonEnabled(false) + } // Register the window with the application getNativeApplication().registerWindow(w) @@ -1626,6 +1630,14 @@ func (w *windowsWebviewWindow) processMessageWithAdditionalObjects(message strin } } +func (w *windowsWebviewWindow) setMaximiseButtonEnabled(enabled bool) { + w.setStyle(enabled, w32.WS_MINIMIZEBOX) +} + +func (w *windowsWebviewWindow) setMinimiseButtonEnabled(enabled bool) { + w.setStyle(enabled, w32.WS_MAXIMIZEBOX) +} + func ScaleWithDPI(pixels int, dpi uint) int { return (pixels * int(dpi)) / 96 } diff --git a/v3/pkg/application/webview_window_windows_devtools.go b/v3/pkg/application/webview_window_windows_devtools.go index 54a799bf94e..2ee7ea1a34b 100644 --- a/v3/pkg/application/webview_window_windows_devtools.go +++ b/v3/pkg/application/webview_window_windows_devtools.go @@ -4,7 +4,7 @@ package application import "github.com/wailsapp/go-webview2/pkg/edge" -func (w *windowsWebviewWindow) toggleDevTools() { +func (w *windowsWebviewWindow) openDevTools() { w.chromium.OpenDevToolsWindow() } diff --git a/v3/pkg/application/webview_window_windows_production.go b/v3/pkg/application/webview_window_windows_production.go index 0dd2fff457b..55a9d2ad25e 100644 --- a/v3/pkg/application/webview_window_windows_production.go +++ b/v3/pkg/application/webview_window_windows_production.go @@ -4,7 +4,7 @@ package application import "github.com/wailsapp/go-webview2/pkg/edge" -func (w *windowsWebviewWindow) toggleDevTools() {} +func (w *windowsWebviewWindow) openDevTools() {} func (w *windowsWebviewWindow) enableDevTools(settings *edge.ICoreWebViewSettings) { err := settings.PutAreDevToolsEnabled(false) diff --git a/v3/pkg/application/window.go b/v3/pkg/application/window.go index 2398cd3682b..303a23df0ab 100644 --- a/v3/pkg/application/window.go +++ b/v3/pkg/application/window.go @@ -21,7 +21,7 @@ type Window interface { DispatchWailsEvent(event *WailsEvent) EnableSizeConstraints() Error(message string, args ...any) - ExecJS(callID, js string) + ExecJS(js string) Focus() ForceReload() Fullscreen() Window @@ -65,7 +65,7 @@ type Window interface { SetZoom(magnification float64) Window Show() Window Size() (width int, height int) - ToggleDevTools() + OpenDevTools() ToggleFullscreen() ToggleMaximise() UnFullscreen() diff --git a/v3/pkg/events/events.go b/v3/pkg/events/events.go index 505308c12b8..d3ce4f50cb7 100644 --- a/v3/pkg/events/events.go +++ b/v3/pkg/events/events.go @@ -31,27 +31,27 @@ type commonEvents struct { func newCommonEvents() commonEvents { return commonEvents{ - ApplicationStarted: 1174, - WindowMaximise: 1175, - WindowUnMaximise: 1176, - WindowFullscreen: 1177, - WindowUnFullscreen: 1178, - WindowRestore: 1179, - WindowMinimise: 1180, - WindowUnMinimise: 1181, - WindowClosing: 1182, - WindowZoom: 1183, - WindowZoomIn: 1184, - WindowZoomOut: 1185, - WindowZoomReset: 1186, - WindowFocus: 1187, - WindowLostFocus: 1188, - WindowShow: 1189, - WindowHide: 1190, - WindowDPIChanged: 1191, - WindowFilesDropped: 1192, - WindowRuntimeReady: 1193, - ThemeChanged: 1194, + ApplicationStarted: 1179, + WindowMaximise: 1180, + WindowUnMaximise: 1181, + WindowFullscreen: 1182, + WindowUnFullscreen: 1183, + WindowRestore: 1184, + WindowMinimise: 1185, + WindowUnMinimise: 1186, + WindowClosing: 1187, + WindowZoom: 1188, + WindowZoomIn: 1189, + WindowZoomOut: 1190, + WindowZoomReset: 1191, + WindowFocus: 1192, + WindowLostFocus: 1193, + WindowShow: 1194, + WindowHide: 1195, + WindowDPIChanged: 1196, + WindowFilesDropped: 1197, + WindowRuntimeReady: 1198, + ThemeChanged: 1199, } } @@ -59,11 +59,21 @@ var Linux = newLinuxEvents() type linuxEvents struct { SystemThemeChanged ApplicationEventType + WindowLoadChanged WindowEventType + WindowDeleteEvent WindowEventType + WindowFocusIn WindowEventType + WindowFocusOut WindowEventType + ApplicationStartup ApplicationEventType } func newLinuxEvents() linuxEvents { return linuxEvents{ SystemThemeChanged: 1024, + WindowLoadChanged: 1025, + WindowDeleteEvent: 1026, + WindowFocusIn: 1027, + WindowFocusOut: 1028, + ApplicationStartup: 1029, } } @@ -198,130 +208,130 @@ type macEvents struct { func newMacEvents() macEvents { return macEvents{ - ApplicationDidBecomeActive: 1025, - ApplicationDidChangeBackingProperties: 1026, - ApplicationDidChangeEffectiveAppearance: 1027, - ApplicationDidChangeIcon: 1028, - ApplicationDidChangeOcclusionState: 1029, - ApplicationDidChangeScreenParameters: 1030, - ApplicationDidChangeStatusBarFrame: 1031, - ApplicationDidChangeStatusBarOrientation: 1032, - ApplicationDidFinishLaunching: 1033, - ApplicationDidHide: 1034, - ApplicationDidResignActiveNotification: 1035, - ApplicationDidUnhide: 1036, - ApplicationDidUpdate: 1037, - ApplicationWillBecomeActive: 1038, - ApplicationWillFinishLaunching: 1039, - ApplicationWillHide: 1040, - ApplicationWillResignActive: 1041, - ApplicationWillTerminate: 1042, - ApplicationWillUnhide: 1043, - ApplicationWillUpdate: 1044, - ApplicationDidChangeTheme: 1045, - ApplicationShouldHandleReopen: 1046, - WindowDidBecomeKey: 1047, - WindowDidBecomeMain: 1048, - WindowDidBeginSheet: 1049, - WindowDidChangeAlpha: 1050, - WindowDidChangeBackingLocation: 1051, - WindowDidChangeBackingProperties: 1052, - WindowDidChangeCollectionBehavior: 1053, - WindowDidChangeEffectiveAppearance: 1054, - WindowDidChangeOcclusionState: 1055, - WindowDidChangeOrderingMode: 1056, - WindowDidChangeScreen: 1057, - WindowDidChangeScreenParameters: 1058, - WindowDidChangeScreenProfile: 1059, - WindowDidChangeScreenSpace: 1060, - WindowDidChangeScreenSpaceProperties: 1061, - WindowDidChangeSharingType: 1062, - WindowDidChangeSpace: 1063, - WindowDidChangeSpaceOrderingMode: 1064, - WindowDidChangeTitle: 1065, - WindowDidChangeToolbar: 1066, - WindowDidChangeVisibility: 1067, - WindowDidDeminiaturize: 1068, - WindowDidEndSheet: 1069, - WindowDidEnterFullScreen: 1070, - WindowDidEnterVersionBrowser: 1071, - WindowDidExitFullScreen: 1072, - WindowDidExitVersionBrowser: 1073, - WindowDidExpose: 1074, - WindowDidFocus: 1075, - WindowDidMiniaturize: 1076, - WindowDidMove: 1077, - WindowDidOrderOffScreen: 1078, - WindowDidOrderOnScreen: 1079, - WindowDidResignKey: 1080, - WindowDidResignMain: 1081, - WindowDidResize: 1082, - WindowDidUpdate: 1083, - WindowDidUpdateAlpha: 1084, - WindowDidUpdateCollectionBehavior: 1085, - WindowDidUpdateCollectionProperties: 1086, - WindowDidUpdateShadow: 1087, - WindowDidUpdateTitle: 1088, - WindowDidUpdateToolbar: 1089, - WindowDidUpdateVisibility: 1090, - WindowShouldClose: 1091, - WindowWillBecomeKey: 1092, - WindowWillBecomeMain: 1093, - WindowWillBeginSheet: 1094, - WindowWillChangeOrderingMode: 1095, - WindowWillClose: 1096, - WindowWillDeminiaturize: 1097, - WindowWillEnterFullScreen: 1098, - WindowWillEnterVersionBrowser: 1099, - WindowWillExitFullScreen: 1100, - WindowWillExitVersionBrowser: 1101, - WindowWillFocus: 1102, - WindowWillMiniaturize: 1103, - WindowWillMove: 1104, - WindowWillOrderOffScreen: 1105, - WindowWillOrderOnScreen: 1106, - WindowWillResignMain: 1107, - WindowWillResize: 1108, - WindowWillUnfocus: 1109, - WindowWillUpdate: 1110, - WindowWillUpdateAlpha: 1111, - WindowWillUpdateCollectionBehavior: 1112, - WindowWillUpdateCollectionProperties: 1113, - WindowWillUpdateShadow: 1114, - WindowWillUpdateTitle: 1115, - WindowWillUpdateToolbar: 1116, - WindowWillUpdateVisibility: 1117, - WindowWillUseStandardFrame: 1118, - MenuWillOpen: 1119, - MenuDidOpen: 1120, - MenuDidClose: 1121, - MenuWillSendAction: 1122, - MenuDidSendAction: 1123, - MenuWillHighlightItem: 1124, - MenuDidHighlightItem: 1125, - MenuWillDisplayItem: 1126, - MenuDidDisplayItem: 1127, - MenuWillAddItem: 1128, - MenuDidAddItem: 1129, - MenuWillRemoveItem: 1130, - MenuDidRemoveItem: 1131, - MenuWillBeginTracking: 1132, - MenuDidBeginTracking: 1133, - MenuWillEndTracking: 1134, - MenuDidEndTracking: 1135, - MenuWillUpdate: 1136, - MenuDidUpdate: 1137, - MenuWillPopUp: 1138, - MenuDidPopUp: 1139, - MenuWillSendActionToItem: 1140, - MenuDidSendActionToItem: 1141, - WebViewDidStartProvisionalNavigation: 1142, - WebViewDidReceiveServerRedirectForProvisionalNavigation: 1143, - WebViewDidFinishNavigation: 1144, - WebViewDidCommitNavigation: 1145, - WindowFileDraggingEntered: 1146, - WindowFileDraggingPerformed: 1147, - WindowFileDraggingExited: 1148, + ApplicationDidBecomeActive: 1030, + ApplicationDidChangeBackingProperties: 1031, + ApplicationDidChangeEffectiveAppearance: 1032, + ApplicationDidChangeIcon: 1033, + ApplicationDidChangeOcclusionState: 1034, + ApplicationDidChangeScreenParameters: 1035, + ApplicationDidChangeStatusBarFrame: 1036, + ApplicationDidChangeStatusBarOrientation: 1037, + ApplicationDidFinishLaunching: 1038, + ApplicationDidHide: 1039, + ApplicationDidResignActiveNotification: 1040, + ApplicationDidUnhide: 1041, + ApplicationDidUpdate: 1042, + ApplicationWillBecomeActive: 1043, + ApplicationWillFinishLaunching: 1044, + ApplicationWillHide: 1045, + ApplicationWillResignActive: 1046, + ApplicationWillTerminate: 1047, + ApplicationWillUnhide: 1048, + ApplicationWillUpdate: 1049, + ApplicationDidChangeTheme: 1050, + ApplicationShouldHandleReopen: 1051, + WindowDidBecomeKey: 1052, + WindowDidBecomeMain: 1053, + WindowDidBeginSheet: 1054, + WindowDidChangeAlpha: 1055, + WindowDidChangeBackingLocation: 1056, + WindowDidChangeBackingProperties: 1057, + WindowDidChangeCollectionBehavior: 1058, + WindowDidChangeEffectiveAppearance: 1059, + WindowDidChangeOcclusionState: 1060, + WindowDidChangeOrderingMode: 1061, + WindowDidChangeScreen: 1062, + WindowDidChangeScreenParameters: 1063, + WindowDidChangeScreenProfile: 1064, + WindowDidChangeScreenSpace: 1065, + WindowDidChangeScreenSpaceProperties: 1066, + WindowDidChangeSharingType: 1067, + WindowDidChangeSpace: 1068, + WindowDidChangeSpaceOrderingMode: 1069, + WindowDidChangeTitle: 1070, + WindowDidChangeToolbar: 1071, + WindowDidChangeVisibility: 1072, + WindowDidDeminiaturize: 1073, + WindowDidEndSheet: 1074, + WindowDidEnterFullScreen: 1075, + WindowDidEnterVersionBrowser: 1076, + WindowDidExitFullScreen: 1077, + WindowDidExitVersionBrowser: 1078, + WindowDidExpose: 1079, + WindowDidFocus: 1080, + WindowDidMiniaturize: 1081, + WindowDidMove: 1082, + WindowDidOrderOffScreen: 1083, + WindowDidOrderOnScreen: 1084, + WindowDidResignKey: 1085, + WindowDidResignMain: 1086, + WindowDidResize: 1087, + WindowDidUpdate: 1088, + WindowDidUpdateAlpha: 1089, + WindowDidUpdateCollectionBehavior: 1090, + WindowDidUpdateCollectionProperties: 1091, + WindowDidUpdateShadow: 1092, + WindowDidUpdateTitle: 1093, + WindowDidUpdateToolbar: 1094, + WindowDidUpdateVisibility: 1095, + WindowShouldClose: 1096, + WindowWillBecomeKey: 1097, + WindowWillBecomeMain: 1098, + WindowWillBeginSheet: 1099, + WindowWillChangeOrderingMode: 1100, + WindowWillClose: 1101, + WindowWillDeminiaturize: 1102, + WindowWillEnterFullScreen: 1103, + WindowWillEnterVersionBrowser: 1104, + WindowWillExitFullScreen: 1105, + WindowWillExitVersionBrowser: 1106, + WindowWillFocus: 1107, + WindowWillMiniaturize: 1108, + WindowWillMove: 1109, + WindowWillOrderOffScreen: 1110, + WindowWillOrderOnScreen: 1111, + WindowWillResignMain: 1112, + WindowWillResize: 1113, + WindowWillUnfocus: 1114, + WindowWillUpdate: 1115, + WindowWillUpdateAlpha: 1116, + WindowWillUpdateCollectionBehavior: 1117, + WindowWillUpdateCollectionProperties: 1118, + WindowWillUpdateShadow: 1119, + WindowWillUpdateTitle: 1120, + WindowWillUpdateToolbar: 1121, + WindowWillUpdateVisibility: 1122, + WindowWillUseStandardFrame: 1123, + MenuWillOpen: 1124, + MenuDidOpen: 1125, + MenuDidClose: 1126, + MenuWillSendAction: 1127, + MenuDidSendAction: 1128, + MenuWillHighlightItem: 1129, + MenuDidHighlightItem: 1130, + MenuWillDisplayItem: 1131, + MenuDidDisplayItem: 1132, + MenuWillAddItem: 1133, + MenuDidAddItem: 1134, + MenuWillRemoveItem: 1135, + MenuDidRemoveItem: 1136, + MenuWillBeginTracking: 1137, + MenuDidBeginTracking: 1138, + MenuWillEndTracking: 1139, + MenuDidEndTracking: 1140, + MenuWillUpdate: 1141, + MenuDidUpdate: 1142, + MenuWillPopUp: 1143, + MenuDidPopUp: 1144, + MenuWillSendActionToItem: 1145, + MenuDidSendActionToItem: 1146, + WebViewDidStartProvisionalNavigation: 1147, + WebViewDidReceiveServerRedirectForProvisionalNavigation: 1148, + WebViewDidFinishNavigation: 1149, + WebViewDidCommitNavigation: 1150, + WindowFileDraggingEntered: 1151, + WindowFileDraggingPerformed: 1152, + WindowFileDraggingExited: 1153, } } @@ -357,31 +367,31 @@ type windowsEvents struct { func newWindowsEvents() windowsEvents { return windowsEvents{ - SystemThemeChanged: 1149, - APMPowerStatusChange: 1150, - APMSuspend: 1151, - APMResumeAutomatic: 1152, - APMResumeSuspend: 1153, - APMPowerSettingChange: 1154, - ApplicationStarted: 1155, - WebViewNavigationCompleted: 1156, - WindowInactive: 1157, - WindowActive: 1158, - WindowClickActive: 1159, - WindowMaximise: 1160, - WindowUnMaximise: 1161, - WindowFullscreen: 1162, - WindowUnFullscreen: 1163, - WindowRestore: 1164, - WindowMinimise: 1165, - WindowUnMinimise: 1166, - WindowClose: 1167, - WindowSetFocus: 1168, - WindowKillFocus: 1169, - WindowDragDrop: 1170, - WindowDragEnter: 1171, - WindowDragLeave: 1172, - WindowDragOver: 1173, + SystemThemeChanged: 1154, + APMPowerStatusChange: 1155, + APMSuspend: 1156, + APMResumeAutomatic: 1157, + APMResumeSuspend: 1158, + APMPowerSettingChange: 1159, + ApplicationStarted: 1160, + WebViewNavigationCompleted: 1161, + WindowInactive: 1162, + WindowActive: 1163, + WindowClickActive: 1164, + WindowMaximise: 1165, + WindowUnMaximise: 1166, + WindowFullscreen: 1167, + WindowUnFullscreen: 1168, + WindowRestore: 1169, + WindowMinimise: 1170, + WindowUnMinimise: 1171, + WindowClose: 1172, + WindowSetFocus: 1173, + WindowKillFocus: 1174, + WindowDragDrop: 1175, + WindowDragEnter: 1176, + WindowDragLeave: 1177, + WindowDragOver: 1178, } } @@ -391,174 +401,179 @@ func JSEvent(event uint) string { var eventToJS = map[uint]string{ 1024: "linux:SystemThemeChanged", - 1025: "mac:ApplicationDidBecomeActive", - 1026: "mac:ApplicationDidChangeBackingProperties", - 1027: "mac:ApplicationDidChangeEffectiveAppearance", - 1028: "mac:ApplicationDidChangeIcon", - 1029: "mac:ApplicationDidChangeOcclusionState", - 1030: "mac:ApplicationDidChangeScreenParameters", - 1031: "mac:ApplicationDidChangeStatusBarFrame", - 1032: "mac:ApplicationDidChangeStatusBarOrientation", - 1033: "mac:ApplicationDidFinishLaunching", - 1034: "mac:ApplicationDidHide", - 1035: "mac:ApplicationDidResignActiveNotification", - 1036: "mac:ApplicationDidUnhide", - 1037: "mac:ApplicationDidUpdate", - 1038: "mac:ApplicationWillBecomeActive", - 1039: "mac:ApplicationWillFinishLaunching", - 1040: "mac:ApplicationWillHide", - 1041: "mac:ApplicationWillResignActive", - 1042: "mac:ApplicationWillTerminate", - 1043: "mac:ApplicationWillUnhide", - 1044: "mac:ApplicationWillUpdate", - 1045: "mac:ApplicationDidChangeTheme!", - 1046: "mac:ApplicationShouldHandleReopen!", - 1047: "mac:WindowDidBecomeKey", - 1048: "mac:WindowDidBecomeMain", - 1049: "mac:WindowDidBeginSheet", - 1050: "mac:WindowDidChangeAlpha", - 1051: "mac:WindowDidChangeBackingLocation", - 1052: "mac:WindowDidChangeBackingProperties", - 1053: "mac:WindowDidChangeCollectionBehavior", - 1054: "mac:WindowDidChangeEffectiveAppearance", - 1055: "mac:WindowDidChangeOcclusionState", - 1056: "mac:WindowDidChangeOrderingMode", - 1057: "mac:WindowDidChangeScreen", - 1058: "mac:WindowDidChangeScreenParameters", - 1059: "mac:WindowDidChangeScreenProfile", - 1060: "mac:WindowDidChangeScreenSpace", - 1061: "mac:WindowDidChangeScreenSpaceProperties", - 1062: "mac:WindowDidChangeSharingType", - 1063: "mac:WindowDidChangeSpace", - 1064: "mac:WindowDidChangeSpaceOrderingMode", - 1065: "mac:WindowDidChangeTitle", - 1066: "mac:WindowDidChangeToolbar", - 1067: "mac:WindowDidChangeVisibility", - 1068: "mac:WindowDidDeminiaturize", - 1069: "mac:WindowDidEndSheet", - 1070: "mac:WindowDidEnterFullScreen", - 1071: "mac:WindowDidEnterVersionBrowser", - 1072: "mac:WindowDidExitFullScreen", - 1073: "mac:WindowDidExitVersionBrowser", - 1074: "mac:WindowDidExpose", - 1075: "mac:WindowDidFocus", - 1076: "mac:WindowDidMiniaturize", - 1077: "mac:WindowDidMove", - 1078: "mac:WindowDidOrderOffScreen", - 1079: "mac:WindowDidOrderOnScreen", - 1080: "mac:WindowDidResignKey", - 1081: "mac:WindowDidResignMain", - 1082: "mac:WindowDidResize", - 1083: "mac:WindowDidUpdate", - 1084: "mac:WindowDidUpdateAlpha", - 1085: "mac:WindowDidUpdateCollectionBehavior", - 1086: "mac:WindowDidUpdateCollectionProperties", - 1087: "mac:WindowDidUpdateShadow", - 1088: "mac:WindowDidUpdateTitle", - 1089: "mac:WindowDidUpdateToolbar", - 1090: "mac:WindowDidUpdateVisibility", - 1091: "mac:WindowShouldClose!", - 1092: "mac:WindowWillBecomeKey", - 1093: "mac:WindowWillBecomeMain", - 1094: "mac:WindowWillBeginSheet", - 1095: "mac:WindowWillChangeOrderingMode", - 1096: "mac:WindowWillClose", - 1097: "mac:WindowWillDeminiaturize", - 1098: "mac:WindowWillEnterFullScreen", - 1099: "mac:WindowWillEnterVersionBrowser", - 1100: "mac:WindowWillExitFullScreen", - 1101: "mac:WindowWillExitVersionBrowser", - 1102: "mac:WindowWillFocus", - 1103: "mac:WindowWillMiniaturize", - 1104: "mac:WindowWillMove", - 1105: "mac:WindowWillOrderOffScreen", - 1106: "mac:WindowWillOrderOnScreen", - 1107: "mac:WindowWillResignMain", - 1108: "mac:WindowWillResize", - 1109: "mac:WindowWillUnfocus", - 1110: "mac:WindowWillUpdate", - 1111: "mac:WindowWillUpdateAlpha", - 1112: "mac:WindowWillUpdateCollectionBehavior", - 1113: "mac:WindowWillUpdateCollectionProperties", - 1114: "mac:WindowWillUpdateShadow", - 1115: "mac:WindowWillUpdateTitle", - 1116: "mac:WindowWillUpdateToolbar", - 1117: "mac:WindowWillUpdateVisibility", - 1118: "mac:WindowWillUseStandardFrame", - 1119: "mac:MenuWillOpen", - 1120: "mac:MenuDidOpen", - 1121: "mac:MenuDidClose", - 1122: "mac:MenuWillSendAction", - 1123: "mac:MenuDidSendAction", - 1124: "mac:MenuWillHighlightItem", - 1125: "mac:MenuDidHighlightItem", - 1126: "mac:MenuWillDisplayItem", - 1127: "mac:MenuDidDisplayItem", - 1128: "mac:MenuWillAddItem", - 1129: "mac:MenuDidAddItem", - 1130: "mac:MenuWillRemoveItem", - 1131: "mac:MenuDidRemoveItem", - 1132: "mac:MenuWillBeginTracking", - 1133: "mac:MenuDidBeginTracking", - 1134: "mac:MenuWillEndTracking", - 1135: "mac:MenuDidEndTracking", - 1136: "mac:MenuWillUpdate", - 1137: "mac:MenuDidUpdate", - 1138: "mac:MenuWillPopUp", - 1139: "mac:MenuDidPopUp", - 1140: "mac:MenuWillSendActionToItem", - 1141: "mac:MenuDidSendActionToItem", - 1142: "mac:WebViewDidStartProvisionalNavigation", - 1143: "mac:WebViewDidReceiveServerRedirectForProvisionalNavigation", - 1144: "mac:WebViewDidFinishNavigation", - 1145: "mac:WebViewDidCommitNavigation", - 1146: "mac:WindowFileDraggingEntered", - 1147: "mac:WindowFileDraggingPerformed", - 1148: "mac:WindowFileDraggingExited", - 1149: "windows:SystemThemeChanged", - 1150: "windows:APMPowerStatusChange", - 1151: "windows:APMSuspend", - 1152: "windows:APMResumeAutomatic", - 1153: "windows:APMResumeSuspend", - 1154: "windows:APMPowerSettingChange", - 1155: "windows:ApplicationStarted", - 1156: "windows:WebViewNavigationCompleted", - 1157: "windows:WindowInactive", - 1158: "windows:WindowActive", - 1159: "windows:WindowClickActive", - 1160: "windows:WindowMaximise", - 1161: "windows:WindowUnMaximise", - 1162: "windows:WindowFullscreen", - 1163: "windows:WindowUnFullscreen", - 1164: "windows:WindowRestore", - 1165: "windows:WindowMinimise", - 1166: "windows:WindowUnMinimise", - 1167: "windows:WindowClose", - 1168: "windows:WindowSetFocus", - 1169: "windows:WindowKillFocus", - 1170: "windows:WindowDragDrop", - 1171: "windows:WindowDragEnter", - 1172: "windows:WindowDragLeave", - 1173: "windows:WindowDragOver", - 1174: "common:ApplicationStarted", - 1175: "common:WindowMaximise", - 1176: "common:WindowUnMaximise", - 1177: "common:WindowFullscreen", - 1178: "common:WindowUnFullscreen", - 1179: "common:WindowRestore", - 1180: "common:WindowMinimise", - 1181: "common:WindowUnMinimise", - 1182: "common:WindowClosing", - 1183: "common:WindowZoom", - 1184: "common:WindowZoomIn", - 1185: "common:WindowZoomOut", - 1186: "common:WindowZoomReset", - 1187: "common:WindowFocus", - 1188: "common:WindowLostFocus", - 1189: "common:WindowShow", - 1190: "common:WindowHide", - 1191: "common:WindowDPIChanged", - 1192: "common:WindowFilesDropped", - 1193: "common:WindowRuntimeReady", - 1194: "common:ThemeChanged", + 1025: "linux:WindowLoadChanged", + 1026: "linux:WindowDeleteEvent", + 1027: "linux:WindowFocusIn", + 1028: "linux:WindowFocusOut", + 1029: "linux:ApplicationStartup", + 1030: "mac:ApplicationDidBecomeActive", + 1031: "mac:ApplicationDidChangeBackingProperties", + 1032: "mac:ApplicationDidChangeEffectiveAppearance", + 1033: "mac:ApplicationDidChangeIcon", + 1034: "mac:ApplicationDidChangeOcclusionState", + 1035: "mac:ApplicationDidChangeScreenParameters", + 1036: "mac:ApplicationDidChangeStatusBarFrame", + 1037: "mac:ApplicationDidChangeStatusBarOrientation", + 1038: "mac:ApplicationDidFinishLaunching", + 1039: "mac:ApplicationDidHide", + 1040: "mac:ApplicationDidResignActiveNotification", + 1041: "mac:ApplicationDidUnhide", + 1042: "mac:ApplicationDidUpdate", + 1043: "mac:ApplicationWillBecomeActive", + 1044: "mac:ApplicationWillFinishLaunching", + 1045: "mac:ApplicationWillHide", + 1046: "mac:ApplicationWillResignActive", + 1047: "mac:ApplicationWillTerminate", + 1048: "mac:ApplicationWillUnhide", + 1049: "mac:ApplicationWillUpdate", + 1050: "mac:ApplicationDidChangeTheme!", + 1051: "mac:ApplicationShouldHandleReopen!", + 1052: "mac:WindowDidBecomeKey", + 1053: "mac:WindowDidBecomeMain", + 1054: "mac:WindowDidBeginSheet", + 1055: "mac:WindowDidChangeAlpha", + 1056: "mac:WindowDidChangeBackingLocation", + 1057: "mac:WindowDidChangeBackingProperties", + 1058: "mac:WindowDidChangeCollectionBehavior", + 1059: "mac:WindowDidChangeEffectiveAppearance", + 1060: "mac:WindowDidChangeOcclusionState", + 1061: "mac:WindowDidChangeOrderingMode", + 1062: "mac:WindowDidChangeScreen", + 1063: "mac:WindowDidChangeScreenParameters", + 1064: "mac:WindowDidChangeScreenProfile", + 1065: "mac:WindowDidChangeScreenSpace", + 1066: "mac:WindowDidChangeScreenSpaceProperties", + 1067: "mac:WindowDidChangeSharingType", + 1068: "mac:WindowDidChangeSpace", + 1069: "mac:WindowDidChangeSpaceOrderingMode", + 1070: "mac:WindowDidChangeTitle", + 1071: "mac:WindowDidChangeToolbar", + 1072: "mac:WindowDidChangeVisibility", + 1073: "mac:WindowDidDeminiaturize", + 1074: "mac:WindowDidEndSheet", + 1075: "mac:WindowDidEnterFullScreen", + 1076: "mac:WindowDidEnterVersionBrowser", + 1077: "mac:WindowDidExitFullScreen", + 1078: "mac:WindowDidExitVersionBrowser", + 1079: "mac:WindowDidExpose", + 1080: "mac:WindowDidFocus", + 1081: "mac:WindowDidMiniaturize", + 1082: "mac:WindowDidMove", + 1083: "mac:WindowDidOrderOffScreen", + 1084: "mac:WindowDidOrderOnScreen", + 1085: "mac:WindowDidResignKey", + 1086: "mac:WindowDidResignMain", + 1087: "mac:WindowDidResize", + 1088: "mac:WindowDidUpdate", + 1089: "mac:WindowDidUpdateAlpha", + 1090: "mac:WindowDidUpdateCollectionBehavior", + 1091: "mac:WindowDidUpdateCollectionProperties", + 1092: "mac:WindowDidUpdateShadow", + 1093: "mac:WindowDidUpdateTitle", + 1094: "mac:WindowDidUpdateToolbar", + 1095: "mac:WindowDidUpdateVisibility", + 1096: "mac:WindowShouldClose!", + 1097: "mac:WindowWillBecomeKey", + 1098: "mac:WindowWillBecomeMain", + 1099: "mac:WindowWillBeginSheet", + 1100: "mac:WindowWillChangeOrderingMode", + 1101: "mac:WindowWillClose", + 1102: "mac:WindowWillDeminiaturize", + 1103: "mac:WindowWillEnterFullScreen", + 1104: "mac:WindowWillEnterVersionBrowser", + 1105: "mac:WindowWillExitFullScreen", + 1106: "mac:WindowWillExitVersionBrowser", + 1107: "mac:WindowWillFocus", + 1108: "mac:WindowWillMiniaturize", + 1109: "mac:WindowWillMove", + 1110: "mac:WindowWillOrderOffScreen", + 1111: "mac:WindowWillOrderOnScreen", + 1112: "mac:WindowWillResignMain", + 1113: "mac:WindowWillResize", + 1114: "mac:WindowWillUnfocus", + 1115: "mac:WindowWillUpdate", + 1116: "mac:WindowWillUpdateAlpha", + 1117: "mac:WindowWillUpdateCollectionBehavior", + 1118: "mac:WindowWillUpdateCollectionProperties", + 1119: "mac:WindowWillUpdateShadow", + 1120: "mac:WindowWillUpdateTitle", + 1121: "mac:WindowWillUpdateToolbar", + 1122: "mac:WindowWillUpdateVisibility", + 1123: "mac:WindowWillUseStandardFrame", + 1124: "mac:MenuWillOpen", + 1125: "mac:MenuDidOpen", + 1126: "mac:MenuDidClose", + 1127: "mac:MenuWillSendAction", + 1128: "mac:MenuDidSendAction", + 1129: "mac:MenuWillHighlightItem", + 1130: "mac:MenuDidHighlightItem", + 1131: "mac:MenuWillDisplayItem", + 1132: "mac:MenuDidDisplayItem", + 1133: "mac:MenuWillAddItem", + 1134: "mac:MenuDidAddItem", + 1135: "mac:MenuWillRemoveItem", + 1136: "mac:MenuDidRemoveItem", + 1137: "mac:MenuWillBeginTracking", + 1138: "mac:MenuDidBeginTracking", + 1139: "mac:MenuWillEndTracking", + 1140: "mac:MenuDidEndTracking", + 1141: "mac:MenuWillUpdate", + 1142: "mac:MenuDidUpdate", + 1143: "mac:MenuWillPopUp", + 1144: "mac:MenuDidPopUp", + 1145: "mac:MenuWillSendActionToItem", + 1146: "mac:MenuDidSendActionToItem", + 1147: "mac:WebViewDidStartProvisionalNavigation", + 1148: "mac:WebViewDidReceiveServerRedirectForProvisionalNavigation", + 1149: "mac:WebViewDidFinishNavigation", + 1150: "mac:WebViewDidCommitNavigation", + 1151: "mac:WindowFileDraggingEntered", + 1152: "mac:WindowFileDraggingPerformed", + 1153: "mac:WindowFileDraggingExited", + 1154: "windows:SystemThemeChanged", + 1155: "windows:APMPowerStatusChange", + 1156: "windows:APMSuspend", + 1157: "windows:APMResumeAutomatic", + 1158: "windows:APMResumeSuspend", + 1159: "windows:APMPowerSettingChange", + 1160: "windows:ApplicationStarted", + 1161: "windows:WebViewNavigationCompleted", + 1162: "windows:WindowInactive", + 1163: "windows:WindowActive", + 1164: "windows:WindowClickActive", + 1165: "windows:WindowMaximise", + 1166: "windows:WindowUnMaximise", + 1167: "windows:WindowFullscreen", + 1168: "windows:WindowUnFullscreen", + 1169: "windows:WindowRestore", + 1170: "windows:WindowMinimise", + 1171: "windows:WindowUnMinimise", + 1172: "windows:WindowClose", + 1173: "windows:WindowSetFocus", + 1174: "windows:WindowKillFocus", + 1175: "windows:WindowDragDrop", + 1176: "windows:WindowDragEnter", + 1177: "windows:WindowDragLeave", + 1178: "windows:WindowDragOver", + 1179: "common:ApplicationStarted", + 1180: "common:WindowMaximise", + 1181: "common:WindowUnMaximise", + 1182: "common:WindowFullscreen", + 1183: "common:WindowUnFullscreen", + 1184: "common:WindowRestore", + 1185: "common:WindowMinimise", + 1186: "common:WindowUnMinimise", + 1187: "common:WindowClosing", + 1188: "common:WindowZoom", + 1189: "common:WindowZoomIn", + 1190: "common:WindowZoomOut", + 1191: "common:WindowZoomReset", + 1192: "common:WindowFocus", + 1193: "common:WindowLostFocus", + 1194: "common:WindowShow", + 1195: "common:WindowHide", + 1196: "common:WindowDPIChanged", + 1197: "common:WindowFilesDropped", + 1198: "common:WindowRuntimeReady", + 1199: "common:ThemeChanged", } diff --git a/v3/pkg/events/events.txt b/v3/pkg/events/events.txt index 76406a8dc56..455170c3995 100644 --- a/v3/pkg/events/events.txt +++ b/v3/pkg/events/events.txt @@ -1,4 +1,9 @@ linux:SystemThemeChanged +linux:WindowLoadChanged +linux:WindowDeleteEvent +linux:WindowFocusIn +linux:WindowFocusOut +linux:ApplicationStartup mac:ApplicationDidBecomeActive mac:ApplicationDidChangeBackingProperties mac:ApplicationDidChangeEffectiveAppearance diff --git a/v3/pkg/events/events_darwin.h b/v3/pkg/events/events_darwin.h index c2c74116d6f..f8ee81be2b1 100644 --- a/v3/pkg/events/events_darwin.h +++ b/v3/pkg/events/events_darwin.h @@ -6,132 +6,132 @@ extern void processApplicationEvent(unsigned int, void* data); extern void processWindowEvent(unsigned int, unsigned int); -#define EventApplicationDidBecomeActive 1025 -#define EventApplicationDidChangeBackingProperties 1026 -#define EventApplicationDidChangeEffectiveAppearance 1027 -#define EventApplicationDidChangeIcon 1028 -#define EventApplicationDidChangeOcclusionState 1029 -#define EventApplicationDidChangeScreenParameters 1030 -#define EventApplicationDidChangeStatusBarFrame 1031 -#define EventApplicationDidChangeStatusBarOrientation 1032 -#define EventApplicationDidFinishLaunching 1033 -#define EventApplicationDidHide 1034 -#define EventApplicationDidResignActiveNotification 1035 -#define EventApplicationDidUnhide 1036 -#define EventApplicationDidUpdate 1037 -#define EventApplicationWillBecomeActive 1038 -#define EventApplicationWillFinishLaunching 1039 -#define EventApplicationWillHide 1040 -#define EventApplicationWillResignActive 1041 -#define EventApplicationWillTerminate 1042 -#define EventApplicationWillUnhide 1043 -#define EventApplicationWillUpdate 1044 -#define EventApplicationDidChangeTheme 1045 -#define EventApplicationShouldHandleReopen 1046 -#define EventWindowDidBecomeKey 1047 -#define EventWindowDidBecomeMain 1048 -#define EventWindowDidBeginSheet 1049 -#define EventWindowDidChangeAlpha 1050 -#define EventWindowDidChangeBackingLocation 1051 -#define EventWindowDidChangeBackingProperties 1052 -#define EventWindowDidChangeCollectionBehavior 1053 -#define EventWindowDidChangeEffectiveAppearance 1054 -#define EventWindowDidChangeOcclusionState 1055 -#define EventWindowDidChangeOrderingMode 1056 -#define EventWindowDidChangeScreen 1057 -#define EventWindowDidChangeScreenParameters 1058 -#define EventWindowDidChangeScreenProfile 1059 -#define EventWindowDidChangeScreenSpace 1060 -#define EventWindowDidChangeScreenSpaceProperties 1061 -#define EventWindowDidChangeSharingType 1062 -#define EventWindowDidChangeSpace 1063 -#define EventWindowDidChangeSpaceOrderingMode 1064 -#define EventWindowDidChangeTitle 1065 -#define EventWindowDidChangeToolbar 1066 -#define EventWindowDidChangeVisibility 1067 -#define EventWindowDidDeminiaturize 1068 -#define EventWindowDidEndSheet 1069 -#define EventWindowDidEnterFullScreen 1070 -#define EventWindowDidEnterVersionBrowser 1071 -#define EventWindowDidExitFullScreen 1072 -#define EventWindowDidExitVersionBrowser 1073 -#define EventWindowDidExpose 1074 -#define EventWindowDidFocus 1075 -#define EventWindowDidMiniaturize 1076 -#define EventWindowDidMove 1077 -#define EventWindowDidOrderOffScreen 1078 -#define EventWindowDidOrderOnScreen 1079 -#define EventWindowDidResignKey 1080 -#define EventWindowDidResignMain 1081 -#define EventWindowDidResize 1082 -#define EventWindowDidUpdate 1083 -#define EventWindowDidUpdateAlpha 1084 -#define EventWindowDidUpdateCollectionBehavior 1085 -#define EventWindowDidUpdateCollectionProperties 1086 -#define EventWindowDidUpdateShadow 1087 -#define EventWindowDidUpdateTitle 1088 -#define EventWindowDidUpdateToolbar 1089 -#define EventWindowDidUpdateVisibility 1090 -#define EventWindowShouldClose 1091 -#define EventWindowWillBecomeKey 1092 -#define EventWindowWillBecomeMain 1093 -#define EventWindowWillBeginSheet 1094 -#define EventWindowWillChangeOrderingMode 1095 -#define EventWindowWillClose 1096 -#define EventWindowWillDeminiaturize 1097 -#define EventWindowWillEnterFullScreen 1098 -#define EventWindowWillEnterVersionBrowser 1099 -#define EventWindowWillExitFullScreen 1100 -#define EventWindowWillExitVersionBrowser 1101 -#define EventWindowWillFocus 1102 -#define EventWindowWillMiniaturize 1103 -#define EventWindowWillMove 1104 -#define EventWindowWillOrderOffScreen 1105 -#define EventWindowWillOrderOnScreen 1106 -#define EventWindowWillResignMain 1107 -#define EventWindowWillResize 1108 -#define EventWindowWillUnfocus 1109 -#define EventWindowWillUpdate 1110 -#define EventWindowWillUpdateAlpha 1111 -#define EventWindowWillUpdateCollectionBehavior 1112 -#define EventWindowWillUpdateCollectionProperties 1113 -#define EventWindowWillUpdateShadow 1114 -#define EventWindowWillUpdateTitle 1115 -#define EventWindowWillUpdateToolbar 1116 -#define EventWindowWillUpdateVisibility 1117 -#define EventWindowWillUseStandardFrame 1118 -#define EventMenuWillOpen 1119 -#define EventMenuDidOpen 1120 -#define EventMenuDidClose 1121 -#define EventMenuWillSendAction 1122 -#define EventMenuDidSendAction 1123 -#define EventMenuWillHighlightItem 1124 -#define EventMenuDidHighlightItem 1125 -#define EventMenuWillDisplayItem 1126 -#define EventMenuDidDisplayItem 1127 -#define EventMenuWillAddItem 1128 -#define EventMenuDidAddItem 1129 -#define EventMenuWillRemoveItem 1130 -#define EventMenuDidRemoveItem 1131 -#define EventMenuWillBeginTracking 1132 -#define EventMenuDidBeginTracking 1133 -#define EventMenuWillEndTracking 1134 -#define EventMenuDidEndTracking 1135 -#define EventMenuWillUpdate 1136 -#define EventMenuDidUpdate 1137 -#define EventMenuWillPopUp 1138 -#define EventMenuDidPopUp 1139 -#define EventMenuWillSendActionToItem 1140 -#define EventMenuDidSendActionToItem 1141 -#define EventWebViewDidStartProvisionalNavigation 1142 -#define EventWebViewDidReceiveServerRedirectForProvisionalNavigation 1143 -#define EventWebViewDidFinishNavigation 1144 -#define EventWebViewDidCommitNavigation 1145 -#define EventWindowFileDraggingEntered 1146 -#define EventWindowFileDraggingPerformed 1147 -#define EventWindowFileDraggingExited 1148 +#define EventApplicationDidBecomeActive 1030 +#define EventApplicationDidChangeBackingProperties 1031 +#define EventApplicationDidChangeEffectiveAppearance 1032 +#define EventApplicationDidChangeIcon 1033 +#define EventApplicationDidChangeOcclusionState 1034 +#define EventApplicationDidChangeScreenParameters 1035 +#define EventApplicationDidChangeStatusBarFrame 1036 +#define EventApplicationDidChangeStatusBarOrientation 1037 +#define EventApplicationDidFinishLaunching 1038 +#define EventApplicationDidHide 1039 +#define EventApplicationDidResignActiveNotification 1040 +#define EventApplicationDidUnhide 1041 +#define EventApplicationDidUpdate 1042 +#define EventApplicationWillBecomeActive 1043 +#define EventApplicationWillFinishLaunching 1044 +#define EventApplicationWillHide 1045 +#define EventApplicationWillResignActive 1046 +#define EventApplicationWillTerminate 1047 +#define EventApplicationWillUnhide 1048 +#define EventApplicationWillUpdate 1049 +#define EventApplicationDidChangeTheme 1050 +#define EventApplicationShouldHandleReopen 1051 +#define EventWindowDidBecomeKey 1052 +#define EventWindowDidBecomeMain 1053 +#define EventWindowDidBeginSheet 1054 +#define EventWindowDidChangeAlpha 1055 +#define EventWindowDidChangeBackingLocation 1056 +#define EventWindowDidChangeBackingProperties 1057 +#define EventWindowDidChangeCollectionBehavior 1058 +#define EventWindowDidChangeEffectiveAppearance 1059 +#define EventWindowDidChangeOcclusionState 1060 +#define EventWindowDidChangeOrderingMode 1061 +#define EventWindowDidChangeScreen 1062 +#define EventWindowDidChangeScreenParameters 1063 +#define EventWindowDidChangeScreenProfile 1064 +#define EventWindowDidChangeScreenSpace 1065 +#define EventWindowDidChangeScreenSpaceProperties 1066 +#define EventWindowDidChangeSharingType 1067 +#define EventWindowDidChangeSpace 1068 +#define EventWindowDidChangeSpaceOrderingMode 1069 +#define EventWindowDidChangeTitle 1070 +#define EventWindowDidChangeToolbar 1071 +#define EventWindowDidChangeVisibility 1072 +#define EventWindowDidDeminiaturize 1073 +#define EventWindowDidEndSheet 1074 +#define EventWindowDidEnterFullScreen 1075 +#define EventWindowDidEnterVersionBrowser 1076 +#define EventWindowDidExitFullScreen 1077 +#define EventWindowDidExitVersionBrowser 1078 +#define EventWindowDidExpose 1079 +#define EventWindowDidFocus 1080 +#define EventWindowDidMiniaturize 1081 +#define EventWindowDidMove 1082 +#define EventWindowDidOrderOffScreen 1083 +#define EventWindowDidOrderOnScreen 1084 +#define EventWindowDidResignKey 1085 +#define EventWindowDidResignMain 1086 +#define EventWindowDidResize 1087 +#define EventWindowDidUpdate 1088 +#define EventWindowDidUpdateAlpha 1089 +#define EventWindowDidUpdateCollectionBehavior 1090 +#define EventWindowDidUpdateCollectionProperties 1091 +#define EventWindowDidUpdateShadow 1092 +#define EventWindowDidUpdateTitle 1093 +#define EventWindowDidUpdateToolbar 1094 +#define EventWindowDidUpdateVisibility 1095 +#define EventWindowShouldClose 1096 +#define EventWindowWillBecomeKey 1097 +#define EventWindowWillBecomeMain 1098 +#define EventWindowWillBeginSheet 1099 +#define EventWindowWillChangeOrderingMode 1100 +#define EventWindowWillClose 1101 +#define EventWindowWillDeminiaturize 1102 +#define EventWindowWillEnterFullScreen 1103 +#define EventWindowWillEnterVersionBrowser 1104 +#define EventWindowWillExitFullScreen 1105 +#define EventWindowWillExitVersionBrowser 1106 +#define EventWindowWillFocus 1107 +#define EventWindowWillMiniaturize 1108 +#define EventWindowWillMove 1109 +#define EventWindowWillOrderOffScreen 1110 +#define EventWindowWillOrderOnScreen 1111 +#define EventWindowWillResignMain 1112 +#define EventWindowWillResize 1113 +#define EventWindowWillUnfocus 1114 +#define EventWindowWillUpdate 1115 +#define EventWindowWillUpdateAlpha 1116 +#define EventWindowWillUpdateCollectionBehavior 1117 +#define EventWindowWillUpdateCollectionProperties 1118 +#define EventWindowWillUpdateShadow 1119 +#define EventWindowWillUpdateTitle 1120 +#define EventWindowWillUpdateToolbar 1121 +#define EventWindowWillUpdateVisibility 1122 +#define EventWindowWillUseStandardFrame 1123 +#define EventMenuWillOpen 1124 +#define EventMenuDidOpen 1125 +#define EventMenuDidClose 1126 +#define EventMenuWillSendAction 1127 +#define EventMenuDidSendAction 1128 +#define EventMenuWillHighlightItem 1129 +#define EventMenuDidHighlightItem 1130 +#define EventMenuWillDisplayItem 1131 +#define EventMenuDidDisplayItem 1132 +#define EventMenuWillAddItem 1133 +#define EventMenuDidAddItem 1134 +#define EventMenuWillRemoveItem 1135 +#define EventMenuDidRemoveItem 1136 +#define EventMenuWillBeginTracking 1137 +#define EventMenuDidBeginTracking 1138 +#define EventMenuWillEndTracking 1139 +#define EventMenuDidEndTracking 1140 +#define EventMenuWillUpdate 1141 +#define EventMenuDidUpdate 1142 +#define EventMenuWillPopUp 1143 +#define EventMenuDidPopUp 1144 +#define EventMenuWillSendActionToItem 1145 +#define EventMenuDidSendActionToItem 1146 +#define EventWebViewDidStartProvisionalNavigation 1147 +#define EventWebViewDidReceiveServerRedirectForProvisionalNavigation 1148 +#define EventWebViewDidFinishNavigation 1149 +#define EventWebViewDidCommitNavigation 1150 +#define EventWindowFileDraggingEntered 1151 +#define EventWindowFileDraggingPerformed 1152 +#define EventWindowFileDraggingExited 1153 -#define MAX_EVENTS 1149 +#define MAX_EVENTS 1154 #endif \ No newline at end of file diff --git a/v3/pkg/events/events_linux.go b/v3/pkg/events/events_linux.go new file mode 100644 index 00000000000..2782beb8acd --- /dev/null +++ b/v3/pkg/events/events_linux.go @@ -0,0 +1,22 @@ +//go:build linux + +package events + +/* +#include "events_linux.h" +#include +#include + +bool hasListener[MAX_EVENTS] = {false}; + +void registerListener(unsigned int event) { + hasListener[event] = true; +} + +bool hasListeners(unsigned int event) { + //return hasListener[event]; + return true; +} + +*/ +import "C" diff --git a/v3/pkg/events/events_linux.h b/v3/pkg/events/events_linux.h new file mode 100644 index 00000000000..21b6f32eee0 --- /dev/null +++ b/v3/pkg/events/events_linux.h @@ -0,0 +1,19 @@ +//go:build linux + +#ifndef _events_h +#define _events_h + +extern void processApplicationEvent(unsigned int, void* data); +extern void processWindowEvent(unsigned int, unsigned int); + +#define EventSystemThemeChanged 1024 +#define EventWindowLoadChanged 1025 +#define EventWindowDeleteEvent 1026 +#define EventWindowFocusIn 1027 +#define EventWindowFocusOut 1028 +#define EventApplicationStartup 1029 + +#define MAX_EVENTS 1030 + + +#endif \ No newline at end of file diff --git a/v3/tasks/events/generate.go b/v3/tasks/events/generate.go index 9518036f88e..4772a1ef8d9 100644 --- a/v3/tasks/events/generate.go +++ b/v3/tasks/events/generate.go @@ -61,7 +61,19 @@ $$EVENTTOJS} ` -var eventsH = `//go:build darwin +var darwinEventsH = `//go:build darwin + +#ifndef _events_h +#define _events_h + +extern void processApplicationEvent(unsigned int, void* data); +extern void processWindowEvent(unsigned int, unsigned int); + +$$CHEADEREVENTS + +#endif` + +var linuxEventsH = `//go:build linux #ifndef _events_h #define _events_h @@ -108,10 +120,11 @@ func main() { linuxEventsDecl := bytes.NewBufferString("") linuxEventsValues := bytes.NewBufferString("") + linuxCHeaderEvents := bytes.NewBufferString("") macEventsDecl := bytes.NewBufferString("") macEventsValues := bytes.NewBufferString("") - cHeaderEvents := bytes.NewBufferString("") + macCHeaderEvents := bytes.NewBufferString("") windowDelegateEvents := bytes.NewBufferString("") applicationDelegateEvents := bytes.NewBufferString("") webviewDelegateEvents := bytes.NewBufferString("") @@ -137,6 +150,7 @@ func main() { var id int // var maxLinuxEvents int var maxMacEvents int + var maxLinuxEvents int var line []byte // Loop over each line in the file for id, line = range bytes.Split(eventNames, []byte{'\n'}) { @@ -179,7 +193,8 @@ func main() { linuxJSEvents.WriteString("\t\t" + event + ": \"" + strings.TrimSpace(string(line)) + "\",\n") linuxTSEvents.WriteString("\t\t" + event + ": string,\n") eventToJS.WriteString("\t" + strconv.Itoa(id) + ": \"" + strings.TrimSpace(string(line)) + "\",\n") - //maxLinuxEvents = id + maxLinuxEvents = id + linuxCHeaderEvents.WriteString("#define Event" + eventTitle + " " + strconv.Itoa(id) + "\n") case "mac": eventType := "ApplicationEventType" if strings.HasPrefix(event, "Window") { @@ -192,7 +207,7 @@ func main() { macEventsValues.WriteString("\t\t" + event + ": " + strconv.Itoa(id) + ",\n") macJSEvents.WriteString("\t\t" + event + ": \"" + strings.TrimSpace(string(line)) + "\",\n") macTSEvents.WriteString("\t\t" + event + ": string,\n") - cHeaderEvents.WriteString("#define Event" + eventTitle + " " + strconv.Itoa(id) + "\n") + macCHeaderEvents.WriteString("#define Event" + eventTitle + " " + strconv.Itoa(id) + "\n") eventToJS.WriteString("\t" + strconv.Itoa(id) + ": \"" + strings.TrimSpace(string(line)) + "\",\n") maxMacEvents = id if ignoreEvent { @@ -258,7 +273,8 @@ func main() { } } - cHeaderEvents.WriteString("\n#define MAX_EVENTS " + strconv.Itoa(maxMacEvents+1) + "\n") + macCHeaderEvents.WriteString("\n#define MAX_EVENTS " + strconv.Itoa(maxMacEvents+1) + "\n") + linuxCHeaderEvents.WriteString("\n#define MAX_EVENTS " + strconv.Itoa(maxLinuxEvents+1) + "\n") // Save the eventsGo template substituting the values and decls templateToWrite := strings.ReplaceAll(eventsGo, "$$LINUXEVENTSDECL", linuxEventsDecl.String()) @@ -296,13 +312,20 @@ func main() { panic(err) } - // Save the eventsH template substituting the values and decls - templateToWrite = strings.ReplaceAll(eventsH, "$$CHEADEREVENTS", cHeaderEvents.String()) + // Save the darwinEventsH template substituting the values and decls + templateToWrite = strings.ReplaceAll(darwinEventsH, "$$CHEADEREVENTS", macCHeaderEvents.String()) err = os.WriteFile("../../pkg/events/events_darwin.h", []byte(templateToWrite), 0644) if err != nil { panic(err) } + // Save the linuxEventsH template substituting the values and decls + templateToWrite = strings.ReplaceAll(linuxEventsH, "$$CHEADEREVENTS", linuxCHeaderEvents.String()) + err = os.WriteFile("../../pkg/events/events_linux.h", []byte(templateToWrite), 0644) + if err != nil { + panic(err) + } + // Load the window_delegate.m file windowDelegate, err := os.ReadFile("../../pkg/application/webview_window_darwin.m") if err != nil {