aviary-ps/src/ffi.purs

24 lines
717 B
Plaintext
Raw Permalink Normal View History

module Aviary.FFI where
2022-11-09 03:42:02 +00:00
import Prelude
import Data.ArrayBuffer.Types (ArrayBuffer)
2022-11-09 01:37:59 +00:00
import Data.Maybe (Maybe(..))
2022-11-09 03:42:02 +00:00
import Effect (Effect)
import Web.File.Blob (Blob)
-- mimeType :: String
-- blobData :: ArrayBuffer
foreign import arrayBufferToBlob :: String -> ArrayBuffer -> Blob
foreign import nonce_a :: ArrayBuffer
foreign import nonce_b :: ArrayBuffer
2022-11-09 01:37:59 +00:00
foreign import decodeBlurhashImpl :: (forall x. x -> Maybe x) -> (forall x. Maybe x) -> Int -> Int -> String -> Maybe String
decodeBlurhash :: Int -> Int -> String -> Maybe String
decodeBlurhash = decodeBlurhashImpl Just Nothing
decodeBlurhash32 :: String -> Maybe String
decodeBlurhash32 = decodeBlurhash 32 32
2022-11-09 03:42:02 +00:00
foreign import removeSpinner :: Effect Unit