gtk 0.0.6

Rust bindings for the GTK+ library
// 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_OVERLAY};
use ffi;

struct_Widget!(Overlay);

impl Overlay {
    pub fn new() -> Option<Overlay> {
        assert_initialized_main_thread!();
        let tmp_pointer = unsafe { ffi::gtk_overlay_new() };
        check_pointer!(tmp_pointer, Overlay)
    }

    pub fn add_overlay<T: ::WidgetTrait>(&self, widget: &T) {
        unsafe {
            ffi::gtk_overlay_add_overlay(GTK_OVERLAY(self.pointer), widget.unwrap_widget())
        }
    }
}

impl_drop!(Overlay);
impl_TraitWidget!(Overlay);

impl ::ContainerTrait for Overlay {}
impl ::BinTrait for Overlay {}