Skip to content

Commit

Permalink
Implement ClearBrowserAutoFill as Windows only solution
Browse files Browse the repository at this point in the history
See: #116
  • Loading branch information
philippjbauer committed Jan 21, 2023
1 parent c2be700 commit 8248338
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Photino.NET/PhotinoDllImports.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public partial class PhotinoWindow


//SET
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl, SetLastError = true, CharSet = CharSet.Auto)] static extern void Photino_setWebView2RuntimePath_win32 (IntPtr instance, string webView2RuntimePath);
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl, SetLastError = true, CharSet = CharSet.Auto)] static extern void Photino_setWebView2RuntimePath_win32(IntPtr instance, string webView2RuntimePath);
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl, SetLastError = true)] static extern void Photino_SetContextMenuEnabled(IntPtr instance, bool enabled);
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl, SetLastError = true)] static extern void Photino_SetDevToolsEnabled(IntPtr instance, bool enabled);
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl, SetLastError = true)] static extern void Photino_SetFullScreen(IntPtr instance, bool fullScreen);
Expand All @@ -66,6 +66,7 @@ public partial class PhotinoWindow

//MISC
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl, SetLastError = true)] static extern void Photino_Center(IntPtr instance);
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl, SetLastError = true)] static extern void Photino_ClearBrowserAutoFill(IntPtr instance);
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl, SetLastError = true, CharSet = CharSet.Auto)] static extern void Photino_SendWebMessage(IntPtr instance, string message);
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl, SetLastError = true, CharSet = CharSet.Auto)] static extern void Photino_ShowMessage(IntPtr instance, string title, string body, uint type);
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl, SetLastError = true, CharSet = CharSet.Auto)] static extern void Photino_ShowNotification(IntPtr instance, string title, string body);
Expand Down
10 changes: 10 additions & 0 deletions Photino.NET/PhotinoWindow.NET.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1196,6 +1196,16 @@ public PhotinoWindow Win32SetWebView2Path(string data)
return this;
}

public PhotinoWindow ClearBrowserAutoFill()
{
if (IsWindowsPlatform)
Invoke(() => Photino_ClearBrowserAutoFill(_nativeInstance));
else
Log("ClearBrowserAutoFill is only supported on the Windows platform");

return this;
}

//NON-FLUENT METHODS - CAN ONLY BE CALLED AFTER WINDOW IS INITIALIZED
//ONE OF THESE 2 METHODS *MUST* BE CALLED TO CREATE THE WINDOW

Expand Down

0 comments on commit 8248338

Please sign in to comment.