101 Commits

Author SHA1 Message Date
Lucas Nogueira
fb5c76ca06 fix(windows) build on SDK 10.0.19041.1 2020-06-11 10:40:02 -03:00
Richard Hozák
48cfa085e0 Fix type mismatch (#163)
Fixes #162
2020-04-03 21:41:15 +02:00
Alex Jones
3a0db4eaca Use default icon provided by winres when present (#124)
* Use default winres icon as top left window icon

* Replace MAKEINTRESOURCE macro with cast

Co-authored-by: Richard Hozák <r.hozak@seznam.cz>
2020-03-16 13:21:11 +01:00
zxey
8f1f391a92 Apply rustfmt 2020-03-15 02:30:46 +01:00
zxey
363dd8eb29 Bump versions 2020-03-15 00:43:14 +01:00
zxey
44ed909ea3 Remove webview_check_url
It was not needed, simple null check is enough.
Webview on macOS, Linux, and Windows correctly display empty webpage is content is empty, no need to display empty html document.

With this, Linux gtk backend is now fully in Rust, no c compiler needed.
2020-03-15 01:34:43 +01:00
zxey
9b8b107c04 Reimplement inject css function in Rust 2020-03-15 00:55:44 +01:00
zxey
3fb4b4449b Rewrite gtk backend in rust 2020-03-14 23:39:26 +01:00
zxey
542816bab2 Remove bitflags dependency from webview-sys 2020-03-13 22:57:41 +01:00
zxey
9597833d87 mshtml: Move webview initialization to one function 2020-03-13 12:24:42 +01:00
zxey
6813ebff61 Remove far pointers from mshtml implementation
It gets expanded to nothing, it is not needed.
2020-03-13 11:35:30 +01:00
zxey
bbc50de6d2 Do not store title, convert it as needed
Storing it served no real purpose, it just made things harder to reason about.
2020-03-13 11:09:09 +01:00
zxey
a11503ab33 Fix mshtml c compilation warning
We were retuning pointer to pointer, BSTR is already a pointer.
2020-03-13 10:58:01 +01:00
zxey
30143633fe Remove mshtml private fields put them directly in implementation 2020-03-13 10:55:00 +01:00
zxey
6006b7386d Deprecate dialogs
Uses tinyfiledialogs to implement dialog functions on webview.
Removes original implementation.
Converts all examples that use dialogs to use tinyfiledialogs directly.

Note:
Your code will still work as it is, you will only get deprecation warnings,
you should eventually switch to tinyfiledialogs or some other crate for handling dialogs.
2020-03-13 00:36:06 +01:00
zxey
fe26a67493 Bump version 2020-03-12 23:00:10 +01:00
Yin Guanhao
5bfb70be19 mshtml: fix compilation with gcc 2020-03-12 21:36:35 +01:00
Yin Guanhao
7c2c83df8e edge: fix compilation error, scale window size
And don't worry too much about older Windows, because edge is only
available on Windows 10 anyway.
2020-03-12 21:36:35 +01:00
Yin Guanhao
74183c8db0 mshtml: various fixes
* Fix function signature of SetThreadDpiAwarenessContext.

* Don't return if SetThreadDpiAwarenessContext is not present.

* Use SetProcessDPIAware as fallback.

* Use system dpi awareness.

* Scale window size according to the DPI.
2020-03-12 21:36:35 +01:00
Giovanni Patruno
5353c0486f webview_mshtml.c: EnableDpiAwareness moved upper 2020-03-12 21:36:35 +01:00
Giovanni Patruno
0e4ef40e0c webview_mshtml.c: Using HMODULE instead of auto 2020-03-12 21:36:35 +01:00
Giovanni Patruno
acfbc77a0e webview_mshtml.c: SetThreadDpiAwareness signature changed 2020-03-12 21:36:35 +01:00
Giovanni Patruno
adf0095867 webview_edge.cpp: fix context name 2020-03-12 21:36:35 +01:00
Giovanni Patruno
d46cc70c10 webview_edge.cpp: Enabling DPI awareness 2020-03-12 21:36:35 +01:00
Giovanni Patruno
263b6a43c6 webview_mshtml.c: Enabling DPI awareness 2020-03-12 21:36:35 +01:00
Robert Masen
55f619190e fix frameless edge window expecting title bar 2020-02-26 21:21:14 +01:00
Robert Masen
21415bdaa5 update windows to allow for frameless + resizable 2020-02-26 21:21:14 +01:00
Robert
96e68018dd first pass at linux 2020-02-26 21:21:14 +01:00
Robert Masen
2c1d5071e8 pass two at framless on windows 2020-02-26 21:21:14 +01:00
Robert Masen
8dec22b7e6 windows pass at frameless 2020-02-26 21:21:14 +01:00
rfm
17385b8b38 first pass at frameless 2020-02-26 21:21:14 +01:00
zxey
0ef21b6682 Bump versions 2020-01-08 23:30:28 +01:00
carbotaniuman
0a26b3ddc5 Address multiple windows on MacOS 2020-01-08 23:27:17 +01:00
Yin Guanhao
9c116bd5d6 mshtml, edge: speed up Content::Html
Previously `sscanf` is used in decoding the url-encoded html document.
But `sscanf` is quite expensive. Loading a larger document (~800KiB) has
a noticeable delay.

And mshtml is giving the third argument to `sscanf` a `char*` when it
should be an `int*`. It is very problematic.

This commit replaces them with our own hex decoding function.
2019-12-30 11:36:31 +01:00
zxey
6710478a58 Remove unused function 2019-12-28 14:31:57 +01:00
Robert Masen
b664974c1b Allow for graceful Exit (#107)
* First pass at graceful exit

* Working macos unified exit

* fix example html to work with IE

* terminate > exit

* unified edge, I think

* update gtk c impl

* tag terminate as depricated

* fix old fn name

* remove OleUninitialize from edge

* remove queue_close

* remove terminate

* fix typo in edge cpp file

* inspect return value of graceful exit example

* actually create the variable inspected

* make example run a little faster

* Adjust cocoa webveiw_exit

* add back missing method on edge

* lots of pinting

* fix printf arg

* better even debug printing

* clean up debugging stuff

* remove some unneeded changes

* slow down example

* fix view title

* add comment about posting the event to the application on close

Closes #105 
Fixes #52
2019-12-28 14:27:12 +01:00
Yin Guanhao
de8f8d3268 mshtml: fix setting registry key to disable compatibility mode
Always explicitly use wchar_t.
2019-12-26 00:06:29 +01:00
carbotaniuman
177a0d4433 Fix #108 2019-12-23 15:33:33 +01:00
Parker Snell
6f2c3600f0 Eliminate unnecessary string copies/allocations 2019-12-09 09:57:58 +01:00
Parker Snell
438d0afd40 Fix mshtml memory leak 2019-12-09 09:57:58 +01:00
zxey
e850ff0176 Bump version 2019-11-21 16:26:43 +01:00
zxey
b9b40b77d3 Remove unused functions from edge backend 2019-11-21 16:13:23 +01:00
André Twupack
b1779d080e fix for issue #93
- moved functions webview_js_encode and webview_inject_css into webview.h
2019-11-21 10:01:47 +01:00
zxey
eb6c213035 Fix linked libraries
Added missing linked libraries to edge backend.
I also kept the pragmas, if someone want to build the backends separately, so they do not have to supply link library flags to msvc.
2019-11-10 15:38:17 +01:00
zxey
6c2ecbe4fa Publish new version 2019-11-03 19:02:08 +01:00
Jeffrey McAteer
54f30b3bb1 attempt to fix compile error reported by cargo 2019-11-03 00:08:09 +01:00
zxey
788661593a Fix windows unicode support
Affects both mshtml and edge backends.

Fixes #41
Fixes #78
2019-10-15 21:17:02 +02:00
Darren Kaste
69566708a4 Fix Edge backend process leak 2019-10-11 09:32:53 +02:00
zxey
e8dbc06d0c Publish new versions of crates
webview-sys updated its minor version, because the public api changed
web-view updated only patch version, the public api remains the same
2019-10-10 20:50:00 +02:00
Miklós Tusz
cf3dee4f51 Enable webgl and hardware acceleration for webview_gtk canvas 2019-10-10 20:37:31 +02:00