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 | |||
| 32 | namespace OpenTK.Platform |
||
| 33 | { |
||
| 34 | /// <summary> |
||
| 35 | /// Defines the interface for a GameWindow. |
||
| 36 | /// </summary> |
||
| 37 | public interface IGameWindow : INativeWindow |
||
| 38 | { |
||
| 39 | /// <summary> |
||
| 40 | /// Enters the game loop of the GameWindow using the maximum update rate. |
||
| 41 | /// </summary> |
||
| 42 | /// <seealso cref="Run(double)"/> |
||
| 43 | void Run(); |
||
| 44 | |||
| 45 | /// <summary> |
||
| 46 | /// Enters the game loop of the GameWindow using the specified update rate. |
||
| 47 | /// </summary> |
||
| 48 | void Run(double updateRate); |
||
| 49 | |||
| 50 | /// <summary> |
||
| 51 | /// Makes the GraphicsContext current on the calling thread. |
||
| 52 | /// </summary> |
||
| 53 | void MakeCurrent(); |
||
| 54 | |||
| 55 | /// <summary> |
||
| 56 | /// Swaps the front and back buffers of the current GraphicsContext, presenting the rendered scene to the user. |
||
| 57 | /// </summary> |
||
| 58 | void SwapBuffers(); |
||
| 59 | |||
| 60 | /// <summary> |
||
| 61 | /// Occurs before the window is displayed for the first time. |
||
| 62 | /// </summary> |
||
| 63 | event EventHandler<EventArgs> Load; |
||
| 64 | |||
| 65 | /// <summary> |
||
| 66 | /// Occurs before the window is destroyed. |
||
| 67 | /// </summary> |
||
| 68 | event EventHandler<EventArgs> Unload; |
||
| 69 | |||
| 70 | /// <summary> |
||
| 71 | /// Occurs when it is time to update a frame. |
||
| 72 | /// </summary> |
||
| 73 | event EventHandler<FrameEventArgs> UpdateFrame; |
||
| 74 | |||
| 75 | /// <summary> |
||
| 76 | /// Occurs when it is time to render a frame. |
||
| 77 | /// </summary> |
||
| 78 | event EventHandler<FrameEventArgs> RenderFrame; |
||
| 79 | } |
||
| 80 | } |