Skip to content

Commit

Permalink
Core - Add IWindowInfo.WindowName
Browse files Browse the repository at this point in the history
Allows setting of the window_name property
  • Loading branch information
amaitland committed Jun 6, 2022
1 parent 666a115 commit bea4307
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ public WindowInfo() { }
public virtual int Width { get { throw null; } set { } }
public virtual System.IntPtr WindowHandle { get { throw null; } set { } }
public virtual bool WindowlessRenderingEnabled { get { throw null; } set { } }
public virtual string WindowName { get { throw null; } set { } }
public virtual int X { get { throw null; } set { } }
public virtual int Y { get { throw null; } set { } }
public void Dispose() { }
Expand Down
12 changes: 12 additions & 0 deletions CefSharp.Core.Runtime/WindowInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,18 @@ namespace CefSharp
}
}

virtual property String^ WindowName
{
String^ get()
{
return StringUtils::ToClr(_windowInfo->window_name);
}
void set(String^ value)
{
StringUtils::AssignNativeFromClr(_windowInfo->window_name, value);
}
}

virtual property bool WindowlessRenderingEnabled
{
bool get()
Expand Down
7 changes: 7 additions & 0 deletions CefSharp.Core/WindowInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@ public IntPtr WindowHandle
set { windowInfo.WindowHandle = value; }
}

/// <inheritdoc/>
public string WindowName
{
get { return windowInfo.WindowName; }
set { windowInfo.WindowName = value; }
}

/// <inheritdoc/>
public void Dispose()
{
Expand Down
4 changes: 4 additions & 0 deletions CefSharp/IWindowInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ public interface IWindowInfo : IDisposable
/// Handle for the new browser window. Only used with windowed rendering.
/// </summary>
IntPtr WindowHandle { get; set; }
/// <summary>
/// Window Name
/// </summary>
string WindowName { get; set; }

/// <summary>
/// Create the browser as a child window.
Expand Down

0 comments on commit bea4307

Please sign in to comment.