ktx-codec-0.1.0.0: Khronos texture format
Safe HaskellNone
LanguageHaskell2010

Codec.Ktx.KeyValue

Synopsis

Documentation

Predefined keys

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 #

Writing

newtype Value Source #

A wrapper for raw data.

Use FromValue/ToValue to process.

Constructors

Value ByteString 

Instances

Instances details
Generic Value Source # 
Instance details

Defined in Codec.Ktx.KeyValue

Associated Types

type Rep Value 
Instance details

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)))

Methods

from :: Value -> Rep Value x #

to :: Rep Value x -> Value #

Show Value Source # 
Instance details

Defined in Codec.Ktx.KeyValue

Methods

showsPrec :: Int -> Value -> ShowS #

show :: Value -> String #

showList :: [Value] -> ShowS #

Eq Value Source # 
Instance details

Defined in Codec.Ktx.KeyValue

Methods

(==) :: Value -> Value -> Bool #

(/=) :: Value -> Value -> Bool #

type Rep Value Source # 
Instance details

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)))

number :: (Num a, Show a) => a -> Value Source #

Reading

class FromValue a where Source #

Methods

fromValue :: Value -> Maybe a Source #

Instances

Instances details
FromValue ByteString Source # 
Instance details

Defined in Codec.Ktx.KeyValue

FromValue Text Source # 
Instance details

Defined in Codec.Ktx.KeyValue

FromValue Integer Source # 
Instance details

Defined in Codec.Ktx.KeyValue

textual :: KeyValueData -> Map Text Text Source #

Extract all valid (null-terminated utf8) values.

Binary operations