gdk4_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 gdk4_sys as gdk;
15use glib_sys as glib;
16
17#[cfg(unix)]
18#[allow(unused_imports)]
19use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
20#[allow(unused_imports)]
21use libc::{intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE};
22#[allow(unused_imports)]
23use std::ffi::{
24    c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
25};
26
27#[allow(unused_imports)]
28use glib::{gboolean, gconstpointer, gpointer, GType};
29
30// Enums
31pub type GdkWin32MessageFilterReturn = c_int;
32pub const GDK_WIN32_MESSAGE_FILTER_CONTINUE: GdkWin32MessageFilterReturn = 0;
33pub const GDK_WIN32_MESSAGE_FILTER_REMOVE: GdkWin32MessageFilterReturn = 1;
34
35// Callbacks
36pub type GdkWin32MessageFilterFunc = Option<
37    unsafe extern "C" fn(
38        *mut GdkWin32Display,
39        gpointer,
40        *mut c_int,
41        gpointer,
42    ) -> GdkWin32MessageFilterReturn,
43>;
44
45// Records
46#[repr(C)]
47#[allow(dead_code)]
48pub struct _GdkWin32DisplayClass {
49    _data: [u8; 0],
50    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
51}
52
53pub type GdkWin32DisplayClass = _GdkWin32DisplayClass;
54
55#[repr(C)]
56#[allow(dead_code)]
57pub struct _GdkWin32DisplayManagerClass {
58    _data: [u8; 0],
59    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
60}
61
62pub type GdkWin32DisplayManagerClass = _GdkWin32DisplayManagerClass;
63
64#[repr(C)]
65#[allow(dead_code)]
66pub struct _GdkWin32DragClass {
67    _data: [u8; 0],
68    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
69}
70
71pub type GdkWin32DragClass = _GdkWin32DragClass;
72
73#[repr(C)]
74#[allow(dead_code)]
75pub struct _GdkWin32GLContextClass {
76    _data: [u8; 0],
77    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
78}
79
80pub type GdkWin32GLContextClass = _GdkWin32GLContextClass;
81
82#[repr(C)]
83#[allow(dead_code)]
84pub struct _GdkWin32HCursorClass {
85    _data: [u8; 0],
86    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
87}
88
89pub type GdkWin32HCursorClass = _GdkWin32HCursorClass;
90
91#[repr(C)]
92#[allow(dead_code)]
93pub struct _GdkWin32MonitorClass {
94    _data: [u8; 0],
95    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
96}
97
98pub type GdkWin32MonitorClass = _GdkWin32MonitorClass;
99
100#[repr(C)]
101#[allow(dead_code)]
102pub struct _GdkWin32ScreenClass {
103    _data: [u8; 0],
104    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
105}
106
107pub type GdkWin32ScreenClass = _GdkWin32ScreenClass;
108
109#[repr(C)]
110#[allow(dead_code)]
111pub struct _GdkWin32SurfaceClass {
112    _data: [u8; 0],
113    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
114}
115
116pub type GdkWin32SurfaceClass = _GdkWin32SurfaceClass;
117
118// Classes
119#[repr(C)]
120#[allow(dead_code)]
121pub struct GdkWin32Display {
122    _data: [u8; 0],
123    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
124}
125
126impl ::std::fmt::Debug for GdkWin32Display {
127    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
128        f.debug_struct(&format!("GdkWin32Display @ {self:p}"))
129            .finish()
130    }
131}
132
133#[repr(C)]
134#[allow(dead_code)]
135pub struct GdkWin32DisplayManager {
136    _data: [u8; 0],
137    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
138}
139
140impl ::std::fmt::Debug for GdkWin32DisplayManager {
141    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
142        f.debug_struct(&format!("GdkWin32DisplayManager @ {self:p}"))
143            .finish()
144    }
145}
146
147#[repr(C)]
148#[allow(dead_code)]
149pub struct GdkWin32Drag {
150    _data: [u8; 0],
151    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
152}
153
154impl ::std::fmt::Debug for GdkWin32Drag {
155    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
156        f.debug_struct(&format!("GdkWin32Drag @ {self:p}")).finish()
157    }
158}
159
160#[repr(C)]
161#[allow(dead_code)]
162pub struct GdkWin32GLContext {
163    _data: [u8; 0],
164    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
165}
166
167impl ::std::fmt::Debug for GdkWin32GLContext {
168    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
169        f.debug_struct(&format!("GdkWin32GLContext @ {self:p}"))
170            .finish()
171    }
172}
173
174#[repr(C)]
175#[allow(dead_code)]
176pub struct GdkWin32HCursor {
177    _data: [u8; 0],
178    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
179}
180
181impl ::std::fmt::Debug for GdkWin32HCursor {
182    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
183        f.debug_struct(&format!("GdkWin32HCursor @ {self:p}"))
184            .finish()
185    }
186}
187
188#[repr(C)]
189#[allow(dead_code)]
190pub struct GdkWin32Monitor {
191    _data: [u8; 0],
192    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
193}
194
195impl ::std::fmt::Debug for GdkWin32Monitor {
196    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
197        f.debug_struct(&format!("GdkWin32Monitor @ {self:p}"))
198            .finish()
199    }
200}
201
202#[repr(C)]
203#[allow(dead_code)]
204pub struct GdkWin32Screen {
205    _data: [u8; 0],
206    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
207}
208
209impl ::std::fmt::Debug for GdkWin32Screen {
210    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
211        f.debug_struct(&format!("GdkWin32Screen @ {self:p}"))
212            .finish()
213    }
214}
215
216#[repr(C)]
217#[allow(dead_code)]
218pub struct GdkWin32Surface {
219    _data: [u8; 0],
220    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
221}
222
223impl ::std::fmt::Debug for GdkWin32Surface {
224    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
225        f.debug_struct(&format!("GdkWin32Surface @ {self:p}"))
226            .finish()
227    }
228}
229
230extern "C" {
231
232    //=========================================================================
233    // GdkWin32Display
234    //=========================================================================
235    pub fn gdk_win32_display_get_type() -> GType;
236    pub fn gdk_win32_display_get_primary_monitor(
237        display: *mut gdk::GdkDisplay,
238    ) -> *mut gdk::GdkMonitor;
239    pub fn gdk_win32_display_get_wgl_version(
240        display: *mut gdk::GdkDisplay,
241        major: *mut c_int,
242        minor: *mut c_int,
243    ) -> gboolean;
244    pub fn gdk_win32_display_add_filter(
245        display: *mut GdkWin32Display,
246        function: GdkWin32MessageFilterFunc,
247        data: gpointer,
248    );
249    #[cfg(feature = "v4_4")]
250    #[cfg_attr(docsrs, doc(cfg(feature = "v4_4")))]
251    pub fn gdk_win32_display_get_egl_display(display: *mut GdkWin32Display) -> gpointer;
252    pub fn gdk_win32_display_get_win32hcursor(
253        display: *mut GdkWin32Display,
254        cursor: *mut gdk::GdkCursor,
255    ) -> *mut GdkWin32HCursor;
256    pub fn gdk_win32_display_remove_filter(
257        display: *mut GdkWin32Display,
258        function: GdkWin32MessageFilterFunc,
259        data: gpointer,
260    );
261    pub fn gdk_win32_display_set_cursor_theme(
262        display: *mut GdkWin32Display,
263        name: *const c_char,
264        size: c_int,
265    );
266
267    //=========================================================================
268    // GdkWin32DisplayManager
269    //=========================================================================
270    pub fn gdk_win32_display_manager_get_type() -> GType;
271
272    //=========================================================================
273    // GdkWin32Drag
274    //=========================================================================
275    pub fn gdk_win32_drag_get_type() -> GType;
276
277    //=========================================================================
278    // GdkWin32GLContext
279    //=========================================================================
280    pub fn gdk_win32_gl_context_get_type() -> GType;
281
282    //=========================================================================
283    // GdkWin32HCursor
284    //=========================================================================
285    pub fn gdk_win32_hcursor_get_type() -> GType;
286    pub fn gdk_win32_hcursor_new(
287        display: *mut GdkWin32Display,
288        handle: ssize_t,
289        destroyable: gboolean,
290    ) -> *mut GdkWin32HCursor;
291
292    //=========================================================================
293    // GdkWin32Monitor
294    //=========================================================================
295    pub fn gdk_win32_monitor_get_type() -> GType;
296    pub fn gdk_win32_monitor_get_workarea(
297        monitor: *mut gdk::GdkMonitor,
298        workarea: *mut gdk::GdkRectangle,
299    );
300
301    //=========================================================================
302    // GdkWin32Screen
303    //=========================================================================
304    pub fn gdk_win32_screen_get_type() -> GType;
305
306    //=========================================================================
307    // GdkWin32Surface
308    //=========================================================================
309    pub fn gdk_win32_surface_get_type() -> GType;
310    pub fn gdk_win32_surface_get_impl_hwnd(surface: *mut gdk::GdkSurface) -> ssize_t;
311    pub fn gdk_win32_surface_is_win32(surface: *mut gdk::GdkSurface) -> gboolean;
312    pub fn gdk_win32_surface_lookup_for_display(
313        display: *mut gdk::GdkDisplay,
314        anid: ssize_t,
315    ) -> *mut gdk::GdkSurface;
316    pub fn gdk_win32_surface_get_handle(surface: *mut GdkWin32Surface) -> ssize_t;
317    pub fn gdk_win32_surface_set_urgency_hint(surface: *mut GdkWin32Surface, urgent: gboolean);
318
319    //=========================================================================
320    // Other functions
321    //=========================================================================
322    pub fn gdk_win32_handle_table_lookup(handle: ssize_t) -> gpointer;
323
324}