Beispiel #1
0
        /// <summary>
        /// Create the window
        /// </summary>
        /// <param name="mode">Video mode to use</param>
        /// <param name="title">Title of the window</param>
        /// <param name="style">Window style (Resize | Close by default)</param>
        /// <param name="settings">Creation parameters</param>
        public Window(VideoMode mode, string title, Styles style, ContextSettings settings) :
            base(IntPtr.Zero)
        {
            // Copy the title to a null-terminated UTF-32 byte array
            byte[] titleAsUtf32 = System.Text.Encoding.UTF32.GetBytes(title + '\0');

            unsafe
            {
                fixed(byte *titlePtr = titleAsUtf32)
                {
                    SetThis(sfWindow_createUnicode(mode, (IntPtr)titlePtr, style, ref settings));
                }
            }
        }
Beispiel #2
0
 /// <summary>
 /// Create the window from an existing control
 /// </summary>
 /// <param name="Handle">Platform-specific handle of the control</param>
 /// <param name="settings">Creation parameters</param>
 public Window(IntPtr Handle, ContextSettings settings) :
     base(sfWindow_createFromHandle(Handle, ref settings))
 {
 }
Beispiel #3
0
 static extern IntPtr sfWindow_createFromHandle(IntPtr Handle, ref ContextSettings Params);
Beispiel #4
0
 static extern IntPtr sfWindow_createUnicode(VideoMode Mode, IntPtr Title, Styles Style, ref ContextSettings Params);
Beispiel #5
0
 internal ExposedWindow(VideoMode mode, string title, Styles style, ContextSettings settings)
     : base(mode, title, style, settings)
 {
     Initialize();
 }
Beispiel #6
0
 internal ExposedWindow(IntPtr handle, ContextSettings settings)
     : base(handle, settings)
 {
     Initialize();
 }