Merge pull request #319 from wravery/dev

feat: various improvements to bindings
This commit is contained in:
Bill Avery
2025-12-29 18:43:24 -08:00
committed by GitHub
18 changed files with 5949 additions and 12 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -14533,6 +14533,69 @@ unsafe extern "C" {
byte_size: usize,
) -> *mut cef_shared_process_message_builder_t;
}
#[doc = "\n Structure that facilitates managing the browser-related tasks. The functions\n of this structure may only be called on the UI thread.\n\n NOTE: This struct is allocated DLL-side.\n"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _cef_task_manager_t {
#[doc = "\n Base structure.\n"]
pub base: cef_base_ref_counted_t,
#[doc = "\n Returns the number of tasks currently tracked by the task manager. Returns\n 0 if the function was called from the incorrect thread.\n"]
pub get_tasks_count:
::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_task_manager_t) -> usize>,
#[doc = "\n Gets the list of task IDs currently tracked by the task manager. Tasks\n that share the same process id will always be consecutive. The list will\n be sorted in a way that reflects the process tree: the browser process\n will be first, followed by the gpu process if it exists. Related processes\n (e.g., a subframe process and its parent) will be kept together if\n possible. Callers can expect this ordering to be stable when a process is\n added or removed. The task IDs are unique within the application lifespan.\n Returns false (0) if the function was called from the incorrect thread.\n"]
pub get_task_ids_list: ::std::option::Option<
unsafe extern "C" fn(
self_: *mut _cef_task_manager_t,
task_idsCount: *mut usize,
task_ids: *mut i64,
) -> ::std::os::raw::c_int,
>,
#[doc = "\n Gets information about the task with |task_id|. Returns true (1) if the\n information about the task was successfully retrieved and false (0) if the\n |task_id| is invalid or the function was called from the incorrect thread.\n"]
pub get_task_info: ::std::option::Option<
unsafe extern "C" fn(
self_: *mut _cef_task_manager_t,
task_id: i64,
info: *mut _cef_task_info_t,
) -> ::std::os::raw::c_int,
>,
#[doc = "\n Attempts to terminate a task with |task_id|. Returns false (0) if the\n |task_id| is invalid, the call is made from an incorrect thread, or if the\n task cannot be terminated.\n"]
pub kill_task: ::std::option::Option<
unsafe extern "C" fn(
self_: *mut _cef_task_manager_t,
task_id: i64,
) -> ::std::os::raw::c_int,
>,
#[doc = "\n Returns the task ID associated with the main task for |browser_id| (value\n from cef_browser_t::GetIdentifier). Returns -1 if |browser_id| is invalid,\n does not currently have an associated task, or the function was called\n from the incorrect thread.\n"]
pub get_task_id_for_browser_id: ::std::option::Option<
unsafe extern "C" fn(
self_: *mut _cef_task_manager_t,
browser_id: ::std::os::raw::c_int,
) -> i64,
>,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of _cef_task_manager_t"][::std::mem::size_of::<_cef_task_manager_t>() - 80usize];
["Alignment of _cef_task_manager_t"][::std::mem::align_of::<_cef_task_manager_t>() - 8usize];
["Offset of field: _cef_task_manager_t::base"]
[::std::mem::offset_of!(_cef_task_manager_t, base) - 0usize];
["Offset of field: _cef_task_manager_t::get_tasks_count"]
[::std::mem::offset_of!(_cef_task_manager_t, get_tasks_count) - 40usize];
["Offset of field: _cef_task_manager_t::get_task_ids_list"]
[::std::mem::offset_of!(_cef_task_manager_t, get_task_ids_list) - 48usize];
["Offset of field: _cef_task_manager_t::get_task_info"]
[::std::mem::offset_of!(_cef_task_manager_t, get_task_info) - 56usize];
["Offset of field: _cef_task_manager_t::kill_task"]
[::std::mem::offset_of!(_cef_task_manager_t, kill_task) - 64usize];
["Offset of field: _cef_task_manager_t::get_task_id_for_browser_id"]
[::std::mem::offset_of!(_cef_task_manager_t, get_task_id_for_browser_id) - 72usize];
};
#[doc = "\n Structure that facilitates managing the browser-related tasks. The functions\n of this structure may only be called on the UI thread.\n\n NOTE: This struct is allocated DLL-side.\n"]
pub type cef_task_manager_t = _cef_task_manager_t;
unsafe extern "C" {
#[doc = "\n Returns the global task manager object. Returns nullptr if the function was\n called from the incorrect thread.\n"]
pub fn cef_task_manager_get() -> *mut cef_task_manager_t;
}
pub type pthread_t = __darwin_pthread_t;
pub type pid_t = __darwin_pid_t;
pub type cef_platform_thread_id_t = pid_t;

View File

@@ -14568,6 +14568,69 @@ unsafe extern "C" {
byte_size: usize,
) -> *mut cef_shared_process_message_builder_t;
}
#[doc = "\n Structure that facilitates managing the browser-related tasks. The functions\n of this structure may only be called on the UI thread.\n\n NOTE: This struct is allocated DLL-side.\n"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _cef_task_manager_t {
#[doc = "\n Base structure.\n"]
pub base: cef_base_ref_counted_t,
#[doc = "\n Returns the number of tasks currently tracked by the task manager. Returns\n 0 if the function was called from the incorrect thread.\n"]
pub get_tasks_count:
::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_task_manager_t) -> usize>,
#[doc = "\n Gets the list of task IDs currently tracked by the task manager. Tasks\n that share the same process id will always be consecutive. The list will\n be sorted in a way that reflects the process tree: the browser process\n will be first, followed by the gpu process if it exists. Related processes\n (e.g., a subframe process and its parent) will be kept together if\n possible. Callers can expect this ordering to be stable when a process is\n added or removed. The task IDs are unique within the application lifespan.\n Returns false (0) if the function was called from the incorrect thread.\n"]
pub get_task_ids_list: ::std::option::Option<
unsafe extern "C" fn(
self_: *mut _cef_task_manager_t,
task_idsCount: *mut usize,
task_ids: *mut i64,
) -> ::std::os::raw::c_int,
>,
#[doc = "\n Gets information about the task with |task_id|. Returns true (1) if the\n information about the task was successfully retrieved and false (0) if the\n |task_id| is invalid or the function was called from the incorrect thread.\n"]
pub get_task_info: ::std::option::Option<
unsafe extern "C" fn(
self_: *mut _cef_task_manager_t,
task_id: i64,
info: *mut _cef_task_info_t,
) -> ::std::os::raw::c_int,
>,
#[doc = "\n Attempts to terminate a task with |task_id|. Returns false (0) if the\n |task_id| is invalid, the call is made from an incorrect thread, or if the\n task cannot be terminated.\n"]
pub kill_task: ::std::option::Option<
unsafe extern "C" fn(
self_: *mut _cef_task_manager_t,
task_id: i64,
) -> ::std::os::raw::c_int,
>,
#[doc = "\n Returns the task ID associated with the main task for |browser_id| (value\n from cef_browser_t::GetIdentifier). Returns -1 if |browser_id| is invalid,\n does not currently have an associated task, or the function was called\n from the incorrect thread.\n"]
pub get_task_id_for_browser_id: ::std::option::Option<
unsafe extern "C" fn(
self_: *mut _cef_task_manager_t,
browser_id: ::std::os::raw::c_int,
) -> i64,
>,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of _cef_task_manager_t"][::std::mem::size_of::<_cef_task_manager_t>() - 80usize];
["Alignment of _cef_task_manager_t"][::std::mem::align_of::<_cef_task_manager_t>() - 8usize];
["Offset of field: _cef_task_manager_t::base"]
[::std::mem::offset_of!(_cef_task_manager_t, base) - 0usize];
["Offset of field: _cef_task_manager_t::get_tasks_count"]
[::std::mem::offset_of!(_cef_task_manager_t, get_tasks_count) - 40usize];
["Offset of field: _cef_task_manager_t::get_task_ids_list"]
[::std::mem::offset_of!(_cef_task_manager_t, get_task_ids_list) - 48usize];
["Offset of field: _cef_task_manager_t::get_task_info"]
[::std::mem::offset_of!(_cef_task_manager_t, get_task_info) - 56usize];
["Offset of field: _cef_task_manager_t::kill_task"]
[::std::mem::offset_of!(_cef_task_manager_t, kill_task) - 64usize];
["Offset of field: _cef_task_manager_t::get_task_id_for_browser_id"]
[::std::mem::offset_of!(_cef_task_manager_t, get_task_id_for_browser_id) - 72usize];
};
#[doc = "\n Structure that facilitates managing the browser-related tasks. The functions\n of this structure may only be called on the UI thread.\n\n NOTE: This struct is allocated DLL-side.\n"]
pub type cef_task_manager_t = _cef_task_manager_t;
unsafe extern "C" {
#[doc = "\n Returns the global task manager object. Returns nullptr if the function was\n called from the incorrect thread.\n"]
pub fn cef_task_manager_get() -> *mut cef_task_manager_t;
}
pub type cef_platform_thread_id_t = DWORD;
unsafe extern "C" {
#[doc = "\n Returns the current platform thread ID.\n"]

View File

@@ -14528,6 +14528,69 @@ unsafe extern "C" {
byte_size: usize,
) -> *mut cef_shared_process_message_builder_t;
}
#[doc = "\n Structure that facilitates managing the browser-related tasks. The functions\n of this structure may only be called on the UI thread.\n\n NOTE: This struct is allocated DLL-side.\n"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _cef_task_manager_t {
#[doc = "\n Base structure.\n"]
pub base: cef_base_ref_counted_t,
#[doc = "\n Returns the number of tasks currently tracked by the task manager. Returns\n 0 if the function was called from the incorrect thread.\n"]
pub get_tasks_count:
::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_task_manager_t) -> usize>,
#[doc = "\n Gets the list of task IDs currently tracked by the task manager. Tasks\n that share the same process id will always be consecutive. The list will\n be sorted in a way that reflects the process tree: the browser process\n will be first, followed by the gpu process if it exists. Related processes\n (e.g., a subframe process and its parent) will be kept together if\n possible. Callers can expect this ordering to be stable when a process is\n added or removed. The task IDs are unique within the application lifespan.\n Returns false (0) if the function was called from the incorrect thread.\n"]
pub get_task_ids_list: ::std::option::Option<
unsafe extern "C" fn(
self_: *mut _cef_task_manager_t,
task_idsCount: *mut usize,
task_ids: *mut i64,
) -> ::std::os::raw::c_int,
>,
#[doc = "\n Gets information about the task with |task_id|. Returns true (1) if the\n information about the task was successfully retrieved and false (0) if the\n |task_id| is invalid or the function was called from the incorrect thread.\n"]
pub get_task_info: ::std::option::Option<
unsafe extern "C" fn(
self_: *mut _cef_task_manager_t,
task_id: i64,
info: *mut _cef_task_info_t,
) -> ::std::os::raw::c_int,
>,
#[doc = "\n Attempts to terminate a task with |task_id|. Returns false (0) if the\n |task_id| is invalid, the call is made from an incorrect thread, or if the\n task cannot be terminated.\n"]
pub kill_task: ::std::option::Option<
unsafe extern "C" fn(
self_: *mut _cef_task_manager_t,
task_id: i64,
) -> ::std::os::raw::c_int,
>,
#[doc = "\n Returns the task ID associated with the main task for |browser_id| (value\n from cef_browser_t::GetIdentifier). Returns -1 if |browser_id| is invalid,\n does not currently have an associated task, or the function was called\n from the incorrect thread.\n"]
pub get_task_id_for_browser_id: ::std::option::Option<
unsafe extern "C" fn(
self_: *mut _cef_task_manager_t,
browser_id: ::std::os::raw::c_int,
) -> i64,
>,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of _cef_task_manager_t"][::std::mem::size_of::<_cef_task_manager_t>() - 80usize];
["Alignment of _cef_task_manager_t"][::std::mem::align_of::<_cef_task_manager_t>() - 8usize];
["Offset of field: _cef_task_manager_t::base"]
[::std::mem::offset_of!(_cef_task_manager_t, base) - 0usize];
["Offset of field: _cef_task_manager_t::get_tasks_count"]
[::std::mem::offset_of!(_cef_task_manager_t, get_tasks_count) - 40usize];
["Offset of field: _cef_task_manager_t::get_task_ids_list"]
[::std::mem::offset_of!(_cef_task_manager_t, get_task_ids_list) - 48usize];
["Offset of field: _cef_task_manager_t::get_task_info"]
[::std::mem::offset_of!(_cef_task_manager_t, get_task_info) - 56usize];
["Offset of field: _cef_task_manager_t::kill_task"]
[::std::mem::offset_of!(_cef_task_manager_t, kill_task) - 64usize];
["Offset of field: _cef_task_manager_t::get_task_id_for_browser_id"]
[::std::mem::offset_of!(_cef_task_manager_t, get_task_id_for_browser_id) - 72usize];
};
#[doc = "\n Structure that facilitates managing the browser-related tasks. The functions\n of this structure may only be called on the UI thread.\n\n NOTE: This struct is allocated DLL-side.\n"]
pub type cef_task_manager_t = _cef_task_manager_t;
unsafe extern "C" {
#[doc = "\n Returns the global task manager object. Returns nullptr if the function was\n called from the incorrect thread.\n"]
pub fn cef_task_manager_get() -> *mut cef_task_manager_t;
}
pub type pthread_t = ::std::os::raw::c_ulong;
pub type cef_platform_thread_id_t = pid_t;
unsafe extern "C" {

View File

@@ -14521,6 +14521,69 @@ unsafe extern "C" {
byte_size: usize,
) -> *mut cef_shared_process_message_builder_t;
}
#[doc = "\n Structure that facilitates managing the browser-related tasks. The functions\n of this structure may only be called on the UI thread.\n\n NOTE: This struct is allocated DLL-side.\n"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _cef_task_manager_t {
#[doc = "\n Base structure.\n"]
pub base: cef_base_ref_counted_t,
#[doc = "\n Returns the number of tasks currently tracked by the task manager. Returns\n 0 if the function was called from the incorrect thread.\n"]
pub get_tasks_count:
::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_task_manager_t) -> usize>,
#[doc = "\n Gets the list of task IDs currently tracked by the task manager. Tasks\n that share the same process id will always be consecutive. The list will\n be sorted in a way that reflects the process tree: the browser process\n will be first, followed by the gpu process if it exists. Related processes\n (e.g., a subframe process and its parent) will be kept together if\n possible. Callers can expect this ordering to be stable when a process is\n added or removed. The task IDs are unique within the application lifespan.\n Returns false (0) if the function was called from the incorrect thread.\n"]
pub get_task_ids_list: ::std::option::Option<
unsafe extern "C" fn(
self_: *mut _cef_task_manager_t,
task_idsCount: *mut usize,
task_ids: *mut i64,
) -> ::std::os::raw::c_int,
>,
#[doc = "\n Gets information about the task with |task_id|. Returns true (1) if the\n information about the task was successfully retrieved and false (0) if the\n |task_id| is invalid or the function was called from the incorrect thread.\n"]
pub get_task_info: ::std::option::Option<
unsafe extern "C" fn(
self_: *mut _cef_task_manager_t,
task_id: i64,
info: *mut _cef_task_info_t,
) -> ::std::os::raw::c_int,
>,
#[doc = "\n Attempts to terminate a task with |task_id|. Returns false (0) if the\n |task_id| is invalid, the call is made from an incorrect thread, or if the\n task cannot be terminated.\n"]
pub kill_task: ::std::option::Option<
unsafe extern "C" fn(
self_: *mut _cef_task_manager_t,
task_id: i64,
) -> ::std::os::raw::c_int,
>,
#[doc = "\n Returns the task ID associated with the main task for |browser_id| (value\n from cef_browser_t::GetIdentifier). Returns -1 if |browser_id| is invalid,\n does not currently have an associated task, or the function was called\n from the incorrect thread.\n"]
pub get_task_id_for_browser_id: ::std::option::Option<
unsafe extern "C" fn(
self_: *mut _cef_task_manager_t,
browser_id: ::std::os::raw::c_int,
) -> i64,
>,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of _cef_task_manager_t"][::std::mem::size_of::<_cef_task_manager_t>() - 40usize];
["Alignment of _cef_task_manager_t"][::std::mem::align_of::<_cef_task_manager_t>() - 4usize];
["Offset of field: _cef_task_manager_t::base"]
[::std::mem::offset_of!(_cef_task_manager_t, base) - 0usize];
["Offset of field: _cef_task_manager_t::get_tasks_count"]
[::std::mem::offset_of!(_cef_task_manager_t, get_tasks_count) - 20usize];
["Offset of field: _cef_task_manager_t::get_task_ids_list"]
[::std::mem::offset_of!(_cef_task_manager_t, get_task_ids_list) - 24usize];
["Offset of field: _cef_task_manager_t::get_task_info"]
[::std::mem::offset_of!(_cef_task_manager_t, get_task_info) - 28usize];
["Offset of field: _cef_task_manager_t::kill_task"]
[::std::mem::offset_of!(_cef_task_manager_t, kill_task) - 32usize];
["Offset of field: _cef_task_manager_t::get_task_id_for_browser_id"]
[::std::mem::offset_of!(_cef_task_manager_t, get_task_id_for_browser_id) - 36usize];
};
#[doc = "\n Structure that facilitates managing the browser-related tasks. The functions\n of this structure may only be called on the UI thread.\n\n NOTE: This struct is allocated DLL-side.\n"]
pub type cef_task_manager_t = _cef_task_manager_t;
unsafe extern "C" {
#[doc = "\n Returns the global task manager object. Returns nullptr if the function was\n called from the incorrect thread.\n"]
pub fn cef_task_manager_get() -> *mut cef_task_manager_t;
}
pub type pthread_t = ::std::os::raw::c_ulong;
pub type cef_platform_thread_id_t = pid_t;
unsafe extern "C" {

View File

@@ -14750,6 +14750,69 @@ unsafe extern "C" {
byte_size: usize,
) -> *mut cef_shared_process_message_builder_t;
}
#[doc = "\n Structure that facilitates managing the browser-related tasks. The functions\n of this structure may only be called on the UI thread.\n\n NOTE: This struct is allocated DLL-side.\n"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct _cef_task_manager_t {
#[doc = "\n Base structure.\n"]
pub base: cef_base_ref_counted_t,
#[doc = "\n Returns the number of tasks currently tracked by the task manager. Returns\n 0 if the function was called from the incorrect thread.\n"]
pub get_tasks_count:
::std::option::Option<unsafe extern "stdcall" fn(self_: *mut _cef_task_manager_t) -> usize>,
#[doc = "\n Gets the list of task IDs currently tracked by the task manager. Tasks\n that share the same process id will always be consecutive. The list will\n be sorted in a way that reflects the process tree: the browser process\n will be first, followed by the gpu process if it exists. Related processes\n (e.g., a subframe process and its parent) will be kept together if\n possible. Callers can expect this ordering to be stable when a process is\n added or removed. The task IDs are unique within the application lifespan.\n Returns false (0) if the function was called from the incorrect thread.\n"]
pub get_task_ids_list: ::std::option::Option<
unsafe extern "stdcall" fn(
self_: *mut _cef_task_manager_t,
task_idsCount: *mut usize,
task_ids: *mut i64,
) -> ::std::os::raw::c_int,
>,
#[doc = "\n Gets information about the task with |task_id|. Returns true (1) if the\n information about the task was successfully retrieved and false (0) if the\n |task_id| is invalid or the function was called from the incorrect thread.\n"]
pub get_task_info: ::std::option::Option<
unsafe extern "stdcall" fn(
self_: *mut _cef_task_manager_t,
task_id: i64,
info: *mut _cef_task_info_t,
) -> ::std::os::raw::c_int,
>,
#[doc = "\n Attempts to terminate a task with |task_id|. Returns false (0) if the\n |task_id| is invalid, the call is made from an incorrect thread, or if the\n task cannot be terminated.\n"]
pub kill_task: ::std::option::Option<
unsafe extern "stdcall" fn(
self_: *mut _cef_task_manager_t,
task_id: i64,
) -> ::std::os::raw::c_int,
>,
#[doc = "\n Returns the task ID associated with the main task for |browser_id| (value\n from cef_browser_t::GetIdentifier). Returns -1 if |browser_id| is invalid,\n does not currently have an associated task, or the function was called\n from the incorrect thread.\n"]
pub get_task_id_for_browser_id: ::std::option::Option<
unsafe extern "stdcall" fn(
self_: *mut _cef_task_manager_t,
browser_id: ::std::os::raw::c_int,
) -> i64,
>,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of _cef_task_manager_t"][::std::mem::size_of::<_cef_task_manager_t>() - 40usize];
["Alignment of _cef_task_manager_t"][::std::mem::align_of::<_cef_task_manager_t>() - 4usize];
["Offset of field: _cef_task_manager_t::base"]
[::std::mem::offset_of!(_cef_task_manager_t, base) - 0usize];
["Offset of field: _cef_task_manager_t::get_tasks_count"]
[::std::mem::offset_of!(_cef_task_manager_t, get_tasks_count) - 20usize];
["Offset of field: _cef_task_manager_t::get_task_ids_list"]
[::std::mem::offset_of!(_cef_task_manager_t, get_task_ids_list) - 24usize];
["Offset of field: _cef_task_manager_t::get_task_info"]
[::std::mem::offset_of!(_cef_task_manager_t, get_task_info) - 28usize];
["Offset of field: _cef_task_manager_t::kill_task"]
[::std::mem::offset_of!(_cef_task_manager_t, kill_task) - 32usize];
["Offset of field: _cef_task_manager_t::get_task_id_for_browser_id"]
[::std::mem::offset_of!(_cef_task_manager_t, get_task_id_for_browser_id) - 36usize];
};
#[doc = "\n Structure that facilitates managing the browser-related tasks. The functions\n of this structure may only be called on the UI thread.\n\n NOTE: This struct is allocated DLL-side.\n"]
pub type cef_task_manager_t = _cef_task_manager_t;
unsafe extern "C" {
#[doc = "\n Returns the global task manager object. Returns nullptr if the function was\n called from the incorrect thread.\n"]
pub fn cef_task_manager_get() -> *mut cef_task_manager_t;
}
pub type cef_platform_thread_id_t = DWORD;
unsafe extern "C" {
#[doc = "\n Returns the current platform thread ID.\n"]

View File

@@ -14533,6 +14533,69 @@ unsafe extern "C" {
byte_size: usize,
) -> *mut cef_shared_process_message_builder_t;
}
#[doc = "\n Structure that facilitates managing the browser-related tasks. The functions\n of this structure may only be called on the UI thread.\n\n NOTE: This struct is allocated DLL-side.\n"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _cef_task_manager_t {
#[doc = "\n Base structure.\n"]
pub base: cef_base_ref_counted_t,
#[doc = "\n Returns the number of tasks currently tracked by the task manager. Returns\n 0 if the function was called from the incorrect thread.\n"]
pub get_tasks_count:
::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_task_manager_t) -> usize>,
#[doc = "\n Gets the list of task IDs currently tracked by the task manager. Tasks\n that share the same process id will always be consecutive. The list will\n be sorted in a way that reflects the process tree: the browser process\n will be first, followed by the gpu process if it exists. Related processes\n (e.g., a subframe process and its parent) will be kept together if\n possible. Callers can expect this ordering to be stable when a process is\n added or removed. The task IDs are unique within the application lifespan.\n Returns false (0) if the function was called from the incorrect thread.\n"]
pub get_task_ids_list: ::std::option::Option<
unsafe extern "C" fn(
self_: *mut _cef_task_manager_t,
task_idsCount: *mut usize,
task_ids: *mut i64,
) -> ::std::os::raw::c_int,
>,
#[doc = "\n Gets information about the task with |task_id|. Returns true (1) if the\n information about the task was successfully retrieved and false (0) if the\n |task_id| is invalid or the function was called from the incorrect thread.\n"]
pub get_task_info: ::std::option::Option<
unsafe extern "C" fn(
self_: *mut _cef_task_manager_t,
task_id: i64,
info: *mut _cef_task_info_t,
) -> ::std::os::raw::c_int,
>,
#[doc = "\n Attempts to terminate a task with |task_id|. Returns false (0) if the\n |task_id| is invalid, the call is made from an incorrect thread, or if the\n task cannot be terminated.\n"]
pub kill_task: ::std::option::Option<
unsafe extern "C" fn(
self_: *mut _cef_task_manager_t,
task_id: i64,
) -> ::std::os::raw::c_int,
>,
#[doc = "\n Returns the task ID associated with the main task for |browser_id| (value\n from cef_browser_t::GetIdentifier). Returns -1 if |browser_id| is invalid,\n does not currently have an associated task, or the function was called\n from the incorrect thread.\n"]
pub get_task_id_for_browser_id: ::std::option::Option<
unsafe extern "C" fn(
self_: *mut _cef_task_manager_t,
browser_id: ::std::os::raw::c_int,
) -> i64,
>,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of _cef_task_manager_t"][::std::mem::size_of::<_cef_task_manager_t>() - 80usize];
["Alignment of _cef_task_manager_t"][::std::mem::align_of::<_cef_task_manager_t>() - 8usize];
["Offset of field: _cef_task_manager_t::base"]
[::std::mem::offset_of!(_cef_task_manager_t, base) - 0usize];
["Offset of field: _cef_task_manager_t::get_tasks_count"]
[::std::mem::offset_of!(_cef_task_manager_t, get_tasks_count) - 40usize];
["Offset of field: _cef_task_manager_t::get_task_ids_list"]
[::std::mem::offset_of!(_cef_task_manager_t, get_task_ids_list) - 48usize];
["Offset of field: _cef_task_manager_t::get_task_info"]
[::std::mem::offset_of!(_cef_task_manager_t, get_task_info) - 56usize];
["Offset of field: _cef_task_manager_t::kill_task"]
[::std::mem::offset_of!(_cef_task_manager_t, kill_task) - 64usize];
["Offset of field: _cef_task_manager_t::get_task_id_for_browser_id"]
[::std::mem::offset_of!(_cef_task_manager_t, get_task_id_for_browser_id) - 72usize];
};
#[doc = "\n Structure that facilitates managing the browser-related tasks. The functions\n of this structure may only be called on the UI thread.\n\n NOTE: This struct is allocated DLL-side.\n"]
pub type cef_task_manager_t = _cef_task_manager_t;
unsafe extern "C" {
#[doc = "\n Returns the global task manager object. Returns nullptr if the function was\n called from the incorrect thread.\n"]
pub fn cef_task_manager_get() -> *mut cef_task_manager_t;
}
pub type pthread_t = __darwin_pthread_t;
pub type pid_t = __darwin_pid_t;
pub type cef_platform_thread_id_t = pid_t;

View File

@@ -14568,6 +14568,69 @@ unsafe extern "C" {
byte_size: usize,
) -> *mut cef_shared_process_message_builder_t;
}
#[doc = "\n Structure that facilitates managing the browser-related tasks. The functions\n of this structure may only be called on the UI thread.\n\n NOTE: This struct is allocated DLL-side.\n"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _cef_task_manager_t {
#[doc = "\n Base structure.\n"]
pub base: cef_base_ref_counted_t,
#[doc = "\n Returns the number of tasks currently tracked by the task manager. Returns\n 0 if the function was called from the incorrect thread.\n"]
pub get_tasks_count:
::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_task_manager_t) -> usize>,
#[doc = "\n Gets the list of task IDs currently tracked by the task manager. Tasks\n that share the same process id will always be consecutive. The list will\n be sorted in a way that reflects the process tree: the browser process\n will be first, followed by the gpu process if it exists. Related processes\n (e.g., a subframe process and its parent) will be kept together if\n possible. Callers can expect this ordering to be stable when a process is\n added or removed. The task IDs are unique within the application lifespan.\n Returns false (0) if the function was called from the incorrect thread.\n"]
pub get_task_ids_list: ::std::option::Option<
unsafe extern "C" fn(
self_: *mut _cef_task_manager_t,
task_idsCount: *mut usize,
task_ids: *mut i64,
) -> ::std::os::raw::c_int,
>,
#[doc = "\n Gets information about the task with |task_id|. Returns true (1) if the\n information about the task was successfully retrieved and false (0) if the\n |task_id| is invalid or the function was called from the incorrect thread.\n"]
pub get_task_info: ::std::option::Option<
unsafe extern "C" fn(
self_: *mut _cef_task_manager_t,
task_id: i64,
info: *mut _cef_task_info_t,
) -> ::std::os::raw::c_int,
>,
#[doc = "\n Attempts to terminate a task with |task_id|. Returns false (0) if the\n |task_id| is invalid, the call is made from an incorrect thread, or if the\n task cannot be terminated.\n"]
pub kill_task: ::std::option::Option<
unsafe extern "C" fn(
self_: *mut _cef_task_manager_t,
task_id: i64,
) -> ::std::os::raw::c_int,
>,
#[doc = "\n Returns the task ID associated with the main task for |browser_id| (value\n from cef_browser_t::GetIdentifier). Returns -1 if |browser_id| is invalid,\n does not currently have an associated task, or the function was called\n from the incorrect thread.\n"]
pub get_task_id_for_browser_id: ::std::option::Option<
unsafe extern "C" fn(
self_: *mut _cef_task_manager_t,
browser_id: ::std::os::raw::c_int,
) -> i64,
>,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of _cef_task_manager_t"][::std::mem::size_of::<_cef_task_manager_t>() - 80usize];
["Alignment of _cef_task_manager_t"][::std::mem::align_of::<_cef_task_manager_t>() - 8usize];
["Offset of field: _cef_task_manager_t::base"]
[::std::mem::offset_of!(_cef_task_manager_t, base) - 0usize];
["Offset of field: _cef_task_manager_t::get_tasks_count"]
[::std::mem::offset_of!(_cef_task_manager_t, get_tasks_count) - 40usize];
["Offset of field: _cef_task_manager_t::get_task_ids_list"]
[::std::mem::offset_of!(_cef_task_manager_t, get_task_ids_list) - 48usize];
["Offset of field: _cef_task_manager_t::get_task_info"]
[::std::mem::offset_of!(_cef_task_manager_t, get_task_info) - 56usize];
["Offset of field: _cef_task_manager_t::kill_task"]
[::std::mem::offset_of!(_cef_task_manager_t, kill_task) - 64usize];
["Offset of field: _cef_task_manager_t::get_task_id_for_browser_id"]
[::std::mem::offset_of!(_cef_task_manager_t, get_task_id_for_browser_id) - 72usize];
};
#[doc = "\n Structure that facilitates managing the browser-related tasks. The functions\n of this structure may only be called on the UI thread.\n\n NOTE: This struct is allocated DLL-side.\n"]
pub type cef_task_manager_t = _cef_task_manager_t;
unsafe extern "C" {
#[doc = "\n Returns the global task manager object. Returns nullptr if the function was\n called from the incorrect thread.\n"]
pub fn cef_task_manager_get() -> *mut cef_task_manager_t;
}
pub type cef_platform_thread_id_t = DWORD;
unsafe extern "C" {
#[doc = "\n Returns the current platform thread ID.\n"]

View File

@@ -14528,6 +14528,69 @@ unsafe extern "C" {
byte_size: usize,
) -> *mut cef_shared_process_message_builder_t;
}
#[doc = "\n Structure that facilitates managing the browser-related tasks. The functions\n of this structure may only be called on the UI thread.\n\n NOTE: This struct is allocated DLL-side.\n"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _cef_task_manager_t {
#[doc = "\n Base structure.\n"]
pub base: cef_base_ref_counted_t,
#[doc = "\n Returns the number of tasks currently tracked by the task manager. Returns\n 0 if the function was called from the incorrect thread.\n"]
pub get_tasks_count:
::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_task_manager_t) -> usize>,
#[doc = "\n Gets the list of task IDs currently tracked by the task manager. Tasks\n that share the same process id will always be consecutive. The list will\n be sorted in a way that reflects the process tree: the browser process\n will be first, followed by the gpu process if it exists. Related processes\n (e.g., a subframe process and its parent) will be kept together if\n possible. Callers can expect this ordering to be stable when a process is\n added or removed. The task IDs are unique within the application lifespan.\n Returns false (0) if the function was called from the incorrect thread.\n"]
pub get_task_ids_list: ::std::option::Option<
unsafe extern "C" fn(
self_: *mut _cef_task_manager_t,
task_idsCount: *mut usize,
task_ids: *mut i64,
) -> ::std::os::raw::c_int,
>,
#[doc = "\n Gets information about the task with |task_id|. Returns true (1) if the\n information about the task was successfully retrieved and false (0) if the\n |task_id| is invalid or the function was called from the incorrect thread.\n"]
pub get_task_info: ::std::option::Option<
unsafe extern "C" fn(
self_: *mut _cef_task_manager_t,
task_id: i64,
info: *mut _cef_task_info_t,
) -> ::std::os::raw::c_int,
>,
#[doc = "\n Attempts to terminate a task with |task_id|. Returns false (0) if the\n |task_id| is invalid, the call is made from an incorrect thread, or if the\n task cannot be terminated.\n"]
pub kill_task: ::std::option::Option<
unsafe extern "C" fn(
self_: *mut _cef_task_manager_t,
task_id: i64,
) -> ::std::os::raw::c_int,
>,
#[doc = "\n Returns the task ID associated with the main task for |browser_id| (value\n from cef_browser_t::GetIdentifier). Returns -1 if |browser_id| is invalid,\n does not currently have an associated task, or the function was called\n from the incorrect thread.\n"]
pub get_task_id_for_browser_id: ::std::option::Option<
unsafe extern "C" fn(
self_: *mut _cef_task_manager_t,
browser_id: ::std::os::raw::c_int,
) -> i64,
>,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of _cef_task_manager_t"][::std::mem::size_of::<_cef_task_manager_t>() - 80usize];
["Alignment of _cef_task_manager_t"][::std::mem::align_of::<_cef_task_manager_t>() - 8usize];
["Offset of field: _cef_task_manager_t::base"]
[::std::mem::offset_of!(_cef_task_manager_t, base) - 0usize];
["Offset of field: _cef_task_manager_t::get_tasks_count"]
[::std::mem::offset_of!(_cef_task_manager_t, get_tasks_count) - 40usize];
["Offset of field: _cef_task_manager_t::get_task_ids_list"]
[::std::mem::offset_of!(_cef_task_manager_t, get_task_ids_list) - 48usize];
["Offset of field: _cef_task_manager_t::get_task_info"]
[::std::mem::offset_of!(_cef_task_manager_t, get_task_info) - 56usize];
["Offset of field: _cef_task_manager_t::kill_task"]
[::std::mem::offset_of!(_cef_task_manager_t, kill_task) - 64usize];
["Offset of field: _cef_task_manager_t::get_task_id_for_browser_id"]
[::std::mem::offset_of!(_cef_task_manager_t, get_task_id_for_browser_id) - 72usize];
};
#[doc = "\n Structure that facilitates managing the browser-related tasks. The functions\n of this structure may only be called on the UI thread.\n\n NOTE: This struct is allocated DLL-side.\n"]
pub type cef_task_manager_t = _cef_task_manager_t;
unsafe extern "C" {
#[doc = "\n Returns the global task manager object. Returns nullptr if the function was\n called from the incorrect thread.\n"]
pub fn cef_task_manager_get() -> *mut cef_task_manager_t;
}
pub type pthread_t = ::std::os::raw::c_ulong;
pub type cef_platform_thread_id_t = pid_t;
unsafe extern "C" {

View File

@@ -77,7 +77,7 @@
#include "include/capi/cef_stream_capi.h"
#include "include/capi/cef_string_visitor_capi.h"
#include "include/capi/cef_task_capi.h"
// #include "include/capi/cef_task_manager_capi.h" NOTE: Not yet included because bindings generate incorrect out-parameter
#include "include/capi/cef_task_manager_capi.h"
#include "include/capi/cef_thread_capi.h"
#include "include/capi/cef_trace_capi.h"
#include "include/capi/cef_unresponsive_process_callback_capi.h"

View File

@@ -599,11 +599,18 @@ impl SignatureRef<'_> {
let arg_name = format_ident!("arg_{slice_name}");
let out_name = format_ident!("out_{slice_name}");
let vec_name = format_ident!("vec_{slice_name}");
let add_refs = if tree.root(&slice_ty.to_token_stream().to_string()) == BASE_REF_COUNTED {
Some(quote! { elem.add_ref(); })
let slice_ty = slice_ty.to_token_stream().to_string();
let get_elem = if tree.root(&slice_ty) == BASE_REF_COUNTED {
quote! {
elem.add_ref();
elem.get_raw()
}
} else if tree.cef_name_map.contains_key(&slice_ty) {
quote! { elem.get_raw() }
} else {
None
quote! { *elem }
};
match (count_modifiers.as_slice(), slice_modifiers.as_slice()) {
([], [TypeModifier::Slice]) => Some(quote! {
let #arg_count = #arg_name
@@ -615,8 +622,7 @@ impl SignatureRef<'_> {
.map(|arg| arg
.iter()
.map(|elem| {
#add_refs
elem.get_raw()
#get_elem
})
.collect::<Vec<_>>())
.unwrap_or_default();
@@ -638,8 +644,7 @@ impl SignatureRef<'_> {
.map(|elem| elem
.as_ref()
.map(|elem| {
#add_refs
elem.get_raw()
#get_elem
})
.unwrap_or(std::ptr::null_mut()))
.collect::<Vec<_>>())
@@ -662,8 +667,7 @@ impl SignatureRef<'_> {
.map(|arg| arg
.iter()
.map(|elem| {
#add_refs
elem.get_raw()
#get_elem
})
.collect::<Vec<_>>())
.unwrap_or_default();
@@ -687,8 +691,7 @@ impl SignatureRef<'_> {
.map(|elem| elem
.as_ref()
.map(|elem| {
#add_refs
elem.get_raw()
#get_elem
})
.unwrap_or(std::ptr::null_mut()))
.collect::<Vec<_>>())
@@ -3514,6 +3517,31 @@ fn make_my_struct() -> {rust_name} {{
})
}
});
let impl_raw_repr = e.ty.and_then(|ty| {
ty.attrs
.iter()
.find_map(|attr| match (attr.style, &attr.meta) {
(
syn::AttrStyle::Outer,
syn::Meta::List(syn::MetaList {
path,
delimiter: syn::MacroDelimiter::Paren(_),
tokens,
}),
) if path.to_token_stream().to_string() == quote! { repr }.to_string() => {
let repr = syn::parse2::<syn::Type>(tokens.clone()).ok()?;
Some(quote! {
impl #rust_name {
#[doc = "Get the raw integer representation."]
pub fn get_raw(&self) -> #repr {
self.0 as #repr
}
}
})
}
_ => None,
})
});
let impl_default =
e.ty.and_then(|ty| ty.variants.first())
.map(|v| {
@@ -3551,6 +3579,8 @@ fn make_my_struct() -> {rust_name} {{
#declare_values
#impl_raw_repr
impl Default for #rust_name {
fn default() -> Self {
#impl_default