Пример #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));
                }
            }
        }
Пример #2
0
 static extern IntPtr sfWindow_createUnicode(VideoMode Mode, IntPtr Title, Styles Style, ref ContextSettings Params);
Пример #3
0
 static extern IntPtr sfWindow_createFromHandle(IntPtr Handle, ref ContextSettings Params);
Пример #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))
 {
 }