Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1452 | chris | 1 | #region License |
| 2 | // |
||
| 3 | // The Open Toolkit Library License |
||
| 4 | // |
||
| 5 | // Copyright (c) 2006 - 2009 the Open Toolkit library. |
||
| 6 | // |
||
| 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy |
||
| 8 | // of this software and associated documentation files (the "Software"), to deal |
||
| 9 | // in the Software without restriction, including without limitation the rights to |
||
| 10 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of |
||
| 11 | // the Software, and to permit persons to whom the Software is furnished to do |
||
| 12 | // so, subject to the following conditions: |
||
| 13 | // |
||
| 14 | // The above copyright notice and this permission notice shall be included in all |
||
| 15 | // copies or substantial portions of the Software. |
||
| 16 | // |
||
| 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
||
| 18 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
||
| 19 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
||
| 20 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
||
| 21 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
||
| 22 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||
| 23 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
||
| 24 | // OTHER DEALINGS IN THE SOFTWARE. |
||
| 25 | // |
||
| 26 | #endregion |
||
| 27 | |||
| 28 | using System; |
||
| 29 | using System.Collections.Generic; |
||
| 30 | using System.Text; |
||
| 31 | using System.Drawing; |
||
| 32 | using OpenTK.Platform; |
||
| 33 | using System.ComponentModel; |
||
| 34 | |||
| 35 | namespace OpenTK |
||
| 36 | { |
||
| 37 | /// <summary> |
||
| 38 | /// Defines the interface for a native window. |
||
| 39 | /// </summary> |
||
| 40 | public interface INativeWindow : IDisposable |
||
| 41 | { |
||
| 42 | /// <summary> |
||
| 43 | /// Gets or sets the <see cref="System.Drawing.Icon"/> of the window. |
||
| 44 | /// </summary> |
||
| 45 | Icon Icon { get; set; } |
||
| 46 | |||
| 47 | /// <summary> |
||
| 48 | /// Gets or sets the title of the window. |
||
| 49 | /// </summary> |
||
| 50 | string Title { get; set; } |
||
| 51 | |||
| 52 | /// <summary> |
||
| 53 | /// Gets a System.Boolean that indicates whether this window has input focus. |
||
| 54 | /// </summary> |
||
| 55 | bool Focused { get; } |
||
| 56 | |||
| 57 | /// <summary> |
||
| 58 | /// Gets or sets a System.Boolean that indicates whether the window is visible. |
||
| 59 | /// </summary> |
||
| 60 | bool Visible { get; set; } |
||
| 61 | |||
| 62 | /// <summary> |
||
| 63 | /// Gets a System.Boolean that indicates whether the window has been created and has not been destroyed. |
||
| 64 | /// </summary> |
||
| 65 | bool Exists { get; } |
||
| 66 | |||
| 67 | /// <summary> |
||
| 68 | /// Gets the <see cref="OpenTK.Platform.IWindowInfo"/> for this window. |
||
| 69 | /// </summary> |
||
| 70 | IWindowInfo WindowInfo { get; } |
||
| 71 | |||
| 72 | /// <summary> |
||
| 73 | /// Gets or sets the <see cref="OpenTK.WindowState"/> for this window. |
||
| 74 | /// </summary> |
||
| 75 | WindowState WindowState { get; set; } |
||
| 76 | |||
| 77 | /// <summary> |
||
| 78 | /// Gets or sets the <see cref="OpenTK.WindowBorder"/> for this window. |
||
| 79 | /// </summary> |
||
| 80 | WindowBorder WindowBorder { get; set; } |
||
| 81 | |||
| 82 | /// <summary> |
||
| 83 | /// Gets or sets a <see cref="System.Drawing.Rectangle"/> structure the contains the external bounds of this window, in screen coordinates. |
||
| 84 | /// External bounds include the title bar, borders and drawing area of the window. |
||
| 85 | /// </summary> |
||
| 86 | Rectangle Bounds { get; set; } |
||
| 87 | |||
| 88 | /// <summary> |
||
| 89 | /// Gets or sets a <see cref="System.Drawing.Point"/> structure that contains the location of this window on the desktop. |
||
| 90 | /// </summary> |
||
| 91 | Point Location { get; set; } |
||
| 92 | |||
| 93 | /// <summary> |
||
| 94 | /// Gets or sets a <see cref="System.Drawing.Size"/> structure that contains the external size of this window. |
||
| 95 | /// </summary> |
||
| 96 | Size Size { get; set; } |
||
| 97 | |||
| 98 | /// <summary> |
||
| 99 | /// Gets or sets the horizontal location of this window on the desktop. |
||
| 100 | /// </summary> |
||
| 101 | int X { get; set; } |
||
| 102 | |||
| 103 | /// <summary> |
||
| 104 | /// Gets or sets the vertical location of this window on the desktop. |
||
| 105 | /// </summary> |
||
| 106 | int Y { get; set; } |
||
| 107 | |||
| 108 | /// <summary> |
||
| 109 | /// Gets or sets the external width of this window. |
||
| 110 | /// </summary> |
||
| 111 | int Width { get; set; } |
||
| 112 | |||
| 113 | /// <summary> |
||
| 114 | /// Gets or sets the external height of this window. |
||
| 115 | /// </summary> |
||
| 116 | int Height { get; set; } |
||
| 117 | |||
| 118 | /// <summary> |
||
| 119 | /// Gets or sets a <see cref="System.Drawing.Rectangle"/> structure that contains the internal bounds of this window, in client coordinates. |
||
| 120 | /// The internal bounds include the drawing area of the window, but exclude the titlebar and window borders. |
||
| 121 | /// </summary> |
||
| 122 | Rectangle ClientRectangle { get; set; } |
||
| 123 | |||
| 124 | /// <summary> |
||
| 125 | /// Gets or sets a <see cref="System.Drawing.Size"/> structure that contains the internal size this window. |
||
| 126 | /// </summary> |
||
| 127 | Size ClientSize { get; set; } |
||
| 128 | |||
| 129 | /// <summary> |
||
| 130 | /// This property is deprecated and should not be used. |
||
| 131 | /// </summary> |
||
| 132 | [Obsolete] |
||
| 133 | OpenTK.Input.IInputDriver InputDriver { get; } |
||
| 134 | |||
| 135 | /// <summary> |
||
| 136 | /// Closes this window. |
||
| 137 | /// </summary> |
||
| 138 | void Close(); |
||
| 139 | |||
| 140 | /// <summary> |
||
| 141 | /// Processes pending window events. |
||
| 142 | /// </summary> |
||
| 143 | void ProcessEvents(); |
||
| 144 | |||
| 145 | /// <summary> |
||
| 146 | /// Transforms the specified point from screen to client coordinates. |
||
| 147 | /// </summary> |
||
| 148 | /// <param name="point"> |
||
| 149 | /// A <see cref="System.Drawing.Point"/> to transform. |
||
| 150 | /// </param> |
||
| 151 | /// <returns> |
||
| 152 | /// The point transformed to client coordinates. |
||
| 153 | /// </returns> |
||
| 154 | Point PointToClient(Point point); |
||
| 155 | |||
| 156 | /// <summary> |
||
| 157 | /// Transforms the specified point from client to screen coordinates. |
||
| 158 | /// </summary> |
||
| 159 | /// <param name="point"> |
||
| 160 | /// A <see cref="System.Drawing.Point"/> to transform. |
||
| 161 | /// </param> |
||
| 162 | /// <returns> |
||
| 163 | /// The point transformed to screen coordinates. |
||
| 164 | /// </returns> |
||
| 165 | Point PointToScreen(Point point); |
||
| 166 | |||
| 167 | /// <summary> |
||
| 168 | /// Occurs whenever the window is moved. |
||
| 169 | /// </summary> |
||
| 170 | event EventHandler<EventArgs> Move; |
||
| 171 | |||
| 172 | /// <summary> |
||
| 173 | /// Occurs whenever the window is resized. |
||
| 174 | /// </summary> |
||
| 175 | event EventHandler<EventArgs> Resize; |
||
| 176 | |||
| 177 | /// <summary> |
||
| 178 | /// Occurs when the window is about to close. |
||
| 179 | /// </summary> |
||
| 180 | event EventHandler<CancelEventArgs> Closing; |
||
| 181 | |||
| 182 | /// <summary> |
||
| 183 | /// Occurs after the window has closed. |
||
| 184 | /// </summary> |
||
| 185 | event EventHandler<EventArgs> Closed; |
||
| 186 | |||
| 187 | /// <summary> |
||
| 188 | /// Occurs when the window is disposed. |
||
| 189 | /// </summary> |
||
| 190 | event EventHandler<EventArgs> Disposed; |
||
| 191 | |||
| 192 | /// <summary> |
||
| 193 | /// Occurs when the <see cref="Icon"/> property of the window changes. |
||
| 194 | /// </summary> |
||
| 195 | event EventHandler<EventArgs> IconChanged; |
||
| 196 | |||
| 197 | /// <summary> |
||
| 198 | /// Occurs when the <see cref="Title"/> property of the window changes. |
||
| 199 | /// </summary> |
||
| 200 | event EventHandler<EventArgs> TitleChanged; |
||
| 201 | |||
| 202 | /// <summary> |
||
| 203 | /// Occurs when the <see cref="Visible"/> property of the window changes. |
||
| 204 | /// </summary> |
||
| 205 | event EventHandler<EventArgs> VisibleChanged; |
||
| 206 | |||
| 207 | /// <summary> |
||
| 208 | /// Occurs when the <see cref="Focused"/> property of the window changes. |
||
| 209 | /// </summary> |
||
| 210 | event EventHandler<EventArgs> FocusedChanged; |
||
| 211 | |||
| 212 | /// <summary> |
||
| 213 | /// Occurs when the <see cref="WindowBorder"/> property of the window changes. |
||
| 214 | /// </summary> |
||
| 215 | event EventHandler<EventArgs> WindowBorderChanged; |
||
| 216 | |||
| 217 | /// <summary> |
||
| 218 | /// Occurs when the <see cref="WindowState"/> property of the window changes. |
||
| 219 | /// </summary> |
||
| 220 | event EventHandler<EventArgs> WindowStateChanged; |
||
| 221 | |||
| 222 | /// <summary> |
||
| 223 | /// Occurs whenever a character is typed. |
||
| 224 | /// </summary> |
||
| 225 | event EventHandler<KeyPressEventArgs> KeyPress; |
||
| 226 | |||
| 227 | /// <summary> |
||
| 228 | /// Occurs whenever the mouse cursor leaves the window <see cref="Bounds"/>. |
||
| 229 | /// </summary> |
||
| 230 | event EventHandler<EventArgs> MouseLeave; |
||
| 231 | |||
| 232 | /// <summary> |
||
| 233 | /// Occurs whenever the mouse cursor enters the window <see cref="Bounds"/>. |
||
| 234 | /// </summary> |
||
| 235 | event EventHandler<EventArgs> MouseEnter; |
||
| 236 | |||
| 237 | //event EventHandler<MouseEventArgs> MouseMove; |
||
| 238 | //event EventHandler<MouseEventArgs> MouseWheel; |
||
| 239 | //event EventHandler<MouseEventArgs> MouseDown; |
||
| 240 | //event EventHandler<MouseEventArgs> MouseUp; |
||
| 241 | //event EventHandler<MouseEventArgs> MouseClick; |
||
| 242 | //event EventHandler<MouseEventArgs> MouseDoubleClick; |
||
| 243 | |||
| 244 | //event EventHandler<KeyEventArgs> KeyDown; |
||
| 245 | //event EventHandler<KeyEventArgs> KeyUp; |
||
| 246 | |||
| 247 | |||
| 248 | //event EventHandler<DragEventArgs> DragDrop; |
||
| 249 | //event EventHandler<DragEventArgs> DragEnter; |
||
| 250 | //event EventHandler<DragEventArgs> DragOver; |
||
| 251 | //event EventHandler<EventArgs> DragLeave; |
||
| 252 | } |
||
| 253 | } |