Example #1
0
 public void Dispose()
 {
     if (_self != null)
     {
         Release();
         _self = null;
     }
     GC.SuppressFinalize(this);
 }
Example #2
0
        public static int is_file(cef_drag_data_t *self)
        {
            is_file_delegate d;
            var p = self->_is_file;

            if (p == _p7)
            {
                d = _d7;
            }
            else
            {
                d = (is_file_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_file_delegate));
                if (_p7 == IntPtr.Zero)
                {
                    _d7 = d; _p7 = p;
                }
            }
            return(d(self));
        }
Example #3
0
        public static int is_fragment(cef_drag_data_t *self)
        {
            is_fragment_delegate d;
            var p = self->_is_fragment;

            if (p == _p6)
            {
                d = _d6;
            }
            else
            {
                d = (is_fragment_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_fragment_delegate));
                if (_p6 == IntPtr.Zero)
                {
                    _d6 = d; _p6 = p;
                }
            }
            return(d(self));
        }
Example #4
0
        public static void set_fragment_base_url(cef_drag_data_t *self, cef_string_t *base_url)
        {
            set_fragment_base_url_delegate d;
            var p = self->_set_fragment_base_url;

            if (p == _p16)
            {
                d = _d16;
            }
            else
            {
                d = (set_fragment_base_url_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_fragment_base_url_delegate));
                if (_p16 == IntPtr.Zero)
                {
                    _d16 = d; _p16 = p;
                }
            }
            d(self, base_url);
        }
Example #5
0
        public static void set_fragment_text(cef_drag_data_t *self, cef_string_t *text)
        {
            set_fragment_text_delegate d;
            var p = self->_set_fragment_text;

            if (p == _p14)
            {
                d = _d14;
            }
            else
            {
                d = (set_fragment_text_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_fragment_text_delegate));
                if (_p14 == IntPtr.Zero)
                {
                    _d14 = d; _p14 = p;
                }
            }
            d(self, text);
        }
Example #6
0
        public static void set_link_title(cef_drag_data_t *self, cef_string_t *title)
        {
            set_link_title_delegate d;
            var p = self->_set_link_title;

            if (p == _p12)
            {
                d = _d12;
            }
            else
            {
                d = (set_link_title_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_link_title_delegate));
                if (_p12 == IntPtr.Zero)
                {
                    _d12 = d; _p12 = p;
                }
            }
            d(self, title);
        }
Example #7
0
        public static int get_file_names(cef_drag_data_t *self, cef_string_list *names)
        {
            get_file_names_delegate d;
            var p = self->_get_file_names;

            if (p == _p10)
            {
                d = _d10;
            }
            else
            {
                d = (get_file_names_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_file_names_delegate));
                if (_p10 == IntPtr.Zero)
                {
                    _d10 = d; _p10 = p;
                }
            }
            return(d(self, names));
        }
Example #8
0
        public static cef_string_userfree *get_file_name(cef_drag_data_t *self)
        {
            get_file_name_delegate d;
            var p = self->_get_file_name;

            if (p == _pe)
            {
                d = _de;
            }
            else
            {
                d = (get_file_name_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_file_name_delegate));
                if (_pe == IntPtr.Zero)
                {
                    _de = d; _pe = p;
                }
            }
            return(d(self));
        }
Example #9
0
        public static void add_ref(cef_drag_data_t *self)
        {
            add_ref_delegate d;
            var p = self->_base._add_ref;

            if (p == _p0)
            {
                d = _d0;
            }
            else
            {
                d = (add_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(add_ref_delegate));
                if (_p0 == IntPtr.Zero)
                {
                    _d0 = d; _p0 = p;
                }
            }
            d(self);
        }
Example #10
0
        public static int has_image(cef_drag_data_t *self)
        {
            has_image_delegate d;
            var p = self->_has_image;

            if (p == _p1b)
            {
                d = _d1b;
            }
            else
            {
                d = (has_image_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_image_delegate));
                if (_p1b == IntPtr.Zero)
                {
                    _d1b = d; _p1b = p;
                }
            }
            return(d(self));
        }
Example #11
0
        public static cef_point_t get_image_hotspot(cef_drag_data_t *self)
        {
            get_image_hotspot_delegate d;
            var p = self->_get_image_hotspot;

            if (p == _p1a)
            {
                d = _d1a;
            }
            else
            {
                d = (get_image_hotspot_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_image_hotspot_delegate));
                if (_p1a == IntPtr.Zero)
                {
                    _d1a = d; _p1a = p;
                }
            }
            return(d(self));
        }
Example #12
0
        public static cef_image_t *get_image(cef_drag_data_t *self)
        {
            get_image_delegate d;
            var p = self->_get_image;

            if (p == _p19)
            {
                d = _d19;
            }
            else
            {
                d = (get_image_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_image_delegate));
                if (_p19 == IntPtr.Zero)
                {
                    _d19 = d; _p19 = p;
                }
            }
            return(d(self));
        }
Example #13
0
        public static void add_file(cef_drag_data_t *self, cef_string_t *path, cef_string_t *display_name)
        {
            add_file_delegate d;
            var p = self->_add_file;

            if (p == _p18)
            {
                d = _d18;
            }
            else
            {
                d = (add_file_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(add_file_delegate));
                if (_p18 == IntPtr.Zero)
                {
                    _d18 = d; _p18 = p;
                }
            }
            d(self, path, display_name);
        }
Example #14
0
        public static cef_string_userfree *get_link_metadata(cef_drag_data_t *self)
        {
            get_link_metadata_delegate d;
            var p = self->_get_link_metadata;

            if (p == _pa)
            {
                d = _da;
            }
            else
            {
                d = (get_link_metadata_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_link_metadata_delegate));
                if (_pa == IntPtr.Zero)
                {
                    _da = d; _pa = p;
                }
            }
            return(d(self));
        }
Example #15
0
        public static int release(cef_drag_data_t *self)
        {
            release_delegate d;
            var p = self->_base._release;

            if (p == _p1)
            {
                d = _d1;
            }
            else
            {
                d = (release_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(release_delegate));
                if (_p1 == IntPtr.Zero)
                {
                    _d1 = d; _p1 = p;
                }
            }
            return(d(self));
        }
Example #16
0
        public static void reset_file_contents(cef_drag_data_t *self)
        {
            reset_file_contents_delegate d;
            var p = self->_reset_file_contents;

            if (p == _p17)
            {
                d = _d17;
            }
            else
            {
                d = (reset_file_contents_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(reset_file_contents_delegate));
                if (_p17 == IntPtr.Zero)
                {
                    _d17 = d; _p17 = p;
                }
            }
            d(self);
        }
Example #17
0
        public static int has_one_ref(cef_drag_data_t *self)
        {
            has_one_ref_delegate d;
            var p = self->_base._has_one_ref;

            if (p == _p2)
            {
                d = _d2;
            }
            else
            {
                d = (has_one_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_one_ref_delegate));
                if (_p2 == IntPtr.Zero)
                {
                    _d2 = d; _p2 = p;
                }
            }
            return(d(self));
        }
Example #18
0
        public static UIntPtr get_file_contents(cef_drag_data_t *self, cef_stream_writer_t *writer)
        {
            get_file_contents_delegate d;
            var p = self->_get_file_contents;

            if (p == _pf)
            {
                d = _df;
            }
            else
            {
                d = (get_file_contents_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_file_contents_delegate));
                if (_pf == IntPtr.Zero)
                {
                    _df = d; _pf = p;
                }
            }
            return(d(self, writer));
        }
Example #19
0
        public static cef_drag_data_t *clone(cef_drag_data_t *self)
        {
            clone_delegate d;
            var            p = self->_clone;

            if (p == _p3)
            {
                d = _d3;
            }
            else
            {
                d = (clone_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(clone_delegate));
                if (_p3 == IntPtr.Zero)
                {
                    _d3 = d; _p3 = p;
                }
            }
            return(d(self));
        }
Example #20
0
        public static void set_link_url(cef_drag_data_t *self, cef_string_t *url)
        {
            set_link_url_delegate d;
            var p = self->_set_link_url;

            if (p == _p11)
            {
                d = _d11;
            }
            else
            {
                d = (set_link_url_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_link_url_delegate));
                if (_p11 == IntPtr.Zero)
                {
                    _d11 = d; _p11 = p;
                }
            }
            d(self, url);
        }
Example #21
0
        public static int is_read_only(cef_drag_data_t *self)
        {
            is_read_only_delegate d;
            var p = self->_is_read_only;

            if (p == _p4)
            {
                d = _d4;
            }
            else
            {
                d = (is_read_only_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_read_only_delegate));
                if (_p4 == IntPtr.Zero)
                {
                    _d4 = d; _p4 = p;
                }
            }
            return(d(self));
        }
Example #22
0
        public static void set_link_metadata(cef_drag_data_t *self, cef_string_t *data)
        {
            set_link_metadata_delegate d;
            var p = self->_set_link_metadata;

            if (p == _p13)
            {
                d = _d13;
            }
            else
            {
                d = (set_link_metadata_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_link_metadata_delegate));
                if (_p13 == IntPtr.Zero)
                {
                    _d13 = d; _p13 = p;
                }
            }
            d(self, data);
        }
Example #23
0
        public static int is_link(cef_drag_data_t *self)
        {
            is_link_delegate d;
            var p = self->_is_link;

            if (p == _p5)
            {
                d = _d5;
            }
            else
            {
                d = (is_link_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_link_delegate));
                if (_p5 == IntPtr.Zero)
                {
                    _d5 = d; _p5 = p;
                }
            }
            return(d(self));
        }
Example #24
0
        public static void set_fragment_html(cef_drag_data_t *self, cef_string_t *html)
        {
            set_fragment_html_delegate d;
            var p = self->_set_fragment_html;

            if (p == _p15)
            {
                d = _d15;
            }
            else
            {
                d = (set_fragment_html_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_fragment_html_delegate));
                if (_p15 == IntPtr.Zero)
                {
                    _d15 = d; _p15 = p;
                }
            }
            d(self, html);
        }
Example #25
0
        public static cef_string_userfree *get_fragment_base_url(cef_drag_data_t *self)
        {
            get_fragment_base_url_delegate d;
            var p = self->_get_fragment_base_url;

            if (p == _pd)
            {
                d = _dd;
            }
            else
            {
                d = (get_fragment_base_url_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_fragment_base_url_delegate));
                if (_pd == IntPtr.Zero)
                {
                    _dd = d; _pd = p;
                }
            }
            return(d(self));
        }
        public static void drag_target_drag_enter(cef_browser_host_t *self, cef_drag_data_t *drag_data, cef_mouse_event_t * @event, CefDragOperationsMask allowed_ops)
        {
            drag_target_drag_enter_delegate d;
            var p = self->_drag_target_drag_enter;

            if (p == _p24)
            {
                d = _d24;
            }
            else
            {
                d = (drag_target_drag_enter_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(drag_target_drag_enter_delegate));
                if (_p24 == IntPtr.Zero)
                {
                    _d24 = d; _p24 = p;
                }
            }
            d(self, drag_data, @event, allowed_ops);
        }
        /// <summary>
        /// Called when the browser's cursor has changed. If |type| is CT_CUSTOM then
        /// |custom_cursor_info| will be populated with the custom cursor information.
        /// </summary>
        // protected abstract void OnCursorChange(cef_browser_t* browser, IntPtr cursor, CefCursorType type, cef_cursor_info_t* custom_cursor_info);

        private int start_dragging(cef_render_handler_t *self, cef_browser_t *browser, cef_drag_data_t *drag_data, CefDragOperationsMask allowed_ops, int x, int y)
        {
            CheckSelf(self);
            throw new NotImplementedException(); // TODO: CefRenderHandler.StartDragging
        }
Example #28
0
        private int start_dragging(cef_render_handler_t *self, cef_browser_t *browser, cef_drag_data_t *drag_data, CefDragOperationsMask allowed_ops, int x, int y)
        {
            CheckSelf(self);

            var m_browser  = CefBrowser.FromNative(browser);
            var m_dragData = CefDragData.FromNative(drag_data);

            var m_result = StartDragging(m_browser, m_dragData, allowed_ops, x, y);

            return(m_result ? 1 : 0);
        }
Example #29
0
 public unsafe extern int StartDragging(cef_browser_t *browser, cef_drag_data_t *drag_data, CefDragOperationsMask allowed_ops, int x, int y);
Example #30
0
 internal static CefDragData FromNative(cef_drag_data_t *ptr)
 {
     return(new CefDragData(ptr));
 }
Example #31
0
 public CefDragData(cef_drag_data_t *instance)
     : base((cef_base_ref_counted_t *)instance)
 {
 }
Example #32
0
 private CefDragData(cef_drag_data_t* ptr)
 {
     if (ptr == null) throw new ArgumentNullException("ptr");
     _self = ptr;
 }