search and/or read your saved and liked bluesky posts
wails
go
svelte
sqlite
desktop
bluesky
1/*
2 _ __ _ __
3| | / /___ _(_) /____
4| | /| / / __ `/ / / ___/
5| |/ |/ / /_/ / / (__ )
6|__/|__/\__,_/_/_/____/
7The electron alternative for Go
8(c) Lea Anthony 2019-present
9*/
10
11export function LogPrint(message) {
12 window.runtime.LogPrint(message);
13}
14
15export function LogTrace(message) {
16 window.runtime.LogTrace(message);
17}
18
19export function LogDebug(message) {
20 window.runtime.LogDebug(message);
21}
22
23export function LogInfo(message) {
24 window.runtime.LogInfo(message);
25}
26
27export function LogWarning(message) {
28 window.runtime.LogWarning(message);
29}
30
31export function LogError(message) {
32 window.runtime.LogError(message);
33}
34
35export function LogFatal(message) {
36 window.runtime.LogFatal(message);
37}
38
39export function EventsOnMultiple(eventName, callback, maxCallbacks) {
40 return window.runtime.EventsOnMultiple(eventName, callback, maxCallbacks);
41}
42
43export function EventsOn(eventName, callback) {
44 return EventsOnMultiple(eventName, callback, -1);
45}
46
47export function EventsOff(eventName, ...additionalEventNames) {
48 return window.runtime.EventsOff(eventName, ...additionalEventNames);
49}
50
51export function EventsOffAll() {
52 return window.runtime.EventsOffAll();
53}
54
55export function EventsOnce(eventName, callback) {
56 return EventsOnMultiple(eventName, callback, 1);
57}
58
59export function EventsEmit(eventName) {
60 let args = [eventName].slice.call(arguments);
61 return window.runtime.EventsEmit.apply(null, args);
62}
63
64export function WindowReload() {
65 window.runtime.WindowReload();
66}
67
68export function WindowReloadApp() {
69 window.runtime.WindowReloadApp();
70}
71
72export function WindowSetAlwaysOnTop(b) {
73 window.runtime.WindowSetAlwaysOnTop(b);
74}
75
76export function WindowSetSystemDefaultTheme() {
77 window.runtime.WindowSetSystemDefaultTheme();
78}
79
80export function WindowSetLightTheme() {
81 window.runtime.WindowSetLightTheme();
82}
83
84export function WindowSetDarkTheme() {
85 window.runtime.WindowSetDarkTheme();
86}
87
88export function WindowCenter() {
89 window.runtime.WindowCenter();
90}
91
92export function WindowSetTitle(title) {
93 window.runtime.WindowSetTitle(title);
94}
95
96export function WindowFullscreen() {
97 window.runtime.WindowFullscreen();
98}
99
100export function WindowUnfullscreen() {
101 window.runtime.WindowUnfullscreen();
102}
103
104export function WindowIsFullscreen() {
105 return window.runtime.WindowIsFullscreen();
106}
107
108export function WindowGetSize() {
109 return window.runtime.WindowGetSize();
110}
111
112export function WindowSetSize(width, height) {
113 window.runtime.WindowSetSize(width, height);
114}
115
116export function WindowSetMaxSize(width, height) {
117 window.runtime.WindowSetMaxSize(width, height);
118}
119
120export function WindowSetMinSize(width, height) {
121 window.runtime.WindowSetMinSize(width, height);
122}
123
124export function WindowSetPosition(x, y) {
125 window.runtime.WindowSetPosition(x, y);
126}
127
128export function WindowGetPosition() {
129 return window.runtime.WindowGetPosition();
130}
131
132export function WindowHide() {
133 window.runtime.WindowHide();
134}
135
136export function WindowShow() {
137 window.runtime.WindowShow();
138}
139
140export function WindowMaximise() {
141 window.runtime.WindowMaximise();
142}
143
144export function WindowToggleMaximise() {
145 window.runtime.WindowToggleMaximise();
146}
147
148export function WindowUnmaximise() {
149 window.runtime.WindowUnmaximise();
150}
151
152export function WindowIsMaximised() {
153 return window.runtime.WindowIsMaximised();
154}
155
156export function WindowMinimise() {
157 window.runtime.WindowMinimise();
158}
159
160export function WindowUnminimise() {
161 window.runtime.WindowUnminimise();
162}
163
164export function WindowSetBackgroundColour(R, G, B, A) {
165 window.runtime.WindowSetBackgroundColour(R, G, B, A);
166}
167
168export function ScreenGetAll() {
169 return window.runtime.ScreenGetAll();
170}
171
172export function WindowIsMinimised() {
173 return window.runtime.WindowIsMinimised();
174}
175
176export function WindowIsNormal() {
177 return window.runtime.WindowIsNormal();
178}
179
180export function BrowserOpenURL(url) {
181 window.runtime.BrowserOpenURL(url);
182}
183
184export function Environment() {
185 return window.runtime.Environment();
186}
187
188export function Quit() {
189 window.runtime.Quit();
190}
191
192export function Hide() {
193 window.runtime.Hide();
194}
195
196export function Show() {
197 window.runtime.Show();
198}
199
200export function ClipboardGetText() {
201 return window.runtime.ClipboardGetText();
202}
203
204export function ClipboardSetText(text) {
205 return window.runtime.ClipboardSetText(text);
206}
207
208/**
209 * Callback for OnFileDrop returns a slice of file path strings when a drop is finished.
210 *
211 * @export
212 * @callback OnFileDropCallback
213 * @param {number} x - x coordinate of the drop
214 * @param {number} y - y coordinate of the drop
215 * @param {string[]} paths - A list of file paths.
216 */
217
218/**
219 * OnFileDrop listens to drag and drop events and calls the callback with the coordinates of the drop and an array of path strings.
220 *
221 * @export
222 * @param {OnFileDropCallback} callback - Callback for OnFileDrop returns a slice of file path strings when a drop is finished.
223 * @param {boolean} [useDropTarget=true] - Only call the callback when the drop finished on an element that has the drop target style. (--wails-drop-target)
224 */
225export function OnFileDrop(callback, useDropTarget) {
226 return window.runtime.OnFileDrop(callback, useDropTarget);
227}
228
229/**
230 * OnFileDropOff removes the drag and drop listeners and handlers.
231 */
232export function OnFileDropOff() {
233 return window.runtime.OnFileDropOff();
234}
235
236export function CanResolveFilePaths() {
237 return window.runtime.CanResolveFilePaths();
238}
239
240export function ResolveFilePaths(files) {
241 return window.runtime.ResolveFilePaths(files);
242}