#include <AppKit.h>
#include <LocaleRoster.h>
#include <TypeConstants.h>
#include "../../SDL_internal.h"
#include "../SDL_syslocale.h"
Go to the source code of this file.
◆ SDL_SYS_GetPreferredLocales()
| void SDL_SYS_GetPreferredLocales |
( |
char * |
buf, |
|
|
size_t |
buflen |
|
) |
| |
Definition at line 30 of file SDL_syslocale.cc.
32 BLocaleRoster *roster = BLocaleRoster::Default();
36 if (roster->GetPreferredLanguages(&msg) != B_OK) {
37 SDL_SetError(
"BLocaleRoster couldn't get preferred languages");
41 const char *
key =
"language";
42 type_code typ = B_ANY_TYPE;
44 if ((msg.GetInfo(
key, &typ, &numlangs) != B_OK) || (typ != B_STRING_TYPE)) {
49 for (int32
i = 0;
i < numlangs;
i++) {
50 const char *str =
NULL;
51 if (msg.FindString(
key,
i, &str) != B_OK) {
64 if (
i < (numlangs - 1)) {
GLenum GLuint GLenum GLsizei const GLchar * buf
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
References i, NULL, SDL_SetError, SDL_strlcpy, and SDL_strlen.