// CodeGear C++Builder
// Copyright (c) 1995, 2015 by Embarcadero Technologies, Inc.
// All rights reserved

// (DO NOT EDIT: machine generated header) 'iexAcquire.pas' rev: 30.00 (Windows)

#ifndef IexacquireHPP
#define IexacquireHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member 
#pragma pack(push,8)
#include <System.hpp>
#include <SysInit.hpp>
#include <Winapi.Windows.hpp>
#include <System.Classes.hpp>
#include <System.UITypes.hpp>
#include <hyieutils.hpp>
#include <ietwain.hpp>
#include <iewia.hpp>
#include <iexDCIM.hpp>
#include <hyiedefs.hpp>
#include <Vcl.Controls.hpp>

//-- user supplied -----------------------------------------------------------

namespace Iexacquire
{
//-- forward type declarations -----------------------------------------------
struct TIEAcquireSource;
class DELPHICLASS TIEAcquireParams;
//-- type declarations -------------------------------------------------------
enum DECLSPEC_DENUM TIEAcquireApi : unsigned char { ieaTwain, ieaWIA, ieaDCIM, ieaNone };

typedef System::Set<TIEAcquireApi, TIEAcquireApi::ieaTwain, TIEAcquireApi::ieaNone> TIEAcquireApis;

enum DECLSPEC_DENUM TIEAcquireOrientation : unsigned char { ieaoPortrait, ieaoLandscape, ieaoRotate90, ieaoRotate180 };

enum DECLSPEC_DENUM TIEAcquireRotation : unsigned char { iearNone, iear90CW, iear180CW, iear270CW };

enum DECLSPEC_DENUM TIEAcquirePixelType : unsigned char { ieapMonochrome, ieap8BitGrayScale, ieap16BitGrayScale, ieapFullColor, ieapFullColor16, ieapOther };

enum DECLSPEC_DENUM TIEAcquireDeviceType : unsigned char { ieadUnknown, ieadScanner, ieadCamera, ieadDrive };

struct DECLSPEC_DRECORD TIEAcquireSource
{
public:
	TIEAcquireApi Api;
	System::Variant Location;
	System::AnsiString Name;
	TIEAcquireDeviceType DeviceType;
};


#pragma pack(push,4)
class PASCALIMPLEMENTATION TIEAcquireParams : public System::TObject
{
	typedef System::TObject inherited;
	
private:
	System::Classes::TComponent* fOwner;
	Ietwain::TIETwainParams* fTwainParams;
	Iexdcim::TIEDcimAcquire* fDcimParams;
	bool fDuplex;
	Iewia::TIEWia* fWiaParams;
	bool fWIAVisibleDialog;
	bool fAborting;
	double __fastcall GetXResolution(void);
	double __fastcall GetYResolution(void);
	void __fastcall SetXResolution(double v);
	void __fastcall SetYResolution(double v);
	double __fastcall GetContrast(void);
	void __fastcall SetContrast(double v);
	double __fastcall GetBrightness(void);
	void __fastcall SetBrightness(double v);
	double __fastcall GetThreshold(void);
	void __fastcall SetThreshold(double v);
	TIEAcquireRotation __fastcall GetRotation(void);
	void __fastcall SetRotation(TIEAcquireRotation v);
	TIEAcquirePixelType __fastcall GetPixelType(void);
	void __fastcall SetPixelType(TIEAcquirePixelType v);
	int __fastcall GetBitDepth(void);
	void __fastcall SetBitDepth(int v);
	double __fastcall GetPhysicalHeight(void);
	double __fastcall GetPhysicalWidth(void);
	int __fastcall GetPhysicalHeightPixels(void);
	int __fastcall GetPhysicalWidthPixels(void);
	bool __fastcall GetFeederEnabled(void);
	bool __fastcall GetAutoFeed(void);
	TIEAcquireOrientation __fastcall GetOrientation(void);
	void __fastcall SetOrientation(TIEAcquireOrientation v);
	void __fastcall SetFeederEnabled(bool v);
	void __fastcall SetAutoFeed(bool v);
	double __fastcall GetAcquireFrame(int idx);
	void __fastcall SetAcquireFrame(int idx, double v);
	void __fastcall SetDuplexEnabled(bool v);
	bool __fastcall GetDuplexEnabled(void);
	void __fastcall SetVisibleDialog(bool v);
	bool __fastcall GetVisibleDialog(void);
	void __fastcall SetAcquireFrameEnabled(bool v);
	bool __fastcall GetAcquireFrameEnabled(void);
	bool __fastcall GetFeederLoaded(void);
	bool __fastcall GetDuplexSupported(void);
	bool __fastcall GetPaperDetectable(void);
	TIEAcquireSource __fastcall GetSelectedSource(void);
	bool __fastcall AcquireEx(bool bMultiple, Hyieutils::TIEBitmap* DestBitmap, System::TObject* DestIOParamVals, Hyieutils::TIEMultiCallBack OnGetImage, Hyiedefs::TIEProgressEvent OnProgress, bool bNativePixelFormat);
	bool __fastcall WIADevicePropertyHasFlag(unsigned PropId, int Flag);
	void __fastcall WIADevicePropertySetFlag(unsigned PropId, int Flag, bool bSet);
	TIEAcquireSource __fastcall GetTwainSource(int iIndex);
	TIEAcquireSource __fastcall GetDcimSource(const System::UnicodeString sPath);
	void __fastcall CheckInitialize(bool bIncludeWIA);
	TIEAcquireSource __fastcall GetWiaSource(int iIndex);
	TIEAcquireApi __fastcall GetSelectedSourceApi(void);
	
public:
	TIEAcquireApi fSelectedSourceApi;
	__fastcall TIEAcquireParams(System::Classes::TComponent* Owner);
	__fastcall virtual ~TIEAcquireParams(void);
	bool __fastcall Acquire(Hyieutils::TIEBitmap* DestBitmap, System::TObject* DestIOParamVals, Hyiedefs::TIEProgressEvent OnProgress = 0x0, bool bNativePixelFormat = false)/* overload */;
	bool __fastcall Acquire(Hyieutils::TIEMultiCallBack OnGetImage, Hyiedefs::TIEProgressEvent OnProgress = 0x0, bool bNativePixelFormat = false)/* overload */;
	__property TIEAcquireSource SelectedSource = {read=GetSelectedSource};
	__property TIEAcquireApi SelectedSourceApi = {read=GetSelectedSourceApi, nodefault};
	bool __fastcall SelectSource(TIEAcquireApis Apis = (TIEAcquireApis() << TIEAcquireApi::ieaTwain << TIEAcquireApi::ieaWIA << TIEAcquireApi::ieaDCIM ));
	bool __fastcall SetSource(TIEAcquireApi Api, const System::Variant &Location);
	bool __fastcall SetSourceByStr(const System::UnicodeString sRawDeviceStr);
	__property Ietwain::TIETwainParams* AttachedTwainParams = {read=fTwainParams, write=fTwainParams};
	__property Iexdcim::TIEDcimAcquire* AttachedDCIMParams = {read=fDcimParams, write=fDcimParams};
	__property Iewia::TIEWia* AttachedWIAParams = {read=fWiaParams, write=fWiaParams};
	void __fastcall FillListWithSources(System::Classes::TStrings* ssDest, TIEAcquireApis Apis = (TIEAcquireApis() << TIEAcquireApi::ieaTwain << TIEAcquireApi::ieaWIA << TIEAcquireApi::ieaDCIM ), bool bNameOnly = false);
	TIEAcquireSource __fastcall FindSourceByName(const System::UnicodeString sName);
	__property bool Aborting = {read=fAborting, write=fAborting, nodefault};
	__property bool VisibleDialog = {read=GetVisibleDialog, write=SetVisibleDialog, nodefault};
	__property double XResolution = {read=GetXResolution, write=SetXResolution};
	__property double YResolution = {read=GetYResolution, write=SetYResolution};
	__property TIEAcquirePixelType PixelType = {read=GetPixelType, write=SetPixelType, nodefault};
	__property int BitDepth = {read=GetBitDepth, write=SetBitDepth, nodefault};
	__property double PhysicalHeight = {read=GetPhysicalHeight};
	__property double PhysicalWidth = {read=GetPhysicalWidth};
	__property int PhysicalHeightPixels = {read=GetPhysicalHeightPixels, nodefault};
	__property int PhysicalWidthPixels = {read=GetPhysicalWidthPixels, nodefault};
	__property bool FeederEnabled = {read=GetFeederEnabled, write=SetFeederEnabled, nodefault};
	__property bool AutoFeed = {read=GetAutoFeed, write=SetAutoFeed, nodefault};
	__property bool FeederLoaded = {read=GetFeederLoaded, nodefault};
	__property bool PaperDetectable = {read=GetPaperDetectable, nodefault};
	__property TIEAcquireOrientation Orientation = {read=GetOrientation, write=SetOrientation, nodefault};
	__property double AcquireFrameLeft = {read=GetAcquireFrame, write=SetAcquireFrame, index=0};
	__property double AcquireFrameTop = {read=GetAcquireFrame, write=SetAcquireFrame, index=1};
	__property double AcquireFrameRight = {read=GetAcquireFrame, write=SetAcquireFrame, index=2};
	__property double AcquireFrameBottom = {read=GetAcquireFrame, write=SetAcquireFrame, index=3};
	__property bool DuplexEnabled = {read=GetDuplexEnabled, write=SetDuplexEnabled, nodefault};
	__property bool DuplexSupported = {read=GetDuplexSupported, nodefault};
	__property bool AcquireFrameEnabled = {read=GetAcquireFrameEnabled, write=SetAcquireFrameEnabled, nodefault};
	__property double Contrast = {read=GetContrast, write=SetContrast};
	__property double Brightness = {read=GetBrightness, write=SetBrightness};
	__property double Threshold = {read=GetThreshold, write=SetThreshold};
	__property TIEAcquireRotation Rotation = {read=GetRotation, write=SetRotation, nodefault};
};

#pragma pack(pop)

//-- var, const, procedure ---------------------------------------------------
static const System::Int8 Default_Device = System::Int8(-1);
#define Error_Compiled_Without_WIA_Str L"ImageEn compiled without WIA support"
extern DELPHI_PACKAGE TIEAcquireSource __fastcall IEAcquireSource(TIEAcquireApi Api, const System::Variant &Location, const System::AnsiString sName, TIEAcquireDeviceType DeviceType);
extern DELPHI_PACKAGE System::UnicodeString __fastcall AcquireSourceToStr(const TIEAcquireSource &AcquireSource);
extern DELPHI_PACKAGE TIEAcquireSource __fastcall StrToAcquireSource(const System::UnicodeString sRawDeviceStr);
extern DELPHI_PACKAGE bool __fastcall IsAcquireSourceStr(const System::UnicodeString value);
extern DELPHI_PACKAGE void __fastcall DrawAcquireComboListBoxItem(Vcl::Controls::TWinControl* TheControl, const System::Types::TRect &CanvasRect, const System::UnicodeString sRawDeviceStr, Vcl::Controls::TImageList* AnImageList = (Vcl::Controls::TImageList*)(0x0), short iScannerGlyph = (short)(0xffffffff), short iCameraGlyph = (short)(0xffffffff), short iDriveGlyph = (short)(0xffffffff), short iUnknownGlyph = (short)(0xffffffff));
}	/* namespace Iexacquire */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_IEXACQUIRE)
using namespace Iexacquire;
#endif
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// IexacquireHPP
