| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Codec.Ktx.KeyValue
Synopsis
- type KeyValueData = Map Text Value
- lookup :: FromValue a => Text -> KeyValueData -> Maybe a
- insertBytes :: Text -> ByteString -> KeyValueData -> KeyValueData
- insertNumber :: (Num a, Show a) => Text -> a -> KeyValueData -> KeyValueData
- insertText :: Text -> Text -> KeyValueData -> KeyValueData
- pattern KTXcubemapIncomplete :: Text
- pattern KTXanimData :: Text
- pattern KTXastcDecodeMode :: Text
- pattern KTXwriterScParams :: Text
- pattern KTXwriter :: Text
- setWriterWith :: (Text -> Text) -> KeyValueData -> KeyValueData
- writerKtxCodecWith :: (Text -> Text) -> Value
- writerKtxCodec :: Value
- pattern KTXswizzle :: Text
- pattern KTXmetalPixelFormat :: Text
- pattern KTXdxgiFormat__ :: Text
- pattern KTXglFormat :: Text
- pattern KTXorientation :: Text
- newtype Value = Value ByteString
- text :: Text -> Value
- bytes :: ByteString -> Value
- number :: (Num a, Show a) => a -> Value
- class FromValue a where
- textual :: KeyValueData -> Map Text Text
- getDataLe :: Int -> Get KeyValueData
- getData :: Get Word32 -> Int -> Get KeyValueData
- putDataLe :: KeyValueData -> Put
- putData :: (Word32 -> Put) -> KeyValueData -> Put
Documentation
insertBytes :: Text -> ByteString -> KeyValueData -> KeyValueData Source #
insertNumber :: (Num a, Show a) => Text -> a -> KeyValueData -> KeyValueData Source #
insertText :: Text -> Text -> KeyValueData -> KeyValueData Source #
Predefined keys
pattern KTXcubemapIncomplete :: Text Source #
pattern KTXanimData :: Text Source #
pattern KTXastcDecodeMode :: Text Source #
pattern KTXwriterScParams :: Text Source #
pattern KTXwriter :: Text Source #
KTX file writers may, and are strongly encouraged to, identify themselves by including a value with the key KTXwriter
The value is a NUL-terminated UTF-8 string that will uniquely identify the tool writing the file, for example: AcmeCo TexTool v1.0.
Only the most recent writer should be identified. Editing tools must overwrite this value when rewriting a file originally written by a different tool.
setWriterWith :: (Text -> Text) -> KeyValueData -> KeyValueData Source #
Replace writer info with your own, using this package version as baseline.
writerKtxCodecWith :: (Text -> Text) -> Value Source #
Attach your application/library version to the writer tag.
writerKtxCodec :: Value Source #
The value for the KTXwriter we ought to write when using this package to write or modify KTX files.
pattern KTXswizzle :: Text Source #
pattern KTXmetalPixelFormat :: Text Source #
pattern KTXdxgiFormat__ :: Text Source #
pattern KTXglFormat :: Text Source #
pattern KTXorientation :: Text Source #
Writing
Constructors
| Value ByteString |
Instances
| Generic Value Source # | |||||
Defined in Codec.Ktx.KeyValue Associated Types
| |||||
| Show Value Source # | |||||
| Eq Value Source # | |||||
| type Rep Value Source # | |||||
Defined in Codec.Ktx.KeyValue type Rep Value = D1 ('MetaData "Value" "Codec.Ktx.KeyValue" "ktx-codec-0.1.0.0-1Avj63qXZz0BVJA8qkNiid" 'True) (C1 ('MetaCons "Value" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) | |||||
bytes :: ByteString -> Value Source #
Reading
Binary operations
putDataLe :: KeyValueData -> Put Source #