Exemplo n.º 1
0
        public static void SDL_SetWindowTitle(SDL_Window Sdl2Window, string title)
        {
            byte *utf8Bytes;

            if (title != null)
            {
                int byteCount = Encoding.UTF8.GetByteCount(title);
                if (byteCount == 0)
                {
                    byte zeroByte = 0;
                    utf8Bytes = &zeroByte;
                }
                else
                {
                    byte *utf8BytesAlloc = stackalloc byte[byteCount + 1];
                    utf8Bytes = utf8BytesAlloc;
                    fixed(char *titlePtr = title)
                    {
                        int actualBytes = Encoding.UTF8.GetBytes(titlePtr, title.Length, utf8Bytes, byteCount);

                        utf8Bytes[actualBytes] = 0;
                    }
                }
            }
            else
            {
                utf8Bytes = null;
            }

            s_setWindowTitle(Sdl2Window, utf8Bytes);
        }
Exemplo n.º 2
0
 public static void SDL_HideWindow(SDL_Window window) => s_hideWindow(window);
Exemplo n.º 3
0
 public static string SDL_GetWindowTitle(SDL_Window Sdl2Window) => s_getWindowTitle(Sdl2Window);
Exemplo n.º 4
0
 public static void SDL_SetWindowPosition(SDL_Window Sdl2Window, int x, int y) => s_setWindowPosition(Sdl2Window, x, y);
Exemplo n.º 5
0
 public static void SDL_GetWindowSize(SDL_Window Sdl2Window, int *w, int *h) => s_getWindowSize(Sdl2Window, w, h);
Exemplo n.º 6
0
 public static int SDL_GetWindowDisplayIndex(SDL_Window window) => s_sdl_getWindowDisplayIndex(window);
Exemplo n.º 7
0
 public static int SDL_GetWindowOpacity(SDL_Window Sdl2Window, float *opacity) => s_getWindowOpacity(Sdl2Window, opacity);
Exemplo n.º 8
0
 public static uint SDL_GetWindowID(SDL_Window Sdl2Window) => s_getWindowID(Sdl2Window);
Exemplo n.º 9
0
 public static void SDL_GL_SwapWindow(SDL_Window Sdl2Window) => s_gl_swapWindow(Sdl2Window);
Exemplo n.º 10
0
 public static IntPtr SDL_GL_CreateContext(SDL_Window Sdl2Window) => s_gl_createContext(Sdl2Window);
Exemplo n.º 11
0
 public static void SDL_SetWindowTitle(SDL_Window Sdl2Window, string title) => s_setWindowTitle(Sdl2Window, title);
Exemplo n.º 12
0
 public static int SDL_GetWMWindowInfo(SDL_Window Sdl2Window, SDL_SysWMinfo *info) => s_getWindowWMInfo(Sdl2Window, info);
Exemplo n.º 13
0
 public static SDL_Renderer SDL_CreateRenderer(SDL_Window Sdl2Window, int index, uint flags)
 => s_sdl_createRenderer(Sdl2Window, index, flags);
Exemplo n.º 14
0
 public static void SDL_WarpMouseInWindow(SDL_Window window, int x, int y) => s_sdl_warpMouseInWindow(window, x, y);
Exemplo n.º 15
0
 /// <summary>
 /// Enable/disable window grab mouse.
 /// If enabled mouse will be contained inside of window.
 /// </summary>
 public static void SDL_SetWindowGrab(SDL_Window window, bool grabbed) => s_sdl_setWindowGrabbed(window, grabbed);
Exemplo n.º 16
0
 public static void SDL_ShowWindow(SDL_Window Sdl2Window) => s_showWindow(Sdl2Window);
Exemplo n.º 17
0
 public static void SDL_HideWindow(SDL_Window Sdl2Window) => s_hideWindow(Sdl2Window);
Exemplo n.º 18
0
 public static int SDL_GL_MakeCurrent(SDL_Window Sdl2Window, IntPtr context) => s_gl_makeCurrent(Sdl2Window, context);
Exemplo n.º 19
0
 public static int SDL_SetWindowOpacity(SDL_Window Sdl2Window, float opacity) => s_setWindowOpacity(Sdl2Window, opacity);
Exemplo n.º 20
0
 public static SDL_WindowFlags SDL_GetWindowFlags(SDL_Window Sdl2Window) => s_getWindowFlags(Sdl2Window);
Exemplo n.º 21
0
 public static void SDL_SetWindowResizable(SDL_Window window, uint resizable) => s_setWindowResizable(window, resizable);
Exemplo n.º 22
0
 public static void SDL_SetWindowBordered(SDL_Window Sdl2Window, uint bordered) => s_setWindowBordered(Sdl2Window, bordered);
Exemplo n.º 23
0
 public static void SDL_DestroyWindow(SDL_Window Sdl2Window) => s_sdl_destroyWindow(Sdl2Window);
Exemplo n.º 24
0
 public static void SDL_MaximizeWindow(SDL_Window Sdl2Window) => s_maximizeWindow(Sdl2Window);
Exemplo n.º 25
0
 public static void SDL_GetWindowPosition(SDL_Window Sdl2Window, int *x, int *y) => s_getWindowPosition(Sdl2Window, x, y);
Exemplo n.º 26
0
 public static void SDL_MinimizeWindow(SDL_Window Sdl2Window) => s_minimizeWindow(Sdl2Window);
Exemplo n.º 27
0
 public static void SDL_SetWindowSize(SDL_Window Sdl2Window, int w, int h) => s_setWindowSize(Sdl2Window, w, h);
Exemplo n.º 28
0
 public static void SDL_RaiseWindow(SDL_Window Sdl2Window) => s_raiseWindow(Sdl2Window);
Exemplo n.º 29
0
 public static int SDL_SetWindowFullscreen(SDL_Window Sdl2Window, SDL_FullscreenMode mode) => s_setWindowFullscreen(Sdl2Window, mode);
Exemplo n.º 30
0
 public static void SDL_ShowWindow(SDL_Window window) => s_showWindow(window);