//
// Generated by Brutal.Sdl.Generate; do not edit by hand.
#nullable enable
namespace Brutal.SdlApi
{
public static unsafe partial class Sdl
{
public static unsafe partial class Init
{
///
/// Compatibility function to initialize the SDL library.
///
/// any of the flags used by SDL_Init(); see SDL_Init for details.
///
/// true on success or false on failure; call SDL_GetError() for more
/// information.
///
///
///
/// This function and SDL_Init() are interchangeable.
///
///
///
/// This function should only be called on the main thread.
///
///
/// This function is available since SDL 3.2.0.
///
///
///
///
public static bool InitSubSystem(SdlInitFlags flags) => PInvoke.InitSubSystem(flags) != 0;
///
/// Shut down specific SDL subsystems.
///
/// any of the flags used by SDL_Init(); see SDL_Init for details.
///
///
/// You still need to call SDL_Quit() even if you close all open subsystems
/// with SDL_QuitSubSystem().
///
///
///
/// This function is not thread safe.
///
///
/// This function is available since SDL 3.2.0.
///
///
///
public static void QuitSubSystem(SdlInitFlags flags) => PInvoke.QuitSubSystem(flags);
///
/// Get a mask of the specified subsystems which are currently initialized.
///
/// any of the flags used by SDL_Init(); see SDL_Init for details.
///
/// a mask of all initialized subsystems if flags is 0, otherwise it
/// returns the initialization status of the specified subsystems.
///
///
/// This function is not thread safe.
///
///
/// This function is available since SDL 3.2.0.
///
///
///
public static SdlInitFlags WasInit(SdlInitFlags flags) => PInvoke.WasInit(flags);
///
/// Return whether this is the main thread.
///
/// true if this thread is the main thread, or false otherwise.
///
///
/// On Apple platforms, the main thread is the thread that runs your program's
/// main() entry point. On other platforms, the main thread is the one that
/// calls SDL_Init(SDL_INIT_VIDEO), which should usually be the one that runs
/// your program's main() entry point. If you are using the main callbacks,
/// SDL_AppInit(), SDL_AppIterate(), and SDL_AppQuit() are all called on the
/// main thread.
///
///
///
/// It is safe to call this function from any thread.
///
///
/// This function is available since SDL 3.2.0.
///
///
public static bool IsMainThread() => PInvoke.IsMainThread() != 0;
///
/// Specify basic metadata about your app.
///
///
/// The name of the application ("My Game 2: Bad Guy's
/// Revenge!").
///
///
/// The version of the application ("1.0.0beta5" or a git
/// hash, or whatever makes sense).
///
///
/// A unique string in reverse-domain format that
/// identifies this app ("com.example.mygame2").
///
///
/// true on success or false on failure; call SDL_GetError() for more
/// information.
///
///
///
/// You can optionally provide metadata about your app to SDL. This is not
/// required, but strongly encouraged.
///
///
/// There are several locations where SDL can make use of metadata (an "About"
/// box in the macOS menu bar, the name of the app can be shown on some audio
/// mixers, etc). Any piece of metadata can be left as NULL, if a specific
/// detail doesn't make sense for the app.
///
///
/// This function should be called as early as possible, before SDL_Init.
/// Multiple calls to this function are allowed, but various state might not
/// change once it has been set up with a previous call to this function.
///
///
/// Passing a NULL removes any previous metadata.
///
///
/// This is a simplified interface for the most important information. You can
/// supply significantly more detailed metadata with
/// SDL_SetAppMetadataProperty().
///
///
///
/// It is safe to call this function from any thread.
///
///
/// This function is available since SDL 3.2.0.
///
///
public static bool SetAppMetadata(string appname, string appversion, string appidentifier) =>
PInvoke.SetAppMetadata(appname, appversion, appidentifier) != 0;
///
/// Specify metadata about your app through a set of properties.
///
/// the name of the metadata property to set.
/// the value of the property, or NULL to remove that property.
///
/// true on success or false on failure; call SDL_GetError() for more
/// information.
///
///
///
/// You can optionally provide metadata about your app to SDL. This is not
/// required, but strongly encouraged.
///
///
/// There are several locations where SDL can make use of metadata (an "About"
/// box in the macOS menu bar, the name of the app can be shown on some audio
/// mixers, etc). Any piece of metadata can be left out, if a specific detail
/// doesn't make sense for the app.
///
///
/// This function should be called as early as possible, before SDL_Init.
/// Multiple calls to this function are allowed, but various state might not
/// change once it has been set up with a previous call to this function.
///
///
/// Once set, this metadata can be read using SDL_GetAppMetadataProperty().
///
///
/// These are the supported properties:
///
///
/// - SDL_PROP_APP_METADATA_NAME_STRING: The human-readable name of the
/// application, like "My Game 2: Bad Guy's Revenge!". This will show up
/// anywhere the OS shows the name of the application separately from window
/// titles, such as volume control applets, etc. This defaults to "SDL
/// Application".
/// - SDL_PROP_APP_METADATA_VERSION_STRING: The version of the app that is
/// running; there are no rules on format, so "1.0.3beta2" and "April 22nd,
/// 2024" and a git hash are all valid options. This has no default.
/// - SDL_PROP_APP_METADATA_IDENTIFIER_STRING: A unique string that
/// identifies this app. This must be in reverse-domain format, like
/// "com.example.mygame2". This string is used by desktop compositors to
/// identify and group windows together, as well as match applications with
/// associated desktop settings and icons. If you plan to package your
/// application in a container such as Flatpak, the app ID should match the
/// name of your Flatpak container as well. This has no default.
/// - SDL_PROP_APP_METADATA_CREATOR_STRING: The human-readable name of the
/// creator/developer/maker of this app, like "MojoWorkshop, LLC"
/// - SDL_PROP_APP_METADATA_COPYRIGHT_STRING: The human-readable copyright
/// notice, like "Copyright (c) 2024 MojoWorkshop, LLC" or whatnot. Keep this
/// to one line, don't paste a copy of a whole software license in here. This
/// has no default.
/// - SDL_PROP_APP_METADATA_URL_STRING: A URL to the app on the web. Maybe a
/// product page, or a storefront, or even a GitHub repository, for user's
/// further information This has no default.
/// - SDL_PROP_APP_METADATA_TYPE_STRING: The type of application this is.
/// Currently this string can be "game" for a video game, "mediaplayer" for a
/// media player, or generically "application" if nothing else applies.
/// Future versions of SDL might add new types. This defaults to
/// "application".
///
///
///
/// It is safe to call this function from any thread.
///
///
/// This function is available since SDL 3.2.0.
///
///
///
public static bool SetAppMetadataProperty(string name, string value) =>
PInvoke.SetAppMetadataProperty(name, value) != 0;
///
/// Get metadata about your app.
///
/// the name of the metadata property to get.
///
/// the current value of the metadata property, or the default if it
/// is not set, NULL for properties with no default.
///
///
///
/// This returns metadata previously set using SDL_SetAppMetadata() or
/// SDL_SetAppMetadataProperty(). See SDL_SetAppMetadataProperty() for the list
/// of available properties and their meanings.
///
///
///
/// It is safe to call this function from any thread, although
/// the string returned is not protected and could potentially be
/// freed if you call SDL_SetAppMetadataProperty() to set that
/// property from another thread.
///
///
/// This function is available since SDL 3.2.0.
///
///
///
public static string? GetAppMetadataProperty(string name) => PInvoke.GetAppMetadataProperty(name);
}
}
}