Skip to content

Commit

Permalink
Merge pull request #429 from MoAlyousef/master
Browse files Browse the repository at this point in the history
0.13.1
  • Loading branch information
MoAlyousef committed Jan 7, 2021
2 parents edd1295 + e31fe6a commit b1a1445
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 51 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
@@ -1,7 +1,7 @@
# Changelog


## [0.13.0] - 2021-01-07
## [0.13.1] - 2021-01-07
### Changes
- [BREAKING] Remove deprecated calls app::set_color and calls to scrollbar_width (should be replaced by scrollbar_size)
- Add proper Default impl for use with fl2rust.
Expand Down
2 changes: 1 addition & 1 deletion fltk-derive/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "fltk-derive"
version = "0.13.0"
version = "0.13.1"
authors = ["MoAlyousef <mohammed.alyousef@neurosrg.com>"]
edition = "2018"
description = "Rust bindings for the FLTK GUI library"
Expand Down
22 changes: 0 additions & 22 deletions fltk-derive/src/browser.rs
Expand Up @@ -107,14 +107,6 @@ pub fn impl_browser_trait(ast: &DeriveInput) -> TokenStream {
format!("{}_{}", name_str, "set_scrollbar_size").as_str(),
name.span(),
);
let scrollbar_width = Ident::new(
format!("{}_{}", name_str, "scrollbar_width").as_str(),
name.span(),
);
let set_scrollbar_width = Ident::new(
format!("{}_{}", name_str, "set_scrollbar_width").as_str(),
name.span(),
);
let sort = Ident::new(format!("{}_{}", name_str, "sort").as_str(), name.span());
let scrollbar = Ident::new(
format!("{}_{}", name_str, "scrollbar").as_str(),
Expand Down Expand Up @@ -449,20 +441,6 @@ pub fn impl_browser_trait(ast: &DeriveInput) -> TokenStream {
}
}

fn scrollbar_width(&self) -> i32 {
assert!(!self.was_deleted());
unsafe {
#scrollbar_width(self._inner)
}
}

fn set_scrollbar_width(&mut self, width: i32) {
assert!(!self.was_deleted());
unsafe {
#set_scrollbar_width(self._inner, width)
}
}

fn sort(&mut self) {
assert!(!self.was_deleted());
unsafe {
Expand Down
22 changes: 0 additions & 22 deletions fltk-derive/src/display.rs
Expand Up @@ -102,10 +102,6 @@ pub fn impl_display_trait(ast: &DeriveInput) -> TokenStream {
format!("{}_{}", name_str, "set_scrollbar_align").as_str(),
name.span(),
);
let set_scrollbar_width = Ident::new(
format!("{}_{}", name_str, "set_scrollbar_width").as_str(),
name.span(),
);
let cursor_style = Ident::new(
format!("{}_{}", name_str, "cursor_style").as_str(),
name.span(),
Expand All @@ -122,10 +118,6 @@ pub fn impl_display_trait(ast: &DeriveInput) -> TokenStream {
format!("{}_{}", name_str, "scrollbar_align").as_str(),
name.span(),
);
let scrollbar_width = Ident::new(
format!("{}_{}", name_str, "scrollbar_width").as_str(),
name.span(),
);
let line_start = Ident::new(
format!("{}_{}", name_str, "line_start").as_str(),
name.span(),
Expand Down Expand Up @@ -445,13 +437,6 @@ pub fn impl_display_trait(ast: &DeriveInput) -> TokenStream {
}
}

fn set_scrollbar_width(&mut self, width: i32){
unsafe {
assert!(!self.was_deleted());
#set_scrollbar_width(self._inner, width)
}
}

fn set_scrollbar_size(&mut self, size: u32){
debug_assert!(size <= std::isize::MAX as u32, "u32 entries have to be < std::isize::MAX for compatibility!");
unsafe {
Expand Down Expand Up @@ -481,13 +466,6 @@ pub fn impl_display_trait(ast: &DeriveInput) -> TokenStream {
}
}

fn scrollbar_width(&self) -> u32 {
unsafe {
assert!(!self.was_deleted());
#scrollbar_width(self._inner) as u32
}
}

fn scrollbar_size(&self) -> u32 {
unsafe {
assert!(!self.was_deleted());
Expand Down
2 changes: 1 addition & 1 deletion fltk-sys/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "fltk-sys"
version = "0.13.0"
version = "0.13.1"
authors = ["MoAlyousef <mohammed.alyousef@neurosrg.com>"]
build = "build.rs"
edition = "2018"
Expand Down
6 changes: 3 additions & 3 deletions fltk/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "fltk"
version = "0.13.0"
version = "0.13.1"
authors = ["MoAlyousef <mohammed.alyousef@neurosrg.com>"]
edition = "2018"
description = "Rust bindings for the FLTK GUI library"
Expand All @@ -17,8 +17,8 @@ name = "fltk"
path = "src/lib.rs"

[dependencies]
fltk-sys = { path = "../fltk-sys", version = "=0.13.0" }
fltk-derive = { path = "../fltk-derive", version = "=0.13.0" }
fltk-sys = { path = "../fltk-sys", version = "=0.13.1" }
fltk-derive = { path = "../fltk-derive", version = "=0.13.1" }
lazy_static = "^1.4.0"
bitflags = "^1.2.1"

Expand Down
2 changes: 1 addition & 1 deletion fltk/examples/editor.rs
Expand Up @@ -147,7 +147,7 @@ fn main() {
// What shows when we attempt to print
let mut printable = text::TextDisplay::default();
printable.set_frame(FrameType::NoBox);
printable.set_scrollbar_width(0);
printable.set_scrollbar_size(0);

let mut wind = window::Window::default()
.with_size(800, 600)
Expand Down

0 comments on commit b1a1445

Please sign in to comment.