Ejemplo n.º 1
0
        /// <summary>
        /// Sets the value at the specified key as type list. Returns true (1) if the
        /// value was set successfully. If |value| is currently owned by another object
        /// then the value will be copied and the |value| reference will not change.
        /// Otherwise, ownership will be transferred to this object and the |value|
        /// reference will be invalidated.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_values_capi.h">cef/include/capi/cef_values_capi.h</see>.
        /// </remarks>
        public bool SetList(string key, CfxListValue value)
        {
            var key_pinned = new PinnedString(key);
            var __retval   = CfxApi.DictionaryValue.cfx_dictionary_value_set_list(NativePtr, key_pinned.Obj.PinnedPtr, key_pinned.Length, CfxListValue.Unwrap(value));

            key_pinned.Obj.Free();
            return(0 != __retval);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Returns the value at the specified key as type list. The returned value
        /// will reference existing data and modifications to the value will modify
        /// this object.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_values_capi.h">cef/include/capi/cef_values_capi.h</see>.
        /// </remarks>
        public CfxListValue GetList(string key)
        {
            var key_pinned = new PinnedString(key);
            var __retval   = CfxApi.DictionaryValue.cfx_dictionary_value_get_list(NativePtr, key_pinned.Obj.PinnedPtr, key_pinned.Length);

            key_pinned.Obj.Free();
            return(CfxListValue.Wrap(__retval));
        }
Ejemplo n.º 3
0
 internal static CfxListValue Wrap(IntPtr nativePtr)
 {
     if (nativePtr == IntPtr.Zero)
     {
         return(null);
     }
     lock (weakCache) {
         var wrapper = (CfxListValue)weakCache.Get(nativePtr);
         if (wrapper == null)
         {
             wrapper = new CfxListValue(nativePtr);
             weakCache.Add(wrapper);
         }
         else
         {
             CfxApi.cfx_release(nativePtr);
         }
         return(wrapper);
     }
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Returns true (1) if this object and |that| object have the same underlying
 /// data. If true (1) modifications to this object will also affect |that|
 /// object and vice-versa.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_values_capi.h">cef/include/capi/cef_values_capi.h</see>.
 /// </remarks>
 public bool IsSame(CfxListValue that)
 {
     return 0 != CfxApi.cfx_list_value_is_same(NativePtr, CfxListValue.Unwrap(that));
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Returns true (1) if this object and |that| object have an equivalent
 /// underlying value but are not necessarily the same object.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_values_capi.h">cef/include/capi/cef_values_capi.h</see>.
 /// </remarks>
 public bool IsEqual(CfxListValue that)
 {
     return 0 != CfxApi.cfx_list_value_is_equal(NativePtr, CfxListValue.Unwrap(that));
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Creates a new object that is not owned by any other object.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_values_capi.h">cef/include/capi/cef_values_capi.h</see>.
 /// </remarks>
 public static CfxListValue Create()
 {
     return(CfxListValue.Wrap(CfxApi.cfx_list_value_create()));
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Sets the value at the specified index as type list. Returns true (1) if the
 /// value was set successfully. If |value| is currently owned by another object
 /// then the value will be copied and the |value| reference will not change.
 /// Otherwise, ownership will be transferred to this object and the |value|
 /// reference will be invalidated.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_values_capi.h">cef/include/capi/cef_values_capi.h</see>.
 /// </remarks>
 public bool SetList(int index, CfxListValue value)
 {
     return(0 != CfxApi.cfx_list_value_set_list(NativePtr, index, CfxListValue.Unwrap(value)));
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Returns the value at the specified index as type list. The returned value
 /// will reference existing data and modifications to the value will modify
 /// this object.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_values_capi.h">cef/include/capi/cef_values_capi.h</see>.
 /// </remarks>
 public CfxListValue GetList(int index)
 {
     return(CfxListValue.Wrap(CfxApi.cfx_list_value_get_list(NativePtr, index)));
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Returns the value at the specified index as type list. The returned value
 /// will reference existing data and modifications to the value will modify
 /// this object.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_values_capi.h">cef/include/capi/cef_values_capi.h</see>.
 /// </remarks>
 public CfxListValue GetList(ulong index)
 {
     return(CfxListValue.Wrap(CfxApi.ListValue.cfx_list_value_get_list(NativePtr, (UIntPtr)index)));
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Returns true (1) if this object and |that| object have an equivalent
 /// underlying value but are not necessarily the same object.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_values_capi.h">cef/include/capi/cef_values_capi.h</see>.
 /// </remarks>
 public bool IsEqual(CfxListValue that)
 {
     return(0 != CfxApi.cfx_list_value_is_equal(NativePtr, CfxListValue.Unwrap(that)));
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Returns true (1) if this object and |that| object have the same underlying
 /// data. If true (1) modifications to this object will also affect |that|
 /// object and vice-versa.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_values_capi.h">cef/include/capi/cef_values_capi.h</see>.
 /// </remarks>
 public bool IsSame(CfxListValue that)
 {
     return(0 != CfxApi.cfx_list_value_is_same(NativePtr, CfxListValue.Unwrap(that)));
 }
Ejemplo n.º 12
0
 /// <summary>
 /// Sets the underlying value as type list. Returns true (1) if the value was
 /// set successfully. This object keeps a reference to |value| and ownership of
 /// the underlying data remains unchanged.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_values_capi.h">cef/include/capi/cef_values_capi.h</see>.
 /// </remarks>
 public bool SetList(CfxListValue value)
 {
     return(0 != CfxApi.Value.cfx_value_set_list(NativePtr, CfxListValue.Unwrap(value)));
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Sets the value at the specified index as type list. Returns true (1) if the
 /// value was set successfully. If |value| is currently owned by another object
 /// then the value will be copied and the |value| reference will not change.
 /// Otherwise, ownership will be transferred to this object and the |value|
 /// reference will be invalidated.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_values_capi.h">cef/include/capi/cef_values_capi.h</see>.
 /// </remarks>
 public bool SetList(ulong index, CfxListValue value)
 {
     return(0 != CfxApi.ListValue.cfx_list_value_set_list(NativePtr, (UIntPtr)index, CfxListValue.Unwrap(value)));
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Sets the value at the specified index as type list. Returns true (1) if the
 /// value was set successfully. If |value| is currently owned by another object
 /// then the value will be copied and the |value| reference will not change.
 /// Otherwise, ownership will be transferred to this object and the |value|
 /// reference will be invalidated.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_values_capi.h">cef/include/capi/cef_values_capi.h</see>.
 /// </remarks>
 public bool SetList(int index, CfxListValue value)
 {
     return 0 != CfxApi.cfx_list_value_set_list(NativePtr, index, CfxListValue.Unwrap(value));
 }
Ejemplo n.º 15
0
 /// <summary>
 /// Returns a writable copy of this object.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_values_capi.h">cef/include/capi/cef_values_capi.h</see>.
 /// </remarks>
 public CfxListValue Copy()
 {
     return(CfxListValue.Wrap(CfxApi.cfx_list_value_copy(NativePtr)));
 }
Ejemplo n.º 16
0
 internal static CfxListValue Wrap(IntPtr nativePtr)
 {
     if(nativePtr == IntPtr.Zero) return null;
     lock(weakCache) {
         var wrapper = (CfxListValue)weakCache.Get(nativePtr);
         if(wrapper == null) {
             wrapper = new CfxListValue(nativePtr);
             weakCache.Add(wrapper);
         } else {
             CfxApi.cfx_release(nativePtr);
         }
         return wrapper;
     }
 }
Ejemplo n.º 17
0
 /// <summary>
 /// Sets the value at the specified key as type list. Returns true (1) if the
 /// value was set successfully. If |value| is currently owned by another object
 /// then the value will be copied and the |value| reference will not change.
 /// Otherwise, ownership will be transferred to this object and the |value|
 /// reference will be invalidated.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_values_capi.h">cef/include/capi/cef_values_capi.h</see>.
 /// </remarks>
 public bool SetList(string key, CfxListValue value)
 {
     var key_pinned = new PinnedString(key);
     var __retval = CfxApi.cfx_dictionary_value_set_list(NativePtr, key_pinned.Obj.PinnedPtr, key_pinned.Length, CfxListValue.Unwrap(value));
     key_pinned.Obj.Free();
     return 0 != __retval;
 }