Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. extern "C" fn file_dialog_dismissed(self_: *mut cef_run_file_dialog_callback_t, selected_accept_filter: ::std::os::raw::c_int, file_paths: cef_string_list_t) {
  2. //let this = std::mem::ManuallyDrop::into_inner(unsafe { <cef_run_file_dialog_callback_t as RefCounter>::Wrapper::make_temp(self_) });
  3. let this = make_fn_once();
  4. let files = if file_paths.is_null() {
  5. None
  6. } else {
  7. Some(from_string_list(file_paths))
  8. };
  9.  
  10. this(selected_accept_filter as usize, files);
  11. }
  12.  
  13. fn make_fn_once() -> Box<dyn FnOnce(usize, Option<Vec<std::path::PathBuf>>)> {
  14. Box::new(|a, b| {})
  15. }
  16.  
  17. type cef_run_file_dialog_callback_t = *const std::ffi::c_void;
  18. type cef_string_list_t = *const std::ffi::c_void;
  19.  
  20. fn from_string_list(list: cef_string_list_t) -> Vec<std::path::PathBuf> {
  21. Vec::new()
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement