2022-05-03 10:25:52 +00:00
|
|
|
|
#ifndef __HGSANE_H__
|
|
|
|
|
#define __HGSANE_H__
|
|
|
|
|
|
|
|
|
|
#include "../base/HGDef.h"
|
|
|
|
|
#include "../base/HGBaseErr.h"
|
|
|
|
|
#include "HGSaneErr.h"
|
|
|
|
|
#include "../base/HGImage.h"
|
2023-03-25 07:31:09 +00:00
|
|
|
|
#include "sane.h"
|
2022-05-03 10:25:52 +00:00
|
|
|
|
|
|
|
|
|
HG_DECLARE_HANDLE(HGSaneManager);
|
|
|
|
|
HG_DECLARE_HANDLE(HGSaneDevice);
|
|
|
|
|
|
2023-03-25 07:31:09 +00:00
|
|
|
|
/* Sane设备回调
|
2022-05-03 10:25:52 +00:00
|
|
|
|
*/
|
2023-03-25 10:03:47 +00:00
|
|
|
|
typedef void (HGAPI* HGSane_DeviceEventFunc)(HGSaneDevice dev, HGUInt error, const HGChar *errInfo, HGPointer param);
|
|
|
|
|
typedef void (HGAPI* HGSane_DeviceImageFunc)(HGSaneDevice dev, HGImage image, HGPointer param);
|
2022-05-03 10:25:52 +00:00
|
|
|
|
|
|
|
|
|
HGEXPORT HGResult HGAPI HGSane_CreateManager(const HGChar *sanePath, HGSaneManager* mgr);
|
|
|
|
|
|
|
|
|
|
HGEXPORT HGResult HGAPI HGSane_DestroyManager(HGSaneManager mgr);
|
|
|
|
|
|
|
|
|
|
HGEXPORT HGResult HGAPI HGSane_GetDeviceCount(HGSaneManager mgr, HGUInt *count);
|
|
|
|
|
|
|
|
|
|
HGEXPORT HGResult HGAPI HGSane_GetDeviceName(HGSaneManager mgr, HGUInt index, HGChar *name, HGUInt maxLen);
|
|
|
|
|
|
2023-03-25 07:31:09 +00:00
|
|
|
|
HGEXPORT HGResult HGAPI HGSane_OpenDevice(HGSaneManager mgr, HGUInt index, HGSaneDevice *dev, HGChar *errInfo, HGUInt errInfoLen);
|
2022-05-03 10:25:52 +00:00
|
|
|
|
|
|
|
|
|
HGEXPORT HGResult HGAPI HGSane_CloseDevice(HGSaneDevice dev);
|
|
|
|
|
|
2023-03-25 07:31:09 +00:00
|
|
|
|
HGEXPORT HGResult HGAPI HGSane_GetDeviceHandle(HGSaneDevice dev, SANE_Handle *handle);
|
2022-05-03 10:25:52 +00:00
|
|
|
|
|
2023-03-25 10:03:47 +00:00
|
|
|
|
HGEXPORT HGResult HGAPI HGSane_StartDevice(HGSaneDevice dev, HGSane_DeviceEventFunc eventFunc, HGPointer eventParam,
|
|
|
|
|
HGSane_DeviceImageFunc imageFunc, HGPointer imageParam, HGChar* errInfo, HGUInt errInfoLen);
|
2022-05-03 10:25:52 +00:00
|
|
|
|
|
2023-03-25 07:31:09 +00:00
|
|
|
|
HGEXPORT HGResult HGAPI HGSane_StopDevice(HGSaneDevice dev);
|
2022-05-03 10:25:52 +00:00
|
|
|
|
|
|
|
|
|
#endif /* __HGSANE_H__ */
|