Skip to content

Commit 30847c6

Browse files
committed
Added parameter flags to SciterAPIHost.CreateMainWindow
1 parent 8bf407e commit 30847c6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/EmptyFlow.SciterAPI/Client/SciterAPIHost.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public static IntPtr WindowsDelegateImplementaion ( IntPtr hwnd, uint msg, IntPt
106106
return 0;
107107
}
108108

109-
public void CreateMainWindow ( int width = 0, int height = 0, bool enableDebug = false, bool enableFeature = false ) {
109+
public void CreateMainWindow ( int width = 0, int height = 0, bool enableDebug = false, bool enableFeature = false, WindowsFlags? flags = default ) {
110110
if ( enableDebug ) m_basicApi.SciterSetOption ( IntPtr.Zero, RtOptions.SCITER_SET_DEBUG_MODE, new IntPtr ( 1 ) );
111111
if ( enableFeature ) m_basicApi.SciterSetOption ( IntPtr.Zero, RtOptions.SCITER_SET_SCRIPT_RUNTIME_FEATURES, new IntPtr ( (int) DefaultRuntimeFeatures ) );
112112

@@ -119,7 +119,7 @@ public void CreateMainWindow ( int width = 0, int height = 0, bool enableDebug =
119119
var ptr = Marshal.GetFunctionPointerForDelegate<WindowDelegate> ( WindowsDelegateImplementaion );
120120

121121
m_mainWindow = m_basicApi.SciterCreateWindow (
122-
WindowsFlags.Main | WindowsFlags.Resizeable | WindowsFlags.Titlebar | WindowsFlags.Controls,
122+
flags == null ? WindowsFlags.Main | WindowsFlags.Resizeable | WindowsFlags.Titlebar | WindowsFlags.Controls : flags.Value,
123123
rectangePointer,
124124
RuntimeInformation.IsOSPlatform ( OSPlatform.Windows ) ? ptr : IntPtr.Zero,
125125
IntPtr.Zero,

src/EmptyFlow.SciterAPI/EmptyFlow.SciterAPI.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<PackageLicenseFile>LICENSE</PackageLicenseFile>
2323
<PackageReleaseNotes>
2424
SciterAPIHost.CreateMainWindow parameters width and height now is not mandatory, if you not specify it window it will be centered and sized to half from screen size
25+
SciterAPIHost.CreateMainWindow added parameter flags for control over flags in window, be default it will be WindowsFlags.Main | WindowsFlags.Resizeable | WindowsFlags.Titlebar | WindowsFlags.Controls
2526
SciterAPIHost.GetWindowSizeAndPosition method for get size and position of window
2627
SciterAPIHost.GetWindowActive method for get window activated state
2728
SciterAPIHost.GraphicsDrawImage added override with Vector2 parameters

0 commit comments

Comments
 (0)