316 lines
11 KiB
C#
316 lines
11 KiB
C#
//
|
|
// DO NOT MODIFY! THIS IS AUTOGENERATED FILE!
|
|
//
|
|
namespace Cef3.Interop
|
|
{
|
|
using System;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
using System.Runtime.InteropServices;
|
|
using System.Security;
|
|
|
|
[StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)]
|
|
[SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable")]
|
|
internal unsafe struct cef_v8context_t
|
|
{
|
|
internal cef_base_t _base;
|
|
internal IntPtr _get_task_runner;
|
|
internal IntPtr _is_valid;
|
|
internal IntPtr _get_browser;
|
|
internal IntPtr _get_frame;
|
|
internal IntPtr _get_global;
|
|
internal IntPtr _enter;
|
|
internal IntPtr _exit;
|
|
internal IntPtr _is_same;
|
|
internal IntPtr _eval;
|
|
|
|
// GetCurrentContext
|
|
[DllImport(libcef.DllName, EntryPoint = "cef_v8context_get_current_context", CallingConvention = libcef.CEF_CALL)]
|
|
public static extern cef_v8context_t* get_current_context();
|
|
|
|
// GetEnteredContext
|
|
[DllImport(libcef.DllName, EntryPoint = "cef_v8context_get_entered_context", CallingConvention = libcef.CEF_CALL)]
|
|
public static extern cef_v8context_t* get_entered_context();
|
|
|
|
// InContext
|
|
[DllImport(libcef.DllName, EntryPoint = "cef_v8context_in_context", CallingConvention = libcef.CEF_CALL)]
|
|
public static extern int in_context();
|
|
|
|
[UnmanagedFunctionPointer(libcef.CEF_CALLBACK)]
|
|
#if !DEBUG
|
|
[SuppressUnmanagedCodeSecurity]
|
|
#endif
|
|
private delegate void add_ref_delegate(cef_v8context_t* self);
|
|
|
|
[UnmanagedFunctionPointer(libcef.CEF_CALLBACK)]
|
|
#if !DEBUG
|
|
[SuppressUnmanagedCodeSecurity]
|
|
#endif
|
|
private delegate int release_delegate(cef_v8context_t* self);
|
|
|
|
[UnmanagedFunctionPointer(libcef.CEF_CALLBACK)]
|
|
#if !DEBUG
|
|
[SuppressUnmanagedCodeSecurity]
|
|
#endif
|
|
private delegate int has_one_ref_delegate(cef_v8context_t* self);
|
|
|
|
[UnmanagedFunctionPointer(libcef.CEF_CALLBACK)]
|
|
#if !DEBUG
|
|
[SuppressUnmanagedCodeSecurity]
|
|
#endif
|
|
private delegate cef_task_runner_t* get_task_runner_delegate(cef_v8context_t* self);
|
|
|
|
[UnmanagedFunctionPointer(libcef.CEF_CALLBACK)]
|
|
#if !DEBUG
|
|
[SuppressUnmanagedCodeSecurity]
|
|
#endif
|
|
private delegate int is_valid_delegate(cef_v8context_t* self);
|
|
|
|
[UnmanagedFunctionPointer(libcef.CEF_CALLBACK)]
|
|
#if !DEBUG
|
|
[SuppressUnmanagedCodeSecurity]
|
|
#endif
|
|
private delegate cef_browser_t* get_browser_delegate(cef_v8context_t* self);
|
|
|
|
[UnmanagedFunctionPointer(libcef.CEF_CALLBACK)]
|
|
#if !DEBUG
|
|
[SuppressUnmanagedCodeSecurity]
|
|
#endif
|
|
private delegate cef_frame_t* get_frame_delegate(cef_v8context_t* self);
|
|
|
|
[UnmanagedFunctionPointer(libcef.CEF_CALLBACK)]
|
|
#if !DEBUG
|
|
[SuppressUnmanagedCodeSecurity]
|
|
#endif
|
|
private delegate cef_v8value_t* get_global_delegate(cef_v8context_t* self);
|
|
|
|
[UnmanagedFunctionPointer(libcef.CEF_CALLBACK)]
|
|
#if !DEBUG
|
|
[SuppressUnmanagedCodeSecurity]
|
|
#endif
|
|
private delegate int enter_delegate(cef_v8context_t* self);
|
|
|
|
[UnmanagedFunctionPointer(libcef.CEF_CALLBACK)]
|
|
#if !DEBUG
|
|
[SuppressUnmanagedCodeSecurity]
|
|
#endif
|
|
private delegate int exit_delegate(cef_v8context_t* self);
|
|
|
|
[UnmanagedFunctionPointer(libcef.CEF_CALLBACK)]
|
|
#if !DEBUG
|
|
[SuppressUnmanagedCodeSecurity]
|
|
#endif
|
|
private delegate int is_same_delegate(cef_v8context_t* self, cef_v8context_t* that);
|
|
|
|
[UnmanagedFunctionPointer(libcef.CEF_CALLBACK)]
|
|
#if !DEBUG
|
|
[SuppressUnmanagedCodeSecurity]
|
|
#endif
|
|
private delegate int eval_delegate(cef_v8context_t* self, cef_string_t* code, cef_v8value_t** retval, cef_v8exception_t** exception);
|
|
|
|
// AddRef
|
|
private static IntPtr _p0;
|
|
private static add_ref_delegate _d0;
|
|
|
|
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);
|
|
}
|
|
|
|
// Release
|
|
private static IntPtr _p1;
|
|
private static release_delegate _d1;
|
|
|
|
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);
|
|
}
|
|
|
|
// HasOneRef
|
|
private static IntPtr _p2;
|
|
private static has_one_ref_delegate _d2;
|
|
|
|
public static int has_one_ref(cef_v8context_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);
|
|
}
|
|
|
|
// GetTaskRunner
|
|
private static IntPtr _p3;
|
|
private static get_task_runner_delegate _d3;
|
|
|
|
public static cef_task_runner_t* get_task_runner(cef_v8context_t* self)
|
|
{
|
|
get_task_runner_delegate d;
|
|
var p = self->_get_task_runner;
|
|
if (p == _p3) { d = _d3; }
|
|
else
|
|
{
|
|
d = (get_task_runner_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_task_runner_delegate));
|
|
if (_p3 == IntPtr.Zero) { _d3 = d; _p3 = p; }
|
|
}
|
|
return d(self);
|
|
}
|
|
|
|
// IsValid
|
|
private static IntPtr _p4;
|
|
private static is_valid_delegate _d4;
|
|
|
|
public static int is_valid(cef_v8context_t* self)
|
|
{
|
|
is_valid_delegate d;
|
|
var p = self->_is_valid;
|
|
if (p == _p4) { d = _d4; }
|
|
else
|
|
{
|
|
d = (is_valid_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_valid_delegate));
|
|
if (_p4 == IntPtr.Zero) { _d4 = d; _p4 = p; }
|
|
}
|
|
return d(self);
|
|
}
|
|
|
|
// GetBrowser
|
|
private static IntPtr _p5;
|
|
private static get_browser_delegate _d5;
|
|
|
|
public static cef_browser_t* get_browser(cef_v8context_t* self)
|
|
{
|
|
get_browser_delegate d;
|
|
var p = self->_get_browser;
|
|
if (p == _p5) { d = _d5; }
|
|
else
|
|
{
|
|
d = (get_browser_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_browser_delegate));
|
|
if (_p5 == IntPtr.Zero) { _d5 = d; _p5 = p; }
|
|
}
|
|
return d(self);
|
|
}
|
|
|
|
// GetFrame
|
|
private static IntPtr _p6;
|
|
private static get_frame_delegate _d6;
|
|
|
|
public static cef_frame_t* get_frame(cef_v8context_t* self)
|
|
{
|
|
get_frame_delegate d;
|
|
var p = self->_get_frame;
|
|
if (p == _p6) { d = _d6; }
|
|
else
|
|
{
|
|
d = (get_frame_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_frame_delegate));
|
|
if (_p6 == IntPtr.Zero) { _d6 = d; _p6 = p; }
|
|
}
|
|
return d(self);
|
|
}
|
|
|
|
// GetGlobal
|
|
private static IntPtr _p7;
|
|
private static get_global_delegate _d7;
|
|
|
|
public static cef_v8value_t* get_global(cef_v8context_t* self)
|
|
{
|
|
get_global_delegate d;
|
|
var p = self->_get_global;
|
|
if (p == _p7) { d = _d7; }
|
|
else
|
|
{
|
|
d = (get_global_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_global_delegate));
|
|
if (_p7 == IntPtr.Zero) { _d7 = d; _p7 = p; }
|
|
}
|
|
return d(self);
|
|
}
|
|
|
|
// Enter
|
|
private static IntPtr _p8;
|
|
private static enter_delegate _d8;
|
|
|
|
public static int enter(cef_v8context_t* self)
|
|
{
|
|
enter_delegate d;
|
|
var p = self->_enter;
|
|
if (p == _p8) { d = _d8; }
|
|
else
|
|
{
|
|
d = (enter_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(enter_delegate));
|
|
if (_p8 == IntPtr.Zero) { _d8 = d; _p8 = p; }
|
|
}
|
|
return d(self);
|
|
}
|
|
|
|
// Exit
|
|
private static IntPtr _p9;
|
|
private static exit_delegate _d9;
|
|
|
|
public static int exit(cef_v8context_t* self)
|
|
{
|
|
exit_delegate d;
|
|
var p = self->_exit;
|
|
if (p == _p9) { d = _d9; }
|
|
else
|
|
{
|
|
d = (exit_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(exit_delegate));
|
|
if (_p9 == IntPtr.Zero) { _d9 = d; _p9 = p; }
|
|
}
|
|
return d(self);
|
|
}
|
|
|
|
// IsSame
|
|
private static IntPtr _pa;
|
|
private static is_same_delegate _da;
|
|
|
|
public static int is_same(cef_v8context_t* self, cef_v8context_t* that)
|
|
{
|
|
is_same_delegate d;
|
|
var p = self->_is_same;
|
|
if (p == _pa) { d = _da; }
|
|
else
|
|
{
|
|
d = (is_same_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_same_delegate));
|
|
if (_pa == IntPtr.Zero) { _da = d; _pa = p; }
|
|
}
|
|
return d(self, that);
|
|
}
|
|
|
|
// Eval
|
|
private static IntPtr _pb;
|
|
private static eval_delegate _db;
|
|
|
|
public static int eval(cef_v8context_t* self, cef_string_t* code, cef_v8value_t** retval, cef_v8exception_t** exception)
|
|
{
|
|
eval_delegate d;
|
|
var p = self->_eval;
|
|
if (p == _pb) { d = _db; }
|
|
else
|
|
{
|
|
d = (eval_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(eval_delegate));
|
|
if (_pb == IntPtr.Zero) { _db = d; _pb = p; }
|
|
}
|
|
return d(self, code, retval, exception);
|
|
}
|
|
|
|
}
|
|
}
|