Açıklama Yok
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

IWindowInfo.cs 5.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. // Copyright © 2015 The CefSharp Authors. All rights reserved.
  2. //
  3. // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
  4. using System;
  5. using CefSharp.Structs;
  6. namespace CefSharp
  7. {
  8. /// <summary>
  9. /// Class representing window information.
  10. /// </summary>
  11. public interface IWindowInfo : IDisposable
  12. {
  13. /// <summary>
  14. /// X coordinate
  15. /// </summary>
  16. int X { get; set; }
  17. /// <summary>
  18. /// Y coordinate
  19. /// </summary>
  20. int Y { get; set; }
  21. /// <summary>
  22. /// Width
  23. /// </summary>
  24. int Width { get; set; }
  25. /// <summary>
  26. /// Height
  27. /// </summary>
  28. int Height { get; set; }
  29. /// <summary>
  30. /// Window style
  31. /// </summary>
  32. uint Style { get; set; }
  33. /// <summary>
  34. /// Ex window style
  35. /// </summary>
  36. uint ExStyle { get; set; }
  37. /// <summary>
  38. /// Parent window handle
  39. /// </summary>
  40. IntPtr ParentWindowHandle { get; set; }
  41. /// <summary>
  42. /// Set to true to create the browser using windowless (off-screen) rendering.
  43. /// No window will be created for the browser and all rendering will occur via the
  44. /// IRenderHandler interface. The <see cref="ParentWindowHandle"/> value will be used to identify monitor info
  45. /// and to act as the parent window for dialogs, context menus, etc. If |<see cref="ParentWindowHandle"/> is not provided then the main screen monitor will be used and some functionality that requires a parent window may not function correctly.
  46. /// In order to create windowless browsers the CefSettings.WindowlessRenderingEnabled value must be set to true.
  47. /// Transparent painting is enabled by default but can be disabled by setting <see cref="IBrowserSettings.BackgroundColor"/> to an opaque value.
  48. /// </summary>
  49. bool WindowlessRenderingEnabled { get; set; }
  50. /// <summary>
  51. /// Set to true to enable shared textures for windowless rendering. Only
  52. /// valid if <see cref="WindowlessRenderingEnabled"/> is also set to true. Currently
  53. /// only supported on Windows (D3D11). This feature is experimental and has many bugs
  54. /// at the moment.
  55. /// </summary>
  56. bool SharedTextureEnabled { get; set; }
  57. /// <summary>
  58. /// Set to true to enable the ability to issue BeginFrame requests from the
  59. /// client application by calling <see cref="IBrowserHost.SendExternalBeginFrame"/>.
  60. /// </summary>
  61. bool ExternalBeginFrameEnabled { get; set; }
  62. /// <summary>
  63. /// Handle for the new browser window. Only used with windowed rendering.
  64. /// </summary>
  65. IntPtr WindowHandle { get; set; }
  66. /// <summary>
  67. /// Window Name
  68. /// </summary>
  69. string WindowName { get; set; }
  70. /// <summary>
  71. /// Create the browser as a child window.
  72. /// Calls GetClientRect(Hwnd) to obtain the window bounds
  73. /// </summary>
  74. /// <param name="parentHandle">parent handle</param>
  75. void SetAsChild(IntPtr parentHandle);
  76. /// <summary>
  77. /// Create the browser as a child window.
  78. /// </summary>
  79. /// <param name="parentHandle">parent handle</param>
  80. /// <param name="windowBounds">window bounds</param>
  81. void SetAsChild(IntPtr parentHandle, Rect windowBounds);
  82. /// <summary>
  83. /// Create the browser as a child window.
  84. /// </summary>
  85. /// <param name="parentHandle">parent handle</param>
  86. /// <param name="left">left</param>
  87. /// <param name="top">top</param>
  88. /// <param name="right">right</param>
  89. /// <param name="bottom">bottom</param>
  90. void SetAsChild(IntPtr parentHandle, int left, int top, int right, int bottom);
  91. /// <summary>
  92. /// Create the browser as a popup window.
  93. /// </summary>
  94. /// <param name="parentHandle">parent handle</param>
  95. /// <param name="windowName">window name</param>
  96. void SetAsPopup(IntPtr parentHandle, string windowName);
  97. /// <summary>
  98. /// Create the browser using windowless (off-screen) rendering.
  99. /// 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.
  100. /// </summary>
  101. /// <param name="parentHandle">Value will be used to identify monitor info and to act as the parent window for dialogs, context menus, etc.
  102. /// If not provided then the main screen monitor will be used and some functionality that requires a parent window may not function correctly.
  103. /// In order to create windowless browsers the CefSettings.windowless_rendering_enabled value must be set to true.</param>
  104. void SetAsWindowless(IntPtr parentHandle);
  105. /// <summary>
  106. /// Used internally to get the underlying <see cref="IWindowInfo"/> instance.
  107. /// Unlikely you'll use this yourself.
  108. /// </summary>
  109. /// <returns>the inner most instance</returns>
  110. [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
  111. IWindowInfo UnWrap();
  112. }
  113. }