zxey
32a10871e6
Rename wrapper functions to webview functions
2019-10-07 23:52:36 +02:00
zxey
31b4904b69
Fix rustc warnings
2019-09-29 11:50:26 +02:00
zxey
040041be55
Remove pre Rust 1.30 flag
2019-09-29 11:49:43 +02:00
Thomas Hurst
e982977219
Use C calling convention for callbacks
...
This fixes crashes on 32bit Windows (reported in #3 )
2019-05-16 15:44:48 +02:00
Sam Green
a019c73756
Remove bounds from type definitions.
2018-11-27 18:39:50 +00:00
Sam Green
4e7378a653
Add fluent dialog API with example.
2018-11-22 20:52:35 +00:00
Sam Green
8a5d2dda0d
Implement run method for builder. Use in examples.
2018-11-22 20:52:35 +00:00
Sam Green
a9708e255c
Add convenience function for constructing new builder.
2018-11-22 20:52:35 +00:00
Sam Green
41fa713175
Add ability to override webview source and document. ( #39 )
2018-11-16 10:01:35 +00:00
Sam Green
57c0669adf
Revert "Fix double free and user data usage after move" to fix leak. ( #37 )
...
Add `mem::forget` call to prevent double free.
This reverts commit 8bcb16f52f .
2018-11-11 16:47:51 +00:00
zxey
8bcb16f52f
Fix double free and user data usage after move
...
Previously when in WebView::run method, WebView::into_inner would be called,
which consumed inner user data, and freed inner c-webview instance.
This caused problems when paired with Drop implementation for WebView
which called exactly the same function, thus accessing the moved out
inner user data and freeing the c-webview instance again.
The solution I did here was to split the freeing into Drop and leave only
user data move in into_inner method.
2018-11-10 23:04:07 +01:00
Sam Green
d5f9f284e3
Rewrite to use builder pattern. Fix dispatch unsafety. ( #36 )
...
* Major rewrite.
- Fix unsafety (require 'static bound on dispatched closure)
- Switch to builder pattern.
- Run rustfmt
- Fix clippy warnings
- Userdata borrowed from webview instead of being arg of dispatch closure
- Bump minor version
- Update webview
- Add crate-level doc
* Add rustfmt.toml
* Allow propagation of errors from invoke and dispatch closures.
* Refine doc comments.
* Add enum derives.
* Remove mut bound from `handle()`.
* Remove dependency on failure.
2018-11-10 20:16:12 +00:00
Aaron Weiss
8f5caf2db6
Add support for webview_set_title and use it in todo example.
2018-07-12 10:23:19 +02:00
Aaron Weiss
db9e4babc5
Add support for webview_set_color and use it in todo example.
2018-07-11 22:00:54 +02:00
Ram Kaniyur
010126d895
Remove impl Trait because it's still unstable.
2018-05-08 14:49:39 +10:00
Ram Kaniyur
2901294634
Fix boundary bug in the escape code; turns out chars wasn't so stupid after all.
2018-05-08 13:53:38 +10:00
Ram Kaniyur
2ee2eda43f
Hide escape module.
2018-05-08 13:42:12 +10:00
Ram Kaniyur
1bdedc99e0
Add JavaScript string escaper.
2018-05-08 13:31:07 +10:00
Boscop
3932662710
improved string handling in dialog
2018-04-29 23:57:22 +02:00
zxey
69519d102b
Implement Content enum
...
Content enum allows us to pass url or html content easily to webview
without the need to encode the passed string beforehand.
2018-04-08 02:44:46 +02:00
zxey
02c3004c8f
Implement dialog function for showing system dialogs
2018-04-08 02:04:48 +02:00
zxey
3e5c8a44bf
Update c-webview, introduce -sys convention
...
This adds webview as a submodule instead of including sources directly.
New webview function are not yet implemented, the functionality stays the
same.
2018-04-08 00:00:41 +02:00
Boscop
49846c9dea
made init callback FnOnce and dispatch callback generic over WebView lifetime
...
(uses webview.h from zserge/webview#5a16d33)
2018-02-01 16:14:28 +01:00
Boscop
79973f9f56
require dispatched callbacks to be Send
2018-01-23 01:08:10 +01:00
Boscop
450b215f2c
import
2018-01-21 07:36:31 +01:00