2007-08-10 11:27:13 +02:00
|
|
|
|
#region --- License ---
|
|
|
|
|
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
|
|
|
|
* See license.txt for license info
|
|
|
|
|
*/
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
using System;
|
2007-08-05 15:42:31 +02:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
namespace OpenTK.Platform.X11
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Describes an X11 window.
|
|
|
|
|
/// This class supports OpenTK, and is not intended for use by OpenTK programs.
|
|
|
|
|
/// </summary>
|
2007-08-21 11:01:24 +02:00
|
|
|
|
public class WindowInfo : IWindowInfo
|
2007-08-05 15:42:31 +02:00
|
|
|
|
{
|
2007-08-21 11:01:24 +02:00
|
|
|
|
public WindowInfo()
|
2007-08-10 11:27:13 +02:00
|
|
|
|
{
|
|
|
|
|
visinfo = new VisualInfo();
|
2007-08-07 22:32:26 +02:00
|
|
|
|
}
|
2007-08-21 11:01:24 +02:00
|
|
|
|
|
|
|
|
|
public WindowInfo(WindowInfo parent)
|
2007-08-10 11:27:13 +02:00
|
|
|
|
{
|
2007-08-09 14:14:00 +02:00
|
|
|
|
this.Handle = parent.Handle;
|
2007-08-05 15:42:31 +02:00
|
|
|
|
this.TopLevelWindow = parent.TopLevelWindow;
|
|
|
|
|
this.Screen = parent.Screen;
|
|
|
|
|
this.Display = parent.Display;
|
|
|
|
|
this.RootWindow = parent.RootWindow;
|
2007-08-05 20:52:46 +02:00
|
|
|
|
this.VisualInfo = parent.VisualInfo;
|
2007-08-10 11:27:13 +02:00
|
|
|
|
this.Parent = parent;
|
2007-08-05 15:42:31 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private IntPtr rootWindow, handle, topLevelWindow, display;
|
|
|
|
|
private int screen;
|
|
|
|
|
private WindowInfo parent;
|
2007-08-05 20:51:07 +02:00
|
|
|
|
private VisualInfo visinfo;
|
2007-08-05 15:42:31 +02:00
|
|
|
|
|
2007-08-21 11:01:24 +02:00
|
|
|
|
public IntPtr RootWindow { get { return rootWindow; } set { rootWindow = value; } }
|
|
|
|
|
public IntPtr TopLevelWindow { get { return topLevelWindow; } set { topLevelWindow = value; } }
|
|
|
|
|
public IntPtr Display { get { return display; } set { display = value; } }
|
|
|
|
|
public int Screen { get { return screen; } set { screen = value; } }
|
|
|
|
|
public VisualInfo VisualInfo { get { return visinfo; } set { visinfo = value; } }
|
2007-08-05 15:42:31 +02:00
|
|
|
|
|
2007-08-21 11:01:24 +02:00
|
|
|
|
public IntPtr Handle { get { return handle; } set { handle = value; } }
|
|
|
|
|
public IWindowInfo Parent { get { return parent; } set { parent = value as WindowInfo; } }
|
2007-08-05 18:44:31 +02:00
|
|
|
|
|
|
|
|
|
public override string ToString()
|
|
|
|
|
{
|
2007-08-05 21:04:06 +02:00
|
|
|
|
return String.Format("X11.WindowInfo: Display {0}, Screen {1}, Handle {2}, Parent: ({3})",
|
2007-08-05 18:54:14 +02:00
|
|
|
|
this.Display, this.Screen, this.Handle, this.Parent != null ? this.Parent.ToString() : "null");
|
2007-08-05 18:44:31 +02:00
|
|
|
|
}
|
2007-08-05 15:42:31 +02:00
|
|
|
|
}
|
|
|
|
|
}
|