public static int is_canceled(cef_download_item_t *self) { is_canceled_delegate d; var p = self->_is_canceled; if (p == _p6) { d = _d6; } else { d = (is_canceled_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_canceled_delegate)); if (_p6 == IntPtr.Zero) { _d6 = d; _p6 = p; } } return(d(self)); }
public static int enter(cef_v8context_t *self) { enter_delegate d; var p = self->_enter; if (p == _p9) { d = _d9; } else { d = (enter_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(enter_delegate)); if (_p9 == IntPtr.Zero) { _d9 = d; _p9 = p; } } return(d(self)); }
public static int is_same(cef_v8context_t *self, cef_v8context_t *that) { is_same_delegate d; var p = self->_is_same; if (p == _pb) { d = _db; } else { d = (is_same_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_same_delegate)); if (_pb == IntPtr.Zero) { _db = d; _pb = p; } } return(d(self, that)); }
public static int is_valid(cef_v8context_t *self) { is_valid_delegate d; var p = self->_is_valid; if (p == _p5) { d = _d5; } else { d = (is_valid_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_valid_delegate)); if (_p5 == IntPtr.Zero) { _d5 = d; _p5 = p; } } return(d(self)); }
public static cef_frame_t *get_frame(cef_v8context_t *self) { get_frame_delegate d; var p = self->_get_frame; if (p == _p7) { d = _d7; } else { d = (get_frame_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_frame_delegate)); if (_p7 == IntPtr.Zero) { _d7 = d; _p7 = p; } } return(d(self)); }
public static int may_block(cef_stream_reader_t *self) { may_block_delegate d; var p = self->_may_block; if (p == _p8) { d = _d8; } else { d = (may_block_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(may_block_delegate)); if (_p8 == IntPtr.Zero) { _d8 = d; _p8 = p; } } return(d(self)); }
public static int release(cef_v8context_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 uint get_id(cef_download_item_t *self) { get_id_delegate d; var p = self->_get_id; if (p == _pe) { d = _de; } else { d = (get_id_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_id_delegate)); if (_pe == IntPtr.Zero) { _de = d; _pe = p; } } return(d(self)); }
public static cef_string_userfree *get_suggested_file_name(cef_download_item_t *self) { get_suggested_file_name_delegate d; var p = self->_get_suggested_file_name; if (p == _p10) { d = _d10; } else { d = (get_suggested_file_name_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_suggested_file_name_delegate)); if (_p10 == IntPtr.Zero) { _d10 = d; _p10 = p; } } return(d(self)); }
public static cef_time_t get_end_time(cef_download_item_t *self) { get_end_time_delegate d; var p = self->_get_end_time; if (p == _pc) { d = _dc; } else { d = (get_end_time_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_end_time_delegate)); if (_pc == IntPtr.Zero) { _dc = d; _pc = p; } } return(d(self)); }
public static cef_string_userfree *get_full_path(cef_download_item_t *self) { get_full_path_delegate d; var p = self->_get_full_path; if (p == _pd) { d = _dd; } else { d = (get_full_path_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_full_path_delegate)); if (_pd == IntPtr.Zero) { _dd = d; _pd = p; } } return(d(self)); }
public static long get_received_bytes(cef_download_item_t *self) { get_received_bytes_delegate d; var p = self->_get_received_bytes; if (p == _pa) { d = _da; } else { d = (get_received_bytes_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_received_bytes_delegate)); if (_pa == IntPtr.Zero) { _da = d; _pa = p; } } return(d(self)); }
public static int get_percent_complete(cef_download_item_t *self) { get_percent_complete_delegate d; var p = self->_get_percent_complete; if (p == _p8) { d = _d8; } else { d = (get_percent_complete_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_percent_complete_delegate)); if (_p8 == IntPtr.Zero) { _d8 = d; _p8 = p; } } return(d(self)); }
public static long get_current_speed(cef_download_item_t *self) { get_current_speed_delegate d; var p = self->_get_current_speed; if (p == _p7) { d = _d7; } else { d = (get_current_speed_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_current_speed_delegate)); if (_p7 == IntPtr.Zero) { _d7 = d; _p7 = p; } } return(d(self)); }
public static long tell(cef_stream_reader_t *self) { tell_delegate d; var p = self->_tell; if (p == _p6) { d = _d6; } else { d = (tell_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(tell_delegate)); if (_p6 == IntPtr.Zero) { _d6 = d; _p6 = p; } } return(d(self)); }
public static cef_string_userfree *get_content_disposition(cef_download_item_t *self) { get_content_disposition_delegate d; var p = self->_get_content_disposition; if (p == _p11) { d = _d11; } else { d = (get_content_disposition_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_content_disposition_delegate)); if (_p11 == IntPtr.Zero) { _d11 = d; _p11 = p; } } return(d(self)); }
public static int eof(cef_stream_reader_t *self) { eof_delegate d; var p = self->_eof; if (p == _p7) { d = _d7; } else { d = (eof_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(eof_delegate)); if (_p7 == IntPtr.Zero) { _d7 = d; _p7 = p; } } return(d(self)); }
public static cef_string_userfree *get_mime_type(cef_download_item_t *self) { get_mime_type_delegate d; var p = self->_get_mime_type; if (p == _p12) { d = _d12; } else { d = (get_mime_type_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_mime_type_delegate)); if (_p12 == IntPtr.Zero) { _d12 = d; _p12 = p; } } return(d(self)); }
public static void add_ref(cef_v8context_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); }
/// <summary> /// 初期化 /// </summary> /// <param name="dllName">ライブラリの名前</param> /// <param name="functionName">関数の名前</param> #else /// <summary> /// Constructor /// </summary> /// <param name="dllName">Name of library</param> /// <param name="functionName">Name of function</param> #endif public DynamicInvoker(string dllName, string functionName) { if (Platform.OS == OS.Unix) { throw new PlatformNotSupportedException("This method is for only Windows"); } #if net20 || net40 if (!typeof(T).IsSubclassOf(typeof(Delegate))) #else if (!typeof(T).GetTypeInfo().IsSubclassOf(typeof(Delegate))) #endif { throw new OpenCvSharpException("The type argument must be Delegate."); } if (string.IsNullOrEmpty(dllName)) { throw new ArgumentNullException(nameof(dllName)); } if (string.IsNullOrEmpty(functionName)) { throw new ArgumentNullException(nameof(functionName)); } PtrLib = Win32Api.LoadLibrary(dllName); if (PtrLib == IntPtr.Zero) { throw new OpenCvSharpException("Failed to load \"{0}\".", dllName); } PtrProc = Win32Api.GetProcAddress(PtrLib, functionName); if (PtrProc == IntPtr.Zero) { throw new OpenCvSharpException("Failed to get address of function \"{0}\".", functionName); } DllName = dllName; FunctionName = functionName; IsDisposed = false; #if net20 || net40 || uwp Call = (T)(object)Marshal.GetDelegateForFunctionPointer(PtrProc, typeof(T)); #else Call = Marshal.GetDelegateForFunctionPointer <T>(PtrProc); #endif }
public static int has_at_least_one_ref(cef_v8context_t *self) { has_at_least_one_ref_delegate d; var p = self->_base._has_at_least_one_ref; if (p == _p3) { d = _d3; } else { d = (has_at_least_one_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_at_least_one_ref_delegate)); if (_p3 == IntPtr.Zero) { _d3 = d; _p3 = p; } } return(d(self)); }
private bool InternalOpen(string device) { OpenNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("open")); unmanaged = (OpenNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(OpenNativeDelegate)); } if (unmanaged == null) { return(false); } IntPtr native_device = GLib.Marshaller.StringToPtrGStrdup(device); bool __result = unmanaged(this.Handle, native_device); GLib.Marshaller.Free(native_device); return(__result); }
public static cef_browser_t *get_browser(cef_v8context_t *self) { get_browser_delegate d; var p = self->_get_browser; if (p == _p6) { d = _d6; } else { d = (get_browser_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_browser_delegate)); if (_p6 == IntPtr.Zero) { _d6 = d; _p6 = p; } } return(d(self)); }
public static int has_one_ref(cef_stream_reader_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)); }
public static cef_v8value_t *get_global(cef_v8context_t *self) { get_global_delegate d; var p = self->_get_global; if (p == _p8) { d = _d8; } else { d = (get_global_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_global_delegate)); if (_p8 == IntPtr.Zero) { _d8 = d; _p8 = p; } } return(d(self)); }
public static UIntPtr read(cef_stream_reader_t *self, void *ptr, UIntPtr size, UIntPtr n) { read_delegate d; var p = self->_read; if (p == _p4) { d = _d4; } else { d = (read_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(read_delegate)); if (_p4 == IntPtr.Zero) { _d4 = d; _p4 = p; } } return(d(self, ptr, size, n)); }
public static int exit(cef_v8context_t *self) { exit_delegate d; var p = self->_exit; if (p == _pa) { d = _da; } else { d = (exit_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(exit_delegate)); if (_pa == IntPtr.Zero) { _da = d; _pa = p; } } return(d(self)); }
public static int seek(cef_stream_reader_t *self, long offset, int whence) { seek_delegate d; var p = self->_seek; if (p == _p5) { d = _d5; } else { d = (seek_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(seek_delegate)); if (_p5 == IntPtr.Zero) { _d5 = d; _p5 = p; } } return(d(self, offset, whence)); }
public static int eval(cef_v8context_t *self, cef_string_t *code, cef_string_t *script_url, int start_line, cef_v8value_t **retval, cef_v8exception_t **exception) { eval_delegate d; var p = self->_eval; if (p == _pc) { d = _dc; } else { d = (eval_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(eval_delegate)); if (_pc == IntPtr.Zero) { _dc = d; _pc = p; } } return(d(self, code, script_url, start_line, retval, exception)); }
public static int is_complete(cef_download_item_t *self) { is_complete_delegate d; var p = self->_is_complete; if (p == _p5) { d = _d5; } else { d = (is_complete_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_complete_delegate)); if (_p5 == IntPtr.Zero) { _d5 = d; _p5 = p; } } return(d(self)); }