github.com/AlpineAIO/wails/v2@v2.0.0-beta.32.0.20240505041856-1047a8fa5fef/pkg/templates/generate/assets/common/frontend/wailsjs/runtime/runtime.js (about) 1 /* 2 _ __ _ __ 3 | | / /___ _(_) /____ 4 | | /| / / __ `/ / / ___/ 5 | |/ |/ / /_/ / / (__ ) 6 |__/|__/\__,_/_/_/____/ 7 The electron alternative for Go 8 (c) Lea Anthony 2019-present 9 */ 10 11 export function LogPrint(message) { 12 window.runtime.LogPrint(message); 13 } 14 15 export function LogTrace(message) { 16 window.runtime.LogTrace(message); 17 } 18 19 export function LogDebug(message) { 20 window.runtime.LogDebug(message); 21 } 22 23 export function LogInfo(message) { 24 window.runtime.LogInfo(message); 25 } 26 27 export function LogWarning(message) { 28 window.runtime.LogWarning(message); 29 } 30 31 export function LogError(message) { 32 window.runtime.LogError(message); 33 } 34 35 export function LogFatal(message) { 36 window.runtime.LogFatal(message); 37 } 38 39 export function EventsOnMultiple(eventName, callback, maxCallbacks) { 40 window.runtime.EventsOnMultiple(eventName, callback, maxCallbacks); 41 } 42 43 export function EventsOn(eventName, callback) { 44 EventsOnMultiple(eventName, callback, -1); 45 } 46 47 export function EventsOff(eventName) { 48 return window.runtime.EventsOff(eventName); 49 } 50 51 export function EventsOnce(eventName, callback) { 52 EventsOnMultiple(eventName, callback, 1); 53 } 54 55 export function EventsEmit(eventName) { 56 let args = [eventName].slice.call(arguments); 57 return window.runtime.EventsEmit.apply(null, args); 58 } 59 60 export function WindowReload() { 61 window.runtime.WindowReload(); 62 } 63 64 export function WindowReloadApp() { 65 window.runtime.WindowReloadApp(); 66 } 67 68 export function WindowSetAlwaysOnTop(b) { 69 window.runtime.WindowSetAlwaysOnTop(b); 70 } 71 72 export function WindowSetSystemDefaultTheme() { 73 window.runtime.WindowSetSystemDefaultTheme(); 74 } 75 76 export function WindowSetLightTheme() { 77 window.runtime.WindowSetLightTheme(); 78 } 79 80 export function WindowSetDarkTheme() { 81 window.runtime.WindowSetDarkTheme(); 82 } 83 84 export function WindowCenter() { 85 window.runtime.WindowCenter(); 86 } 87 88 export function WindowSetTitle(title) { 89 window.runtime.WindowSetTitle(title); 90 } 91 92 export function WindowFullscreen() { 93 window.runtime.WindowFullscreen(); 94 } 95 96 export function WindowUnfullscreen() { 97 window.runtime.WindowUnfullscreen(); 98 } 99 100 export function WindowGetSize() { 101 return window.runtime.WindowGetSize(); 102 } 103 104 export function WindowSetSize(width, height) { 105 window.runtime.WindowSetSize(width, height); 106 } 107 108 export function WindowSetMaxSize(width, height) { 109 window.runtime.WindowSetMaxSize(width, height); 110 } 111 112 export function WindowSetMinSize(width, height) { 113 window.runtime.WindowSetMinSize(width, height); 114 } 115 116 export function WindowSetPosition(x, y) { 117 window.runtime.WindowSetPosition(x, y); 118 } 119 120 export function WindowGetPosition() { 121 return window.runtime.WindowGetPosition(); 122 } 123 124 export function WindowHide() { 125 window.runtime.WindowHide(); 126 } 127 128 export function WindowShow() { 129 window.runtime.WindowShow(); 130 } 131 132 export function WindowMaximise() { 133 window.runtime.WindowMaximise(); 134 } 135 136 export function WindowToggleMaximise() { 137 window.runtime.WindowToggleMaximise(); 138 } 139 140 export function WindowUnmaximise() { 141 window.runtime.WindowUnmaximise(); 142 } 143 144 export function WindowMinimise() { 145 window.runtime.WindowMinimise(); 146 } 147 148 export function WindowUnminimise() { 149 window.runtime.WindowUnminimise(); 150 } 151 152 export function WindowSetBackgroundColour(R, G, B, A) { 153 window.runtime.WindowSetBackgroundColour(R, G, B, A); 154 } 155 156 export function ScreenGetAll() { 157 return window.runtime.ScreenGetAll(); 158 } 159 160 export function BrowserOpenURL(url) { 161 window.runtime.BrowserOpenURL(url); 162 } 163 164 export function Environment() { 165 return window.runtime.Environment(); 166 } 167 168 export function Quit() { 169 window.runtime.Quit(); 170 } 171 172 export function Hide() { 173 window.runtime.Hide(); 174 } 175 176 export function Show() { 177 window.runtime.Show(); 178 }