// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files.git)
// DO NOT EDIT

use glib::translate::*;

glib::wrapper! {
    #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
    pub struct FileList(Boxed<ffi::GdkFileList>);

    match fn {
        copy => |ptr| glib::gobject_ffi::g_boxed_copy(ffi::gdk_file_list_get_type(), ptr as *mut _) as *mut ffi::GdkFileList,
        free => |ptr| glib::gobject_ffi::g_boxed_free(ffi::gdk_file_list_get_type(), ptr as *mut _),
        type_ => || ffi::gdk_file_list_get_type(),
    }
}

impl FileList {
    #[doc(alias = "gdk_file_list_get_files")]
    #[doc(alias = "get_files")]
    pub fn files(&self) -> Vec<gio::File> {
        unsafe {
            FromGlibPtrContainer::from_glib_container(ffi::gdk_file_list_get_files(mut_override(
                self.to_glib_none().0,
            )))
        }
    }
}
