gdk_x11_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
14mod manual;
15
16pub use manual::*;
17
18#[allow(unused_imports)]
19use libc::{
20    c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
21    intptr_t, size_t, ssize_t, uintptr_t, FILE,
22};
23
24#[allow(unused_imports)]
25use glib::{gboolean, gconstpointer, gpointer, GType};
26
27// Records
28#[repr(C)]
29pub struct _GdkX11AppLaunchContextClass {
30    _data: [u8; 0],
31    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
32}
33
34pub type GdkX11AppLaunchContextClass = *mut _GdkX11AppLaunchContextClass;
35
36#[repr(C)]
37pub struct _GdkX11CursorClass {
38    _data: [u8; 0],
39    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
40}
41
42pub type GdkX11CursorClass = *mut _GdkX11CursorClass;
43
44#[repr(C)]
45pub struct _GdkX11DeviceCoreClass {
46    _data: [u8; 0],
47    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
48}
49
50pub type GdkX11DeviceCoreClass = *mut _GdkX11DeviceCoreClass;
51
52#[repr(C)]
53pub struct _GdkX11DeviceManagerCoreClass {
54    _data: [u8; 0],
55    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
56}
57
58pub type GdkX11DeviceManagerCoreClass = *mut _GdkX11DeviceManagerCoreClass;
59
60#[repr(C)]
61pub struct _GdkX11DeviceManagerXI2Class {
62    _data: [u8; 0],
63    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
64}
65
66pub type GdkX11DeviceManagerXI2Class = *mut _GdkX11DeviceManagerXI2Class;
67
68#[repr(C)]
69pub struct _GdkX11DeviceXI2Class {
70    _data: [u8; 0],
71    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
72}
73
74pub type GdkX11DeviceXI2Class = *mut _GdkX11DeviceXI2Class;
75
76#[repr(C)]
77pub struct _GdkX11DisplayClass {
78    _data: [u8; 0],
79    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
80}
81
82pub type GdkX11DisplayClass = *mut _GdkX11DisplayClass;
83
84#[repr(C)]
85pub struct _GdkX11DisplayManagerClass {
86    _data: [u8; 0],
87    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
88}
89
90pub type GdkX11DisplayManagerClass = *mut _GdkX11DisplayManagerClass;
91
92#[repr(C)]
93pub struct _GdkX11DragContextClass {
94    _data: [u8; 0],
95    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
96}
97
98pub type GdkX11DragContextClass = *mut _GdkX11DragContextClass;
99
100#[repr(C)]
101pub struct _GdkX11GLContextClass {
102    _data: [u8; 0],
103    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
104}
105
106pub type GdkX11GLContextClass = *mut _GdkX11GLContextClass;
107
108#[repr(C)]
109pub struct _GdkX11KeymapClass {
110    _data: [u8; 0],
111    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
112}
113
114pub type GdkX11KeymapClass = *mut _GdkX11KeymapClass;
115
116#[repr(C)]
117pub struct _GdkX11MonitorClass {
118    _data: [u8; 0],
119    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
120}
121
122pub type GdkX11MonitorClass = *mut _GdkX11MonitorClass;
123
124#[repr(C)]
125pub struct _GdkX11ScreenClass {
126    _data: [u8; 0],
127    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
128}
129
130pub type GdkX11ScreenClass = *mut _GdkX11ScreenClass;
131
132#[repr(C)]
133pub struct _GdkX11VisualClass {
134    _data: [u8; 0],
135    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
136}
137
138pub type GdkX11VisualClass = *mut _GdkX11VisualClass;
139
140#[repr(C)]
141pub struct _GdkX11WindowClass {
142    _data: [u8; 0],
143    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
144}
145
146pub type GdkX11WindowClass = *mut _GdkX11WindowClass;
147
148// Classes
149#[repr(C)]
150pub struct GdkX11AppLaunchContext {
151    _data: [u8; 0],
152    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
153}
154
155impl ::std::fmt::Debug for GdkX11AppLaunchContext {
156    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
157        f.debug_struct(&format!("GdkX11AppLaunchContext @ {self:p}"))
158            .finish()
159    }
160}
161
162#[repr(C)]
163pub struct GdkX11Cursor {
164    _data: [u8; 0],
165    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
166}
167
168impl ::std::fmt::Debug for GdkX11Cursor {
169    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
170        f.debug_struct(&format!("GdkX11Cursor @ {self:p}")).finish()
171    }
172}
173
174#[repr(C)]
175pub struct GdkX11DeviceCore {
176    _data: [u8; 0],
177    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
178}
179
180impl ::std::fmt::Debug for GdkX11DeviceCore {
181    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
182        f.debug_struct(&format!("GdkX11DeviceCore @ {self:p}"))
183            .finish()
184    }
185}
186
187#[repr(C)]
188pub struct GdkX11DeviceManagerCore {
189    _data: [u8; 0],
190    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
191}
192
193impl ::std::fmt::Debug for GdkX11DeviceManagerCore {
194    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
195        f.debug_struct(&format!("GdkX11DeviceManagerCore @ {self:p}"))
196            .finish()
197    }
198}
199
200#[repr(C)]
201pub struct GdkX11DeviceManagerXI2 {
202    _data: [u8; 0],
203    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
204}
205
206impl ::std::fmt::Debug for GdkX11DeviceManagerXI2 {
207    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
208        f.debug_struct(&format!("GdkX11DeviceManagerXI2 @ {self:p}"))
209            .finish()
210    }
211}
212
213#[repr(C)]
214pub struct GdkX11DeviceXI2 {
215    _data: [u8; 0],
216    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
217}
218
219impl ::std::fmt::Debug for GdkX11DeviceXI2 {
220    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
221        f.debug_struct(&format!("GdkX11DeviceXI2 @ {self:p}"))
222            .finish()
223    }
224}
225
226#[repr(C)]
227pub struct GdkX11Display {
228    _data: [u8; 0],
229    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
230}
231
232impl ::std::fmt::Debug for GdkX11Display {
233    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
234        f.debug_struct(&format!("GdkX11Display @ {self:p}"))
235            .finish()
236    }
237}
238
239#[repr(C)]
240pub struct GdkX11DisplayManager {
241    _data: [u8; 0],
242    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
243}
244
245impl ::std::fmt::Debug for GdkX11DisplayManager {
246    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
247        f.debug_struct(&format!("GdkX11DisplayManager @ {self:p}"))
248            .finish()
249    }
250}
251
252#[repr(C)]
253pub struct GdkX11DragContext {
254    _data: [u8; 0],
255    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
256}
257
258impl ::std::fmt::Debug for GdkX11DragContext {
259    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
260        f.debug_struct(&format!("GdkX11DragContext @ {self:p}"))
261            .finish()
262    }
263}
264
265#[repr(C)]
266pub struct GdkX11GLContext {
267    _data: [u8; 0],
268    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
269}
270
271impl ::std::fmt::Debug for GdkX11GLContext {
272    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
273        f.debug_struct(&format!("GdkX11GLContext @ {self:p}"))
274            .finish()
275    }
276}
277
278#[repr(C)]
279pub struct GdkX11Keymap {
280    _data: [u8; 0],
281    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
282}
283
284impl ::std::fmt::Debug for GdkX11Keymap {
285    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
286        f.debug_struct(&format!("GdkX11Keymap @ {self:p}")).finish()
287    }
288}
289
290#[repr(C)]
291pub struct GdkX11Monitor {
292    _data: [u8; 0],
293    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
294}
295
296impl ::std::fmt::Debug for GdkX11Monitor {
297    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
298        f.debug_struct(&format!("GdkX11Monitor @ {self:p}"))
299            .finish()
300    }
301}
302
303#[repr(C)]
304pub struct GdkX11Screen {
305    _data: [u8; 0],
306    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
307}
308
309impl ::std::fmt::Debug for GdkX11Screen {
310    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
311        f.debug_struct(&format!("GdkX11Screen @ {self:p}")).finish()
312    }
313}
314
315#[repr(C)]
316pub struct GdkX11Visual {
317    _data: [u8; 0],
318    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
319}
320
321impl ::std::fmt::Debug for GdkX11Visual {
322    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
323        f.debug_struct(&format!("GdkX11Visual @ {self:p}")).finish()
324    }
325}
326
327#[repr(C)]
328pub struct GdkX11Window {
329    _data: [u8; 0],
330    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
331}
332
333impl ::std::fmt::Debug for GdkX11Window {
334    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
335        f.debug_struct(&format!("GdkX11Window @ {self:p}")).finish()
336    }
337}
338
339#[link(name = "gdk-3")]
340extern "C" {
341
342    //=========================================================================
343    // GdkX11AppLaunchContext
344    //=========================================================================
345    pub fn gdk_x11_app_launch_context_get_type() -> GType;
346
347    //=========================================================================
348    // GdkX11Cursor
349    //=========================================================================
350    pub fn gdk_x11_cursor_get_type() -> GType;
351    pub fn gdk_x11_cursor_get_xcursor(cursor: *mut GdkX11Cursor) -> xlib::Cursor;
352    pub fn gdk_x11_cursor_get_xdisplay(cursor: *mut GdkX11Cursor) -> *mut xlib::Display;
353
354    //=========================================================================
355    // GdkX11DeviceCore
356    //=========================================================================
357    pub fn gdk_x11_device_core_get_type() -> GType;
358
359    //=========================================================================
360    // GdkX11DeviceManagerCore
361    //=========================================================================
362    pub fn gdk_x11_device_manager_core_get_type() -> GType;
363
364    //=========================================================================
365    // GdkX11DeviceManagerXI2
366    //=========================================================================
367    pub fn gdk_x11_device_manager_xi2_get_type() -> GType;
368
369    //=========================================================================
370    // GdkX11DeviceXI2
371    //=========================================================================
372    pub fn gdk_x11_device_xi2_get_type() -> GType;
373
374    //=========================================================================
375    // GdkX11Display
376    //=========================================================================
377    pub fn gdk_x11_display_get_type() -> GType;
378    pub fn gdk_x11_display_get_glx_version(
379        display: *mut gdk::GdkDisplay,
380        major: *mut c_int,
381        minor: *mut c_int,
382    ) -> gboolean;
383    pub fn gdk_x11_display_broadcast_startup_message(
384        display: *mut GdkX11Display,
385        message_type: *const c_char,
386        ...
387    );
388    pub fn gdk_x11_display_error_trap_pop(display: *mut GdkX11Display) -> c_int;
389    pub fn gdk_x11_display_error_trap_pop_ignored(display: *mut GdkX11Display);
390    pub fn gdk_x11_display_error_trap_push(display: *mut GdkX11Display);
391    pub fn gdk_x11_display_get_startup_notification_id(
392        display: *mut GdkX11Display,
393    ) -> *const c_char;
394    pub fn gdk_x11_display_get_user_time(display: *mut GdkX11Display) -> u32;
395    pub fn gdk_x11_display_get_xdisplay(display: *mut GdkX11Display) -> *mut xlib::Display;
396    pub fn gdk_x11_display_grab(display: *mut GdkX11Display);
397    pub fn gdk_x11_display_set_cursor_theme(
398        display: *mut GdkX11Display,
399        theme: *const c_char,
400        size: c_int,
401    );
402    pub fn gdk_x11_display_set_startup_notification_id(
403        display: *mut GdkX11Display,
404        startup_id: *const c_char,
405    );
406    pub fn gdk_x11_display_set_window_scale(display: *mut GdkX11Display, scale: c_int);
407    pub fn gdk_x11_display_string_to_compound_text(
408        display: *mut GdkX11Display,
409        str: *const c_char,
410        encoding: *mut gdk::GdkAtom,
411        format: *mut c_int,
412        ctext: *mut *mut u8,
413        length: *mut c_int,
414    ) -> c_int;
415    pub fn gdk_x11_display_text_property_to_text_list(
416        display: *mut GdkX11Display,
417        encoding: gdk::GdkAtom,
418        format: c_int,
419        text: *const u8,
420        length: c_int,
421        list: *mut *mut *mut c_char,
422    ) -> c_int;
423    pub fn gdk_x11_display_ungrab(display: *mut GdkX11Display);
424    pub fn gdk_x11_display_utf8_to_compound_text(
425        display: *mut GdkX11Display,
426        str: *const c_char,
427        encoding: *mut gdk::GdkAtom,
428        format: *mut c_int,
429        ctext: *mut *mut u8,
430        length: *mut c_int,
431    ) -> gboolean;
432
433    //=========================================================================
434    // GdkX11DisplayManager
435    //=========================================================================
436    pub fn gdk_x11_display_manager_get_type() -> GType;
437
438    //=========================================================================
439    // GdkX11DragContext
440    //=========================================================================
441    pub fn gdk_x11_drag_context_get_type() -> GType;
442
443    //=========================================================================
444    // GdkX11GLContext
445    //=========================================================================
446    pub fn gdk_x11_gl_context_get_type() -> GType;
447
448    //=========================================================================
449    // GdkX11Keymap
450    //=========================================================================
451    pub fn gdk_x11_keymap_get_type() -> GType;
452    pub fn gdk_x11_keymap_get_group_for_state(keymap: *mut GdkX11Keymap, state: c_uint) -> c_int;
453    pub fn gdk_x11_keymap_key_is_modifier(keymap: *mut GdkX11Keymap, keycode: c_uint) -> gboolean;
454
455    //=========================================================================
456    // GdkX11Monitor
457    //=========================================================================
458    pub fn gdk_x11_monitor_get_type() -> GType;
459    pub fn gdk_x11_monitor_get_output(monitor: *mut gdk::GdkMonitor) -> xlib::XID;
460
461    //=========================================================================
462    // GdkX11Screen
463    //=========================================================================
464    pub fn gdk_x11_screen_get_type() -> GType;
465    pub fn gdk_x11_screen_get_current_desktop(screen: *mut GdkX11Screen) -> u32;
466    pub fn gdk_x11_screen_get_monitor_output(
467        screen: *mut GdkX11Screen,
468        monitor_num: c_int,
469    ) -> xlib::XID;
470    pub fn gdk_x11_screen_get_number_of_desktops(screen: *mut GdkX11Screen) -> u32;
471    pub fn gdk_x11_screen_get_screen_number(screen: *mut GdkX11Screen) -> c_int;
472    pub fn gdk_x11_screen_get_window_manager_name(screen: *mut GdkX11Screen) -> *const c_char;
473    pub fn gdk_x11_screen_get_xscreen(screen: *mut GdkX11Screen) -> *mut xlib::Screen;
474    pub fn gdk_x11_screen_lookup_visual(
475        screen: *mut GdkX11Screen,
476        xvisualid: xlib::VisualID,
477    ) -> *mut GdkX11Visual;
478    pub fn gdk_x11_screen_supports_net_wm_hint(
479        screen: *mut GdkX11Screen,
480        property: gdk::GdkAtom,
481    ) -> gboolean;
482
483    //=========================================================================
484    // GdkX11Visual
485    //=========================================================================
486    pub fn gdk_x11_visual_get_type() -> GType;
487    pub fn gdk_x11_visual_get_xvisual(visual: *mut GdkX11Visual) -> *mut xlib::Visual;
488
489    //=========================================================================
490    // GdkX11Window
491    //=========================================================================
492    pub fn gdk_x11_window_get_type() -> GType;
493    pub fn gdk_x11_window_foreign_new_for_display(
494        display: *mut GdkX11Display,
495        window: xlib::Window,
496    ) -> *mut gdk::GdkWindow;
497    pub fn gdk_x11_window_lookup_for_display(
498        display: *mut GdkX11Display,
499        window: xlib::Window,
500    ) -> *mut GdkX11Window;
501    pub fn gdk_x11_window_get_desktop(window: *mut GdkX11Window) -> u32;
502    pub fn gdk_x11_window_get_xid(window: *mut GdkX11Window) -> xlib::Window;
503    pub fn gdk_x11_window_move_to_current_desktop(window: *mut GdkX11Window);
504    pub fn gdk_x11_window_move_to_desktop(window: *mut GdkX11Window, desktop: u32);
505    pub fn gdk_x11_window_set_frame_extents(
506        window: *mut GdkX11Window,
507        left: c_int,
508        right: c_int,
509        top: c_int,
510        bottom: c_int,
511    );
512    pub fn gdk_x11_window_set_frame_sync_enabled(
513        window: *mut GdkX11Window,
514        frame_sync_enabled: gboolean,
515    );
516    pub fn gdk_x11_window_set_hide_titlebar_when_maximized(
517        window: *mut GdkX11Window,
518        hide_titlebar_when_maximized: gboolean,
519    );
520    pub fn gdk_x11_window_set_theme_variant(window: *mut GdkX11Window, variant: *mut c_char);
521    pub fn gdk_x11_window_set_user_time(window: *mut GdkX11Window, timestamp: u32);
522    pub fn gdk_x11_window_set_utf8_property(
523        window: *mut GdkX11Window,
524        name: *const c_char,
525        value: *const c_char,
526    );
527
528    //=========================================================================
529    // Other functions
530    //=========================================================================
531    pub fn gdk_x11_atom_to_xatom(atom: gdk::GdkAtom) -> xlib::Atom;
532    pub fn gdk_x11_atom_to_xatom_for_display(
533        display: *mut GdkX11Display,
534        atom: gdk::GdkAtom,
535    ) -> xlib::Atom;
536    pub fn gdk_x11_device_get_id(device: *mut GdkX11DeviceCore) -> c_int;
537    pub fn gdk_x11_device_manager_lookup(
538        device_manager: *mut GdkX11DeviceManagerCore,
539        device_id: c_int,
540    ) -> *mut GdkX11DeviceCore;
541    pub fn gdk_x11_free_compound_text(ctext: *mut u8);
542    pub fn gdk_x11_free_text_list(list: *mut *mut c_char);
543    pub fn gdk_x11_get_default_root_xwindow() -> xlib::Window;
544    pub fn gdk_x11_get_default_screen() -> c_int;
545    pub fn gdk_x11_get_default_xdisplay() -> *mut xlib::Display;
546    #[cfg(feature = "v3_24_2")]
547    #[cfg_attr(docsrs, doc(cfg(feature = "v3_24_2")))]
548    pub fn gdk_x11_get_parent_relative_pattern() -> *mut cairo::cairo_pattern_t;
549    pub fn gdk_x11_get_server_time(window: *mut GdkX11Window) -> u32;
550    pub fn gdk_x11_get_xatom_by_name(atom_name: *const c_char) -> xlib::Atom;
551    pub fn gdk_x11_get_xatom_by_name_for_display(
552        display: *mut GdkX11Display,
553        atom_name: *const c_char,
554    ) -> xlib::Atom;
555    pub fn gdk_x11_get_xatom_name(xatom: xlib::Atom) -> *const c_char;
556    pub fn gdk_x11_get_xatom_name_for_display(
557        display: *mut GdkX11Display,
558        xatom: xlib::Atom,
559    ) -> *const c_char;
560    pub fn gdk_x11_grab_server();
561    pub fn gdk_x11_lookup_xdisplay(xdisplay: *mut xlib::Display) -> *mut GdkX11Display;
562    pub fn gdk_x11_register_standard_event_type(
563        display: *mut GdkX11Display,
564        event_base: c_int,
565        n_events: c_int,
566    );
567    pub fn gdk_x11_set_sm_client_id(sm_client_id: *const c_char);
568    pub fn gdk_x11_ungrab_server();
569    pub fn gdk_x11_xatom_to_atom(xatom: xlib::Atom) -> gdk::GdkAtom;
570    pub fn gdk_x11_xatom_to_atom_for_display(
571        display: *mut GdkX11Display,
572        xatom: xlib::Atom,
573    ) -> gdk::GdkAtom;
574
575}