diff --git a/Photino.NET/PhotinoDllImports.cs b/Photino.NET/PhotinoDllImports.cs index 645acefc..61e96c85 100644 --- a/Photino.NET/PhotinoDllImports.cs +++ b/Photino.NET/PhotinoDllImports.cs @@ -220,6 +220,18 @@ public partial class PhotinoWindow [UnmanagedCallConv(CallConvs = new Type[] { typeof(System.Runtime.CompilerServices.CallConvCdecl) })] static partial void Photino_SetZoom(IntPtr instance, int zoom); + [LibraryImport(DLL_NAME, SetLastError = true)] + [UnmanagedCallConv(CallConvs = new Type[] { typeof(System.Runtime.CompilerServices.CallConvCdecl) })] + static partial void Photino_SetFlash(IntPtr instance, [MarshalAs(UnmanagedType.I1)] bool state); + + [LibraryImport(DLL_NAME, SetLastError = true)] + [UnmanagedCallConv(CallConvs = new Type[] { typeof(System.Runtime.CompilerServices.CallConvCdecl) })] + static partial void Photino_SetProgress(IntPtr instance, ulong current, ulong total, PhotinoWindowProgressState state); + + [LibraryImport(DLL_NAME, SetLastError = true)] + [UnmanagedCallConv(CallConvs = new Type[] { typeof(System.Runtime.CompilerServices.CallConvCdecl) })] + static partial void Photino_ClearProgress(IntPtr instance); + //MISC [LibraryImport(DLL_NAME, SetLastError = true)] diff --git a/Photino.NET/PhotinoWindow.NET.cs b/Photino.NET/PhotinoWindow.NET.cs index 1f7e9ae4..946047f3 100644 --- a/Photino.NET/PhotinoWindow.NET.cs +++ b/Photino.NET/PhotinoWindow.NET.cs @@ -2289,6 +2289,27 @@ public PhotinoWindow SetZoom(int zoom) return this; } + public PhotinoWindow SetFlash(bool state) + { + Log($".SetFlash({state})"); + Invoke(() => Photino_SetFlash(_nativeInstance, state)); + return this; + } + + public PhotinoWindow SetProgress(ulong current, ulong total, PhotinoWindowProgressState state) + { + Log($".SetProgress({current}, {total}, {state})"); + Invoke(() => Photino_SetProgress(_nativeInstance, current, total, state)); + return this; + } + + public PhotinoWindow ClearProgress() + { + Log($".ClearProgress()"); + Invoke(() => Photino_ClearProgress(_nativeInstance)); + return this; + } + /// /// When true the native window starts up at the OS Default location. /// Default is true. diff --git a/Photino.NET/PhotinoWindowEnums.cs b/Photino.NET/PhotinoWindowEnums.cs new file mode 100644 index 00000000..8d36928f --- /dev/null +++ b/Photino.NET/PhotinoWindowEnums.cs @@ -0,0 +1,11 @@ +using System; + +namespace Photino.NET; + +public enum PhotinoWindowProgressState +{ + Error, + Paused, + Normal, + Indeterminate, +} \ No newline at end of file