#region License
//
// The Open Toolkit Library License
//
// Copyright (c) 2006 - 2009 the Open Toolkit library.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights to
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
// the Software, and to permit persons to whom the Software is furnished to do
// so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
//
#endregion
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using OpenTK.Platform;
using System.ComponentModel;
namespace OpenTK
{
///
/// Defines the interface for a native window.
///
public interface INativeWindow : IDisposable
{
///
/// Gets or sets the title of the window.
///
string Title { get; set; }
///
/// Gets a System.Boolean that indicates whether this window has input focus.
///
bool Focused { get; }
///
/// Gets or sets a System.Boolean that indicates whether the window is visible.
///
bool Visible { get; set; }
///
/// Gets a System.Boolean that indicates whether the window has been created and has not been destroyed.
///
bool Exists { get; }
///
/// Gets the for this window.
///
IWindowInfo WindowInfo { get; }
///
/// Gets or sets the for this window.
///
WindowState WindowState { get; set; }
///
/// Gets or sets the for this window.
///
WindowBorder WindowBorder { get; set; }
///
/// Gets or sets a structure the contains the external bounds of this window, in screen coordinates.
/// External bounds include the title bar, borders and drawing area of the window.
///
Rectangle Bounds { get; set; }
///
/// Gets or sets a structure that contains the location of this window on the desktop.
///
Point Location { get; set; }
///
/// Gets or sets a structure that contains the external size of this window.
///
Size Size { get; set; }
///
/// Gets or sets the horizontal location of this window on the desktop.
///
int X { get; set; }
///
/// Gets or sets the vertical location of this window on the desktop.
///
int Y { get; set; }
///
/// Gets or sets the external width of this window.
///
int Width { get; set; }
///
/// Gets or sets the external height of this window.
///
int Height { get; set; }
///
/// Gets or sets a structure that contains the internal bounds of this window, in client coordinates.
/// The internal bounds include the drawing area of the window, but exclude the titlebar and window borders.
///
Rectangle ClientRectangle { get; set; }
///
/// Gets or sets a structure that contains the internal size this window.
///
Size ClientSize { get; set; }
[Obsolete]
OpenTK.Input.IInputDriver InputDriver { get; }
///
/// Closes this window. Equivalent to .
///
void Close();
///
/// Processes pending window events.
///
void ProcessEvents();
///
/// Transforms the specified point from screen to client coordinates.
///
///
/// A to transform.
///
///
/// The point transformed to client coordinates.
///
Point PointToClient(Point point);
///
/// Transforms the specified point from client to screen coordinates.
///
///
/// A to transform.
///
///
/// The point transformed to screen coordinates.
///
Point PointToScreen(Point point);
///
/// Occurs whenever the window is moved.
///
event EventHandler Move;
///
/// Occurs whenever the window is resized.
///
event EventHandler Resize;
///
/// Occurs when the window is about to close.
///
event EventHandler Closing;
///
/// Occurs after the window has closed.
///
event EventHandler Closed;
///
/// Occurs when the window is disposed.
///
event EventHandler Disposed;
///
/// Occurs when the property of the window changes.
///
event EventHandler TitleChanged;
///
/// Occurs when the property of the window changes.
///
event EventHandler VisibleChanged;
///
/// Occurs when the property of the window changes.
///
event EventHandler FocusedChanged;
///
/// Occurs when the property of the window changes.
///
event EventHandler WindowBorderChanged;
///
/// Occurs when the property of the window changes.
///
event EventHandler WindowStateChanged;
///
/// Occurs whenever a character is typed.
///
event EventHandler KeyPress;
//event EventHandler MouseEnter;
//event EventHandler MouseMove;
//event EventHandler MouseWheel;
//event EventHandler MouseDown;
//event EventHandler MouseUp;
//event EventHandler MouseClick;
//event EventHandler MouseDoubleClick;
//event EventHandler KeyDown;
//event EventHandler KeyUp;
//event EventHandler DragDrop;
//event EventHandler DragEnter;
//event EventHandler DragOver;
//event EventHandler DragLeave;
}
}