using StgSharp.Graphics.GL; using StgSharp.Math; using System; using System.Runtime.InteropServices; namespace StgSharp.Graphics { [StructLayout(LayoutKind.Sequential)] internal struct formInfo { public int width; public int height; public vec4d color; public string name; } public unsafe class Form { internal IntPtr windowPtr; internal formInfo info; internal IntPtr shader; internal LinkedList allControl; public vec2d Size { get { return new vec2d(info.width, info.height); } set { info.width = (int)value.X; info.height = (int)value.Y; } } public int Width { get => info.width; set => info.width = value; } public int Height { get => info.height; set => info.height = value; } public vec4d Color { get => info.color; set => info.color = value; } /// /// Constructor of a Form, creats an instance of a form and /// initilize all the customizing operations. /// public Form() { info = new formInfo(); allControl = new LinkedList(); Init(); //StgSharp.Graphic.LoadForm(this); } //used for internal control purpose internal Form(int instruction) { } internal unsafe void defualtInit() { //IntPtr windowPtr = Graphic.InitWindow(this); } public virtual void Init() { info.color = new vec4d(0.95, 0.93, 0.92, 0); info.width = 800; info.height = 600; //this.windowPtr = Graphic.InitWindow(this); } public void Show() { } } }