mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
embedding: begin cef string_multimap api
cef_string_multimap_alloc()
This commit is contained in:
parent
64cc9ec688
commit
89fa3bb99a
3 changed files with 28 additions and 4 deletions
|
@ -52,6 +52,7 @@ pub mod request;
|
|||
pub mod string;
|
||||
pub mod string_list;
|
||||
pub mod string_map;
|
||||
pub mod string_multimap;
|
||||
pub mod task;
|
||||
pub mod types;
|
||||
pub mod urlrequest;
|
||||
|
|
22
ports/cef/string_multimap.rs
Normal file
22
ports/cef/string_multimap.rs
Normal file
|
@ -0,0 +1,22 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use eutil::slice_to_str;
|
||||
use libc::{c_int};
|
||||
use std::collections::TreeMap;
|
||||
use std::mem;
|
||||
use std::string::String;
|
||||
use string::{cef_string_userfree_utf8_alloc,cef_string_userfree_utf8_free,cef_string_utf8_set};
|
||||
use types::{cef_string_multimap_t,cef_string_t};
|
||||
|
||||
|
||||
//cef_string_multimap
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn cef_string_multimap_alloc() -> *mut cef_string_multimap_t {
|
||||
unsafe {
|
||||
let smm: Box<TreeMap<String, Vec<*mut cef_string_t>>> = box TreeMap::new();
|
||||
mem::transmute(smm)
|
||||
}
|
||||
}
|
|
@ -5,10 +5,11 @@
|
|||
use libc::{c_uint, c_ushort, c_int, c_double, size_t, c_void, c_longlong};
|
||||
use libc::types::os::arch::c95::wchar_t;
|
||||
|
||||
pub enum cef_string_map_t {}
|
||||
pub enum cef_string_list_t {}
|
||||
pub enum cef_text_input_context_t {}
|
||||
pub enum cef_event_handle_t {}
|
||||
pub type cef_string_map_t = c_void;
|
||||
pub type cef_string_multimap_t = c_void;
|
||||
pub type cef_string_list_t = c_void;
|
||||
pub type cef_text_input_context_t = c_void;
|
||||
pub type cef_event_handle_t = c_void;
|
||||
|
||||
//these all need to be done...
|
||||
pub enum cef_binary_value_val {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue