23 #include <LocaleRoster.h>
24 #include <TypeConstants.h>
26 #include "../../SDL_internal.h"
27 #include "../SDL_syslocale.h"
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
void SDL_SYS_GetPreferredLocales(char *buf, size_t buflen)
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)