init lserp cs 5.0
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
//
|
||||
// This file manually written from cef/include/internal/cef_types.h.
|
||||
//
|
||||
namespace Cef3.Interop
|
||||
{
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)]
|
||||
internal unsafe struct cef_browser_settings_t
|
||||
{
|
||||
public UIntPtr size;
|
||||
|
||||
public int windowless_frame_rate;
|
||||
|
||||
public cef_string_t standard_font_family;
|
||||
public cef_string_t fixed_font_family;
|
||||
public cef_string_t serif_font_family;
|
||||
public cef_string_t sans_serif_font_family;
|
||||
public cef_string_t cursive_font_family;
|
||||
public cef_string_t fantasy_font_family;
|
||||
public int default_font_size;
|
||||
public int default_fixed_font_size;
|
||||
public int minimum_font_size;
|
||||
public int minimum_logical_font_size;
|
||||
|
||||
public cef_string_t default_encoding;
|
||||
|
||||
public CefState remote_fonts;
|
||||
public CefState javascript;
|
||||
public CefState javascript_open_windows;
|
||||
public CefState javascript_close_windows;
|
||||
public CefState javascript_access_clipboard;
|
||||
public CefState javascript_dom_paste;
|
||||
public CefState caret_browsing;
|
||||
public CefState java;
|
||||
public CefState plugins;
|
||||
public CefState universal_access_from_file_urls;
|
||||
public CefState file_access_from_file_urls;
|
||||
public CefState web_security;
|
||||
public CefState image_loading;
|
||||
public CefState image_shrink_standalone_to_fit;
|
||||
public CefState text_area_resize;
|
||||
public CefState tab_to_links;
|
||||
public CefState local_storage;
|
||||
public CefState databases;
|
||||
public CefState application_cache;
|
||||
public CefState webgl;
|
||||
|
||||
public uint background_color;
|
||||
|
||||
public cef_string_t accept_language_list;
|
||||
|
||||
#region Alloc & Free
|
||||
private static int _sizeof;
|
||||
|
||||
static cef_browser_settings_t()
|
||||
{
|
||||
_sizeof = Marshal.SizeOf(typeof(cef_browser_settings_t));
|
||||
}
|
||||
|
||||
public static cef_browser_settings_t* Alloc()
|
||||
{
|
||||
var ptr = (cef_browser_settings_t*)Marshal.AllocHGlobal(_sizeof);
|
||||
*ptr = new cef_browser_settings_t();
|
||||
ptr->size = (UIntPtr)_sizeof;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
public static void Free(cef_browser_settings_t* ptr)
|
||||
{
|
||||
Marshal.FreeHGlobal((IntPtr)ptr);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
//
|
||||
// This file manually written from cef/include/internal/cef_types.h.
|
||||
//
|
||||
namespace Cef3.Interop
|
||||
{
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)]
|
||||
internal unsafe struct cef_cookie_t
|
||||
{
|
||||
public cef_string_t name;
|
||||
public cef_string_t value;
|
||||
public cef_string_t domain;
|
||||
public cef_string_t path;
|
||||
public int secure;
|
||||
public int httponly;
|
||||
public cef_time_t creation;
|
||||
public cef_time_t last_access;
|
||||
public int has_expires;
|
||||
public cef_time_t expires;
|
||||
|
||||
internal static void Clear(cef_cookie_t* ptr)
|
||||
{
|
||||
libcef.string_clear(&ptr->name);
|
||||
libcef.string_clear(&ptr->value);
|
||||
libcef.string_clear(&ptr->domain);
|
||||
libcef.string_clear(&ptr->path);
|
||||
}
|
||||
|
||||
#region Alloc & Free
|
||||
private static int _sizeof;
|
||||
|
||||
static cef_cookie_t()
|
||||
{
|
||||
_sizeof = Marshal.SizeOf(typeof(cef_cookie_t));
|
||||
}
|
||||
|
||||
public static cef_cookie_t* Alloc()
|
||||
{
|
||||
var ptr = (cef_cookie_t*)Marshal.AllocHGlobal(_sizeof);
|
||||
*ptr = new cef_cookie_t();
|
||||
return ptr;
|
||||
}
|
||||
|
||||
public static void Free(cef_cookie_t* ptr)
|
||||
{
|
||||
Marshal.FreeHGlobal((IntPtr)ptr);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
namespace Cef3.Interop
|
||||
{
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)]
|
||||
internal unsafe struct cef_cursor_info_t
|
||||
{
|
||||
public cef_point_t hotspot;
|
||||
public float image_scale_factor;
|
||||
public void* buffer;
|
||||
public cef_size_t size;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// This file manually written from cef/include/internal/cef_types.h.
|
||||
//
|
||||
namespace Cef3.Interop
|
||||
{
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)]
|
||||
internal unsafe struct cef_draggable_region_t
|
||||
{
|
||||
public cef_rect_t bounds;
|
||||
public int draggable;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// This file manually written from cef/include/internal/cef_types.h.
|
||||
//
|
||||
namespace Cef3.Interop
|
||||
{
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)]
|
||||
internal unsafe struct cef_geoposition_t
|
||||
{
|
||||
public double latitude;
|
||||
public double longitude;
|
||||
public double altitude;
|
||||
public double accuracy;
|
||||
public double altitude_accuracy;
|
||||
public double heading;
|
||||
public double speed;
|
||||
public cef_time_t timestamp;
|
||||
public CefGeopositionErrorCode error_code;
|
||||
public cef_string_t error_message;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
namespace Cef3.Interop
|
||||
{
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)]
|
||||
internal unsafe struct cef_key_event_t
|
||||
{
|
||||
public CefKeyEventType type;
|
||||
public CefEventFlags modifiers;
|
||||
public int windows_key_code;
|
||||
public int native_key_code;
|
||||
public int is_system_key;
|
||||
public ushort character;
|
||||
public ushort unmodified_character;
|
||||
public int focus_on_editable_field;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
namespace Cef3.Interop
|
||||
{
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
internal struct cef_main_args_t
|
||||
{
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)]
|
||||
internal unsafe struct cef_main_args_t_windows
|
||||
{
|
||||
public IntPtr instance;
|
||||
|
||||
#region Alloc & Free
|
||||
private static int _sizeof;
|
||||
|
||||
static cef_main_args_t_windows()
|
||||
{
|
||||
_sizeof = Marshal.SizeOf(typeof(cef_main_args_t_windows));
|
||||
}
|
||||
|
||||
public static cef_main_args_t_windows* Alloc()
|
||||
{
|
||||
var ptr = (cef_main_args_t_windows*)Marshal.AllocHGlobal(_sizeof);
|
||||
*ptr = new cef_main_args_t_windows();
|
||||
return ptr;
|
||||
}
|
||||
|
||||
public static void Free(cef_main_args_t_windows* ptr)
|
||||
{
|
||||
Marshal.FreeHGlobal((IntPtr)ptr);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)]
|
||||
internal unsafe struct cef_main_args_t_posix
|
||||
{
|
||||
public int argc;
|
||||
public IntPtr argv;
|
||||
|
||||
#region Alloc & Free
|
||||
private static int _sizeof;
|
||||
|
||||
static cef_main_args_t_posix()
|
||||
{
|
||||
_sizeof = Marshal.SizeOf(typeof(cef_main_args_t_posix));
|
||||
}
|
||||
|
||||
public static cef_main_args_t_posix* Alloc()
|
||||
{
|
||||
var ptr = (cef_main_args_t_posix*)Marshal.AllocHGlobal(_sizeof);
|
||||
*ptr = new cef_main_args_t_posix();
|
||||
return ptr;
|
||||
}
|
||||
|
||||
public static void Free(cef_main_args_t_posix* ptr)
|
||||
{
|
||||
Marshal.FreeHGlobal((IntPtr)ptr);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
namespace Cef3.Interop
|
||||
{
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)]
|
||||
internal unsafe struct cef_mouse_event_t
|
||||
{
|
||||
public int x;
|
||||
public int y;
|
||||
public CefEventFlags modifiers;
|
||||
|
||||
public cef_mouse_event_t(int x, int y, CefEventFlags modifiers)
|
||||
{
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.modifiers = modifiers;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// This file manually written from cef/include/internal/cef_types.h.
|
||||
//
|
||||
namespace Cef3.Interop
|
||||
{
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)]
|
||||
internal unsafe struct cef_page_range_t
|
||||
{
|
||||
public int from;
|
||||
public int to;
|
||||
|
||||
public cef_page_range_t(int from, int to)
|
||||
{
|
||||
this.from = from;
|
||||
this.to = to;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
//
|
||||
// This file manually written from cef/include/internal/cef_types.h.
|
||||
//
|
||||
namespace Cef3.Interop
|
||||
{
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)]
|
||||
internal unsafe struct cef_pdf_print_settings_t
|
||||
{
|
||||
public cef_string_t header_footer_title;
|
||||
public cef_string_t header_footer_url;
|
||||
public int page_width;
|
||||
public int page_height;
|
||||
public double margin_top;
|
||||
public double margin_right;
|
||||
public double margin_bottom;
|
||||
public double margin_left;
|
||||
public CefPdfPrintMarginType margin_type;
|
||||
public int header_footer_enabled;
|
||||
public int selection_only;
|
||||
public int landscape;
|
||||
public int backgrounds_enabled;
|
||||
|
||||
internal static void Clear(cef_pdf_print_settings_t* ptr)
|
||||
{
|
||||
libcef.string_clear(&ptr->header_footer_title);
|
||||
libcef.string_clear(&ptr->header_footer_url);
|
||||
}
|
||||
|
||||
#region Alloc & Free
|
||||
private static int _sizeof;
|
||||
|
||||
static cef_pdf_print_settings_t()
|
||||
{
|
||||
_sizeof = Marshal.SizeOf(typeof(cef_pdf_print_settings_t));
|
||||
}
|
||||
|
||||
public static cef_pdf_print_settings_t* Alloc()
|
||||
{
|
||||
var ptr = (cef_pdf_print_settings_t*)Marshal.AllocHGlobal(_sizeof);
|
||||
*ptr = new cef_pdf_print_settings_t();
|
||||
return ptr;
|
||||
}
|
||||
|
||||
public static void Free(cef_pdf_print_settings_t* ptr)
|
||||
{
|
||||
Marshal.FreeHGlobal((IntPtr)ptr);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// This file manually written from cef/include/internal/cef_types.h.
|
||||
//
|
||||
namespace Cef3.Interop
|
||||
{
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)]
|
||||
internal unsafe struct cef_point_t
|
||||
{
|
||||
public int x;
|
||||
public int y;
|
||||
|
||||
public cef_point_t(int x, int y)
|
||||
{
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// This file manually written from cef/include/internal/cef_types.h.
|
||||
//
|
||||
namespace Cef3.Interop
|
||||
{
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)]
|
||||
internal unsafe struct cef_popup_features_t
|
||||
{
|
||||
public int x;
|
||||
public int xSet;
|
||||
public int y;
|
||||
public int ySet;
|
||||
public int width;
|
||||
public int widthSet;
|
||||
public int height;
|
||||
public int heightSet;
|
||||
|
||||
public int menuBarVisible;
|
||||
public int statusBarVisible;
|
||||
public int toolBarVisible;
|
||||
public int locationBarVisible;
|
||||
public int scrollbarsVisible;
|
||||
public int resizable;
|
||||
|
||||
public int fullscreen;
|
||||
public int dialog;
|
||||
public cef_string_list* additionalFeatures;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// This file manually written from cef/include/internal/cef_types.h.
|
||||
//
|
||||
namespace Cef3.Interop
|
||||
{
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)]
|
||||
internal unsafe struct cef_rect_t
|
||||
{
|
||||
public int x;
|
||||
public int y;
|
||||
public int width;
|
||||
public int height;
|
||||
|
||||
public cef_rect_t(int x, int y, int width, int height)
|
||||
{
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
//
|
||||
// This file manually written from cef/include/internal/cef_types.h.
|
||||
//
|
||||
namespace Cef3.Interop
|
||||
{
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)]
|
||||
internal unsafe struct cef_request_context_settings_t
|
||||
{
|
||||
public UIntPtr size;
|
||||
public cef_string_t cache_path;
|
||||
public int persist_session_cookies;
|
||||
public int ignore_certificate_errors;
|
||||
public cef_string_t accept_language_list;
|
||||
|
||||
#region Alloc & Free
|
||||
private static int _sizeof;
|
||||
|
||||
static cef_request_context_settings_t()
|
||||
{
|
||||
_sizeof = Marshal.SizeOf(typeof(cef_request_context_settings_t));
|
||||
}
|
||||
|
||||
public static cef_request_context_settings_t* Alloc()
|
||||
{
|
||||
var ptr = (cef_request_context_settings_t*)Marshal.AllocHGlobal(_sizeof);
|
||||
*ptr = new cef_request_context_settings_t();
|
||||
ptr->size = (UIntPtr)_sizeof;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
public static void Free(cef_request_context_settings_t* ptr)
|
||||
{
|
||||
Marshal.FreeHGlobal((IntPtr)ptr);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// This file manually written from cef/include/internal/cef_types.h.
|
||||
//
|
||||
namespace Cef3.Interop
|
||||
{
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)]
|
||||
internal unsafe struct cef_screen_info_t
|
||||
{
|
||||
public float device_scale_factor;
|
||||
public int depth;
|
||||
public int depth_per_component;
|
||||
public int is_monochrome;
|
||||
public cef_rect_t rect;
|
||||
public cef_rect_t available_rect;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
//
|
||||
// This file manually written from cef/include/internal/cef_types.h.
|
||||
// C API name: cef_settings_t.
|
||||
//
|
||||
// Note: cef_settings_t structure in CEF has 2 layouts (choosed in compile time),
|
||||
// so in C# we make different structures and will choose layouts in runtime.
|
||||
// Windows platform: cef_settings_t_windows.
|
||||
// Non-windows platforms: cef_settings_t_posix.
|
||||
//
|
||||
namespace Cef3.Interop
|
||||
{
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)]
|
||||
internal unsafe struct cef_settings_t
|
||||
{
|
||||
public UIntPtr size;
|
||||
public int single_process;
|
||||
public int no_sandbox;
|
||||
public cef_string_t browser_subprocess_path;
|
||||
public int multi_threaded_message_loop;
|
||||
public int windowless_rendering_enabled;
|
||||
public int command_line_args_disabled;
|
||||
public cef_string_t cache_path;
|
||||
public cef_string_t user_data_path;
|
||||
public int persist_session_cookies;
|
||||
public cef_string_t user_agent;
|
||||
public cef_string_t product_version;
|
||||
public cef_string_t locale;
|
||||
public cef_string_t log_file;
|
||||
public CefLogSeverity log_severity;
|
||||
public cef_string_t javascript_flags;
|
||||
public cef_string_t resources_dir_path;
|
||||
public cef_string_t locales_dir_path;
|
||||
public int pack_loading_disabled;
|
||||
public int remote_debugging_port;
|
||||
public int uncaught_exception_stack_size;
|
||||
public int context_safety_implementation;
|
||||
public int ignore_certificate_errors;
|
||||
public uint background_color;
|
||||
public cef_string_t accept_language_list;
|
||||
|
||||
#region Alloc & Free
|
||||
private static int _sizeof;
|
||||
|
||||
static cef_settings_t()
|
||||
{
|
||||
_sizeof = Marshal.SizeOf(typeof(cef_settings_t));
|
||||
}
|
||||
|
||||
public static cef_settings_t* Alloc()
|
||||
{
|
||||
var ptr = (cef_settings_t*)Marshal.AllocHGlobal(_sizeof);
|
||||
*ptr = new cef_settings_t();
|
||||
ptr->size = (UIntPtr)_sizeof;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
public static void Free(cef_settings_t* ptr)
|
||||
{
|
||||
Marshal.FreeHGlobal((IntPtr)ptr);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// This file manually written from cef/include/internal/cef_types.h.
|
||||
//
|
||||
namespace Cef3.Interop
|
||||
{
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)]
|
||||
internal unsafe struct cef_size_t
|
||||
{
|
||||
public int width;
|
||||
public int height;
|
||||
|
||||
public cef_size_t(int width, int height)
|
||||
{
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
//
|
||||
// This file manually written from cef/include/internal/cef_time.h.
|
||||
//
|
||||
namespace Cef3.Interop
|
||||
{
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)]
|
||||
internal unsafe struct cef_time_t
|
||||
{
|
||||
public int year;
|
||||
public int month;
|
||||
public int day_of_week;
|
||||
public int day_of_month;
|
||||
public int hour;
|
||||
public int minute;
|
||||
public int second;
|
||||
public int millisecond;
|
||||
|
||||
public cef_time_t(DateTime value)
|
||||
{
|
||||
value = value.ToUniversalTime();
|
||||
|
||||
year = value.Year;
|
||||
month = value.Month;
|
||||
day_of_week = (int)value.DayOfWeek;
|
||||
day_of_month = value.Day;
|
||||
hour = value.Hour;
|
||||
minute = value.Minute;
|
||||
second = value.Second;
|
||||
millisecond = value.Millisecond;
|
||||
}
|
||||
|
||||
public DateTime ToDateTime()
|
||||
{
|
||||
return new DateTime(
|
||||
year,
|
||||
month,
|
||||
day_of_month,
|
||||
hour,
|
||||
minute,
|
||||
second,
|
||||
millisecond,
|
||||
DateTimeKind.Utc
|
||||
);
|
||||
}
|
||||
|
||||
public static DateTime ToDateTime(cef_time_t* ptr)
|
||||
{
|
||||
return new DateTime(
|
||||
ptr->year,
|
||||
ptr->month,
|
||||
ptr->day_of_month,
|
||||
ptr->hour,
|
||||
ptr->minute,
|
||||
ptr->second,
|
||||
ptr->millisecond,
|
||||
DateTimeKind.Utc
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
//
|
||||
// This file manually written from cef/include/internal/cef_types.h.
|
||||
//
|
||||
namespace Cef3.Interop
|
||||
{
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)]
|
||||
internal unsafe struct cef_urlparts_t
|
||||
{
|
||||
public cef_string_t spec;
|
||||
public cef_string_t scheme;
|
||||
public cef_string_t username;
|
||||
public cef_string_t password;
|
||||
public cef_string_t host;
|
||||
public cef_string_t port;
|
||||
public cef_string_t origin;
|
||||
public cef_string_t path;
|
||||
public cef_string_t query;
|
||||
|
||||
internal static void Clear(cef_urlparts_t* self)
|
||||
{
|
||||
libcef.string_clear(&self->spec);
|
||||
libcef.string_clear(&self->scheme);
|
||||
libcef.string_clear(&self->username);
|
||||
libcef.string_clear(&self->password);
|
||||
libcef.string_clear(&self->host);
|
||||
libcef.string_clear(&self->port);
|
||||
libcef.string_clear(&self->origin);
|
||||
libcef.string_clear(&self->path);
|
||||
libcef.string_clear(&self->query);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
//
|
||||
// This file manually written from:
|
||||
// cef/include/internal/cef_types_win.h.
|
||||
//
|
||||
namespace Cef3.Interop
|
||||
{
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
internal struct cef_window_info_t
|
||||
{
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)]
|
||||
internal unsafe struct cef_window_info_t_windows
|
||||
{
|
||||
// Standard parameters required by CreateWindowEx()
|
||||
public uint ex_style;
|
||||
public cef_string_t window_name;
|
||||
public uint style;
|
||||
public int x;
|
||||
public int y;
|
||||
public int width;
|
||||
public int height;
|
||||
public IntPtr parent_window;
|
||||
public IntPtr menu;
|
||||
|
||||
// If window rendering is disabled no browser window will be created. Set
|
||||
// |parent_window| to be used for identifying monitor info
|
||||
// (MonitorFromWindow). If |parent_window| is not provided the main screen
|
||||
// monitor will be used.
|
||||
public int windowless_rendering_enabled;
|
||||
|
||||
// Set to true to enable transparent painting.
|
||||
public int transparent_painting_enabled;
|
||||
|
||||
// Handle for the new browser window.
|
||||
public IntPtr window;
|
||||
|
||||
#region Alloc & Free
|
||||
private static int _sizeof;
|
||||
|
||||
static cef_window_info_t_windows()
|
||||
{
|
||||
_sizeof = Marshal.SizeOf(typeof(cef_window_info_t_windows));
|
||||
}
|
||||
|
||||
public static cef_window_info_t_windows* Alloc()
|
||||
{
|
||||
var ptr = (cef_window_info_t_windows*)Marshal.AllocHGlobal(_sizeof);
|
||||
*ptr = new cef_window_info_t_windows();
|
||||
return ptr;
|
||||
}
|
||||
|
||||
public static void Free(cef_window_info_t_windows* ptr)
|
||||
{
|
||||
if (ptr != null)
|
||||
{
|
||||
libcef.string_clear(&ptr->window_name);
|
||||
Marshal.FreeHGlobal((IntPtr)ptr);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
internal unsafe struct cef_window_info_t_linux
|
||||
{
|
||||
public uint x;
|
||||
public uint y;
|
||||
public uint width;
|
||||
public uint height;
|
||||
|
||||
public IntPtr parent_window;
|
||||
public int windowless_rendering_enabled;
|
||||
public int transparent_painting_enabled;
|
||||
public IntPtr window;
|
||||
|
||||
#region Alloc & Free
|
||||
private static int _sizeof;
|
||||
|
||||
static cef_window_info_t_linux()
|
||||
{
|
||||
_sizeof = Marshal.SizeOf(typeof(cef_window_info_t_linux));
|
||||
}
|
||||
|
||||
public static cef_window_info_t_linux* Alloc()
|
||||
{
|
||||
var ptr = (cef_window_info_t_linux*)Marshal.AllocHGlobal(_sizeof);
|
||||
*ptr = new cef_window_info_t_linux();
|
||||
return ptr;
|
||||
}
|
||||
|
||||
public static void Free(cef_window_info_t_linux* ptr)
|
||||
{
|
||||
if (ptr != null)
|
||||
{
|
||||
Marshal.FreeHGlobal((IntPtr)ptr);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
internal unsafe struct cef_window_info_t_mac
|
||||
{
|
||||
public cef_string_t window_name;
|
||||
public int x;
|
||||
public int y;
|
||||
public int width;
|
||||
public int height;
|
||||
public int hidden;
|
||||
|
||||
// NSView pointer for the parent view.
|
||||
public IntPtr parent_view;
|
||||
|
||||
public int windowless_rendering_enabled;
|
||||
public int transparent_painting_enabled;
|
||||
|
||||
// NSView pointer for the new browser view.
|
||||
public IntPtr view;
|
||||
|
||||
#region Alloc & Free
|
||||
private static int _sizeof;
|
||||
|
||||
static cef_window_info_t_mac()
|
||||
{
|
||||
_sizeof = Marshal.SizeOf(typeof(cef_window_info_t_mac));
|
||||
}
|
||||
|
||||
public static cef_window_info_t_mac* Alloc()
|
||||
{
|
||||
var ptr = (cef_window_info_t_mac*)Marshal.AllocHGlobal(_sizeof);
|
||||
*ptr = new cef_window_info_t_mac();
|
||||
return ptr;
|
||||
}
|
||||
|
||||
public static void Free(cef_window_info_t_mac* ptr)
|
||||
{
|
||||
if (ptr != null)
|
||||
{
|
||||
libcef.string_clear(&ptr->window_name);
|
||||
Marshal.FreeHGlobal((IntPtr)ptr);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user