From 30185975d174b814731abb6c5ded59250a2a136e Mon Sep 17 00:00:00 2001 From: Mohammed Alyousef Date: Sat, 27 Jan 2024 01:40:23 +0300 Subject: [PATCH] update --- Cargo.toml | 4 ++-- examples/basic2.rs | 23 +++++++++++++++++++++++ fltk-webview-sys/Cargo.toml | 4 ++-- 3 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 examples/basic2.rs diff --git a/Cargo.toml b/Cargo.toml index e4602ee..f45fc2e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fltk-webview" -version = "0.4.0" +version = "0.4.1" authors = ["MoAlyousef ", "Adia Robbie "] edition = "2021" description = "Webview for embedded fltk windows" @@ -14,7 +14,7 @@ license = "MIT" [dependencies] # fltk = { version = "1.4", features = ["fltk-bundled"] } fltk = "1.4" -fltk-webview-sys = { version = "0.3.0", path = "fltk-webview-sys" } +fltk-webview-sys = { version = "0.3.2", path = "fltk-webview-sys" } # for the examples [dev-dependencies] diff --git a/examples/basic2.rs b/examples/basic2.rs new file mode 100644 index 0000000..c0673d9 --- /dev/null +++ b/examples/basic2.rs @@ -0,0 +1,23 @@ +use fltk::{app, prelude::*, group, input, window}; +use fltk_webview::*; + +fn main() { + let app = app::App::default(); + let mut win = window::Window::default() + .with_size(800, 600) + .with_label("Webview"); + let mut col = group::Flex::default_fill().column(); + col.set_margin(5); + let inp = input::Input::default(); + col.fixed(&inp, 30); + let mut wv_win = window::Window::default(); + col.end(); + win.end(); + win.make_resizable(true); + win.show(); + + let wv = Webview::create(false, &mut wv_win); + wv.navigate("https://google.com"); + + app.run().unwrap(); +} diff --git a/fltk-webview-sys/Cargo.toml b/fltk-webview-sys/Cargo.toml index 906282f..68f6f4e 100644 --- a/fltk-webview-sys/Cargo.toml +++ b/fltk-webview-sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fltk-webview-sys" -version = "0.3.1" +version = "0.3.2" authors = ["MoAlyousef ", "Adia Robbie "] edition = "2018" description = "Webview for embedded fltk windows" @@ -12,7 +12,7 @@ readme = "../README.md" license = "MIT" [dependencies] -wv-sys = "0.1" +wv-sys = "0.1.2" [build-dependencies] pkg-config = "0.3"