Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git
src/server/ffi.rs (1.8K)
1 #![allow(non_upper_case_globals)]
2 #![allow(non_camel_case_types)]
3 #![allow(non_snake_case)]
4 #![allow(dead_code)]
5 #![allow(clippy::all)]
6 #![allow(clippy::approx_constant)]
7
8 #[repr(C)]
9 #[derive(Debug, Copy, Clone)]
10 pub struct wl_listener {
11 pub link: wl_list,
12 pub notify: ::std::option::Option<
13 unsafe extern "C" fn(listener: *mut wl_listener, data: *mut ::std::os::raw::c_void),
14 >,
15 }
16
17 #[repr(C)]
18 #[derive(Debug, Copy, Clone)]
19 pub struct pixman_region32_data {
20 _unused: [u8; 0],
21 }
22
23 pub type pixman_region32_data_t = pixman_region32_data;
24
25 #[repr(C)]
26 #[derive(Debug, Copy, Clone)]
27 pub struct pixman_box32 {
28 pub x1: i32,
29 pub y1: i32,
30 pub x2: i32,
31 pub y2: i32,
32 }
33
34 pub type pixman_box32_t = pixman_box32;
35
36 #[repr(C)]
37 #[derive(Debug, Copy, Clone)]
38 pub struct pixman_region32 {
39 pub extents: pixman_box32,
40 pub data: *mut pixman_region32_data,
41 }
42
43 pub type pixman_region32_t = pixman_region32;
44
45 #[repr(C)]
46 #[derive(Debug, Copy, Clone)]
47 pub struct pixman_rectangle32 {
48 pub x: i32,
49 pub y: i32,
50 pub width: u32,
51 pub height: u32,
52 }
53
54 pub type pixman_rectangle32_t = pixman_rectangle32;
55
56 include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
57
58 #[repr(C)]
59 #[derive(Debug, Copy, Clone)]
60 pub struct wlr_input_device {
61 pub type_: wlr_input_device_type,
62 pub name: *mut ::std::os::raw::c_char,
63 pub events: wlr_input_device_events,
64 pub data: *mut ::std::os::raw::c_void,
65 }
66
67 #[repr(C)]
68 #[derive(Debug, Copy, Clone)]
69 pub struct wlr_input_device_events {
70 pub destroy: wl_signal,
71 }
72
73 extern "C" {
74 pub fn river_init_wlroots_log(importance: wlr_log_importance);
75 }
76
77 #[repr(C)]
78 #[derive(Debug, Copy, Clone)]
79 pub struct wlr_addon {
80 pub impl_: *const wlr_addon_interface,
81 pub owner: *const ::std::os::raw::c_void,
82 pub link: wl_list,
83 }