Esempio n. 1
0
        /// <summary>Get the shape parameters of a shaped window.</summary>
/// <param name="window">The shaped window whose parameters should be retrieved.</param>
/// <param name="shape_mode">An empty shape-mode structure to fill, or NULL to check whether the window has a shape.</param>
/// <returns>
/// <para>0 if the window has a shape and, provided shape_mode was not NULL, shape_mode has been filled with the mode</para>
/// <para>data, SDL_NONSHAPEABLE_WINDOW if the SDL_Window given is not a shaped window, or SDL_WINDOW_LACKS_SHAPE if</para>
/// <para>the SDL_Window given is a shapeable window currently lacking a shape.</para>
/// </returns>
/// <remarks>
/// <para>SDL_WindowShapeMode</para>
/// <para>SDL_SetWindowShape</para>
/// </remarks>
        public static int GetShapedWindowMode(global::SharpSDL.Window window, global::SharpSDL.SDL_WindowShapeMode shape_mode)
        {
            var __arg0 = ReferenceEquals(window, null) ? global::System.IntPtr.Zero : window.__Instance;
            var __arg1 = ReferenceEquals(shape_mode, null) ? global::System.IntPtr.Zero : shape_mode.__Instance;
            var __ret  = __Internal.GetShapedWindowMode(__arg0, __arg1);

            return(__ret);
        }
Esempio n. 2
0
        /// <summary>Moves the mouse to the given position within the window.</summary>
/// <param name="window">The window to move the mouse into, or NULL for the current mouse focus</param>
/// <param name="x">The x coordinate within the window</param>
/// <param name="y">The y coordinate within the window</param>
/// <remarks>This function generates a mouse motion event</remarks>
        public static void WarpMouseInWindow(global::SharpSDL.Window window, int x, int y)
        {
            var __arg0 = ReferenceEquals(window, null) ? global::System.IntPtr.Zero : window.__Instance;

            __Internal.WarpMouseInWindow(__arg0, x, y);
        }
Esempio n. 3
0
        /// <summary>Create a simple modal message box</summary>
/// <param name="flags">::SDL_MessageBoxFlags</param>
/// <param name="title">UTF-8 title text</param>
/// <param name="message">UTF-8 message text</param>
/// <param name="window">The parent window, or NULL for no parent</param>
/// <returns>0 on success, -1 on error</returns>
/// <remarks>SDL_ShowMessageBox</remarks>
        public static int ShowSimpleMessageBox(uint flags, string title, string message, global::SharpSDL.Window window)
        {
            var __arg3 = ReferenceEquals(window, null) ? global::System.IntPtr.Zero : window.__Instance;
            var __ret  = __Internal.ShowSimpleMessageBox(flags, title, message, __arg3);

            return(__ret);
        }