sdl3-bindgen-sys
Safe HaskellNone
LanguageGHC2021

SDL3.Sys.Bindgen.Locale

Description

SDL locale services.

This provides a way to get a list of preferred locales (language plus country) for the user. There is exactly one function: SDL_GetPreferredLocales(), which handles all the heavy lifting, and offers documentation on all the strange ways humans might have configured their language settings. A struct to provide locale data.

Locale data is split into a spoken language, like English, and an optional country, like Canada. The language will be in ISO-639 format (so English would be "en"), and the country, if not NULL, will be an ISO-3166 country code (so Canada would be "CA").

See also
sDL_GetPreferredLocales

Since: 3.2.0

Synopsis

Documentation

data SDL_Locale Source #

C declaration
struct SDL_Locale, defined at SDL3/SDL_locale.h 60:16

Constructors

SDL_Locale 

Fields

  • language :: PtrConst CChar

    A language name, like "en" for English.

    C declaration
    language, defined at SDL3/SDL_locale.h 62:17
  • country :: PtrConst CChar

    A country, like "US" for America. Can be NULL.

    C declaration
    country, defined at SDL3/SDL_locale.h 63:17

Instances

Instances details
Storable SDL_Locale Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Locale

Generic SDL_Locale Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Locale

Associated Types

type Rep SDL_Locale 
Instance details

Defined in SDL3.Sys.Bindgen.Locale

type Rep SDL_Locale = D1 ('MetaData "SDL_Locale" "SDL3.Sys.Bindgen.Locale" "sdl3-bindgen-sys-0.0.1.0-inplace" 'False) (C1 ('MetaCons "SDL_Locale" 'PrefixI 'True) (S1 ('MetaSel ('Just "language") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (PtrConst CChar)) :*: S1 ('MetaSel ('Just "country") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (PtrConst CChar))))
Show SDL_Locale Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Locale

Eq SDL_Locale Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Locale

ReadRaw SDL_Locale Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Locale

StaticSize SDL_Locale Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Locale

WriteRaw SDL_Locale Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Locale

Methods

writeRaw :: Ptr SDL_Locale -> SDL_Locale -> IO () #

IsStruct SDL_Locale Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Locale

Methods

zero :: SDL_Locale #

HasCField SDL_Locale "country" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Locale

Associated Types

type CFieldType SDL_Locale "country" 
Instance details

Defined in SDL3.Sys.Bindgen.Locale

Methods

offset# :: Proxy# SDL_Locale -> Proxy# "country" -> Int #

HasCField SDL_Locale "language" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Locale

Associated Types

type CFieldType SDL_Locale "language" 
Instance details

Defined in SDL3.Sys.Bindgen.Locale

Methods

offset# :: Proxy# SDL_Locale -> Proxy# "language" -> Int #

ty ~ PtrConst CChar => HasField "country" SDL_Locale ty Source #

A country, like "US" for America. Can be NULL.

C declaration
country, defined at SDL3/SDL_locale.h 63:17
Instance details

Defined in SDL3.Sys.Bindgen.Locale

Methods

hasField :: SDL_Locale -> (ty -> SDL_Locale, ty) #

ty ~ PtrConst CChar => HasField "language" SDL_Locale ty Source #

A language name, like "en" for English.

C declaration
language, defined at SDL3/SDL_locale.h 62:17
Instance details

Defined in SDL3.Sys.Bindgen.Locale

Methods

hasField :: SDL_Locale -> (ty -> SDL_Locale, ty) #

ty ~ PtrConst CChar => HasField "country" (Ptr SDL_Locale) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Locale

Methods

getField :: Ptr SDL_Locale -> Ptr ty #

ty ~ PtrConst CChar => HasField "language" (Ptr SDL_Locale) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Locale

Methods

getField :: Ptr SDL_Locale -> Ptr ty #

type Rep SDL_Locale Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Locale

type Rep SDL_Locale = D1 ('MetaData "SDL_Locale" "SDL3.Sys.Bindgen.Locale" "sdl3-bindgen-sys-0.0.1.0-inplace" 'False) (C1 ('MetaCons "SDL_Locale" 'PrefixI 'True) (S1 ('MetaSel ('Just "language") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (PtrConst CChar)) :*: S1 ('MetaSel ('Just "country") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (PtrConst CChar))))
type CFieldType SDL_Locale "country" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Locale

type CFieldType SDL_Locale "language" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Locale