| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
SDL3.Sys.Bindgen.Time
Description
SDL realtime clock and date/time routines.
There are two data types that are used in this category: SDL_Time, which represents the nanoseconds since a specific moment (an "epoch"), and SDL_DateTime, which breaks time down into human-understandable components: years, months, days, hours, etc.
Much of the functionality is involved in converting those two types to other useful forms. A structure holding a calendar date and time broken down into its components.
Since: 3.2.0
Synopsis
- data SDL_DateTime = SDL_DateTime {}
- newtype SDL_DateFormat = SDL_DateFormat {}
- pattern SDL_DATE_FORMAT_YYYYMMDD :: SDL_DateFormat
- pattern SDL_DATE_FORMAT_DDMMYYYY :: SDL_DateFormat
- pattern SDL_DATE_FORMAT_MMDDYYYY :: SDL_DateFormat
- newtype SDL_TimeFormat = SDL_TimeFormat {}
- pattern SDL_TIME_FORMAT_24HR :: SDL_TimeFormat
- pattern SDL_TIME_FORMAT_12HR :: SDL_TimeFormat
Documentation
data SDL_DateTime Source #
- C declaration
struct SDL_DateTime, defined atSDL3/SDL_time.h 54:16
Constructors
| SDL_DateTime | |
Fields
| |
Instances
newtype SDL_DateFormat Source #
The preferred date format of the current system locale.
- See also
sDL_GetDateTimeLocalePreferences- C declaration
enum SDL_DateFormat, defined atSDL3/SDL_time.h 74:14
Since: 3.2.0
Constructors
| SDL_DateFormat | |
Instances
| Storable SDL_DateFormat Source # | |||||
Defined in SDL3.Sys.Bindgen.Time Methods sizeOf :: SDL_DateFormat -> Int # alignment :: SDL_DateFormat -> Int # peekElemOff :: Ptr SDL_DateFormat -> Int -> IO SDL_DateFormat # pokeElemOff :: Ptr SDL_DateFormat -> Int -> SDL_DateFormat -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_DateFormat # pokeByteOff :: Ptr b -> Int -> SDL_DateFormat -> IO () # peek :: Ptr SDL_DateFormat -> IO SDL_DateFormat # poke :: Ptr SDL_DateFormat -> SDL_DateFormat -> IO () # | |||||
| Generic SDL_DateFormat Source # | |||||
Defined in SDL3.Sys.Bindgen.Time Associated Types
Methods from :: SDL_DateFormat -> Rep SDL_DateFormat x # to :: Rep SDL_DateFormat x -> SDL_DateFormat # | |||||
| Read SDL_DateFormat Source # | |||||
Defined in SDL3.Sys.Bindgen.Time Methods readsPrec :: Int -> ReadS SDL_DateFormat # readList :: ReadS [SDL_DateFormat] # | |||||
| Show SDL_DateFormat Source # | |||||
Defined in SDL3.Sys.Bindgen.Time Methods showsPrec :: Int -> SDL_DateFormat -> ShowS # show :: SDL_DateFormat -> String # showList :: [SDL_DateFormat] -> ShowS # | |||||
| Eq SDL_DateFormat Source # | |||||
Defined in SDL3.Sys.Bindgen.Time Methods (==) :: SDL_DateFormat -> SDL_DateFormat -> Bool # (/=) :: SDL_DateFormat -> SDL_DateFormat -> Bool # | |||||
| Ord SDL_DateFormat Source # | |||||
Defined in SDL3.Sys.Bindgen.Time Methods compare :: SDL_DateFormat -> SDL_DateFormat -> Ordering # (<) :: SDL_DateFormat -> SDL_DateFormat -> Bool # (<=) :: SDL_DateFormat -> SDL_DateFormat -> Bool # (>) :: SDL_DateFormat -> SDL_DateFormat -> Bool # (>=) :: SDL_DateFormat -> SDL_DateFormat -> Bool # max :: SDL_DateFormat -> SDL_DateFormat -> SDL_DateFormat # min :: SDL_DateFormat -> SDL_DateFormat -> SDL_DateFormat # | |||||
| Prim SDL_DateFormat Source # | |||||
Defined in SDL3.Sys.Bindgen.Time Methods sizeOfType# :: Proxy SDL_DateFormat -> Int# # sizeOf# :: SDL_DateFormat -> Int# # alignmentOfType# :: Proxy SDL_DateFormat -> Int# # alignment# :: SDL_DateFormat -> Int# # indexByteArray# :: ByteArray# -> Int# -> SDL_DateFormat # readByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, SDL_DateFormat #) # writeByteArray# :: MutableByteArray# s -> Int# -> SDL_DateFormat -> State# s -> State# s # setByteArray# :: MutableByteArray# s -> Int# -> Int# -> SDL_DateFormat -> State# s -> State# s # indexOffAddr# :: Addr# -> Int# -> SDL_DateFormat # readOffAddr# :: Addr# -> Int# -> State# s -> (# State# s, SDL_DateFormat #) # writeOffAddr# :: Addr# -> Int# -> SDL_DateFormat -> State# s -> State# s # setOffAddr# :: Addr# -> Int# -> Int# -> SDL_DateFormat -> State# s -> State# s # | |||||
| CEnum SDL_DateFormat Source # | |||||
Defined in SDL3.Sys.Bindgen.Time Associated Types
Methods toCEnum :: CEnumZ SDL_DateFormat -> SDL_DateFormat # fromCEnum :: SDL_DateFormat -> CEnumZ SDL_DateFormat # declaredValues :: proxy SDL_DateFormat -> DeclaredValues SDL_DateFormat # showsUndeclared :: proxy SDL_DateFormat -> Int -> CEnumZ SDL_DateFormat -> ShowS # readPrecUndeclared :: ReadPrec SDL_DateFormat # isDeclared :: SDL_DateFormat -> Bool # mkDeclared :: CEnumZ SDL_DateFormat -> Maybe SDL_DateFormat # | |||||
| SequentialCEnum SDL_DateFormat Source # | |||||
Defined in SDL3.Sys.Bindgen.Time | |||||
| HasFFIType SDL_DateFormat Source # | |||||
Defined in SDL3.Sys.Bindgen.Time Associated Types
Methods | |||||
| ReadRaw SDL_DateFormat Source # | |||||
Defined in SDL3.Sys.Bindgen.Time Methods readRaw :: Ptr SDL_DateFormat -> IO SDL_DateFormat # | |||||
| StaticSize SDL_DateFormat Source # | |||||
Defined in SDL3.Sys.Bindgen.Time Methods staticSizeOf :: Proxy SDL_DateFormat -> Int # staticAlignment :: Proxy SDL_DateFormat -> Int # | |||||
| WriteRaw SDL_DateFormat Source # | |||||
Defined in SDL3.Sys.Bindgen.Time Methods writeRaw :: Ptr SDL_DateFormat -> SDL_DateFormat -> IO () # | |||||
| HasCField SDL_DateFormat "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Time Associated Types
| |||||
| ty ~ CUInt => HasField "unwrap" SDL_DateFormat ty Source # | |||||
Defined in SDL3.Sys.Bindgen.Time Methods hasField :: SDL_DateFormat -> (ty -> SDL_DateFormat, ty) # | |||||
| ty ~ CUInt => HasField "unwrap" (Ptr SDL_DateFormat) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Time Methods getField :: Ptr SDL_DateFormat -> Ptr ty # | |||||
| type Rep SDL_DateFormat Source # | |||||
Defined in SDL3.Sys.Bindgen.Time type Rep SDL_DateFormat = D1 ('MetaData "SDL_DateFormat" "SDL3.Sys.Bindgen.Time" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_DateFormat" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CUInt))) | |||||
| type CEnumZ SDL_DateFormat Source # | |||||
Defined in SDL3.Sys.Bindgen.Time | |||||
| type FFIType SDL_DateFormat Source # | |||||
Defined in SDL3.Sys.Bindgen.Time | |||||
| type CFieldType SDL_DateFormat "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Time | |||||
pattern SDL_DATE_FORMAT_YYYYMMDD :: SDL_DateFormat Source #
Year/Month/Day
- C declaration
SDL_DATE_FORMAT_YYYYMMDD, defined atSDL3/SDL_time.h 76:5
pattern SDL_DATE_FORMAT_DDMMYYYY :: SDL_DateFormat Source #
Day/Month/Year
- C declaration
SDL_DATE_FORMAT_DDMMYYYY, defined atSDL3/SDL_time.h 77:5
pattern SDL_DATE_FORMAT_MMDDYYYY :: SDL_DateFormat Source #
Month/Day/Year
- C declaration
SDL_DATE_FORMAT_MMDDYYYY, defined atSDL3/SDL_time.h 78:5
newtype SDL_TimeFormat Source #
The preferred time format of the current system locale.
- See also
sDL_GetDateTimeLocalePreferences- C declaration
enum SDL_TimeFormat, defined atSDL3/SDL_time.h 88:14
Since: 3.2.0
Constructors
| SDL_TimeFormat | |
Instances
| Storable SDL_TimeFormat Source # | |||||
Defined in SDL3.Sys.Bindgen.Time Methods sizeOf :: SDL_TimeFormat -> Int # alignment :: SDL_TimeFormat -> Int # peekElemOff :: Ptr SDL_TimeFormat -> Int -> IO SDL_TimeFormat # pokeElemOff :: Ptr SDL_TimeFormat -> Int -> SDL_TimeFormat -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_TimeFormat # pokeByteOff :: Ptr b -> Int -> SDL_TimeFormat -> IO () # peek :: Ptr SDL_TimeFormat -> IO SDL_TimeFormat # poke :: Ptr SDL_TimeFormat -> SDL_TimeFormat -> IO () # | |||||
| Generic SDL_TimeFormat Source # | |||||
Defined in SDL3.Sys.Bindgen.Time Associated Types
Methods from :: SDL_TimeFormat -> Rep SDL_TimeFormat x # to :: Rep SDL_TimeFormat x -> SDL_TimeFormat # | |||||
| Read SDL_TimeFormat Source # | |||||
Defined in SDL3.Sys.Bindgen.Time Methods readsPrec :: Int -> ReadS SDL_TimeFormat # readList :: ReadS [SDL_TimeFormat] # | |||||
| Show SDL_TimeFormat Source # | |||||
Defined in SDL3.Sys.Bindgen.Time Methods showsPrec :: Int -> SDL_TimeFormat -> ShowS # show :: SDL_TimeFormat -> String # showList :: [SDL_TimeFormat] -> ShowS # | |||||
| Eq SDL_TimeFormat Source # | |||||
Defined in SDL3.Sys.Bindgen.Time Methods (==) :: SDL_TimeFormat -> SDL_TimeFormat -> Bool # (/=) :: SDL_TimeFormat -> SDL_TimeFormat -> Bool # | |||||
| Ord SDL_TimeFormat Source # | |||||
Defined in SDL3.Sys.Bindgen.Time Methods compare :: SDL_TimeFormat -> SDL_TimeFormat -> Ordering # (<) :: SDL_TimeFormat -> SDL_TimeFormat -> Bool # (<=) :: SDL_TimeFormat -> SDL_TimeFormat -> Bool # (>) :: SDL_TimeFormat -> SDL_TimeFormat -> Bool # (>=) :: SDL_TimeFormat -> SDL_TimeFormat -> Bool # max :: SDL_TimeFormat -> SDL_TimeFormat -> SDL_TimeFormat # min :: SDL_TimeFormat -> SDL_TimeFormat -> SDL_TimeFormat # | |||||
| Prim SDL_TimeFormat Source # | |||||
Defined in SDL3.Sys.Bindgen.Time Methods sizeOfType# :: Proxy SDL_TimeFormat -> Int# # sizeOf# :: SDL_TimeFormat -> Int# # alignmentOfType# :: Proxy SDL_TimeFormat -> Int# # alignment# :: SDL_TimeFormat -> Int# # indexByteArray# :: ByteArray# -> Int# -> SDL_TimeFormat # readByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, SDL_TimeFormat #) # writeByteArray# :: MutableByteArray# s -> Int# -> SDL_TimeFormat -> State# s -> State# s # setByteArray# :: MutableByteArray# s -> Int# -> Int# -> SDL_TimeFormat -> State# s -> State# s # indexOffAddr# :: Addr# -> Int# -> SDL_TimeFormat # readOffAddr# :: Addr# -> Int# -> State# s -> (# State# s, SDL_TimeFormat #) # writeOffAddr# :: Addr# -> Int# -> SDL_TimeFormat -> State# s -> State# s # setOffAddr# :: Addr# -> Int# -> Int# -> SDL_TimeFormat -> State# s -> State# s # | |||||
| CEnum SDL_TimeFormat Source # | |||||
Defined in SDL3.Sys.Bindgen.Time Associated Types
Methods toCEnum :: CEnumZ SDL_TimeFormat -> SDL_TimeFormat # fromCEnum :: SDL_TimeFormat -> CEnumZ SDL_TimeFormat # declaredValues :: proxy SDL_TimeFormat -> DeclaredValues SDL_TimeFormat # showsUndeclared :: proxy SDL_TimeFormat -> Int -> CEnumZ SDL_TimeFormat -> ShowS # readPrecUndeclared :: ReadPrec SDL_TimeFormat # isDeclared :: SDL_TimeFormat -> Bool # mkDeclared :: CEnumZ SDL_TimeFormat -> Maybe SDL_TimeFormat # | |||||
| SequentialCEnum SDL_TimeFormat Source # | |||||
Defined in SDL3.Sys.Bindgen.Time | |||||
| HasFFIType SDL_TimeFormat Source # | |||||
Defined in SDL3.Sys.Bindgen.Time Associated Types
Methods | |||||
| ReadRaw SDL_TimeFormat Source # | |||||
Defined in SDL3.Sys.Bindgen.Time Methods readRaw :: Ptr SDL_TimeFormat -> IO SDL_TimeFormat # | |||||
| StaticSize SDL_TimeFormat Source # | |||||
Defined in SDL3.Sys.Bindgen.Time Methods staticSizeOf :: Proxy SDL_TimeFormat -> Int # staticAlignment :: Proxy SDL_TimeFormat -> Int # | |||||
| WriteRaw SDL_TimeFormat Source # | |||||
Defined in SDL3.Sys.Bindgen.Time Methods writeRaw :: Ptr SDL_TimeFormat -> SDL_TimeFormat -> IO () # | |||||
| HasCField SDL_TimeFormat "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Time Associated Types
| |||||
| ty ~ CUInt => HasField "unwrap" SDL_TimeFormat ty Source # | |||||
Defined in SDL3.Sys.Bindgen.Time Methods hasField :: SDL_TimeFormat -> (ty -> SDL_TimeFormat, ty) # | |||||
| ty ~ CUInt => HasField "unwrap" (Ptr SDL_TimeFormat) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Time Methods getField :: Ptr SDL_TimeFormat -> Ptr ty # | |||||
| type Rep SDL_TimeFormat Source # | |||||
Defined in SDL3.Sys.Bindgen.Time type Rep SDL_TimeFormat = D1 ('MetaData "SDL_TimeFormat" "SDL3.Sys.Bindgen.Time" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_TimeFormat" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CUInt))) | |||||
| type CEnumZ SDL_TimeFormat Source # | |||||
Defined in SDL3.Sys.Bindgen.Time | |||||
| type FFIType SDL_TimeFormat Source # | |||||
Defined in SDL3.Sys.Bindgen.Time | |||||
| type CFieldType SDL_TimeFormat "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Time | |||||
pattern SDL_TIME_FORMAT_24HR :: SDL_TimeFormat Source #
24 hour time
- C declaration
SDL_TIME_FORMAT_24HR, defined atSDL3/SDL_time.h 90:5
pattern SDL_TIME_FORMAT_12HR :: SDL_TimeFormat Source #
12 hour time
- C declaration
SDL_TIME_FORMAT_12HR, defined atSDL3/SDL_time.h 91:5