SDL Wiki
(This is the documentation for SDL3, which is the current stable version. SDL2 was the previous version!)

SDL_SetAppMetadataProperty

Specify metadata about your app through a set of properties.

Header File

Defined in <SDL3/SDL_init.h>

Syntax

bool SDL_SetAppMetadataProperty(const char *name, const char *value);

Function Parameters

const char * name the name of the metadata property to set.
const char * value the value of the property, or NULL to remove that property.

Return Value

(bool) Returns true on success or false on failure; call SDL_GetError() for more information.

Remarks

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_GetMetadataProperty().

These are the supported properties:

Thread Safety

It is safe to call this function from any thread.

Version

This function is available since SDL 3.0.0.

See Also


CategoryAPI, CategoryAPIFunction, CategoryInit


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.