mirror of
https://github.com/taigrr/wails.git
synced 2026-04-04 22:22:41 -07:00
Compare commits
2 Commits
patch-1
...
pre-releas
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71dc137194 | ||
|
|
13e6bd2178 |
@@ -9,4 +9,4 @@
|
|||||||
last 2 versions
|
last 2 versions
|
||||||
Firefox ESR
|
Firefox ESR
|
||||||
not dead
|
not dead
|
||||||
not IE 9-11 # For IE 9-11 support, remove 'not'.
|
IE 9-11 # For IE 9-11 support, remove 'not'.
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ package webview
|
|||||||
#cgo linux openbsd freebsd CFLAGS: -DWEBVIEW_GTK=1 -Wno-deprecated-declarations
|
#cgo linux openbsd freebsd CFLAGS: -DWEBVIEW_GTK=1 -Wno-deprecated-declarations
|
||||||
#cgo linux openbsd freebsd pkg-config: gtk+-3.0 webkit2gtk-4.0
|
#cgo linux openbsd freebsd pkg-config: gtk+-3.0 webkit2gtk-4.0
|
||||||
|
|
||||||
#cgo windows CFLAGS: -DWEBVIEW_WINAPI=1 -std=c99 -DUNICODE=1
|
#cgo windows CFLAGS: -DWEBVIEW_WINAPI=1 -std=c99 -DUNICODE=1 -D_UNICODE=1
|
||||||
#cgo windows LDFLAGS: -lole32 -lcomctl32 -loleaut32 -luuid -lgdi32
|
#cgo windows LDFLAGS: -lole32 -lcomctl32 -loleaut32 -luuid -lgdi32
|
||||||
|
|
||||||
#cgo darwin CFLAGS: -DWEBVIEW_COCOA=1 -x objective-c
|
#cgo darwin CFLAGS: -DWEBVIEW_COCOA=1 -x objective-c
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ extern "C"
|
|||||||
#elif defined(WEBVIEW_WINAPI)
|
#elif defined(WEBVIEW_WINAPI)
|
||||||
#define CINTERFACE
|
#define CINTERFACE
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#include <tchar.h>
|
||||||
|
|
||||||
#include <commctrl.h>
|
#include <commctrl.h>
|
||||||
#include <exdisp.h>
|
#include <exdisp.h>
|
||||||
@@ -1350,8 +1351,8 @@ struct webview_priv
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define WEBVIEW_KEY_FEATURE_BROWSER_EMULATION \
|
#define WEBVIEW_KEY_FEATURE_BROWSER_EMULATION \
|
||||||
"Software\\Microsoft\\Internet " \
|
_T("Software\\Microsoft\\Internet " \
|
||||||
"Explorer\\Main\\FeatureControl\\FEATURE_BROWSER_EMULATION"
|
"Explorer\\Main\\FeatureControl\\FEATURE_BROWSER_EMULATION")
|
||||||
|
|
||||||
static int webview_fix_ie_compat_mode()
|
static int webview_fix_ie_compat_mode()
|
||||||
{
|
{
|
||||||
@@ -1363,7 +1364,7 @@ struct webview_priv
|
|||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
for (p = &appname[strlen(appname) - 1]; p != appname && *p != '\\'; p--)
|
for (p = &appname[_tcslen(appname) - 1]; p != appname && *p != _T('\\'); p--)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
p++;
|
p++;
|
||||||
@@ -1872,14 +1873,30 @@ struct webview_priv
|
|||||||
type |= MB_ICONERROR;
|
type |= MB_ICONERROR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#ifdef UNICODE
|
||||||
|
WCHAR *wtitle = webview_to_utf16(title);
|
||||||
|
WCHAR *warg = webview_to_utf16(arg);
|
||||||
|
MessageBox(w->priv.hwnd, warg, wtitle, type);
|
||||||
|
GlobalFree(warg);
|
||||||
|
GlobalFree(wtitle);
|
||||||
|
#else
|
||||||
MessageBox(w->priv.hwnd, arg, title, type);
|
MessageBox(w->priv.hwnd, arg, title, type);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
WEBVIEW_API void webview_terminate(struct webview *w) { PostQuitMessage(0); }
|
WEBVIEW_API void webview_terminate(struct webview *w) { PostQuitMessage(0); }
|
||||||
WEBVIEW_API void webview_exit(struct webview *w) { OleUninitialize(); }
|
WEBVIEW_API void webview_exit(struct webview *w) { OleUninitialize(); }
|
||||||
WEBVIEW_API void webview_print_log(const char *s) { OutputDebugString(s); }
|
WEBVIEW_API void webview_print_log(const char *s) {
|
||||||
|
#ifdef UNICODE
|
||||||
|
WCHAR *ws = webview_to_utf16(s);
|
||||||
|
OutputDebugString(ws);
|
||||||
|
GlobalFree(ws);
|
||||||
|
#else
|
||||||
|
OutputDebugString(s);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* WEBVIEW_WINAPI */
|
#endif /* WEBVIEW_WINAPI */
|
||||||
|
|
||||||
|
|||||||
@@ -15,10 +15,7 @@
|
|||||||
"error",
|
"error",
|
||||||
"tab"
|
"tab"
|
||||||
],
|
],
|
||||||
"linebreak-style": [
|
"linebreak-style": 0,
|
||||||
"error",
|
|
||||||
"unix"
|
|
||||||
],
|
|
||||||
"quotes": [
|
"quotes": [
|
||||||
"error",
|
"error",
|
||||||
"single"
|
"single"
|
||||||
@@ -28,4 +25,4 @@
|
|||||||
"always"
|
"always"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,6 @@ function OpenFile(filename) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
OpenURL,
|
OpenURL: OpenURL,
|
||||||
OpenFile
|
OpenFile: OpenFile
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -80,10 +80,10 @@ function Acknowledge(eventName) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
OnMultiple,
|
OnMultiple: OnMultiple,
|
||||||
On,
|
On: On,
|
||||||
Once,
|
Once: Once,
|
||||||
Emit,
|
Emit: Emit,
|
||||||
Heartbeat,
|
Heartbeat: Heartbeat,
|
||||||
Acknowledge
|
Acknowledge: Acknowledge
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -62,9 +62,9 @@ function Fatal(message) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
Debug,
|
Debug: Debug,
|
||||||
Info,
|
Info: Info,
|
||||||
Warning,
|
Warning: Warning,
|
||||||
Error,
|
Error: Error,
|
||||||
Fatal
|
Fatal: Fatal
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ const Events = require('./events');
|
|||||||
const Init = require('./init');
|
const Init = require('./init');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
Log,
|
Log: Log,
|
||||||
Browser,
|
Browser: Browser,
|
||||||
Events,
|
Events: Events,
|
||||||
Init
|
Init: Init
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@wailsapp/runtime",
|
"name": "@wailsapp/runtime",
|
||||||
"version": "1.0.6",
|
"version": "1.0.8",
|
||||||
"description": "Wails Javascript runtime library",
|
"description": "Wails Javascript runtime library",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"types": "runtime.d.ts",
|
"types": "runtime.d.ts",
|
||||||
|
|||||||
Reference in New Issue
Block a user