Skip to content
11 changes: 6 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -147,34 +147,35 @@ resharper_csharp_wrap_before_binary_opsign = true
resharper_csharp_wrap_before_declaration_rpar = true
resharper_csharp_wrap_extends_list_style = chop_if_long
resharper_csharp_wrap_parameters_style = chop_if_long
resharper_force_attribute_style = join
resharper_force_attribute_style = separate
resharper_place_type_attribute_on_same_line = false
resharper_place_method_attribute_on_same_line = false
resharper_place_record_field_attribute_on_same_line = false
resharper_place_accessorholder_attribute_on_same_line = false
resharper_formatter_off_tag = @formatter:off
resharper_formatter_on_tag = @formatter:on
resharper_formatter_tags_enabled = true
resharper_indent_preprocessor_if = usual_indent
resharper_indent_preprocessor_other = do_not_change
resharper_indent_raw_literal_string = indent
resharper_instance_members_qualify_declared_in =
resharper_keep_existing_attribute_arrangement = true
resharper_keep_existing_attribute_arrangement = false
resharper_keep_existing_declaration_block_arrangement = true
resharper_keep_existing_embedded_block_arrangement = true
resharper_max_attribute_length_for_same_line = 10
resharper_method_or_operator_body = expression_body
resharper_nested_ternary_style = expanded
resharper_object_creation_when_type_evident = target_typed
resharper_parentheses_redundancy_style = remove
resharper_place_accessorholder_attribute_on_same_line = true
resharper_place_expr_accessor_on_single_line = true
resharper_place_expr_property_on_single_line = true
resharper_place_record_field_attribute_on_same_line = true
resharper_place_simple_accessor_on_single_line = false
resharper_place_simple_anonymousmethod_on_single_line = false
resharper_place_simple_case_statement_on_same_line = true
resharper_place_simple_embedded_statement_on_same_line = true
resharper_place_simple_initializer_on_single_line = false
resharper_place_simple_list_pattern_on_single_line = false
resharper_place_single_method_argument_lambda_on_same_line = false
resharper_place_type_attribute_on_same_line = false
resharper_qualified_using_at_nested_scope = true
resharper_space_in_singleline_anonymous_method = false
resharper_space_within_empty_braces = false
Expand Down
2 changes: 1 addition & 1 deletion .github/codeql-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ paths-ignore:
- "src/InfiniFrame.NativeBridge/Native/cmake-build-release/**"
- "src/InfiniFrame.NativeBridge/Native/cmake-build-release-linux/**"
- "src/InfiniFrame.NativeBridge/Native/cmake-build-release-windows/**"
- "src/InfiniFrame.NativeBridge/Native/Dependencies/**"
- "src/InfiniFrame.NativeBridge/Native/src/Dependencies/**"
- "src/InfiniFrame.NativeBridge/Native/packages/**"
- "tests/**"
- "**/node_modules/**"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@
@* ------------------------------------------------------------------------------------------------------------------ *@

@code {
[EditorRequired, Parameter]
[EditorRequired]
[Parameter]
public required WindowAction WindowAction { get; set; }
[Parameter]
public string? Class { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
@* ------------------------------------------------------------------------------------------------------------------ *@

@code {
[EditorRequired, Parameter]
[EditorRequired]
[Parameter]
public ResizeOrigin ResizeThumb { get; set; }
[Parameter]
public int ResizeArea { get; set; } = ResizeAreaValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ namespace InfiniFrame.BlazorWebView.FileProviders.Static;
// ---------------------------------------------------------------------------------------------------------------------
// Code
// ---------------------------------------------------------------------------------------------------------------------
[JsonSourceGenerationOptions(PropertyNameCaseInsensitive = true), JsonSerializable(typeof(StaticWebAssetManifest))]
[JsonSourceGenerationOptions(PropertyNameCaseInsensitive = true)]
[JsonSerializable(typeof(StaticWebAssetManifest))]
internal sealed partial class StaticWebAssetsManifestJsonContext : JsonSerializerContext;
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace InfiniFrame.NativeBridge;
// Code
// ---------------------------------------------------------------------------------------------------------------------
public partial class InfiniFrameNative {
[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_AddCustomSchemeName", SetLastError = true, StringMarshalling = StringMarshalling.Utf8), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_AddCustomSchemeName", SetLastError = true, StringMarshalling = StringMarshalling.Utf8)]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial InfiniFrameNativeInteropStatus AddCustomSchemeName(IntPtr instance, string scheme);
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,26 @@ namespace InfiniFrame.NativeBridge;
// Code
// ---------------------------------------------------------------------------------------------------------------------
public partial class InfiniFrameNative {
[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_ShowOpenFile", SetLastError = true, StringMarshalling = StringMarshalling.Utf8), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_ShowOpenFile", SetLastError = true, StringMarshalling = StringMarshalling.Utf8)]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
private static partial InfiniFrameNativeInteropStatus ShowOpenFilePtr(IntPtr inst, string title, string defaultPath, [MarshalAs(UnmanagedType.I1)] bool multiSelect, string[] filters, int filtersCount, out int resultCount, out IntPtr values);
internal static InfiniFrameNativeInteropStatus ShowOpenFile(IntPtr instance, string title, string defaultPath, bool multiSelect, string[] filters, int filtersCount, out string?[] values) {
InfiniFrameNativeInteropStatus status = ShowOpenFilePtr(instance, title, defaultPath, multiSelect, filters, filtersCount, out int resultCount, out IntPtr ptrValues);
values = PtrToNativeStringArray(ptrValues, resultCount);
return status;
}

[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_ShowOpenFolder", SetLastError = true, StringMarshalling = StringMarshalling.Utf8), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_ShowOpenFolder", SetLastError = true, StringMarshalling = StringMarshalling.Utf8)]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
private static partial InfiniFrameNativeInteropStatus ShowOpenFolderPtr(IntPtr inst, string title, string defaultPath, [MarshalAs(UnmanagedType.I1)] bool multiSelect, out int resultCount, out IntPtr values);
internal static InfiniFrameNativeInteropStatus ShowOpenFolder(IntPtr instance, string title, string defaultPath, bool multiSelect, out string?[] values) {
InfiniFrameNativeInteropStatus status = ShowOpenFolderPtr(instance, title, defaultPath, multiSelect, out int resultCount, out IntPtr ptrValues);
values = PtrToNativeStringArray(ptrValues, resultCount);
return status;
}

[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_ShowSaveFile", SetLastError = true, StringMarshalling = StringMarshalling.Utf8), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_ShowSaveFile", SetLastError = true, StringMarshalling = StringMarshalling.Utf8)]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
private static partial InfiniFrameNativeInteropStatus ShowSaveFilePtr(IntPtr inst, string title, string defaultPath, string[] filters, int filtersCount, string? defaultFileName, out IntPtr value);
internal static InfiniFrameNativeInteropStatus ShowSaveFile(IntPtr instance, string title, string defaultPath, string[] filters, int filtersCount, string? defaultFileName, out string? value) {
InfiniFrameNativeInteropStatus status = ShowSaveFilePtr(instance, title, defaultPath, filters, filtersCount, defaultFileName, out IntPtr ptrValue);
Expand All @@ -43,7 +46,8 @@ internal static InfiniFrameNativeInteropStatus ShowSaveFile(IntPtr instance, str
return status;
}

[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_ShowMessage", SetLastError = true, StringMarshalling = StringMarshalling.Utf8), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_ShowMessage", SetLastError = true, StringMarshalling = StringMarshalling.Utf8)]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial InfiniFrameNativeInteropStatus ShowMessage(IntPtr inst, string title, string text, InfiniFrameDialogButtons buttons, InfiniFrameDialogIcon icon, out InfiniFrameDialogResult value);

private static string?[] PtrToNativeStringArray(IntPtr valuesPtr, int count) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace InfiniFrame.NativeBridge;
// Code
// ---------------------------------------------------------------------------------------------------------------------
public partial class InfiniFrameNative {
[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_Invoke", SetLastError = true), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_Invoke", SetLastError = true)]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial InfiniFrameNativeInteropStatus Invoke(IntPtr instance, Action callback);
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,27 @@ namespace InfiniFrame.NativeBridge;
// Code
// ---------------------------------------------------------------------------------------------------------------------
public partial class InfiniFrameNative {
[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_SetClosingCallback", SetLastError = true), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_SetClosingCallback", SetLastError = true)]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial InfiniFrameNativeInteropStatus SetClosingCallback(IntPtr instance, CppClosingDelegate callback);

[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_setClosedCallback", SetLastError = true), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_setClosedCallback", SetLastError = true)]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial InfiniFrameNativeInteropStatus SetClosedCallback(IntPtr instance, CppClosedDelegate callback);

[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_SetFocusInCallback", SetLastError = true), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_SetFocusInCallback", SetLastError = true)]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial InfiniFrameNativeInteropStatus SetFocusInCallback(IntPtr instance, CppFocusInDelegate callback);

[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_SetFocusOutCallback", SetLastError = true), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_SetFocusOutCallback", SetLastError = true)]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial InfiniFrameNativeInteropStatus SetFocusOutCallback(IntPtr instance, CppFocusOutDelegate callback);

[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_SetMovedCallback", SetLastError = true), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_SetMovedCallback", SetLastError = true)]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial InfiniFrameNativeInteropStatus SetMovedCallback(IntPtr instance, CppMovedDelegate callback);

[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_SetResizedCallback", SetLastError = true), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_SetResizedCallback", SetLastError = true)]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial InfiniFrameNativeInteropStatus SetResizedCallback(IntPtr instance, CppResizedDelegate callback);
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,19 @@ namespace InfiniFrame.NativeBridge;
// Code
// ---------------------------------------------------------------------------------------------------------------------
public partial class InfiniFrameNative {
[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_ctor", SetLastError = true), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_ctor", SetLastError = true)]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial InfiniFrameNativeInteropStatus Constructor([MarshalUsing(typeof(InfiniFrameNativeParametersMarshaller))] in InfiniFrameNativeParameters parameters, out IntPtr value);

[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_dtor"), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_dtor")]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial InfiniFrameNativeInteropStatus Destructor(IntPtr instance);

[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_Close", SetLastError = true), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]

[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_Close", SetLastError = true)]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial InfiniFrameNativeInteropStatus Close(IntPtr instance);

[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_WaitForExit", SetLastError = true), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]

[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_WaitForExit", SetLastError = true)]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial InfiniFrameNativeInteropStatus WaitForExit(IntPtr instance);
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ namespace InfiniFrame.NativeBridge;
// Code
// ---------------------------------------------------------------------------------------------------------------------
public partial class InfiniFrameNative {
[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_FreeString", SetLastError = true), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_FreeString", SetLastError = true)]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial InfiniFrameNativeInteropStatus FreeString(IntPtr value);

[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_FreeStringArray", SetLastError = true), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_FreeStringArray", SetLastError = true)]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial InfiniFrameNativeInteropStatus FreeStringArray(IntPtr values, int count);

[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_GetLastErrorMessage", SetLastError = true), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_GetLastErrorMessage", SetLastError = true)]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
private static partial InfiniFrameNativeInteropStatus GetLastErrorMessagePtr(out IntPtr value);

internal static string? GetLastErrorMessage() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace InfiniFrame.NativeBridge;
// Code
// ---------------------------------------------------------------------------------------------------------------------
public partial class InfiniFrameNative {
[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_GetAllMonitors", SetLastError = true), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_GetAllMonitors", SetLastError = true)]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial InfiniFrameNativeInteropStatus GetAllMonitors(IntPtr instance, CppGetAllMonitorsDelegate callback);
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace InfiniFrame.NativeBridge;
// Code
// ---------------------------------------------------------------------------------------------------------------------
public partial class InfiniFrameNative {
[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_register_mac", SetLastError = true), UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
[LibraryImport(ArtifactManifest.NativeLibraryName, EntryPoint = "InfiniFrameNative_register_mac", SetLastError = true)]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
internal static partial InfiniFrameNativeInteropStatus RegisterMac();
}
Loading
Loading