|
|
|
@@ -4,31 +4,31 @@ use libc::epoll_event;
|
|
|
|
|
|
|
|
|
|
// ffi function types
|
|
|
|
|
#[allow(non_camel_case_types)]
|
|
|
|
|
pub(crate) type wl_event_loop_fd_func_t = fn(fd: i32, mask: u32, data: *mut libc::c_void) -> i32;
|
|
|
|
|
pub(crate) type wl_event_loop_fd_func_t = unsafe extern "C" fn(fd: i32, mask: u32, data: *mut libc::c_void) -> i32;
|
|
|
|
|
#[allow(non_camel_case_types)]
|
|
|
|
|
pub(crate) type wl_event_loop_timer_func_t = fn(data: *mut libc::c_void) -> i32;
|
|
|
|
|
pub(crate) type wl_event_loop_timer_func_t = unsafe extern "C" fn(data: *mut libc::c_void) -> i32;
|
|
|
|
|
#[allow(non_camel_case_types)]
|
|
|
|
|
pub(crate) type wl_event_loop_signal_func_t = fn(signal_number: i32, data: *mut libc::c_void) -> i32;
|
|
|
|
|
pub(crate) type wl_event_loop_signal_func_t = unsafe extern "C" fn(signal_number: i32, data: *mut libc::c_void) -> i32;
|
|
|
|
|
#[allow(non_camel_case_types)]
|
|
|
|
|
pub(crate) type wl_event_loop_idle_func_t = fn(data: *mut libc::c_void);
|
|
|
|
|
pub(crate) type wl_event_loop_idle_func_t = unsafe extern "C" fn(data: *mut libc::c_void);
|
|
|
|
|
#[allow(non_camel_case_types)]
|
|
|
|
|
pub(crate) type wl_notify_func_t = fn(listener: *mut wl_listener, data: *mut libc::c_void);
|
|
|
|
|
pub(crate) type wl_notify_func_t = unsafe extern "C" fn(listener: *mut wl_listener, data: *mut libc::c_void);
|
|
|
|
|
#[allow(non_camel_case_types)]
|
|
|
|
|
pub(crate) type wl_global_bind_func_t = fn(client: *mut wl_client, data: *mut libc::c_void, version: u32, id: u32);
|
|
|
|
|
pub(crate) type wl_global_bind_func_t = unsafe extern "C" fn(client: *mut wl_client, data: *mut libc::c_void, version: u32, id: u32);
|
|
|
|
|
#[allow(non_camel_case_types)]
|
|
|
|
|
pub(crate) type wl_display_global_filter_func_t = fn(client: *const wl_client, global: *const wl_global, data: *mut libc::c_void) -> bool;
|
|
|
|
|
pub(crate) type wl_display_global_filter_func_t = unsafe extern "C" fn(client: *const wl_client, global: *const wl_global, data: *mut libc::c_void) -> bool;
|
|
|
|
|
#[allow(non_camel_case_types)]
|
|
|
|
|
pub(crate) type wl_client_for_each_resource_iterator_func_t = fn(resource: *mut wl_resource, user_data: *mut libc::c_void) -> wl_iterator_result;
|
|
|
|
|
pub(crate) type wl_client_for_each_resource_iterator_func_t = unsafe extern "C" fn(resource: *mut wl_resource, user_data: *mut libc::c_void) -> wl_iterator_result;
|
|
|
|
|
#[allow(non_camel_case_types)]
|
|
|
|
|
pub(crate) type wl_user_data_destroy_func_t = fn(data: *mut libc::c_void);
|
|
|
|
|
pub(crate) type wl_user_data_destroy_func_t = unsafe extern "C" fn(data: *mut libc::c_void);
|
|
|
|
|
#[allow(non_camel_case_types)]
|
|
|
|
|
pub(crate) type wl_resource_destroy_func_t = fn(resource: *mut wl_resource);
|
|
|
|
|
pub(crate) type wl_resource_destroy_func_t = unsafe extern "C" fn(resource: *mut wl_resource);
|
|
|
|
|
#[allow(non_camel_case_types)]
|
|
|
|
|
pub(crate) type wl_protocol_logger_func_t = fn(user_data: *mut libc::c_void, direction: wl_protocol_logger_type, message: *const wl_protocol_logger_message);
|
|
|
|
|
pub(crate) type wl_protocol_logger_func_t = unsafe extern "C" fn(user_data: *mut libc::c_void, direction: wl_protocol_logger_type, message: *const wl_protocol_logger_message);
|
|
|
|
|
#[allow(non_camel_case_types)]
|
|
|
|
|
pub(crate) type wl_dispatcher_func_t = fn(user_data: *const libc::c_void, target: *mut libc::c_void, opcode: u32, msg: *const wl_message, args: *mut wl_argument) -> i32;
|
|
|
|
|
pub(crate) type wl_dispatcher_func_t = unsafe extern "C" fn(user_data: *const libc::c_void, target: *mut libc::c_void, opcode: u32, msg: *const wl_message, args: *mut wl_argument) -> i32;
|
|
|
|
|
#[allow(non_camel_case_types)]
|
|
|
|
|
pub(crate) type wl_log_func_t = fn(fmt: *const libc::c_char, args: std::ffi::VaList);
|
|
|
|
|
pub(crate) type wl_log_func_t = unsafe extern "C" fn(fmt: *const libc::c_char, args: std::ffi::VaList);
|
|
|
|
|
|
|
|
|
|
// ffi data types and struct
|
|
|
|
|
const UNIX_PATH_MAX: usize = 108;
|
|
|
|
@@ -371,7 +371,7 @@ unsafe extern "C" {
|
|
|
|
|
pub(crate) unsafe fn wl_display_add_global();
|
|
|
|
|
pub(crate) unsafe fn wl_display_add_protocol_logger(disp: *mut wl_display, func: wl_protocol_logger_func_t, user_data: *mut libc::c_void) -> *mut wl_protocol_logger;
|
|
|
|
|
pub(crate) unsafe fn wl_display_add_shm_format(disp: *mut wl_display, format: u32) -> u32;
|
|
|
|
|
pub(crate) unsafe fn wl_display_add_socket_auto(disp: *mut wl_display) -> std::ffi::CStr;
|
|
|
|
|
pub(crate) unsafe fn wl_display_add_socket_auto(disp: *mut wl_display) -> *mut u8;
|
|
|
|
|
pub(crate) unsafe fn wl_display_add_socket(disp: *mut wl_display, name: *const libc::c_char);
|
|
|
|
|
pub(crate) unsafe fn wl_display_add_socket_fd(disp: *mut wl_display, sock_fd: RawFd) -> i32;
|
|
|
|
|
pub(crate) unsafe fn wl_display_create() -> *mut wl_display;
|
|
|
|
|