// Copyright © 2015 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using System;
namespace CefSharp
{
///
/// Class representing window information.
///
public interface IWindowInfo : IDisposable
{
///
/// X coordinate
///
int X { get; set; }
///
/// Y coordinate
///
int Y { get; set; }
///
/// Width
///
int Width { get; set; }
///
/// Height
///
int Height { get; set; }
///
/// Window style
///
uint Style { get; set; }
///
/// Ex window style
///
uint ExStyle { get; set; }
///
/// Parent window handle
///
IntPtr ParentWindowHandle { get; set; }
///
/// Set to true to create the browser using windowless (off-screen) rendering.
/// No window will be created for the browser and all rendering will occur via the
/// IRenderHandler interface. The value will be used to identify monitor info
/// and to act as the parent window for dialogs, context menus, etc. If | is not provided then the main screen monitor will be used and some functionality that requires a parent window may not function correctly.
/// In order to create windowless browsers the CefSettings.WindowlessRenderingEnabled value must be set to true.
/// Transparent painting is enabled by default but can be disabled by setting to an opaque value.
///
bool WindowlessRenderingEnabled { get; set; }
///
/// Set to true to enable shared textures for windowless rendering. Only
/// valid if is also set to true. Currently
/// only supported on Windows (D3D11). This feature is experimental and has many bugs
/// at the moment.
///
bool SharedTextureEnabled { get; set; }
///
/// Set to true to enable the ability to issue BeginFrame requests from the
/// client application by calling .
///
bool ExternalBeginFrameEnabled { get; set; }
///
/// Handle for the new browser window. Only used with windowed rendering.
///
IntPtr WindowHandle { get; set; }
///
/// Create the browser as a child window.
/// Calls GetClientRect(Hwnd) to obtain the window bounds
///
/// parent handle
void SetAsChild(IntPtr parentHandle);
///
/// Create the browser as a child window.
///
/// parent handle
/// left
/// top
/// right
/// bottom
void SetAsChild(IntPtr parentHandle, int left, int top, int right, int bottom);
///
/// Create the browser as a popup window.
///
/// parent handle
/// window name
void SetAsPopup(IntPtr parentHandle, string windowName);
///
/// Create the browser using windowless (off-screen) rendering.
/// No window will be created for the browser and all rendering will occur via the CefRenderHandler interface. This window will automatically be transparent unless a colored backgrond is set in the browser settings.
///
/// Value will be used to identify monitor info and to act as the parent window for dialogs, context menus, etc.
/// If not provided then the main screen monitor will be used and some functionality that requires a parent window may not function correctly.
/// In order to create windowless browsers the CefSettings.windowless_rendering_enabled value must be set to true.
void SetAsWindowless(IntPtr parentHandle);
}
}