Ejemplo n.º 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 = Encoding.UTF32.GetBytes(title + '\0');

            unsafe
            {
                fixed(byte *titlePtr = titleAsUtf32)
                {
                    CPointer = sfWindow_createUnicode(mode, (IntPtr)titlePtr, style, ref settings);
                }
            }
        }
Ejemplo n.º 2
0
 static extern IntPtr sfWindow_createFromHandle(IntPtr Handle, ref ContextSettings Params);
Ejemplo n.º 3
0
 static extern IntPtr sfWindow_createUnicode(VideoMode Mode, IntPtr Title, Styles Style, ref ContextSettings Params);
Ejemplo n.º 4
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))
 {
 }