Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update repository URLs for dependencies #89

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- stable
- beta
- nightly
- "1.48.0"
- "1.51.0"
steps:
- run: sudo apt-get install libwebkit2gtk-4.0-dev -y
- uses: actions/checkout@v2
Expand Down
20 changes: 10 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,34 +45,34 @@ once_cell = "1.0"
ffi = { package = "webkit2gtk-sys", path = "webkit2gtk-sys" }

[dependencies.cairo-rs]
git = "https://github.com/gtk-rs/gtk-rs.git"
git = "https://github.com/gtk-rs/gtk-rs-core.git"

[dependencies.gdk]
git = "https://github.com/gtk-rs/gtk-rs.git"
git = "https://github.com/gtk-rs/gtk3-rs.git"

[dependencies.gdk-sys]
git = "https://github.com/gtk-rs/gtk-rs.git"
git = "https://github.com/gtk-rs/gtk3-rs.git"

[dependencies.gio]
git = "https://github.com/gtk-rs/gtk-rs.git"
git = "https://github.com/gtk-rs/gtk-rs-core.git"

[dependencies.gio-sys]
git = "https://github.com/gtk-rs/gtk-rs.git"
git = "https://github.com/gtk-rs/gtk-rs-core.git"

[dependencies.glib]
git = "https://github.com/gtk-rs/gtk-rs.git"
git = "https://github.com/gtk-rs/gtk-rs-core.git"

[dependencies.glib-sys]
git = "https://github.com/gtk-rs/gtk-rs.git"
git = "https://github.com/gtk-rs/gtk-rs-core.git"

[dependencies.gobject-sys]
git = "https://github.com/gtk-rs/gtk-rs.git"
git = "https://github.com/gtk-rs/gtk-rs-core.git"

[dependencies.gtk]
git = "https://github.com/gtk-rs/gtk-rs.git"
git = "https://github.com/gtk-rs/gtk3-rs.git"

[dependencies.gtk-sys]
git = "https://github.com/gtk-rs/gtk-rs.git"
git = "https://github.com/gtk-rs/gtk3-rs.git"

[dependencies.java_script_core]
package = "javascriptcore-rs"
Expand Down
2 changes: 1 addition & 1 deletion Gir.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"web_kit2" = "webkit2"

[options]
girs_dir = "gir-files"
girs_directories = ["gir-files"]
library = "WebKit2"
version = "4.0"
work_mode = "normal"
Expand Down
13 changes: 7 additions & 6 deletions examples/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ use webkit2gtk;

#[cfg(feature = "v2_4")]
use glib::ToVariant;
use gtk::{ContainerExt, Inhibit, WidgetExt, Window, WindowType};
use gtk::{Inhibit, Window, WindowType};
use gtk::prelude::{ContainerExt, WidgetExt};
#[cfg(feature = "v2_6")]
use webkit2gtk::UserContentManager;
use webkit2gtk::{SettingsExt, WebContext, WebContextExt, WebView, WebViewExt};
Expand All @@ -34,7 +35,7 @@ fn main() {
gtk::init().unwrap();

let window = Window::new(WindowType::Toplevel);
let context = WebContext::get_default().unwrap();
let context = WebContext::default().unwrap();
#[cfg(feature = "v2_4")]
context.set_web_extensions_initialization_user_data(&"webkit".to_variant());
context.set_web_extensions_directory("../webkit2gtk-webextension-rs/example/target/debug/");
Expand All @@ -46,10 +47,10 @@ fn main() {
webview.load_uri("https://crates.io/");
window.add(&webview);

let settings = WebViewExt::get_settings(&webview).unwrap();
let settings = WebViewExt::settings(&webview).unwrap();
settings.set_enable_developer_extras(true);

/*let inspector = webview.get_inspector().unwrap();
/*let inspector = webview.inspector().unwrap();
inspector.show();*/

window.show_all();
Expand All @@ -59,8 +60,8 @@ fn main() {
let cancellable = gio::Cancellable::new();
webview.run_javascript("42", Some(&cancellable), |result| match result {
Ok(result) => {
let context = result.get_global_context().unwrap();
let value = result.get_value().unwrap();
let context = result.global_context().unwrap();
let value = result.value().unwrap();
println!("is_boolean: {}", value.is_boolean(&context));
println!("is_number: {}", value.is_number(&context));
println!("{:?}", value.to_number(&context));
Expand Down
2 changes: 1 addition & 1 deletion gir
Submodule gir updated 115 files
2 changes: 1 addition & 1 deletion gir-files
Submodule gir-files updated 9 files
+492 −529 GLib-2.0.gir
+102 −84 GObject-2.0.gir
+2,549 −2,194 Gdk-4.0.gir
+96 −77 GdkWayland-4.0.gir
+486 −265 Gio-2.0.gir
+707 −593 Gsk-4.0.gir
+2 −2 Gtk-3.0.gir
+21,603 −14,655 Gtk-4.0.gir
+12 −5 fix.sh
20 changes: 6 additions & 14 deletions src/auto/application_info.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// from gir-files (https://github.com/gtk-rs/gir-files.git)
// DO NOT EDIT

#[cfg(any(feature = "v2_18", feature = "dox"))]
Expand All @@ -16,30 +16,26 @@ glib::wrapper! {
match fn {
ref => |ptr| ffi::webkit_application_info_ref(ptr),
unref => |ptr| ffi::webkit_application_info_unref(ptr),
get_type => || ffi::webkit_application_info_get_type(),
type_ => || ffi::webkit_application_info_get_type(),
}
}

impl ApplicationInfo {
#[cfg(any(feature = "v2_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_18")))]
#[doc(alias = "webkit_application_info_new")]
pub fn new() -> ApplicationInfo {
assert_initialized_main_thread!();
unsafe { from_glib_full(ffi::webkit_application_info_new()) }
}

#[cfg(any(feature = "v2_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_18")))]
#[doc(alias = "webkit_application_info_get_name")]
pub fn get_name(&self) -> Option<glib::GString> {
#[doc(alias = "get_name")]
pub fn name(&self) -> Option<glib::GString> {
unsafe { from_glib_none(ffi::webkit_application_info_get_name(self.to_glib_none().0)) }
}

#[cfg(any(feature = "v2_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_18")))]
#[doc(alias = "webkit_application_info_get_version")]
pub fn get_version(&self) -> (u64, u64, u64) {
#[doc(alias = "get_version")]
pub fn version(&self) -> (u64, u64, u64) {
unsafe {
let mut major = mem::MaybeUninit::uninit();
let mut minor = mem::MaybeUninit::uninit();
Expand All @@ -57,17 +53,13 @@ impl ApplicationInfo {
}
}

#[cfg(any(feature = "v2_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_18")))]
#[doc(alias = "webkit_application_info_set_name")]
pub fn set_name(&self, name: &str) {
unsafe {
ffi::webkit_application_info_set_name(self.to_glib_none().0, name.to_glib_none().0);
}
}

#[cfg(any(feature = "v2_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_18")))]
#[doc(alias = "webkit_application_info_set_version")]
pub fn set_version(&self, major: u64, minor: u64, micro: u64) {
unsafe {
Expand Down
Loading