code_app/modules/sane_user/HGSane.h

56 lines
2.3 KiB
C

#ifndef __HGSANE_H__
#define __HGSANE_H__
#include "../base/HGDef.h"
#include "../base/HGBaseErr.h"
#include "HGSaneErr.h"
#include "../base/HGImage.h"
HG_DECLARE_HANDLE(HGSaneManager);
HG_DECLARE_HANDLE(HGSaneSource);
HG_DECLARE_HANDLE(HGSaneDevice);
/* Sane回调
*/
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);
HGEXPORT HGResult HGAPI HGSane_CreateManager(HGSaneManager *manager);
HGEXPORT HGResult HGAPI HGSane_DestroyManager(HGSaneManager manager);
HGEXPORT HGResult HGAPI HGSane_GetSourceCount(HGSaneManager manager, HGUInt *count);
HGEXPORT HGResult HGAPI HGSane_GetSourceNameWithIndex(HGSaneManager manager, HGUInt index, HGChar *name, HGUInt maxLen);
HGEXPORT HGResult HGAPI HGSane_OpenSource(HGSaneManager manager, HGUInt index, HGSaneSource* source);
HGEXPORT HGResult HGAPI HGSane_OpenSelectedSource(HGSaneManager manager, HGWindow parent, HGSaneSource* source);
HGEXPORT HGResult HGAPI HGSane_CloseSource(HGSaneSource source);
HGEXPORT HGResult HGAPI HGSane_GetSourceName(HGSaneSource source, HGChar *name, HGUInt maxLen);
HGEXPORT HGResult HGAPI HGSane_GetDeviceCount(HGSaneSource source, HGUInt *count);
HGEXPORT HGResult HGAPI HGSane_GetDeviceNameWithIndex(HGSaneSource source, HGUInt index, HGChar *name, HGUInt maxLen);
HGEXPORT HGResult HGAPI HGSane_OpenDevice(HGSaneSource source, HGUInt index, HGSaneDevice *dev, HGChar *errInfo, HGUInt errInfoLen);
HGEXPORT HGResult HGAPI HGSane_OpenSelectedDevice(HGSaneSource source, HGWindow parent, HGSaneDevice* dev);
HGEXPORT HGResult HGAPI HGSane_CloseDevice(HGSaneDevice dev);
HGEXPORT HGResult HGAPI HGSane_GetDeviceName(HGSaneDevice dev, HGChar* name, HGUInt maxLen);
HGEXPORT HGResult HGAPI HGSane_ShowDeviceSettingDlg(HGSaneDevice dev, HGWindow parent);
HGEXPORT HGResult HGAPI HGSane_StartDevice(HGSaneDevice dev, HGSane_DeviceEventFunc eventFunc, HGPointer eventParam,
HGSane_DeviceImageFunc imageFunc, HGPointer imageParam, HGChar* errInfo, HGUInt errInfoLen);
HGEXPORT HGResult HGAPI HGSane_StopDevice(HGSaneDevice dev);
HGEXPORT HGResult HGAPI HGSane_StartDeviceWithUI(HGSaneDevice dev, HGWindow parent, HGSane_DeviceImageFunc imageFunc, HGPointer imageParam);
#endif /* __HGSANE_H__ */