Exemplo n.º 1
0
 /// <summary>
 /// Returns true if this Image and |that| Image share the same underlying
 /// storage. Will also return true if both images are empty.
 /// </summary>
 public bool IsSame(CefImage that)
 {
     if (that == null)
     {
         return(false);
     }
     return(cef_image_t.is_same(_self, that.ToNative()) != 0);
 }
        private void on_download_image_finished(cef_download_image_callback_t *self, cef_string_t *image_url, int http_status_code, cef_image_t *image)
        {
            CheckSelf(self);

            var m_imageUrl = cef_string_t.ToString(image_url);
            var m_image    = CefImage.FromNativeOrNull(image);

            OnDownloadImageFinished(m_imageUrl, http_status_code, m_image);
        }
        /// <summary>
        /// Get the image representation of drag data. May return NULL if no image
        /// representation is available.
        /// </summary>
        public CefImage GetImage()
        {
            var result = cef_drag_data_t.get_image(_self);

            return(CefImage.FromNativeOrNull(result));
        }
Exemplo n.º 4
0
 /// <summary>
 /// Create a new CefImage. It will initially be empty. Use the Add*() methods
 /// to add representations at different scale factors.
 /// </summary>
 public static CefImage CreateImage()
 {
     return(CefImage.FromNative(
                cef_image_t.create()
                ));
 }
 /// <summary>
 /// Method that will be executed when the image download has completed.
 /// |image_url| is the URL that was downloaded and |http_status_code| is the
 /// resulting HTTP status code. |image| is the resulting image, possibly at
 /// multiple scale factors, or empty if the download failed.
 /// </summary>
 protected abstract void OnDownloadImageFinished(string imageUrl, int httpStatusCode, CefImage image);