module Bindings.SANE where
import Foreign.Ptr (Ptr,FunPtr,plusPtr)
import Foreign.Ptr (wordPtrToPtr,castPtrToFunPtr)
import Foreign.Storable
import Foreign.C.Types
import Foreign.C.String (CString,CStringLen,CWString,CWStringLen)
import Foreign.Marshal.Alloc (alloca)
import Foreign.Marshal.Array (peekArray,pokeArray)
import Data.Int
import Data.Word
c'SANE_CURRENT_MAJOR = 1
c'SANE_CURRENT_MAJOR :: (Num a) => a
c'SANE_CURRENT_MINOR = 0
c'SANE_CURRENT_MINOR :: (Num a) => a
foreign import ccall "inline_SANE_VERSION_CODE" c'SANE_VERSION_CODE
:: C'SANE_Int -> C'SANE_Int -> C'SANE_Int -> C'SANE_Int
foreign import ccall "inline_SANE_VERSION_MAJOR" c'SANE_VERSION_MAJOR
:: C'SANE_Int -> C'SANE_Int
foreign import ccall "inline_SANE_VERSION_MINOR" c'SANE_VERSION_MINOR
:: C'SANE_Int -> C'SANE_Int
foreign import ccall "inline_SANE_VERSION_BUILD" c'SANE_VERSION_BUILD
:: C'SANE_Int -> C'SANE_Int
c'SANE_FALSE = 0
c'SANE_FALSE :: (Num a) => a
c'SANE_TRUE = 1
c'SANE_TRUE :: (Num a) => a
type C'SANE_Byte = CUChar
type C'SANE_Word = CInt
type C'SANE_Bool = CInt
type C'SANE_Int = CInt
type C'SANE_Char = CChar
type C'SANE_String = CString
type C'SANE_String_Const = CString
type C'SANE_Handle = Ptr ()
type C'SANE_Fixed = CInt
c'SANE_FIXED_SCALE_SHIFT = 16
c'SANE_FIXED_SCALE_SHIFT :: (Num a) => a
foreign import ccall "inline_SANE_FIX" c'SANE_FIX
:: CDouble -> C'SANE_Fixed
foreign import ccall "inline_SANE_UNFIX" c'SANE_UNFIX
:: C'SANE_Fixed -> CDouble
type C'SANE_Status = CUInt
c'SANE_STATUS_GOOD = 0
c'SANE_STATUS_GOOD :: (Num a) => a
c'SANE_STATUS_UNSUPPORTED = 1
c'SANE_STATUS_UNSUPPORTED :: (Num a) => a
c'SANE_STATUS_CANCELLED = 2
c'SANE_STATUS_CANCELLED :: (Num a) => a
c'SANE_STATUS_DEVICE_BUSY = 3
c'SANE_STATUS_DEVICE_BUSY :: (Num a) => a
c'SANE_STATUS_INVAL = 4
c'SANE_STATUS_INVAL :: (Num a) => a
c'SANE_STATUS_EOF = 5
c'SANE_STATUS_EOF :: (Num a) => a
c'SANE_STATUS_JAMMED = 6
c'SANE_STATUS_JAMMED :: (Num a) => a
c'SANE_STATUS_NO_DOCS = 7
c'SANE_STATUS_NO_DOCS :: (Num a) => a
c'SANE_STATUS_COVER_OPEN = 8
c'SANE_STATUS_COVER_OPEN :: (Num a) => a
c'SANE_STATUS_IO_ERROR = 9
c'SANE_STATUS_IO_ERROR :: (Num a) => a
c'SANE_STATUS_NO_MEM = 10
c'SANE_STATUS_NO_MEM :: (Num a) => a
c'SANE_STATUS_ACCESS_DENIED = 11
c'SANE_STATUS_ACCESS_DENIED :: (Num a) => a
type C'SANE_Value_Type = CUInt
c'SANE_TYPE_BOOL = 0
c'SANE_TYPE_BOOL :: (Num a) => a
c'SANE_TYPE_INT = 1
c'SANE_TYPE_INT :: (Num a) => a
c'SANE_TYPE_FIXED = 2
c'SANE_TYPE_FIXED :: (Num a) => a
c'SANE_TYPE_STRING = 3
c'SANE_TYPE_STRING :: (Num a) => a
c'SANE_TYPE_BUTTON = 4
c'SANE_TYPE_BUTTON :: (Num a) => a
c'SANE_TYPE_GROUP = 5
c'SANE_TYPE_GROUP :: (Num a) => a
type C'SANE_Unit = CUInt
c'SANE_UNIT_NONE = 0
c'SANE_UNIT_NONE :: (Num a) => a
c'SANE_UNIT_PIXEL = 1
c'SANE_UNIT_PIXEL :: (Num a) => a
c'SANE_UNIT_BIT = 2
c'SANE_UNIT_BIT :: (Num a) => a
c'SANE_UNIT_MM = 3
c'SANE_UNIT_MM :: (Num a) => a
c'SANE_UNIT_DPI = 4
c'SANE_UNIT_DPI :: (Num a) => a
c'SANE_UNIT_PERCENT = 5
c'SANE_UNIT_PERCENT :: (Num a) => a
c'SANE_UNIT_MICROSECOND = 6
c'SANE_UNIT_MICROSECOND :: (Num a) => a
data C'SANE_Device = C'SANE_Device{
c'SANE_Device'name :: C'SANE_String_Const,
c'SANE_Device'vendor :: C'SANE_String_Const,
c'SANE_Device'model :: C'SANE_String_Const,
c'SANE_Device'type :: C'SANE_String_Const
} deriving (Eq,Show)
p'SANE_Device'name p = plusPtr p 0
p'SANE_Device'name :: Ptr (C'SANE_Device) -> Ptr (C'SANE_String_Const)
p'SANE_Device'vendor p = plusPtr p 8
p'SANE_Device'vendor :: Ptr (C'SANE_Device) -> Ptr (C'SANE_String_Const)
p'SANE_Device'model p = plusPtr p 16
p'SANE_Device'model :: Ptr (C'SANE_Device) -> Ptr (C'SANE_String_Const)
p'SANE_Device'type p = plusPtr p 24
p'SANE_Device'type :: Ptr (C'SANE_Device) -> Ptr (C'SANE_String_Const)
instance Storable C'SANE_Device where
sizeOf _ = 32
alignment _ = 8
peek p = do
v0 <- peekByteOff p 0
v1 <- peekByteOff p 8
v2 <- peekByteOff p 16
v3 <- peekByteOff p 24
return $ C'SANE_Device v0 v1 v2 v3
poke p (C'SANE_Device v0 v1 v2 v3) = do
pokeByteOff p 0 v0
pokeByteOff p 8 v1
pokeByteOff p 16 v2
pokeByteOff p 24 v3
return ()
c'SANE_CAP_SOFT_SELECT = 1
c'SANE_CAP_SOFT_SELECT :: (Num a) => a
c'SANE_CAP_HARD_SELECT = 2
c'SANE_CAP_HARD_SELECT :: (Num a) => a
c'SANE_CAP_SOFT_DETECT = 4
c'SANE_CAP_SOFT_DETECT :: (Num a) => a
c'SANE_CAP_EMULATED = 8
c'SANE_CAP_EMULATED :: (Num a) => a
c'SANE_CAP_AUTOMATIC = 16
c'SANE_CAP_AUTOMATIC :: (Num a) => a
c'SANE_CAP_INACTIVE = 32
c'SANE_CAP_INACTIVE :: (Num a) => a
c'SANE_CAP_ADVANCED = 64
c'SANE_CAP_ADVANCED :: (Num a) => a
foreign import ccall "inline_SANE_OPTION_IS_ACTIVE" c'SANE_OPTION_IS_ACTIVE
:: CInt -> CInt
foreign import ccall "inline_SANE_OPTION_IS_SETTABLE" c'SANE_OPTION_IS_SETTABLE
:: CInt -> CInt
c'SANE_INFO_INEXACT = 1
c'SANE_INFO_INEXACT :: (Num a) => a
c'SANE_INFO_RELOAD_OPTIONS = 2
c'SANE_INFO_RELOAD_OPTIONS :: (Num a) => a
c'SANE_INFO_RELOAD_PARAMS = 4
c'SANE_INFO_RELOAD_PARAMS :: (Num a) => a
type C'SANE_Constraint_Type = CUInt
c'SANE_CONSTRAINT_NONE = 0
c'SANE_CONSTRAINT_NONE :: (Num a) => a
c'SANE_CONSTRAINT_RANGE = 1
c'SANE_CONSTRAINT_RANGE :: (Num a) => a
c'SANE_CONSTRAINT_WORD_LIST = 2
c'SANE_CONSTRAINT_WORD_LIST :: (Num a) => a
c'SANE_CONSTRAINT_STRING_LIST = 3
c'SANE_CONSTRAINT_STRING_LIST :: (Num a) => a
data C'SANE_Range = C'SANE_Range{
c'SANE_Range'min :: C'SANE_Word,
c'SANE_Range'max :: C'SANE_Word,
c'SANE_Range'quant :: C'SANE_Word
} deriving (Eq,Show)
p'SANE_Range'min p = plusPtr p 0
p'SANE_Range'min :: Ptr (C'SANE_Range) -> Ptr (C'SANE_Word)
p'SANE_Range'max p = plusPtr p 4
p'SANE_Range'max :: Ptr (C'SANE_Range) -> Ptr (C'SANE_Word)
p'SANE_Range'quant p = plusPtr p 8
p'SANE_Range'quant :: Ptr (C'SANE_Range) -> Ptr (C'SANE_Word)
instance Storable C'SANE_Range where
sizeOf _ = 12
alignment _ = 4
peek p = do
v0 <- peekByteOff p 0
v1 <- peekByteOff p 4
v2 <- peekByteOff p 8
return $ C'SANE_Range v0 v1 v2
poke p (C'SANE_Range v0 v1 v2) = do
pokeByteOff p 0 v0
pokeByteOff p 4 v1
pokeByteOff p 8 v2
return ()
data C'SANE_Option_Descriptor = C'SANE_Option_Descriptor{
c'SANE_Option_Descriptor'name :: C'SANE_String_Const,
c'SANE_Option_Descriptor'title :: C'SANE_String_Const,
c'SANE_Option_Descriptor'desc :: C'SANE_String_Const,
c'SANE_Option_Descriptor'type :: C'SANE_Value_Type,
c'SANE_Option_Descriptor'unit :: C'SANE_Unit,
c'SANE_Option_Descriptor'size :: C'SANE_Int,
c'SANE_Option_Descriptor'cap :: C'SANE_Int,
c'SANE_Option_Descriptor'constraint_type :: C'SANE_Constraint_Type,
c'SANE_Option_Descriptor'constraint'string_list :: Ptr C'SANE_String_Const,
c'SANE_Option_Descriptor'constraint'word_list :: Ptr C'SANE_Word,
c'SANE_Option_Descriptor'constraint'range :: Ptr C'SANE_Range
} deriving (Eq,Show)
p'SANE_Option_Descriptor'name p = plusPtr p 0
p'SANE_Option_Descriptor'name :: Ptr (C'SANE_Option_Descriptor) -> Ptr (C'SANE_String_Const)
p'SANE_Option_Descriptor'title p = plusPtr p 8
p'SANE_Option_Descriptor'title :: Ptr (C'SANE_Option_Descriptor) -> Ptr (C'SANE_String_Const)
p'SANE_Option_Descriptor'desc p = plusPtr p 16
p'SANE_Option_Descriptor'desc :: Ptr (C'SANE_Option_Descriptor) -> Ptr (C'SANE_String_Const)
p'SANE_Option_Descriptor'type p = plusPtr p 24
p'SANE_Option_Descriptor'type :: Ptr (C'SANE_Option_Descriptor) -> Ptr (C'SANE_Value_Type)
p'SANE_Option_Descriptor'unit p = plusPtr p 28
p'SANE_Option_Descriptor'unit :: Ptr (C'SANE_Option_Descriptor) -> Ptr (C'SANE_Unit)
p'SANE_Option_Descriptor'size p = plusPtr p 32
p'SANE_Option_Descriptor'size :: Ptr (C'SANE_Option_Descriptor) -> Ptr (C'SANE_Int)
p'SANE_Option_Descriptor'cap p = plusPtr p 36
p'SANE_Option_Descriptor'cap :: Ptr (C'SANE_Option_Descriptor) -> Ptr (C'SANE_Int)
p'SANE_Option_Descriptor'constraint_type p = plusPtr p 40
p'SANE_Option_Descriptor'constraint_type :: Ptr (C'SANE_Option_Descriptor) -> Ptr (C'SANE_Constraint_Type)
p'SANE_Option_Descriptor'constraint'string_list p = plusPtr p 48
p'SANE_Option_Descriptor'constraint'string_list :: Ptr (C'SANE_Option_Descriptor) -> Ptr (Ptr C'SANE_String_Const)
p'SANE_Option_Descriptor'constraint'word_list p = plusPtr p 48
p'SANE_Option_Descriptor'constraint'word_list :: Ptr (C'SANE_Option_Descriptor) -> Ptr (Ptr C'SANE_Word)
p'SANE_Option_Descriptor'constraint'range p = plusPtr p 48
p'SANE_Option_Descriptor'constraint'range :: Ptr (C'SANE_Option_Descriptor) -> Ptr (Ptr C'SANE_Range)
u'SANE_Option_Descriptor'constraint'string_list :: C'SANE_Option_Descriptor -> Ptr C'SANE_String_Const -> IO C'SANE_Option_Descriptor
u'SANE_Option_Descriptor'constraint'string_list v vf = alloca $ \p -> do
poke p v
pokeByteOff p 48 vf
vu <- peek p
return $ v
{c'SANE_Option_Descriptor'constraint'string_list = c'SANE_Option_Descriptor'constraint'string_list vu}
{c'SANE_Option_Descriptor'constraint'word_list = c'SANE_Option_Descriptor'constraint'word_list vu}
{c'SANE_Option_Descriptor'constraint'range = c'SANE_Option_Descriptor'constraint'range vu}
u'SANE_Option_Descriptor'constraint'word_list :: C'SANE_Option_Descriptor -> Ptr C'SANE_Word -> IO C'SANE_Option_Descriptor
u'SANE_Option_Descriptor'constraint'word_list v vf = alloca $ \p -> do
poke p v
pokeByteOff p 48 vf
vu <- peek p
return $ v
{c'SANE_Option_Descriptor'constraint'string_list = c'SANE_Option_Descriptor'constraint'string_list vu}
{c'SANE_Option_Descriptor'constraint'word_list = c'SANE_Option_Descriptor'constraint'word_list vu}
{c'SANE_Option_Descriptor'constraint'range = c'SANE_Option_Descriptor'constraint'range vu}
u'SANE_Option_Descriptor'constraint'range :: C'SANE_Option_Descriptor -> Ptr C'SANE_Range -> IO C'SANE_Option_Descriptor
u'SANE_Option_Descriptor'constraint'range v vf = alloca $ \p -> do
poke p v
pokeByteOff p 48 vf
vu <- peek p
return $ v
{c'SANE_Option_Descriptor'constraint'string_list = c'SANE_Option_Descriptor'constraint'string_list vu}
{c'SANE_Option_Descriptor'constraint'word_list = c'SANE_Option_Descriptor'constraint'word_list vu}
{c'SANE_Option_Descriptor'constraint'range = c'SANE_Option_Descriptor'constraint'range vu}
instance Storable C'SANE_Option_Descriptor where
sizeOf _ = 56
alignment _ = 8
peek p = do
v0 <- peekByteOff p 0
v1 <- peekByteOff p 8
v2 <- peekByteOff p 16
v3 <- peekByteOff p 24
v4 <- peekByteOff p 28
v5 <- peekByteOff p 32
v6 <- peekByteOff p 36
v7 <- peekByteOff p 40
v8 <- peekByteOff p 48
v9 <- peekByteOff p 48
v10 <- peekByteOff p 48
return $ C'SANE_Option_Descriptor v0 v1 v2 v3 v4 v5 v6 v7 v8 v9 v10
poke p (C'SANE_Option_Descriptor v0 v1 v2 v3 v4 v5 v6 v7 v8 v9 v10) = do
pokeByteOff p 0 v0
pokeByteOff p 8 v1
pokeByteOff p 16 v2
pokeByteOff p 24 v3
pokeByteOff p 28 v4
pokeByteOff p 32 v5
pokeByteOff p 36 v6
pokeByteOff p 40 v7
pokeByteOff p 48 v8
pokeByteOff p 48 v9
pokeByteOff p 48 v10
return ()
type C'SANE_Action = CUInt
c'SANE_ACTION_GET_VALUE = 0
c'SANE_ACTION_GET_VALUE :: (Num a) => a
c'SANE_ACTION_SET_VALUE = 1
c'SANE_ACTION_SET_VALUE :: (Num a) => a
c'SANE_ACTION_SET_AUTO = 2
c'SANE_ACTION_SET_AUTO :: (Num a) => a
type C'SANE_Frame = CUInt
c'SANE_FRAME_GRAY = 0
c'SANE_FRAME_GRAY :: (Num a) => a
c'SANE_FRAME_RGB = 1
c'SANE_FRAME_RGB :: (Num a) => a
c'SANE_FRAME_RED = 2
c'SANE_FRAME_RED :: (Num a) => a
c'SANE_FRAME_GREEN = 3
c'SANE_FRAME_GREEN :: (Num a) => a
c'SANE_FRAME_BLUE = 4
c'SANE_FRAME_BLUE :: (Num a) => a
data C'SANE_Parameters = C'SANE_Parameters{
c'SANE_Parameters'format :: C'SANE_Frame,
c'SANE_Parameters'last_frame :: C'SANE_Bool,
c'SANE_Parameters'bytes_per_line :: C'SANE_Int,
c'SANE_Parameters'pixels_per_line :: C'SANE_Int,
c'SANE_Parameters'lines :: C'SANE_Int,
c'SANE_Parameters'depth :: C'SANE_Int
} deriving (Eq,Show)
p'SANE_Parameters'format p = plusPtr p 0
p'SANE_Parameters'format :: Ptr (C'SANE_Parameters) -> Ptr (C'SANE_Frame)
p'SANE_Parameters'last_frame p = plusPtr p 4
p'SANE_Parameters'last_frame :: Ptr (C'SANE_Parameters) -> Ptr (C'SANE_Bool)
p'SANE_Parameters'bytes_per_line p = plusPtr p 8
p'SANE_Parameters'bytes_per_line :: Ptr (C'SANE_Parameters) -> Ptr (C'SANE_Int)
p'SANE_Parameters'pixels_per_line p = plusPtr p 12
p'SANE_Parameters'pixels_per_line :: Ptr (C'SANE_Parameters) -> Ptr (C'SANE_Int)
p'SANE_Parameters'lines p = plusPtr p 16
p'SANE_Parameters'lines :: Ptr (C'SANE_Parameters) -> Ptr (C'SANE_Int)
p'SANE_Parameters'depth p = plusPtr p 20
p'SANE_Parameters'depth :: Ptr (C'SANE_Parameters) -> Ptr (C'SANE_Int)
instance Storable C'SANE_Parameters where
sizeOf _ = 24
alignment _ = 4
peek p = do
v0 <- peekByteOff p 0
v1 <- peekByteOff p 4
v2 <- peekByteOff p 8
v3 <- peekByteOff p 12
v4 <- peekByteOff p 16
v5 <- peekByteOff p 20
return $ C'SANE_Parameters v0 v1 v2 v3 v4 v5
poke p (C'SANE_Parameters v0 v1 v2 v3 v4 v5) = do
pokeByteOff p 0 v0
pokeByteOff p 4 v1
pokeByteOff p 8 v2
pokeByteOff p 12 v3
pokeByteOff p 16 v4
pokeByteOff p 20 v5
return ()
data C'SANE_Auth_Data = C'SANE_Auth_Data
c'SANE_MAX_USERNAME_LEN = 128
c'SANE_MAX_USERNAME_LEN :: (Num a) => a
c'SANE_MAX_PASSWORD_LEN = 128
c'SANE_MAX_PASSWORD_LEN :: (Num a) => a
type C'SANE_Auth_Callback = FunPtr (C'SANE_String_Const -> Ptr C'SANE_Char -> Ptr C'SANE_Char -> IO ())
foreign import ccall "wrapper" mk'SANE_Auth_Callback
:: (C'SANE_String_Const -> Ptr C'SANE_Char -> Ptr C'SANE_Char -> IO ()) -> IO C'SANE_Auth_Callback
foreign import ccall "dynamic" mK'SANE_Auth_Callback
:: C'SANE_Auth_Callback -> (C'SANE_String_Const -> Ptr C'SANE_Char -> Ptr C'SANE_Char -> IO ())
foreign import ccall "sane_init" c'sane_init
:: Ptr C'SANE_Int -> C'SANE_Auth_Callback -> IO C'SANE_Status
foreign import ccall "&sane_init" p'sane_init
:: FunPtr (Ptr C'SANE_Int -> C'SANE_Auth_Callback -> IO C'SANE_Status)
foreign import ccall "sane_exit" c'sane_exit
:: IO ()
foreign import ccall "&sane_exit" p'sane_exit
:: FunPtr (IO ())
foreign import ccall "sane_get_devices" c'sane_get_devices
:: Ptr (Ptr (Ptr C'SANE_Device)) -> C'SANE_Bool -> IO C'SANE_Status
foreign import ccall "&sane_get_devices" p'sane_get_devices
:: FunPtr (Ptr (Ptr (Ptr C'SANE_Device)) -> C'SANE_Bool -> IO C'SANE_Status)
foreign import ccall "sane_open" c'sane_open
:: C'SANE_String_Const -> Ptr C'SANE_Handle -> IO C'SANE_Status
foreign import ccall "&sane_open" p'sane_open
:: FunPtr (C'SANE_String_Const -> Ptr C'SANE_Handle -> IO C'SANE_Status)
foreign import ccall "sane_close" c'sane_close
:: C'SANE_Handle -> IO ()
foreign import ccall "&sane_close" p'sane_close
:: FunPtr (C'SANE_Handle -> IO ())
foreign import ccall "sane_get_option_descriptor" c'sane_get_option_descriptor
:: C'SANE_Handle -> C'SANE_Int -> IO (Ptr C'SANE_Option_Descriptor)
foreign import ccall "&sane_get_option_descriptor" p'sane_get_option_descriptor
:: FunPtr (C'SANE_Handle -> C'SANE_Int -> IO (Ptr C'SANE_Option_Descriptor))
foreign import ccall "sane_control_option" c'sane_control_option
:: C'SANE_Handle -> C'SANE_Int -> C'SANE_Action -> Ptr () -> Ptr C'SANE_Int -> IO C'SANE_Status
foreign import ccall "&sane_control_option" p'sane_control_option
:: FunPtr (C'SANE_Handle -> C'SANE_Int -> C'SANE_Action -> Ptr () -> Ptr C'SANE_Int -> IO C'SANE_Status)
foreign import ccall "sane_get_parameters" c'sane_get_parameters
:: C'SANE_Handle -> Ptr C'SANE_Parameters -> IO C'SANE_Status
foreign import ccall "&sane_get_parameters" p'sane_get_parameters
:: FunPtr (C'SANE_Handle -> Ptr C'SANE_Parameters -> IO C'SANE_Status)
foreign import ccall "sane_start" c'sane_start
:: C'SANE_Handle -> IO C'SANE_Status
foreign import ccall "&sane_start" p'sane_start
:: FunPtr (C'SANE_Handle -> IO C'SANE_Status)
foreign import ccall "sane_read" c'sane_read
:: C'SANE_Handle -> Ptr C'SANE_Byte -> C'SANE_Int -> Ptr C'SANE_Int -> IO C'SANE_Status
foreign import ccall "&sane_read" p'sane_read
:: FunPtr (C'SANE_Handle -> Ptr C'SANE_Byte -> C'SANE_Int -> Ptr C'SANE_Int -> IO C'SANE_Status)
foreign import ccall "sane_cancel" c'sane_cancel
:: C'SANE_Handle -> IO ()
foreign import ccall "&sane_cancel" p'sane_cancel
:: FunPtr (C'SANE_Handle -> IO ())
foreign import ccall "sane_set_io_mode" c'sane_set_io_mode
:: C'SANE_Handle -> C'SANE_Bool -> IO C'SANE_Status
foreign import ccall "&sane_set_io_mode" p'sane_set_io_mode
:: FunPtr (C'SANE_Handle -> C'SANE_Bool -> IO C'SANE_Status)
foreign import ccall "sane_get_select_fd" c'sane_get_select_fd
:: C'SANE_Handle -> Ptr C'SANE_Int -> IO C'SANE_Status
foreign import ccall "&sane_get_select_fd" p'sane_get_select_fd
:: FunPtr (C'SANE_Handle -> Ptr C'SANE_Int -> IO C'SANE_Status)
foreign import ccall "sane_strstatus" c'sane_strstatus
:: C'SANE_Status -> IO C'SANE_String_Const
foreign import ccall "&sane_strstatus" p'sane_strstatus
:: FunPtr (C'SANE_Status -> IO C'SANE_String_Const)