Exemplo n.º 1
0
        public static Dictionary<string, string> ToDictionary(cef_string_map* map)
        {
            if (map == null) return null;

            var result = new Dictionary<string, string>();
            var count = libcef.string_map_size(map);
            if (count == 0) return result;

            cef_string_t n_value = new cef_string_t();

            for (var i = 0; i < count; i++)
            {
                libcef.string_map_key(map, i, &n_value);   // FIXME: do not ignore return value of libcef.string_map_key
                var key = cef_string_t.ToString(&n_value);
                libcef.string_map_value(map, i, &n_value); // FIXME: do not ignore return value of libcef.string_map_value
                var value = cef_string_t.ToString(&n_value);
                result.Add(key, value);
            }

            libcef.string_clear(&n_value);

            return result;
        }
Exemplo n.º 2
0
 public static void get_element_attributes(cef_domnode_t* self, cef_string_map* attrMap)
 {
     get_element_attributes_delegate d;
     var p = self->_get_element_attributes;
     if (p == _p19) { d = _d19; }
     else
     {
         d = (get_element_attributes_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_element_attributes_delegate));
         if (_p19 == IntPtr.Zero) { _d19 = d; _p19 = p; }
     }
     d(self, attrMap);
 }
Exemplo n.º 3
0
 public static extern void string_map_clear(cef_string_map* map);
Exemplo n.º 4
0
 public static extern void string_map_free(cef_string_map* map);
Exemplo n.º 5
0
 public static extern int string_map_append(cef_string_map* map, cef_string_t* key, cef_string_t* value);
Exemplo n.º 6
0
 public static extern int string_map_value(cef_string_map* map, int index, cef_string_t* value);
Exemplo n.º 7
0
 public static extern int string_map_key(cef_string_map* map, int index, cef_string_t* key);
Exemplo n.º 8
0
 public static extern int string_map_size(cef_string_map* map);
Exemplo n.º 9
0
 public static void get_switches(cef_command_line_t* self, cef_string_map* switches)
 {
     get_switches_delegate d;
     var p = self->_get_switches;
     if (p == _p10) { d = _d10; }
     else
     {
         d = (get_switches_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_switches_delegate));
         if (_p10 == IntPtr.Zero) { _d10 = d; _p10 = p; }
     }
     d(self, switches);
 }