Add `[Flags]` attribute to mask/flags enums

This commit is contained in:
Susko3 2024-04-06 12:58:35 +02:00
parent 0196aeb249
commit 0b0906bfea
8 changed files with 29 additions and 0 deletions

View File

@ -23,10 +23,12 @@
3. This notice may not be removed or altered from any source distribution.
*/
using System;
using System.Runtime.InteropServices;
namespace SDL
{
[Flags]
public enum SDL_InitFlags
{
SDL_INIT_TIMER = 0x00000001,

View File

@ -23,6 +23,7 @@
3. This notice may not be removed or altered from any source distribution.
*/
using System;
using static SDL.SDL_Scancode;
namespace SDL
@ -275,6 +276,7 @@ namespace SDL
SDLK_ENDCALL = (SDL_SCANCODE_ENDCALL | (1 << 30)),
}
[Flags]
public enum SDL_Keymod
{
SDL_KMOD_NONE = 0x0000,

View File

@ -23,11 +23,13 @@
3. This notice may not be removed or altered from any source distribution.
*/
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SDL
{
[Flags]
public enum SDL_MessageBoxFlags
{
SDL_MESSAGEBOX_ERROR = 0x00000010,
@ -37,6 +39,7 @@ namespace SDL
SDL_MESSAGEBOX_BUTTONS_RIGHT_TO_LEFT = 0x00000100,
}
[Flags]
public enum SDL_MessageBoxButtonFlags
{
SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT = 0x00000001,

View File

@ -29,6 +29,7 @@ using System.Runtime.InteropServices;
namespace SDL
{
[Flags]
public enum SDL_RendererFlags
{
SDL_RENDERER_PRESENTVSYNC = 0x00000004,

View File

@ -0,0 +1,5 @@
# Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
# See the LICENCE file in the repository root for full licence text.
--with-attribute
SDL_InitFlags=Flags

View File

@ -0,0 +1,5 @@
# Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
# See the LICENCE file in the repository root for full licence text.
--with-attribute
SDL_Keymod=Flags

View File

@ -0,0 +1,6 @@
# Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
# See the LICENCE file in the repository root for full licence text.
--with-attribute
SDL_MessageBoxFlags=Flags
SDL_MessageBoxButtonFlags=Flags

View File

@ -0,0 +1,5 @@
# Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
# See the LICENCE file in the repository root for full licence text.
--with-attribute
SDL_RendererFlags=Flags