gio_win32_sys/
lib.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// DO NOT EDIT
4
5#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
6#![allow(
7    clippy::approx_constant,
8    clippy::type_complexity,
9    clippy::unreadable_literal,
10    clippy::upper_case_acronyms
11)]
12#![cfg_attr(docsrs, feature(doc_cfg))]
13
14use gio_sys as gio;
15use glib_sys as glib;
16use gobject_sys as gobject;
17
18mod manual;
19
20pub use manual::*;
21
22#[cfg(unix)]
23#[allow(unused_imports)]
24use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
25#[allow(unused_imports)]
26use libc::{intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE};
27#[allow(unused_imports)]
28use std::ffi::{
29    c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
30};
31
32#[allow(unused_imports)]
33use glib::{gboolean, gconstpointer, gpointer, GType};
34
35// Records
36#[derive(Copy, Clone)]
37#[repr(C)]
38pub struct GWin32InputStreamClass {
39    pub parent_class: gio::GInputStreamClass,
40    pub _g_reserved1: Option<unsafe extern "C" fn()>,
41    pub _g_reserved2: Option<unsafe extern "C" fn()>,
42    pub _g_reserved3: Option<unsafe extern "C" fn()>,
43    pub _g_reserved4: Option<unsafe extern "C" fn()>,
44    pub _g_reserved5: Option<unsafe extern "C" fn()>,
45}
46
47impl ::std::fmt::Debug for GWin32InputStreamClass {
48    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
49        f.debug_struct(&format!("GWin32InputStreamClass @ {self:p}"))
50            .field("parent_class", &self.parent_class)
51            .field("_g_reserved1", &self._g_reserved1)
52            .field("_g_reserved2", &self._g_reserved2)
53            .field("_g_reserved3", &self._g_reserved3)
54            .field("_g_reserved4", &self._g_reserved4)
55            .field("_g_reserved5", &self._g_reserved5)
56            .finish()
57    }
58}
59
60#[repr(C)]
61#[allow(dead_code)]
62pub struct _GWin32InputStreamPrivate {
63    _data: [u8; 0],
64    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
65}
66
67pub type GWin32InputStreamPrivate = _GWin32InputStreamPrivate;
68
69#[derive(Copy, Clone)]
70#[repr(C)]
71pub struct GWin32NetworkMonitor {
72    pub parent_instance: GNetworkMonitorBase,
73    pub priv_: *mut GWin32NetworkMonitorPrivate,
74}
75
76impl ::std::fmt::Debug for GWin32NetworkMonitor {
77    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
78        f.debug_struct(&format!("GWin32NetworkMonitor @ {self:p}"))
79            .field("parent_instance", &self.parent_instance)
80            .field("priv_", &self.priv_)
81            .finish()
82    }
83}
84
85#[derive(Copy, Clone)]
86#[repr(C)]
87pub struct GWin32NetworkMonitorClass {
88    pub parent_class: GNetworkMonitorBaseClass,
89}
90
91impl ::std::fmt::Debug for GWin32NetworkMonitorClass {
92    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
93        f.debug_struct(&format!("GWin32NetworkMonitorClass @ {self:p}"))
94            .field("parent_class", &self.parent_class)
95            .finish()
96    }
97}
98
99#[repr(C)]
100#[allow(dead_code)]
101pub struct _GWin32NetworkMonitorPrivate {
102    _data: [u8; 0],
103    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
104}
105
106pub type GWin32NetworkMonitorPrivate = _GWin32NetworkMonitorPrivate;
107
108#[derive(Copy, Clone)]
109#[repr(C)]
110pub struct GWin32OutputStreamClass {
111    pub parent_class: gio::GOutputStreamClass,
112    pub _g_reserved1: Option<unsafe extern "C" fn()>,
113    pub _g_reserved2: Option<unsafe extern "C" fn()>,
114    pub _g_reserved3: Option<unsafe extern "C" fn()>,
115    pub _g_reserved4: Option<unsafe extern "C" fn()>,
116    pub _g_reserved5: Option<unsafe extern "C" fn()>,
117}
118
119impl ::std::fmt::Debug for GWin32OutputStreamClass {
120    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
121        f.debug_struct(&format!("GWin32OutputStreamClass @ {self:p}"))
122            .field("parent_class", &self.parent_class)
123            .field("_g_reserved1", &self._g_reserved1)
124            .field("_g_reserved2", &self._g_reserved2)
125            .field("_g_reserved3", &self._g_reserved3)
126            .field("_g_reserved4", &self._g_reserved4)
127            .field("_g_reserved5", &self._g_reserved5)
128            .finish()
129    }
130}
131
132#[repr(C)]
133#[allow(dead_code)]
134pub struct _GWin32OutputStreamPrivate {
135    _data: [u8; 0],
136    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
137}
138
139pub type GWin32OutputStreamPrivate = _GWin32OutputStreamPrivate;
140
141// Classes
142#[derive(Copy, Clone)]
143#[repr(C)]
144pub struct GWin32InputStream {
145    pub parent_instance: gio::GInputStream,
146    pub priv_: *mut GWin32InputStreamPrivate,
147}
148
149impl ::std::fmt::Debug for GWin32InputStream {
150    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
151        f.debug_struct(&format!("GWin32InputStream @ {self:p}"))
152            .field("parent_instance", &self.parent_instance)
153            .finish()
154    }
155}
156
157#[derive(Copy, Clone)]
158#[repr(C)]
159pub struct GWin32OutputStream {
160    pub parent_instance: gio::GOutputStream,
161    pub priv_: *mut GWin32OutputStreamPrivate,
162}
163
164impl ::std::fmt::Debug for GWin32OutputStream {
165    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
166        f.debug_struct(&format!("GWin32OutputStream @ {self:p}"))
167            .field("parent_instance", &self.parent_instance)
168            .finish()
169    }
170}
171
172extern "C" {
173
174    //=========================================================================
175    // GWin32InputStream
176    //=========================================================================
177    pub fn g_win32_input_stream_get_type() -> GType;
178    pub fn g_win32_input_stream_new(
179        handle: *mut c_void,
180        close_handle: gboolean,
181    ) -> *mut gio::GInputStream;
182    pub fn g_win32_input_stream_get_close_handle(stream: *mut GWin32InputStream) -> gboolean;
183    pub fn g_win32_input_stream_get_handle(stream: *mut GWin32InputStream) -> *mut c_void;
184    pub fn g_win32_input_stream_set_close_handle(
185        stream: *mut GWin32InputStream,
186        close_handle: gboolean,
187    );
188
189    //=========================================================================
190    // GWin32OutputStream
191    //=========================================================================
192    pub fn g_win32_output_stream_get_type() -> GType;
193    pub fn g_win32_output_stream_new(
194        handle: *mut c_void,
195        close_handle: gboolean,
196    ) -> *mut gio::GOutputStream;
197    pub fn g_win32_output_stream_get_close_handle(stream: *mut GWin32OutputStream) -> gboolean;
198    pub fn g_win32_output_stream_get_handle(stream: *mut GWin32OutputStream) -> *mut c_void;
199    pub fn g_win32_output_stream_set_close_handle(
200        stream: *mut GWin32OutputStream,
201        close_handle: gboolean,
202    );
203
204    //=========================================================================
205    // Other functions
206    //=========================================================================
207    #[cfg(feature = "v2_78")]
208    #[cfg_attr(docsrs, doc(cfg(feature = "v2_78")))]
209    pub fn g_registry_settings_backend_new(
210        registry_key: *const c_char,
211    ) -> *mut gio::GSettingsBackend;
212
213}