Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Commit

Permalink
Issue #862 - gtk::Widget::size_allocate has an immutable allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
hfiguiere committed Feb 22, 2020
1 parent 69e1a9e commit 432c803
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions Gir.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2331,6 +2331,11 @@ manual_traits = ["WidgetExtManual"]
name = "get_style_context"
[object.function.return]
nullable = false
[[object.function]]
name = "size_allocate"
[[object.function.parameter]]
name = "allocation"
const = true
[[object.signal]]
name = "button-press-event"
inhibit = true
Expand Down
6 changes: 3 additions & 3 deletions src/auto/widget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ pub trait WidgetExt: 'static {

fn show_now(&self);

fn size_allocate(&self, allocation: &mut Allocation);
fn size_allocate(&self, allocation: &Allocation);

fn size_allocate_with_baseline(&self, allocation: &mut Allocation, baseline: i32);

Expand Down Expand Up @@ -2733,11 +2733,11 @@ impl<O: IsA<Widget>> WidgetExt for O {
}
}

fn size_allocate(&self, allocation: &mut Allocation) {
fn size_allocate(&self, allocation: &Allocation) {
unsafe {
gtk_sys::gtk_widget_size_allocate(
self.as_ref().to_glib_none().0,
allocation.to_glib_none_mut().0,
mut_override(allocation.to_glib_none().0),
);
}
}
Expand Down

0 comments on commit 432c803

Please sign in to comment.