1#![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
30pub type GdkX11DeviceType = c_int;
32pub const GDK_X11_DEVICE_TYPE_LOGICAL: GdkX11DeviceType = 0;
33pub const GDK_X11_DEVICE_TYPE_PHYSICAL: GdkX11DeviceType = 1;
34pub const GDK_X11_DEVICE_TYPE_FLOATING: GdkX11DeviceType = 2;
35
36#[repr(C)]
38#[allow(dead_code)]
39pub struct _GdkX11AppLaunchContextClass {
40 _data: [u8; 0],
41 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
42}
43
44pub type GdkX11AppLaunchContextClass = _GdkX11AppLaunchContextClass;
45
46#[repr(C)]
47#[allow(dead_code)]
48pub struct _GdkX11DeviceManagerXI2Class {
49 _data: [u8; 0],
50 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
51}
52
53pub type GdkX11DeviceManagerXI2Class = _GdkX11DeviceManagerXI2Class;
54
55#[repr(C)]
56#[allow(dead_code)]
57pub struct _GdkX11DeviceXI2Class {
58 _data: [u8; 0],
59 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
60}
61
62pub type GdkX11DeviceXI2Class = _GdkX11DeviceXI2Class;
63
64#[repr(C)]
65#[allow(dead_code)]
66pub struct _GdkX11DisplayClass {
67 _data: [u8; 0],
68 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
69}
70
71pub type GdkX11DisplayClass = _GdkX11DisplayClass;
72
73#[repr(C)]
74#[allow(dead_code)]
75pub struct _GdkX11DragClass {
76 _data: [u8; 0],
77 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
78}
79
80pub type GdkX11DragClass = _GdkX11DragClass;
81
82#[repr(C)]
83#[allow(dead_code)]
84pub struct _GdkX11GLContextClass {
85 _data: [u8; 0],
86 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
87}
88
89pub type GdkX11GLContextClass = _GdkX11GLContextClass;
90
91#[repr(C)]
92#[allow(dead_code)]
93pub struct _GdkX11MonitorClass {
94 _data: [u8; 0],
95 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
96}
97
98pub type GdkX11MonitorClass = _GdkX11MonitorClass;
99
100#[repr(C)]
101#[allow(dead_code)]
102pub struct _GdkX11ScreenClass {
103 _data: [u8; 0],
104 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
105}
106
107pub type GdkX11ScreenClass = _GdkX11ScreenClass;
108
109#[repr(C)]
110#[allow(dead_code)]
111pub struct _GdkX11SurfaceClass {
112 _data: [u8; 0],
113 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
114}
115
116pub type GdkX11SurfaceClass = _GdkX11SurfaceClass;
117
118#[repr(C)]
120#[allow(dead_code)]
121pub struct GdkX11AppLaunchContext {
122 _data: [u8; 0],
123 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
124}
125
126impl ::std::fmt::Debug for GdkX11AppLaunchContext {
127 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
128 f.debug_struct(&format!("GdkX11AppLaunchContext @ {self:p}"))
129 .finish()
130 }
131}
132
133#[repr(C)]
134#[allow(dead_code)]
135pub struct GdkX11DeviceManagerXI2 {
136 _data: [u8; 0],
137 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
138}
139
140impl ::std::fmt::Debug for GdkX11DeviceManagerXI2 {
141 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
142 f.debug_struct(&format!("GdkX11DeviceManagerXI2 @ {self:p}"))
143 .finish()
144 }
145}
146
147#[repr(C)]
148#[allow(dead_code)]
149pub struct GdkX11DeviceXI2 {
150 _data: [u8; 0],
151 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
152}
153
154impl ::std::fmt::Debug for GdkX11DeviceXI2 {
155 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
156 f.debug_struct(&format!("GdkX11DeviceXI2 @ {self:p}"))
157 .finish()
158 }
159}
160
161#[repr(C)]
162#[allow(dead_code)]
163pub struct GdkX11Display {
164 _data: [u8; 0],
165 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
166}
167
168impl ::std::fmt::Debug for GdkX11Display {
169 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
170 f.debug_struct(&format!("GdkX11Display @ {self:p}"))
171 .finish()
172 }
173}
174
175#[repr(C)]
176#[allow(dead_code)]
177pub struct GdkX11Drag {
178 _data: [u8; 0],
179 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
180}
181
182impl ::std::fmt::Debug for GdkX11Drag {
183 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
184 f.debug_struct(&format!("GdkX11Drag @ {self:p}")).finish()
185 }
186}
187
188#[repr(C)]
189#[allow(dead_code)]
190pub struct GdkX11GLContext {
191 _data: [u8; 0],
192 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
193}
194
195impl ::std::fmt::Debug for GdkX11GLContext {
196 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
197 f.debug_struct(&format!("GdkX11GLContext @ {self:p}"))
198 .finish()
199 }
200}
201
202#[repr(C)]
203#[allow(dead_code)]
204pub struct GdkX11Monitor {
205 _data: [u8; 0],
206 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
207}
208
209impl ::std::fmt::Debug for GdkX11Monitor {
210 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
211 f.debug_struct(&format!("GdkX11Monitor @ {self:p}"))
212 .finish()
213 }
214}
215
216#[repr(C)]
217#[allow(dead_code)]
218pub struct GdkX11Screen {
219 _data: [u8; 0],
220 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
221}
222
223impl ::std::fmt::Debug for GdkX11Screen {
224 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
225 f.debug_struct(&format!("GdkX11Screen @ {self:p}")).finish()
226 }
227}
228
229#[repr(C)]
230#[allow(dead_code)]
231pub struct GdkX11Surface {
232 _data: [u8; 0],
233 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
234}
235
236impl ::std::fmt::Debug for GdkX11Surface {
237 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
238 f.debug_struct(&format!("GdkX11Surface @ {self:p}"))
239 .finish()
240 }
241}
242
243extern "C" {
244
245 pub fn gdk_x11_app_launch_context_get_type() -> GType;
249
250 pub fn gdk_x11_device_manager_xi2_get_type() -> GType;
254
255 pub fn gdk_x11_device_xi2_get_type() -> GType;
259
260 pub fn gdk_x11_display_get_type() -> GType;
264 pub fn gdk_x11_display_open(display_name: *const c_char) -> *mut gdk::GdkDisplay;
265 pub fn gdk_x11_display_set_program_class(
266 display: *mut gdk::GdkDisplay,
267 program_class: *const c_char,
268 );
269 pub fn gdk_x11_display_broadcast_startup_message(
270 display: *mut GdkX11Display,
271 message_type: *const c_char,
272 ...
273 );
274 pub fn gdk_x11_display_error_trap_pop(display: *mut GdkX11Display) -> c_int;
275 pub fn gdk_x11_display_error_trap_pop_ignored(display: *mut GdkX11Display);
276 pub fn gdk_x11_display_error_trap_push(display: *mut GdkX11Display);
277 pub fn gdk_x11_display_get_default_group(display: *mut GdkX11Display) -> *mut gdk::GdkSurface;
278 #[cfg(feature = "v4_4")]
279 #[cfg_attr(docsrs, doc(cfg(feature = "v4_4")))]
280 pub fn gdk_x11_display_get_egl_display(display: *mut GdkX11Display) -> gpointer;
281 #[cfg(feature = "v4_4")]
282 #[cfg_attr(docsrs, doc(cfg(feature = "v4_4")))]
283 pub fn gdk_x11_display_get_egl_version(
284 display: *mut GdkX11Display,
285 major: *mut c_int,
286 minor: *mut c_int,
287 ) -> gboolean;
288 pub fn gdk_x11_display_get_glx_version(
289 display: *mut GdkX11Display,
290 major: *mut c_int,
291 minor: *mut c_int,
292 ) -> gboolean;
293 pub fn gdk_x11_display_get_primary_monitor(display: *mut GdkX11Display)
294 -> *mut gdk::GdkMonitor;
295 pub fn gdk_x11_display_get_screen(display: *mut GdkX11Display) -> *mut GdkX11Screen;
296 pub fn gdk_x11_display_get_startup_notification_id(
297 display: *mut GdkX11Display,
298 ) -> *const c_char;
299 pub fn gdk_x11_display_get_user_time(display: *mut GdkX11Display) -> u32;
300 pub fn gdk_x11_display_get_xcursor(
301 display: *mut GdkX11Display,
302 cursor: *mut gdk::GdkCursor,
303 ) -> c_ulong;
304 pub fn gdk_x11_display_get_xdisplay(display: *mut GdkX11Display) -> gpointer;
305 pub fn gdk_x11_display_get_xrootwindow(display: *mut GdkX11Display) -> c_ulong;
306 pub fn gdk_x11_display_get_xscreen(display: *mut GdkX11Display) -> gpointer;
307 pub fn gdk_x11_display_grab(display: *mut GdkX11Display);
308 pub fn gdk_x11_display_set_cursor_theme(
309 display: *mut GdkX11Display,
310 theme: *const c_char,
311 size: c_int,
312 );
313 pub fn gdk_x11_display_set_startup_notification_id(
314 display: *mut GdkX11Display,
315 startup_id: *const c_char,
316 );
317 pub fn gdk_x11_display_set_surface_scale(display: *mut GdkX11Display, scale: c_int);
318 pub fn gdk_x11_display_string_to_compound_text(
319 display: *mut GdkX11Display,
320 str: *const c_char,
321 encoding: *mut *const c_char,
322 format: *mut c_int,
323 ctext: *mut *mut u8,
324 length: *mut c_int,
325 ) -> c_int;
326 pub fn gdk_x11_display_text_property_to_text_list(
327 display: *mut GdkX11Display,
328 encoding: *const c_char,
329 format: c_int,
330 text: *const u8,
331 length: c_int,
332 list: *mut *mut *mut c_char,
333 ) -> c_int;
334 pub fn gdk_x11_display_ungrab(display: *mut GdkX11Display);
335 pub fn gdk_x11_display_utf8_to_compound_text(
336 display: *mut GdkX11Display,
337 str: *const c_char,
338 encoding: *mut *const c_char,
339 format: *mut c_int,
340 ctext: *mut *mut u8,
341 length: *mut c_int,
342 ) -> gboolean;
343
344 pub fn gdk_x11_drag_get_type() -> GType;
348
349 pub fn gdk_x11_gl_context_get_type() -> GType;
353
354 pub fn gdk_x11_monitor_get_type() -> GType;
358 pub fn gdk_x11_monitor_get_output(monitor: *mut GdkX11Monitor) -> c_ulong;
359 pub fn gdk_x11_monitor_get_workarea(
360 monitor: *mut GdkX11Monitor,
361 workarea: *mut gdk::GdkRectangle,
362 );
363
364 pub fn gdk_x11_screen_get_type() -> GType;
368 pub fn gdk_x11_screen_get_current_desktop(screen: *mut GdkX11Screen) -> u32;
369 pub fn gdk_x11_screen_get_monitor_output(
370 screen: *mut GdkX11Screen,
371 monitor_num: c_int,
372 ) -> c_ulong;
373 pub fn gdk_x11_screen_get_number_of_desktops(screen: *mut GdkX11Screen) -> u32;
374 pub fn gdk_x11_screen_get_screen_number(screen: *mut GdkX11Screen) -> c_int;
375 pub fn gdk_x11_screen_get_window_manager_name(screen: *mut GdkX11Screen) -> *const c_char;
376 pub fn gdk_x11_screen_get_xscreen(screen: *mut GdkX11Screen) -> gpointer;
377 pub fn gdk_x11_screen_supports_net_wm_hint(
378 screen: *mut GdkX11Screen,
379 property_name: *const c_char,
380 ) -> gboolean;
381
382 pub fn gdk_x11_surface_get_type() -> GType;
386 pub fn gdk_x11_surface_lookup_for_display(
387 display: *mut GdkX11Display,
388 window: c_ulong,
389 ) -> *mut GdkX11Surface;
390 pub fn gdk_x11_surface_get_desktop(surface: *mut GdkX11Surface) -> u32;
391 pub fn gdk_x11_surface_get_group(surface: *mut GdkX11Surface) -> *mut gdk::GdkSurface;
392 pub fn gdk_x11_surface_get_xid(surface: *mut GdkX11Surface) -> c_ulong;
393 pub fn gdk_x11_surface_move_to_current_desktop(surface: *mut GdkX11Surface);
394 pub fn gdk_x11_surface_move_to_desktop(surface: *mut GdkX11Surface, desktop: u32);
395 pub fn gdk_x11_surface_set_frame_sync_enabled(
396 surface: *mut GdkX11Surface,
397 frame_sync_enabled: gboolean,
398 );
399 pub fn gdk_x11_surface_set_group(surface: *mut GdkX11Surface, leader: *mut gdk::GdkSurface);
400 pub fn gdk_x11_surface_set_skip_pager_hint(surface: *mut GdkX11Surface, skips_pager: gboolean);
401 pub fn gdk_x11_surface_set_skip_taskbar_hint(
402 surface: *mut GdkX11Surface,
403 skips_taskbar: gboolean,
404 );
405 pub fn gdk_x11_surface_set_theme_variant(surface: *mut GdkX11Surface, variant: *const c_char);
406 pub fn gdk_x11_surface_set_urgency_hint(surface: *mut GdkX11Surface, urgent: gboolean);
407 pub fn gdk_x11_surface_set_user_time(surface: *mut GdkX11Surface, timestamp: u32);
408 pub fn gdk_x11_surface_set_utf8_property(
409 surface: *mut GdkX11Surface,
410 name: *const c_char,
411 value: *const c_char,
412 );
413
414 pub fn gdk_x11_device_get_id(device: *mut GdkX11DeviceXI2) -> c_int;
418 pub fn gdk_x11_device_manager_lookup(
419 device_manager: *mut GdkX11DeviceManagerXI2,
420 device_id: c_int,
421 ) -> *mut GdkX11DeviceXI2;
422 pub fn gdk_x11_free_compound_text(ctext: *mut u8);
423 pub fn gdk_x11_free_text_list(list: *mut *mut c_char);
424 pub fn gdk_x11_get_server_time(surface: *mut GdkX11Surface) -> u32;
425 pub fn gdk_x11_get_xatom_by_name_for_display(
426 display: *mut GdkX11Display,
427 atom_name: *const c_char,
428 ) -> c_ulong;
429 pub fn gdk_x11_get_xatom_name_for_display(
430 display: *mut GdkX11Display,
431 xatom: c_ulong,
432 ) -> *const c_char;
433 pub fn gdk_x11_lookup_xdisplay(xdisplay: gpointer) -> *mut GdkX11Display;
434 pub fn gdk_x11_set_sm_client_id(sm_client_id: *const c_char);
435
436}