public unsafe int GetDataResourceForScale(int resource_id, CefScaleFactor scale_factor, void **data, UIntPtr *data_size)
 {
     fixed(cef_resource_bundle_handler_t *self = &this)
     {
         return(((delegate * unmanaged[Stdcall] < cef_resource_bundle_handler_t *, int, CefScaleFactor, void **, UIntPtr *, int >)get_data_resource_for_scale)(self, resource_id, scale_factor, data, data_size));
     }
 }
 public unsafe cef_binary_value_t *GetDataResourceForScale(int resource_id, CefScaleFactor scale_factor)
 {
     fixed(cef_resource_bundle_t *self = &this)
     {
         return(((delegate * unmanaged[Stdcall] < cef_resource_bundle_t *, int, CefScaleFactor, cef_binary_value_t * >)get_data_resource_for_scale)(self, resource_id, scale_factor));
     }
 }
Exemple #3
0
        /// <summary>
        /// Retrieves the contents of the specified |resource_id| nearest the scale
        /// factor |scale_factor|. Use a |scale_factor| value of SCALE_FACTOR_NONE for
        /// scale independent resources or call GetDataResource instead. If the value
        /// is found then |data| and |data_size| will be populated and this function
        /// will return true (1). If the value is not found then this function will
        /// return false (0). The returned |data| pointer will remain resident in
        /// memory and should not be freed. Include cef_pack_resources.h for a listing
        /// of valid resource ID values.
        /// </summary>
        public unsafe virtual bool GetDataResourceForScale(int resourceId, CefScaleFactor scaleFactor, ref IntPtr data, ref long dataSize)
        {
            fixed(IntPtr *p2 = &data)
            {
                UIntPtr c3 = new UIntPtr((ulong)dataSize);
                var     rv = NativeInstance->GetDataResourceForScale(resourceId, scaleFactor, (void **)p2, &c3) != 0;

                dataSize = (long)c3;
                GC.KeepAlive(this);
                return(rv);
            }
        }
Exemple #4
0
        /// <summary>
        /// Retrieves the contents of the specified |resource_id| nearest the scale
        /// factor |scale_factor|. Use a |scale_factor| value of SCALE_FACTOR_NONE for
        /// scale independent resources or call GetDataResource instead. If the value
        /// is found then |data| and |data_size| will be populated and this method will
        /// return true. If the value is not found then this method will return false.
        /// The returned |data| pointer will remain resident in memory and should not
        /// be freed. Include cef_pack_resources.h for a listing of valid resource ID
        /// values.
        /// </summary>
        public bool GetDataResourceForScale(int resourceId, CefScaleFactor scaleFactor, out void *data, out UIntPtr dataSize)
        {
            void *  n_data;
            UIntPtr n_dataSize;
            var     n_result = cef_resource_bundle_t.get_data_resource_for_scale(_self, resourceId, scaleFactor, &n_data, &n_dataSize);

            if (n_result != 0)
            {
                data     = n_data;
                dataSize = n_dataSize;
                return(true);
            }
            else
            {
                data     = null;
                dataSize = UIntPtr.Zero;
                return(false);
            }
        }
Exemple #5
0
 /// <summary>
 /// Returns a cef_binary_value_t containing the decompressed contents of the
 /// specified |resource_id| nearest the scale factor |scale_factor| or NULL if
 /// not found. Use a |scale_factor| value of SCALE_FACTOR_NONE for scale
 /// independent resources or call GetDataResource instead.Include
 /// cef_pack_resources.h for a listing of valid resource ID values.
 /// </summary>
 public unsafe virtual CefBinaryValue GetDataResourceForScale(int resourceId, CefScaleFactor scaleFactor)
 {
     return(SafeCall(CefBinaryValue.Wrap(CefBinaryValue.Create, NativeInstance->GetDataResourceForScale(resourceId, scaleFactor))));
 }
Exemple #6
0
 public unsafe extern int GetDataResourceForScale(int resource_id, CefScaleFactor scale_factor, void **data, UIntPtr *data_size);
Exemple #7
0
        public static int get_data_resource_for_scale(cef_resource_bundle_t *self, int resource_id, CefScaleFactor scale_factor, void **data, UIntPtr *data_size)
        {
            get_data_resource_for_scale_delegate d;
            var p = self->_get_data_resource_for_scale;

            if (p == _p5)
            {
                d = _d5;
            }
            else
            {
                d = (get_data_resource_for_scale_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_data_resource_for_scale_delegate));
                if (_p5 == IntPtr.Zero)
                {
                    _d5 = d; _p5 = p;
                }
            }
            return(d(self, resource_id, scale_factor, data, data_size));
        }
 /// <summary>
 /// Called to retrieve data for the specified |resource_id| nearest the scale
 /// factor |scale_factor|. To provide the resource data set |data| and
 /// |data_size| to the data pointer and size respectively and return true. To
 /// use the default resource data return false. The resource data will not be
 /// copied and must remain resident in memory. Include cef_pack_resources.h for
 /// a listing of valid resource ID values.
 /// </summary>
 protected virtual bool GetDataResourceForScale(int resource_id, CefScaleFactor scaleFactor, void **data, UIntPtr *data_size)
 {
     return(false);
 }
        private int get_data_resource_for_scale(cef_resource_bundle_handler_t *self, int resource_id, CefScaleFactor scale_factor, void **data, UIntPtr *data_size)
        {
            CheckSelf(self);

            var result = GetDataResourceForScale(resource_id, scale_factor, data, data_size);

            return(result ? 1 : 0);
        }
 /// <summary>
 /// Returns a CefBinaryValue containing the decompressed contents of the
 /// specified |resource_id| nearest the scale factor |scale_factor| or NULL if
 /// not found. Use a |scale_factor| value of SCALE_FACTOR_NONE for scale
 /// independent resources or call GetDataResource instead.Include
 /// cef_pack_resources.h for a listing of valid resource ID values.
 /// </summary>
 public CefBinaryValue GetDataResourceForScale(int resource_id, CefScaleFactor scale_factor)
 {
     return(CefBinaryValue.FromNativeOrNull(
                cef_resource_bundle_t.get_data_resource_for_scale(_self, resource_id, scale_factor)
                ));
 }
Exemple #11
0
 public unsafe extern cef_binary_value_t *GetDataResourceForScale(int resource_id, CefScaleFactor scale_factor);
Exemple #12
0
        public static cef_binary_value_t *get_data_resource_for_scale(cef_resource_bundle_t *self, int resource_id, CefScaleFactor scale_factor)
        {
            get_data_resource_for_scale_delegate d;
            var p = self->_get_data_resource_for_scale;

            if (p == _p6)
            {
                d = _d6;
            }
            else
            {
                d = (get_data_resource_for_scale_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_data_resource_for_scale_delegate));
                if (_p6 == IntPtr.Zero)
                {
                    _d6 = d; _p6 = p;
                }
            }
            return(d(self, resource_id, scale_factor));
        }
 protected internal unsafe override bool GetDataResourceForScale(int resourceId, CefScaleFactor scaleFactor, ref IntPtr data, ref long dataSize)
 {
     return(_implementation.GetDataResourceForScale(resourceId, scaleFactor, ref data, ref dataSize));
 }
        private int get_data_resource_for_scale(cef_resource_bundle_handler_t *self, int resource_id, CefScaleFactor scale_factor, void **data, UIntPtr *data_size)
        {
            CheckSelf(self);

            void *  mData;
            UIntPtr mDataSize;
            var     result = GetDataResourceForScale(resource_id, scale_factor, out mData, out mDataSize);

            if (result)
            {
                *data      = mData;
                *data_size = mDataSize;
                return(1);
            }
            else
            {
                return(0);
            }
        }
 /// <summary>
 /// Called to retrieve data for the specified |resource_id| nearest the scale
 /// factor |scale_factor|. To provide the resource data set |data| and
 /// |data_size| to the data pointer and size respectively and return true. To
 /// use the default resource data return false. The resource data will not be
 /// copied and must remain resident in memory. Include cef_pack_resources.h for
 /// a listing of valid resource ID values.
 /// </summary>
 protected virtual bool GetDataResourceForScale(int resourceId, CefScaleFactor scaleFactor, out void *data, out UIntPtr dataSize)
 {
     data     = null;
     dataSize = UIntPtr.Zero;
     return(false);
 }