Skip to content

Commit

Permalink
Replace PInvokes in PreviewHandler with CsWin32
Browse files Browse the repository at this point in the history
  • Loading branch information
0x5bfa committed Aug 30, 2024
1 parent b03b9fd commit bdc4541
Show file tree
Hide file tree
Showing 4 changed files with 171 additions and 278 deletions.
17 changes: 16 additions & 1 deletion src/Files.App.CsWin32/NativeMethods.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
{
"$schema": "https://aka.ms/CsWin32.schema.json",
"allowMarshaling": false,
"public": true
"public": true,
"comInterop": {
"preserveSigMethods": [
"IEnumShellItems.Next",
"IInitializeWithFile.Initialize",
"IInitializeWithItem.Initialize",
"IInitializeWithStream.Initialize",
"IPreviewHandler.QueryFocus",
"IPreviewHandler.SetRect",
"IObjectWithSite.SetSite",
"IPreviewHandler.SetWindow",
"IPreviewHandlerVisuals.SetBackgroundColor",
"IPreviewHandlerVisuals.SetFont",
"IPreviewHandlerVisuals.SetTextColor",
]
}
}
7 changes: 7 additions & 0 deletions src/Files.App.CsWin32/NativeMethods.txt
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,10 @@ GetModuleHandle
RegisterClassEx
CREATESTRUCTW
AssocQueryString
IPreviewHandlerFrame
IPreviewHandlerVisuals
IObjectWithSite
IInitializeWithStream
IInitializeWithStreamNative
IInitializeWithFile
IInitializeWithItem
Loading

0 comments on commit bdc4541

Please sign in to comment.