⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cdtype.pas

📁 canon 相机SDK,非常难得
💻 PAS
📖 第 1 页 / 共 5 页
字号:
unit cdType;

interface

{****************************************************************************
 ****************************************************************************
 *            Canon Digital Camera SDK : Data Type Definitions              *
 ****************************************************************************
 ****************************************************************************}

{* Basic Data Types *}
type
 cdUInt8            =Byte;
 cdInt8             =Shortint;
 cdChar             =Char;
 cdWChar            =Word;
 cdUInt16           =Word;
 cdInt16            =Smallint;
 cdUInt32           =Longword;
 cdInt32            =Longint;
 cdFloat32          =Single;
 cdUInt64           =Int64;

 cdBoolean          =cdUInt16;
 cdVoid             =Variant;
 cdTime             =cdUInt32;
 cdErr              =cdUInt32;
 cdEventID          =cdUInt32;
 cdReleaseEventID   =cdUInt32;
 cdContext          =cdUInt32;

{* Handles *}
 cdHWND             =cdUInt32;
 cdHandle           =cdUInt32;
 cdHSource          =cdHandle;
 cdHLocalHost       =cdHSource;	{* Handle for local strage *}
 cdHItem            =cdHSource;
 cdHVolume          =cdHItem;
 cdHFolder          =cdHItem;
 cdHImageItem       =cdHItem;
 cdHImageData       =cdHandle;
 cdHEnum            =cdHandle;

{* Strings *}
type cdStr31 = array[0..31] of cdChar;
type cdStr63 = array[0..63] of cdChar;
type cdStr255 = array[0..255] of cdChar;

{* Rationals *}
type cdURational = record
	Numerator   :cdUInt32;
	Denominator :cdUInt32;
end;

type cdRational = record
	Numerator   :cdInt32;
	Denominator :cdInt32;
end;


{****************************************************************************
 ****************************************************************************
 *                 Canon Digital Camera SDK : Constants                     *
 ****************************************************************************
 ****************************************************************************}
const
{* Max *}
 cdMAX_VOL			=64;
 cdMAX_PATH			=512;
 cdANY				=1;
 cdMAX_TRANSFER_PATH_LENGTHT	=2; {*(32)*}
 CD_MAX_VOL			=cdMAX_VOL;
 CD_MAX_PATH			=cdMAX_PATH;

 type cdVolName = array[0..cdMAX_VOL-1] of cdChar;


 {* cdSourceType
    Type of the sorce device *}
type  cdSourceType=cdUInt32;
const
	 cdSRC_TYPE_INVALID     =( cdSourceType(0) );
	 cdSRC_TYPE_HOST        =( cdSourceType(1) );
	 cdSRC_TYPE_CAMERA      =( cdSourceType(2) );

{* cdPortType
    Type of the port. *}
type   cdPortType=cdUInt32;
const
	 cdPORT_TYPE_NO_PORT  	=( cdPortType(0) );
	 cdPORT_TYPE_USB   	=( cdPortType(1) );
	 cdPORT_TYPE_IEEE1394 	=( cdPortType(2) );
         cdPORT_TYPE_STI        =( cdPortType(3) );
         cdPORT_TYPE_WIA        =( cdPortType(4) );
	 cdPORT_TYPE_ANY	=( cdPortType($7FFFFFFF) );

{* cdDevDataType *}
type  cdDevDataType = cdUInt32;
const
         cdDEV_DATA_TYPE_UNKNOWN        = $ffffffff;
         cdDEV_DATA_TYPE_UNDECIDED      = $00000000;
         cdDEV_DATA_TYPE_1              = $00000001;
         cdDEV_DATA_TYPE_2              = $00000002;

{* cdPortSelector
    Port selection type used by CDGetPreviousDeviceInfo=() *}
type  cdPortSelector=cdUInt16;
const
	 cdPORT_SELECT_DEFAULT		=( cdPortSelector(1) );
	 cdPORT_SELECT_LAST_CHOICE	=( cdPortSelector(3) );

{* cdModelID
   4 character camera model identifier  *}
type    cdModelID=cdUInt32;

{* cdVolHWType
   The hardware type of a file system volume*}
type   cdVolHWType=cdUInt16;
const
	 cdHW_TYPE_RAM    		=$0001;
 	 cdHW_TYPE_DISK   		=$0002;
 	 cdHW_TYPE_CDROM  		=$0003;
 	 cdHW_TYPE_REMOTE 		=$0004;
         cdHW_TYPE_ROM                  =$0005;
	 cdHW_TYPE_INVALID		=$FFFF;

{* cdImageFormat
    Image data format  *}
type   cdImageFormat=cdUInt16;
const
	 cdFORMAT_UNKNOWN		=$0000;
	 cdFORMAT_JPEG			=$0001;
	 cdFORMAT_JPEG_DCF		=$0002;
	 cdFORMAT_JPEG_DCF_THUMB	=$0003;
	 cdFORMAT_TIFF			=$0004;
	 cdFORMAT_TIFF_16		=$0005;
	 cdFORMAT_TIFF_DCF		=$0006;
	 cdFORMAT_PIXMAP		=$0007;
 	 cdFORMAT_PIXMAP_16		=$0008;
	 cdFORMAT_OPENDML		=$0009;
	 cdFORMAT_WAV			=$000a;
	 cdFORMAT_DIB			=$000b;
         cdFORMAT_BMP_TOPDOWN           =$000c;
	 cdFORMAT_RAW		        =$0101;
	 cdFORMAT_RAW_SPATIAL		=$0102;

{* cdCompQuality
    Image data quality. *}
type   cdCompQuality=cdUInt16;
const
	 cdCOMP_QUALITY_UNKNOWN		=$ffff;
	 cdCOMP_QUALITY_ECONOMY		=$0001;
	 cdCOMP_QUALITY_NORMAL		=$0002;
	 cdCOMP_QUALITY_FINE		=$0003;
	 cdCOMP_QUALITY_LOSSLESS	=$0004;
	 cdCOMP_QUALITY_RAW		=$0004;
	 cdCOMP_QUALITY_SUPERFINE	=$0005;

 MOVIE_MASK	=$000f;
 //MOVIE_COMP_QUALITY(q)		(q&MOVIE_MASK)

 SUB_JPEG_MASK	=$ff00;
 //SUB_JPEG_COMP_QUALITY(q)	((q&SUB_JPEG_MASK)>>8)

{* cdImageSize
    Image size *}
type  cdImageSize=cdUInt16 ;
const
	 cdIMAGE_SIZE_UNKNOWN		=$FFFF;
	 cdIMAGE_SIZE_LARGE		=$0000;
	 cdIMAGE_SIZE_MEDIUM		=$0001;
	 cdIMAGE_SIZE_SMALL		=$0002;
	 cdIMAGE_SIZE_MEDIUM1		=$0005;
	 cdIMAGE_SIZE_MEDIUM2		=$0006;

 //SUB_JPEG_SIZE(s)			((s&SUB_JPEG_MASK)>>8)
 //MOVIE_SIZE(s)				(s&MOVIE_MASK)

{* cdAttribute
    Attributes for data. *}
type  cdAttribute =cdUInt32;
const
	 cdATTRIB_READ			=$00000001;
	 cdATTRIB_WRITE			=$00000002;
	 cdATTRIB_READ_WRITE		=(cdATTRIB_READ or cdATTRIB_WRITE);

	 cdATTRIB_HIDDEN		=$00000010;
	 cdATTRIB_ARCHIVE		=$00000020;
	 cdATTRIB_SYSTEM		=$00000040;

{* cdItemType
	Type of the Item. *}
type  cdItemType =cdUInt32;
const
	 cdITEM_TYPE_SUB_FOLDER		=$00000001;
	 cdITEM_TYPE_IMAGE_ITEM		=$00000002;
	 cdITEM_TYPE_FILE		=$00000003;

{* cdDataType
	Type of the image data. *}
type  cdDataType=cdUInt32;
const
	 cdDATA_TYPE_THUMBNAIL		=$00000010; {* Thumbnail image data *}
	 cdDATA_TYPE_PICTURE		=$00000020; {* Picture (Full resolution image) data *}
	 cdDATA_TYPE_SOUND		=$00000030; {* Sound data *}
	 cdDATA_TYPE_MOVIE		=$00000040; {* Movie data *}
	 cdDATA_TYPE_PLUS_JPEG		=$00000050; {* +Jpg image data *}
	 cdDATA_TYPE_PREVIEW_JPEG	=$00000060; {* Jpeg data included in RAW file *}

{* cdAddPictureFlags
*}
type  cdAddPictureFlags=cdUInt32;
const
	 cdADD_FLAG_COPY			=$00010000;


{* cdEnumItemOption
	Options for enumeration of items. *}
type  cdEnumItemOption=cdUInt32;
const
	 cdENUM_HAS_THUMBNAIL		        =$00000001;	{* Not enumerate items which don't have thumbnail image. *}
	 cdENUM_MOVIE_TOO			=$00000002;	{* Enumerate items which have movies, too. *}
	 cdENUM_MOVIE_ONLY			=$00000004;	{* Enumerate movie items only. *}
	 cdENUM_NAME_CHECK_OP_1	        	=$00000008;	{* Enumerate same file name files as one item. *}
	 cdENUM_ALL_ITEM			=$00010000;	{* Enumerate the item which is not image item.*}

{* cdProgressOption
	Options for progress callbadk functions. *}
type  cdProgressOption=cdUInt32;
const
	 cdPROG_NO_REPORT			=$00000001;	{* Not called callback function. *}
	 cdPROG_REPORT_DONE			=$00000002;	{* Called only when operation is finished *}
	 cdPROG_REPORT_PERIODICALLY	        =$00000003;	{* Called periodically during the operation *}

{* cdProgressStatus
	Status of the current operation during progress callback function.*}
type  cdProgressStatus=cdUInt32;
const
	 cdSTATUS_TRANSFER			=$00000001;	{* Status is data transfer between camera and host computer. *}
	 cdSTATUS_CONVERT			=$00000002;	{* Status is image data converting.	 *}
	 cdSTATUS_DEVELOPMENT		        =$00000003;	{* Status is image data development. *}

{* cdSlideShowCap
	Capability of slide show function of camera.*}
type  cdSlideShowCap=cdUInt32;
const
	 cdSLIDE_SHOW_CAP_CANON_FORMAT 	        =$00000001;  {* Supports the slide show file of Canon format. *}
	 cdSLIDE_SHOW_CAP_DPOF			=$00000002;  {* Supports the DPOF slide show file. *}

{* cdReleaseControlCap
	Capability of remote release control function of the camera.
	OR value of the followings.                                *}
type  cdReleaseControlCap=cdUInt32;
const
	 cdRELEASE_CONTROL_CAP_SUPPORT 		=$40000000;  {* Supports the remote release control functions. *}
	 cdRELEASE_CONTROL_CAP_ZOOM		=$00000001;  {* Supports the zoom control. *}
	 cdRELEASE_CONTROL_CAP_SETPRM		=$00000002;  {* Supports the setting of the shooting parameters. *}
	 cdRELEASE_CONTROL_CAP_VIEWFINDER	=$00000004;  {* Supports the viewfinder functions. *}
	 cdRELEASE_CONTROL_CAP_ABORT_VIEWFINDER	=$00000008;  {* Needs to terminate the Viewfinder mode when the CDRelease() function is executed. *}
	 cdRELEASE_CONTROL_CAP_AF_LOCK		=$00000010;  {* Supports the AF lock/unlock functions. *}

{*cdParseFaculty
*}
type  cdParseFaculty=cdUInt32;
const
	 cdPARSE_SET_PROP_IN_CAMERA 		=$00000001;  {* Supports the modifing the property of the item in camera.*}


{* Values of cdIMG_PROP_MLWEI_MODE image property
*}
const
	 cdMLWEI_MODE_CENTER    	        =(0);
	 cdMLWEI_MODE_SPOT   			=(1);
	 cdMLWEI_MODE_AVERAGE   		=(2);
	 cdMLWEI_MODE_ESTIMAT   		=(3);
	 cdMLWEI_MODE_PART    			=(4);
	 cdMLWEI_MODE_CENTER_WEI_AVERAGE 	=(5);
	 cdMLWEI_MODE_UNKNOWN   		=($ffff);

{* cdFocusMode
	AF mode setting *}
type  cdFocusMode=cdUInt16;
const
	 cdFOCUS_MODE_SINGLE_AF  		=($0000); {* Single AF     *}
	 cdFOCUS_MODE_CONTINUOUS_AF		=($0001); {* Continuous AF *}
	 cdFOCUS_MODE_PAN_FOCUS  		=($0010); {* Pan Focus     *}
	 cdFOCUS_MODE_ONE_SHOT_AF 		=($1000); {* One-Shot AF   *}
	 cdFOCUS_MODE_AI_SERVO_AF 		=($1001); {* AI Servo AF   *}
	 cdFOCUS_MODE_AI_FOCUS_AF 		=($1002); {* AI Focus AF   *}
	 cdFOCUS_MODE_MF   			=($0008); {* Manual Focus  *}
	 cdFOCUS_MODE_UNKNOWN  			=($ffff); {* unknown       *}

{* cdCompressionType
    picture view compression type (including NONE!)*}
type  cdCompressionType=cdUInt8;
const
	 cdLOSSY    =1;
	 cdNONE     =2;
	 cdLOSSLESS =3;

{* cdDriveMode
*}
type  cdDriveMode=cdUInt16;
const
	 cdDRIVE_MODE_UNKNOWN			=$FFFF;
	 cdDRIVE_MODE_SINGLE			=$0000;
	 cdDRIVE_MODE_CONT			=$0001;
	 cdDRIVE_MODE_MOVIE			=$0002;
	 cdDRIVE_MODE_CONT_SPEED_PRIORITY	=$0003;
	 cdDRIVE_MODE_CONT_LOW			=$0004;
	 cdDRIVE_MODE_CONT_HIGHT		=$0005;
	 cdDRIVE_MODE_SELFTIMER			=$0010;

{* cdShootingMode
*}
type  cdShootingMode=cdUInt16;
const
	 cdSHOOTING_MODE_INVALID		=$FFFF;
	 cdSHOOTING_MODE_AUTO			=$0000;
	 cdSHOOTING_MODE_PROGRAM		=$0001;
	 cdSHOOTING_MODE_TV			=$0002;
	 cdSHOOTING_MODE_AV			=$0003;
	 cdSHOOTING_MODE_MANUAL			=$0004;
	 cdSHOOTING_MODE_A_DEP			=$0005;
	 cdSHOOTING_MODE_M_DEP			=$0006;
	 cdSHOOTING_MODE_BULB			=$0007;
	 cdSHOOTING_MODE_MANUAL_2		=$0065;
	 cdSHOOTING_MODE_FAR_SCENE		=$0066;
	 cdSHOOTING_MODE_FAST_SHUTTER	        =$0067;
	 cdSHOOTING_MODE_SLOW_SHUTTER	        =$0068;
	 cdSHOOTING_MODE_NIGHT_SCENE	        =$0069;
	 cdSHOOTING_MODE_GRAY_SCALE		=$006a;
	 cdSHOOTING_MODE_SEPIA			=$006b;
	 cdSHOOTING_MODE_PORTRAIT		=$006c;
	 cdSHOOTING_MODE_SPOT			=$006d;
	 cdSHOOTING_MODE_MACRO			=$006e;
	 cdSHOOTING_MODE_BW			=$006f;
	 cdSHOOTING_MODE_PANFOCUS		=$0070;
	 cdSHOOTING_MODE_VIVID			=$0071;
	 cdSHOOTING_MODE_NEUTRAL		=$0072;

{* cdAFDistance
	Auto focus mode by which distance is measured *}
type  cdAFDistance=cdUInt16;
const
	 cdAF_DISTANCE_MANUAL			=$0000;
	 cdAF_DISTANCE_AUTO			=$0001;
	 cdAF_DISTANCE_UNKNOWN			=$0002;
	 cdAF_DISTANCE_CLOSE_UP			=$0003;
	 cdAF_DISTANCE_VERY_CLOSE		=$0004;
	 cdAF_DISTANCE_CLOSE			=$0005;
	 cdAF_DISTANCE_MIDDLE			=$0006;
	 cdAF_DISTANCE_FAR			=$0007;
	 cdAF_DISTANCE_NA			=$00ff;

{* cdPhotoEffect
	Photo effect setting *}
type  cdPhotoEffect=cdUInt16;
const
	 cdPHOTO_EFFECT_OFF			=$0000;	{* Off			*}
	 cdPHOTO_EFFECT_VIVID			=$0001;	{* Vivid		*}
	 cdPHOTO_EFFECT_NEUTRAL			=$0002;	{* Neutral		*}
	 cdPHOTO_EFFECT_LOW_SHARPENING	        =$0003;	{* Low sharpening	*}
	 cdPHOTO_EFFECT_SEPIA			=$0004;	{* Sepia		*}
	 cdPHOTO_EFFECT_BW			=$0005;	{* Black & white	*}
	 cdPHOTO_EFFECT_CUSTOM			=$0006;	{* Custom		*}
	 cdPHOTO_EFFECT_UNKNOWN			=$ffff;	{* Unknown		*}

{* cdColorMatrix
	Color matrix number *}
type  cdColorMatrix=cdUInt16;
const
	 cdCOLOR_MATRIX_ATCAPTURE		=$0000;	{* As shot value. Use for cdSetDevParam_ColorMatrix() only *}
	 cdCOLOR_MATRIX_1			=$0001;	{* Color matrix 1	*}
	 cdCOLOR_MATRIX_2			=$0002;	{* Color matrix 2	*}
	 cdCOLOR_MATRIX_3			=$0003;	{* Color matrix 3	*}
	 cdCOLOR_MATRIX_4			=$0004;	{* Color matrix 4	*}
	 cdCOLOR_MATRIX_5			=$0005;	{* Color matrix 5	*}
	 cdCOLOR_MATRIX_UNKNOWN			=$ffff;	{* Unknown		*}


{*-----------------------------------------------------------------------
   Constants for Image property  
------------------------------------------------------------------------*}
{* cdImagePropertyID 
*}
type  cdImagePropertyID=cdUInt32;
const
	 cdIMG_PROP_INVALID					=$FFFFFFFF;
	{* Invalid ID
	*}

  {*----------------------------------------------------------
	  Common Property
  *}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -