#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
#![allow(
clippy::approx_constant,
clippy::type_complexity,
clippy::unreadable_literal,
clippy::upper_case_acronyms
)]
#![cfg_attr(docsrs, feature(doc_cfg))]
use gdk4_sys as gdk;
use glib_sys as glib;
#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use libc::{intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE};
#[allow(unused_imports)]
use std::ffi::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
};
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};
pub type GdkX11DeviceType = c_int;
pub const GDK_X11_DEVICE_TYPE_LOGICAL: GdkX11DeviceType = 0;
pub const GDK_X11_DEVICE_TYPE_PHYSICAL: GdkX11DeviceType = 1;
pub const GDK_X11_DEVICE_TYPE_FLOATING: GdkX11DeviceType = 2;
#[repr(C)]
#[allow(dead_code)]
pub struct _GdkX11AppLaunchContextClass {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
pub type GdkX11AppLaunchContextClass = _GdkX11AppLaunchContextClass;
#[repr(C)]
#[allow(dead_code)]
pub struct _GdkX11DeviceManagerXI2Class {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
pub type GdkX11DeviceManagerXI2Class = _GdkX11DeviceManagerXI2Class;
#[repr(C)]
#[allow(dead_code)]
pub struct _GdkX11DeviceXI2Class {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
pub type GdkX11DeviceXI2Class = _GdkX11DeviceXI2Class;
#[repr(C)]
#[allow(dead_code)]
pub struct _GdkX11DisplayClass {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
pub type GdkX11DisplayClass = _GdkX11DisplayClass;
#[repr(C)]
#[allow(dead_code)]
pub struct _GdkX11DragClass {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
pub type GdkX11DragClass = _GdkX11DragClass;
#[repr(C)]
#[allow(dead_code)]
pub struct _GdkX11GLContextClass {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
pub type GdkX11GLContextClass = _GdkX11GLContextClass;
#[repr(C)]
#[allow(dead_code)]
pub struct _GdkX11MonitorClass {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
pub type GdkX11MonitorClass = _GdkX11MonitorClass;
#[repr(C)]
#[allow(dead_code)]
pub struct _GdkX11ScreenClass {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
pub type GdkX11ScreenClass = _GdkX11ScreenClass;
#[repr(C)]
#[allow(dead_code)]
pub struct _GdkX11SurfaceClass {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
pub type GdkX11SurfaceClass = _GdkX11SurfaceClass;
#[repr(C)]
#[allow(dead_code)]
pub struct GdkX11AppLaunchContext {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
impl ::std::fmt::Debug for GdkX11AppLaunchContext {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GdkX11AppLaunchContext @ {self:p}"))
.finish()
}
}
#[repr(C)]
#[allow(dead_code)]
pub struct GdkX11DeviceManagerXI2 {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
impl ::std::fmt::Debug for GdkX11DeviceManagerXI2 {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GdkX11DeviceManagerXI2 @ {self:p}"))
.finish()
}
}
#[repr(C)]
#[allow(dead_code)]
pub struct GdkX11DeviceXI2 {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
impl ::std::fmt::Debug for GdkX11DeviceXI2 {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GdkX11DeviceXI2 @ {self:p}"))
.finish()
}
}
#[repr(C)]
#[allow(dead_code)]
pub struct GdkX11Display {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
impl ::std::fmt::Debug for GdkX11Display {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GdkX11Display @ {self:p}"))
.finish()
}
}
#[repr(C)]
#[allow(dead_code)]
pub struct GdkX11Drag {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
impl ::std::fmt::Debug for GdkX11Drag {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GdkX11Drag @ {self:p}")).finish()
}
}
#[repr(C)]
#[allow(dead_code)]
pub struct GdkX11GLContext {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
impl ::std::fmt::Debug for GdkX11GLContext {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GdkX11GLContext @ {self:p}"))
.finish()
}
}
#[repr(C)]
#[allow(dead_code)]
pub struct GdkX11Monitor {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
impl ::std::fmt::Debug for GdkX11Monitor {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GdkX11Monitor @ {self:p}"))
.finish()
}
}
#[repr(C)]
#[allow(dead_code)]
pub struct GdkX11Screen {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
impl ::std::fmt::Debug for GdkX11Screen {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GdkX11Screen @ {self:p}")).finish()
}
}
#[repr(C)]
#[allow(dead_code)]
pub struct GdkX11Surface {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
impl ::std::fmt::Debug for GdkX11Surface {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GdkX11Surface @ {self:p}"))
.finish()
}
}
extern "C" {
pub fn gdk_x11_app_launch_context_get_type() -> GType;
pub fn gdk_x11_device_manager_xi2_get_type() -> GType;
pub fn gdk_x11_device_xi2_get_type() -> GType;
pub fn gdk_x11_display_get_type() -> GType;
pub fn gdk_x11_display_open(display_name: *const c_char) -> *mut gdk::GdkDisplay;
pub fn gdk_x11_display_set_program_class(
display: *mut gdk::GdkDisplay,
program_class: *const c_char,
);
pub fn gdk_x11_display_broadcast_startup_message(
display: *mut GdkX11Display,
message_type: *const c_char,
...
);
pub fn gdk_x11_display_error_trap_pop(display: *mut GdkX11Display) -> c_int;
pub fn gdk_x11_display_error_trap_pop_ignored(display: *mut GdkX11Display);
pub fn gdk_x11_display_error_trap_push(display: *mut GdkX11Display);
pub fn gdk_x11_display_get_default_group(display: *mut GdkX11Display) -> *mut gdk::GdkSurface;
#[cfg(feature = "v4_4")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_4")))]
pub fn gdk_x11_display_get_egl_display(display: *mut GdkX11Display) -> gpointer;
#[cfg(feature = "v4_4")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_4")))]
pub fn gdk_x11_display_get_egl_version(
display: *mut GdkX11Display,
major: *mut c_int,
minor: *mut c_int,
) -> gboolean;
pub fn gdk_x11_display_get_glx_version(
display: *mut GdkX11Display,
major: *mut c_int,
minor: *mut c_int,
) -> gboolean;
pub fn gdk_x11_display_get_primary_monitor(display: *mut GdkX11Display)
-> *mut gdk::GdkMonitor;
pub fn gdk_x11_display_get_screen(display: *mut GdkX11Display) -> *mut GdkX11Screen;
pub fn gdk_x11_display_get_startup_notification_id(
display: *mut GdkX11Display,
) -> *const c_char;
pub fn gdk_x11_display_get_user_time(display: *mut GdkX11Display) -> u32;
pub fn gdk_x11_display_get_xcursor(
display: *mut GdkX11Display,
cursor: *mut gdk::GdkCursor,
) -> c_ulong;
pub fn gdk_x11_display_get_xdisplay(display: *mut GdkX11Display) -> gpointer;
pub fn gdk_x11_display_get_xrootwindow(display: *mut GdkX11Display) -> c_ulong;
pub fn gdk_x11_display_get_xscreen(display: *mut GdkX11Display) -> gpointer;
pub fn gdk_x11_display_grab(display: *mut GdkX11Display);
pub fn gdk_x11_display_set_cursor_theme(
display: *mut GdkX11Display,
theme: *const c_char,
size: c_int,
);
pub fn gdk_x11_display_set_startup_notification_id(
display: *mut GdkX11Display,
startup_id: *const c_char,
);
pub fn gdk_x11_display_set_surface_scale(display: *mut GdkX11Display, scale: c_int);
pub fn gdk_x11_display_string_to_compound_text(
display: *mut GdkX11Display,
str: *const c_char,
encoding: *mut *const c_char,
format: *mut c_int,
ctext: *mut *mut u8,
length: *mut c_int,
) -> c_int;
pub fn gdk_x11_display_text_property_to_text_list(
display: *mut GdkX11Display,
encoding: *const c_char,
format: c_int,
text: *const u8,
length: c_int,
list: *mut *mut *mut c_char,
) -> c_int;
pub fn gdk_x11_display_ungrab(display: *mut GdkX11Display);
pub fn gdk_x11_display_utf8_to_compound_text(
display: *mut GdkX11Display,
str: *const c_char,
encoding: *mut *const c_char,
format: *mut c_int,
ctext: *mut *mut u8,
length: *mut c_int,
) -> gboolean;
pub fn gdk_x11_drag_get_type() -> GType;
pub fn gdk_x11_gl_context_get_type() -> GType;
pub fn gdk_x11_monitor_get_type() -> GType;
pub fn gdk_x11_monitor_get_output(monitor: *mut GdkX11Monitor) -> c_ulong;
pub fn gdk_x11_monitor_get_workarea(
monitor: *mut GdkX11Monitor,
workarea: *mut gdk::GdkRectangle,
);
pub fn gdk_x11_screen_get_type() -> GType;
pub fn gdk_x11_screen_get_current_desktop(screen: *mut GdkX11Screen) -> u32;
pub fn gdk_x11_screen_get_monitor_output(
screen: *mut GdkX11Screen,
monitor_num: c_int,
) -> c_ulong;
pub fn gdk_x11_screen_get_number_of_desktops(screen: *mut GdkX11Screen) -> u32;
pub fn gdk_x11_screen_get_screen_number(screen: *mut GdkX11Screen) -> c_int;
pub fn gdk_x11_screen_get_window_manager_name(screen: *mut GdkX11Screen) -> *const c_char;
pub fn gdk_x11_screen_get_xscreen(screen: *mut GdkX11Screen) -> gpointer;
pub fn gdk_x11_screen_supports_net_wm_hint(
screen: *mut GdkX11Screen,
property_name: *const c_char,
) -> gboolean;
pub fn gdk_x11_surface_get_type() -> GType;
pub fn gdk_x11_surface_lookup_for_display(
display: *mut GdkX11Display,
window: c_ulong,
) -> *mut GdkX11Surface;
pub fn gdk_x11_surface_get_desktop(surface: *mut GdkX11Surface) -> u32;
pub fn gdk_x11_surface_get_group(surface: *mut GdkX11Surface) -> *mut gdk::GdkSurface;
pub fn gdk_x11_surface_get_xid(surface: *mut GdkX11Surface) -> c_ulong;
pub fn gdk_x11_surface_move_to_current_desktop(surface: *mut GdkX11Surface);
pub fn gdk_x11_surface_move_to_desktop(surface: *mut GdkX11Surface, desktop: u32);
pub fn gdk_x11_surface_set_frame_sync_enabled(
surface: *mut GdkX11Surface,
frame_sync_enabled: gboolean,
);
pub fn gdk_x11_surface_set_group(surface: *mut GdkX11Surface, leader: *mut gdk::GdkSurface);
pub fn gdk_x11_surface_set_skip_pager_hint(surface: *mut GdkX11Surface, skips_pager: gboolean);
pub fn gdk_x11_surface_set_skip_taskbar_hint(
surface: *mut GdkX11Surface,
skips_taskbar: gboolean,
);
pub fn gdk_x11_surface_set_theme_variant(surface: *mut GdkX11Surface, variant: *const c_char);
pub fn gdk_x11_surface_set_urgency_hint(surface: *mut GdkX11Surface, urgent: gboolean);
pub fn gdk_x11_surface_set_user_time(surface: *mut GdkX11Surface, timestamp: u32);
pub fn gdk_x11_surface_set_utf8_property(
surface: *mut GdkX11Surface,
name: *const c_char,
value: *const c_char,
);
pub fn gdk_x11_device_get_id(device: *mut GdkX11DeviceXI2) -> c_int;
pub fn gdk_x11_device_manager_lookup(
device_manager: *mut GdkX11DeviceManagerXI2,
device_id: c_int,
) -> *mut GdkX11DeviceXI2;
pub fn gdk_x11_free_compound_text(ctext: *mut u8);
pub fn gdk_x11_free_text_list(list: *mut *mut c_char);
pub fn gdk_x11_get_server_time(surface: *mut GdkX11Surface) -> u32;
pub fn gdk_x11_get_xatom_by_name_for_display(
display: *mut GdkX11Display,
atom_name: *const c_char,
) -> c_ulong;
pub fn gdk_x11_get_xatom_name_for_display(
display: *mut GdkX11Display,
xatom: c_ulong,
) -> *const c_char;
pub fn gdk_x11_lookup_xdisplay(xdisplay: gpointer) -> *mut GdkX11Display;
pub fn gdk_x11_set_sm_client_id(sm_client_id: *const c_char);
}