mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Deprecate CreateWindowAndRenderer() and add WindowPos helpers
This commit is contained in:
parent
45dd528c7b
commit
a273d514c5
1 changed files with 29 additions and 0 deletions
|
@ -631,6 +631,26 @@ namespace SDL2
|
||||||
public const WindowPos Centered = 0x2FFF0000;
|
public const WindowPos Centered = 0x2FFF0000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static int WindowPosUndefinedDisplay(int X)
|
||||||
|
{
|
||||||
|
return ((.) WindowPos.Undefined | X);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool WindowPosIsUndefined(int X)
|
||||||
|
{
|
||||||
|
return (X & 0xFFFF0000) == (.) WindowPos.Undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int WindowPosCenteredDisplay(int X)
|
||||||
|
{
|
||||||
|
return ((.) WindowPos.Centered | X);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool WindowPosIsCentered(int X)
|
||||||
|
{
|
||||||
|
return (X & 0xFFFF0000) == (.) WindowPos.Centered;
|
||||||
|
}
|
||||||
|
|
||||||
[CRepr]
|
[CRepr]
|
||||||
public struct SDL_DisplayMode
|
public struct SDL_DisplayMode
|
||||||
{
|
{
|
||||||
|
@ -655,6 +675,15 @@ namespace SDL2
|
||||||
WindowFlags flags
|
WindowFlags flags
|
||||||
);
|
);
|
||||||
|
|
||||||
|
[LinkName("SDL_CreateWindowAndRenderer"), Obsolete("This method uses WindowPos as width and height parameter types. Use other method that uses int32 instead.", false)]
|
||||||
|
public static extern int CreateWindowAndRenderer(
|
||||||
|
WindowPos width,
|
||||||
|
WindowPos height,
|
||||||
|
WindowFlags window_flags,
|
||||||
|
out Window* window,
|
||||||
|
out Renderer* renderer
|
||||||
|
);
|
||||||
|
|
||||||
[LinkName("SDL_CreateWindowAndRenderer")]
|
[LinkName("SDL_CreateWindowAndRenderer")]
|
||||||
public static extern int CreateWindowAndRenderer(
|
public static extern int CreateWindowAndRenderer(
|
||||||
int32 width,
|
int32 width,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue