[go: up one dir, main page]

gtk 0.4.1

Rust bindings for the GTK+ 3 library
Documentation
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
// from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70)
// DO NOT EDIT

use CssSectionType;
use ffi;
use gio;
use glib::translate::*;
use glib_ffi;
use gobject_ffi;
use std::mem;
use std::ptr;

glib_wrapper! {
    pub struct CssSection(Shared<ffi::GtkCssSection>);

    match fn {
        ref => |ptr| ffi::gtk_css_section_ref(ptr),
        unref => |ptr| ffi::gtk_css_section_unref(ptr),
        get_type => || ffi::gtk_css_section_get_type(),
    }
}

impl CssSection {
    pub fn get_end_line(&self) -> u32 {
        unsafe {
            ffi::gtk_css_section_get_end_line(self.to_glib_none().0)
        }
    }

    pub fn get_end_position(&self) -> u32 {
        unsafe {
            ffi::gtk_css_section_get_end_position(self.to_glib_none().0)
        }
    }

    pub fn get_file(&self) -> Option<gio::File> {
        unsafe {
            from_glib_none(ffi::gtk_css_section_get_file(self.to_glib_none().0))
        }
    }

    pub fn get_parent(&self) -> Option<CssSection> {
        unsafe {
            from_glib_none(ffi::gtk_css_section_get_parent(self.to_glib_none().0))
        }
    }

    pub fn get_section_type(&self) -> CssSectionType {
        unsafe {
            from_glib(ffi::gtk_css_section_get_section_type(self.to_glib_none().0))
        }
    }

    pub fn get_start_line(&self) -> u32 {
        unsafe {
            ffi::gtk_css_section_get_start_line(self.to_glib_none().0)
        }
    }

    pub fn get_start_position(&self) -> u32 {
        unsafe {
            ffi::gtk_css_section_get_start_position(self.to_glib_none().0)
        }
    }
}