private CefFileDialogCallback(cef_file_dialog_callback_t *ptr) { if (ptr == null) { throw new ArgumentNullException("ptr"); } _self = ptr; }
internal static CefFileDialogCallback FromNativeOrNull(cef_file_dialog_callback_t *ptr) { if (ptr == null) { return(null); } return(new CefFileDialogCallback(ptr)); }
public void Dispose() { if (_self != null) { Release(); _self = null; } GC.SuppressFinalize(this); }
public static int release(cef_file_dialog_callback_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)); }
public static void add_ref(cef_file_dialog_callback_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); }
public static void cancel(cef_file_dialog_callback_t *self) { cancel_delegate d; var p = self->_cancel; if (p == _p4) { d = _d4; } else { d = (cancel_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(cancel_delegate)); if (_p4 == IntPtr.Zero) { _d4 = d; _p4 = p; } } d(self); }
public static void cont(cef_file_dialog_callback_t *self, int selected_accept_filter, cef_string_list *file_paths) { cont_delegate d; var p = self->_cont; if (p == _p3) { d = _d3; } else { d = (cont_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(cont_delegate)); if (_p3 == IntPtr.Zero) { _d3 = d; _p3 = p; } } d(self, selected_accept_filter, file_paths); }
public static int has_one_ref(cef_file_dialog_callback_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)); }
private int on_file_dialog(cef_dialog_handler_t *self, cef_browser_t *browser, CefFileDialogMode mode, cef_string_t *title, cef_string_t *default_file_name, cef_string_list *accept_types, cef_file_dialog_callback_t *callback) { CheckSelf(self); var mBrowser = CefBrowser.FromNative(browser); var mTitle = cef_string_t.ToString(title); var mDefaultFileName = cef_string_t.ToString(default_file_name); var mAcceptTypes = cef_string_list.ToArray(accept_types); var mCallback = CefFileDialogCallback.FromNative(callback); var result = OnFileDialog(mBrowser, mode, mTitle, mDefaultFileName, mAcceptTypes, mCallback); return(result ? 1 : 0); }
public CefFileDialogCallback(cef_file_dialog_callback_t *instance) : base((cef_base_ref_counted_t *)instance) { }
internal static CefFileDialogCallback FromNative(cef_file_dialog_callback_t *ptr) { return(new CefFileDialogCallback(ptr)); }
private CefFileDialogCallback(cef_file_dialog_callback_t* ptr) { if (ptr == null) throw new ArgumentNullException("ptr"); _self = ptr; }
public unsafe extern int OnFileDialog(cef_browser_t *browser, CefFileDialogMode mode, [Immutable] cef_string_t *title, [Immutable] cef_string_t *default_file_path, cef_string_list_t accept_filters, int selected_accept_filter, cef_file_dialog_callback_t *callback);
private int on_file_dialog(cef_dialog_handler_t *self, cef_browser_t *browser, CefFileDialogMode mode, cef_string_t *title, cef_string_t *default_file_path, cef_string_list *accept_filters, int selected_accept_filter, cef_file_dialog_callback_t *callback) { CheckSelf(self); throw new NotImplementedException(); // TODO: CefDialogHandler.OnFileDialog }
public unsafe int OnFileDialog(cef_browser_t *browser, CefFileDialogMode mode, [Immutable] cef_string_t *title, [Immutable] cef_string_t *default_file_path, cef_string_list_t accept_filters, int selected_accept_filter, cef_file_dialog_callback_t *callback) { fixed(cef_dialog_handler_t *self = &this) { return(((delegate * unmanaged[Stdcall] < cef_dialog_handler_t *, cef_browser_t *, CefFileDialogMode, cef_string_t *, cef_string_t *, cef_string_list_t, int, cef_file_dialog_callback_t *, int >)on_file_dialog)(self, browser, mode, title, default_file_path, accept_filters, selected_accept_filter, callback)); } }