glib-win32 0.22.6

Rust bindings for the GLibWin32 library
Documentation
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT

use crate::{OSType, ffi};
use glib::translate::*;

#[doc(alias = "g_win32_check_windows_version")]
pub fn check_windows_version(major: i32, minor: i32, spver: i32, os_type: OSType) -> bool {
    unsafe {
        from_glib(ffi::g_win32_check_windows_version(
            major,
            minor,
            spver,
            os_type.into_glib(),
        ))
    }
}

#[doc(alias = "g_win32_error_message")]
pub fn error_message(error: i32) -> glib::GString {
    unsafe { from_glib_full(ffi::g_win32_error_message(error)) }
}

#[doc(alias = "g_win32_ftruncate")]
pub fn ftruncate(f: i32, size: u32) -> i32 {
    unsafe { ffi::g_win32_ftruncate(f, size) }
}

#[doc(alias = "g_win32_get_command_line")]
#[doc(alias = "get_command_line")]
pub fn command_line() -> Vec<glib::GString> {
    unsafe { FromGlibPtrContainer::from_glib_full(ffi::g_win32_get_command_line()) }
}

#[doc(alias = "g_win32_getlocale")]
pub fn getlocale() -> glib::GString {
    unsafe { from_glib_full(ffi::g_win32_getlocale()) }
}

#[doc(alias = "g_win32_locale_filename_from_utf8")]
pub fn locale_filename_from_utf8(utf8filename: &str) -> glib::GString {
    unsafe {
        from_glib_full(ffi::g_win32_locale_filename_from_utf8(
            utf8filename.to_glib_none().0,
        ))
    }
}