gtk 0.0.4

Rust bindings for the GTK+ library
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Copyright 2013-2015, The Gtk-rs Project Developers.
// See the COPYRIGHT file at the top-level directory of this distribution.
// Licensed under the MIT license, see the LICENSE file or <http://opensource.org/licenses/MIT>

use cast::GTK_SCROLLED_WINDOW;
use ffi;
use FFIWidget;

pub trait ScrolledWindowTrait: ::WidgetTrait {
    fn set_policy(&self, h_scrollbar_policy: ::PolicyType, v_scrollbar_policy: ::PolicyType) {
        unsafe {
            ffi::gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(self.unwrap_widget()), h_scrollbar_policy, v_scrollbar_policy);
        }
    }
}