mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 10:21:20 +08:00
add function argument to ExecuteOnMainThread
This commit is contained in:
parent
b11964f0eb
commit
3bcddd5b4c
@ -196,8 +196,8 @@ int executeJS(gpointer data) {
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
void ExecuteOnMainThread(JSCallback* jscallback) {
|
||||
g_idle_add((GSourceFunc)executeJS, (gpointer)jscallback);
|
||||
void ExecuteOnMainThread(void* f, JSCallback* jscallback) {
|
||||
g_idle_add((GSourceFunc)f, (gpointer)jscallback);
|
||||
}
|
||||
|
||||
void extern processOpenFileResult(char*);
|
||||
@ -443,7 +443,7 @@ func (w *Window) ExecJS(js string) {
|
||||
webview: w.webview,
|
||||
script: C.CString(js),
|
||||
}
|
||||
C.ExecuteOnMainThread(&jscallback)
|
||||
C.ExecuteOnMainThread(C.executeJS, &jscallback)
|
||||
}
|
||||
|
||||
func (w *Window) StartDrag() {
|
||||
|
Loading…
Reference in New Issue
Block a user