Skip to content

Commit

Permalink
v0.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bamidev committed Mar 3, 2024
1 parent f8918d8 commit 7f4d5be
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 29 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "browser-window"
version = "0.10.0"
version = "0.11.0"
description = "A simple, async/await aware browser window."
edition = "2018"
authors = ["Bamidev"]
Expand Down Expand Up @@ -32,7 +32,7 @@ name = "authentication"
path = "examples/authentication.rs"

[dependencies]
browser-window-c = { path = "c", version = "0.1.0" }
browser-window-c = { path = "c", version = "0.2.0" }
futures-channel = { version = "^0.3" }
gtk = { version = "0.18", optional = true }
javascriptcore-rs = { version = "1", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion c/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "browser-window-c"
version = "0.1.0"
version = "0.2.0"
description = "FFI bindings for the browser-window crate."
edition = "2018"
authors = ["Bamidev"]
Expand Down
51 changes: 29 additions & 22 deletions c/bindgen_backup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4300,22 +4300,6 @@ fn bindgen_test_layout_cbw_Pos2D() {
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cbw_WindowImpl {}
#[test]
fn bindgen_test_layout_cbw_WindowImpl() {
assert_eq!(
::std::mem::size_of::<cbw_WindowImpl>(),
0usize,
concat!("Size of: ", stringify!(cbw_WindowImpl))
);
assert_eq!(
::std::mem::align_of::<cbw_WindowImpl>(),
1usize,
concat!("Alignment of ", stringify!(cbw_WindowImpl))
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cbw_WindowCallbacks {
#[doc = " Fired just before the window gets destroyed and freed from memory.\n Should be implemented to free the user data provided to the window."]
pub do_cleanup: ::std::option::Option<unsafe extern "C" fn(arg1: *mut cbw_Window)>,
Expand Down Expand Up @@ -4449,6 +4433,22 @@ pub struct cbw_WindowDispatchData {
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cbw_WindowImpl {}
#[test]
fn bindgen_test_layout_cbw_WindowImpl() {
assert_eq!(
::std::mem::size_of::<cbw_WindowImpl>(),
0usize,
concat!("Size of: ", stringify!(cbw_WindowImpl))
);
assert_eq!(
::std::mem::align_of::<cbw_WindowImpl>(),
1usize,
concat!("Alignment of ", stringify!(cbw_WindowImpl))
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cbw_Window {
pub app: *mut cbw_Application,
pub parent: *const cbw_Window,
Expand Down Expand Up @@ -4846,14 +4846,21 @@ extern "C" {
pub fn cbw_BrowserWindow_navigate(bw: *mut cbw_BrowserWindow, url: cbw_CStrSlice) -> cbw_Err;
}
extern "C" {
#[doc = " Creates a new browser window"]
#[doc = " Allocates a browser window and creates the window for it.\n Call `bw_BrowserWindow_create` on it to add the actual browser framework to this window."]
#[link_name = "\u{1}bw_BrowserWindow_new"]
pub fn cbw_BrowserWindow_new(
app: *mut cbw_Application, parent: *const cbw_Window, source: cbw_BrowserWindowSource,
_title: cbw_CStrSlice, width: ::std::os::raw::c_int, height: ::std::os::raw::c_int,
window_options: *const cbw_WindowOptions,
browser_window_options: *const cbw_BrowserWindowOptions,
handler: cbw_BrowserWindowHandlerFn, user_data: *mut ::std::os::raw::c_void,
app: *mut cbw_Application, parent: *const cbw_Window, title: cbw_CStrSlice,
width: ::std::os::raw::c_int, height: ::std::os::raw::c_int,
window_options: *const cbw_WindowOptions, handler: cbw_BrowserWindowHandlerFn,
user_data: *mut ::std::os::raw::c_void,
) -> *mut cbw_BrowserWindow;
}
extern "C" {
#[doc = " Adds the browser framework to the browser window.\n Should be called right after `bw_BrowserWindow_new`."]
#[link_name = "\u{1}bw_BrowserWindow_create"]
pub fn cbw_BrowserWindow_create(
bw: *mut cbw_BrowserWindow, width: ::std::os::raw::c_int, height: ::std::os::raw::c_int,
source: cbw_BrowserWindowSource, browser_window_options: *const cbw_BrowserWindowOptions,
callback: cbw_BrowserWindowCreationCallbackFn, callback_data: *mut ::std::os::raw::c_void,
);
}
Expand Down
9 changes: 5 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
//! _Browser Window_ is a Rust crate that allows you to utilize a browser engine
//! to build graphical interfaces. The idea is similar to Electron.js.
//! _BrowserWindow_ is a Rust crate that allows you to utilize a browser engine
//! to build graphical interfaces, similar to Electron.js.
//! You create your user interface with HTML, CSS and JavaScript.
//! Then, you can communicate information to JavaScript and back to Rust.
//!
//! Pick the underlying browser framework by setting feature `webkitgtk` or
//! `cef`. For more info on how to them up, check [this guide](https://github.com/bamidev/browser-window/tree/master/docs/GETTING-STARTED.md).
//! Pick the underlying browser framework by setting feature `cef`, `webkitgtk`
//! or `edge2`. For more info on which on you should choose and how to set them
//! up, check [this guide](https://github.com/bamidev/browser-window/tree/master/docs/GETTING-STARTED.md).
//! # Getting Started
//! To start building apps with Browser Window, take a quick look at the
Expand Down

0 comments on commit 7f4d5be

Please sign in to comment.