📄 ptapisymbian.h
字号:
// Copyright(C) 2002-2007, PartiTek Inc. All rights reserved.
//
// Title: PtAPISymbian.h
//======================================================================================
//
// Description: Include file for the PartiTek Inc. API and definitions.
// The modules included are:
//
// PtQRDecdoe QR Code symbol reading.
// PtDMDecode Data Matrix symbol reading.
//======================================================================================
//
// Version: 3.0
//
// Date: 07 November 2008
// ======================================================================================
#ifndef _PTAPI_SYMBIAN_H
#define _PTAPI_SYMBIAN_H
#include <fbs.h>
/*----------------------------------------------------------------------------------------+
| DEFINES and STRUCTURES SECTION |
| Please refer to the SDK manul for more detail |
+----------------------------------------------------------------------------------------*/
#define BYTE unsigned char
#define WORD unsigned short
#define DWORD unsigned long
/*The PTIMAGE structure contains the image information.*/
typedef struct tagPTIMAGE
{
DWORD dwWidth; //The width of the image in pixels.
DWORD dwHeight; //The height of the image in pixels.
unsigned char* pBits; //Pointer to the image data.
unsigned char* pPalette; //Pointer to the palette data (RGBQUAD)for 1,4,8 bits image.
WORD wBitsPerPixel; //Number of bits per pixel.
}PTIMAGE, *pPTIMAGE;
/*The PTDECODEPARA structure is used to decide parameter when decoding barcodes from an image.*/
typedef struct tagPTDECODEPARA
{
DWORD dwStartX; //The start X-coordinate in pixels of the search window in the image to decode the symbol.
DWORD dwStartY; //The start Y-coordinate in pixels of the search window in the image to decode the symbol.
DWORD dwEndX; //The end X-coordinate in pixels of the search window in the image to decode the symbol.
DWORD dwEndY; //The end Y-coordinate in pixels of the search window in the image to decode the symbol.
DWORD dwMaxCount; //The maximal number of symbols to be searched. If it's set to 0 then search the all symbols.
} PTDECODEPARA, *pPTDECODEPARA
;
/*The PTBARCODEINFO structure contains a barcode information after decoding*/
typedef struct tagPTBARCODEINFO
{
DWORD dwX1, dwY1; //Four corners' coordinates in pixels of the barcode.
DWORD dwX2, dwY2;
DWORD dwX3, dwY3;
DWORD dwX4, dwY4;
BYTE* pData; //Pointer to the buffer that contains the barcode's data.
DWORD dwDataLen; //The barcode data's length in bytes.
}PTBARCODEINFO, *pPTBARCODEINFO
;
/*The PTTOTALBARCODEINFO structure contains all barcodes' information after decoding*/
typedef struct tagPTTOTALBARCODEINFO
{
PTBARCODEINFO* pInfoList; //Pointer to the start address of the list of barcodes' info.
DWORD dwTotalCount; //The number of barcode that have been decoded.
}PTTOTALBARCODEINFO, *pPTOTALBARCODEINFO
;
// * **********************************************************
// * QR Code symbol reading APIs and definitions
// * **********************************************************
#define PT_QRDECODE_FAIL 0x00000000//An error occurred in an operation.
#define PT_QRDECODE_SUCCESS 0x00000001//An operation is successful.
#define PT_QRDECODE_ALLOC_ERROR 0x00000300//Error while allocating the memory.
#define PT_QRDECODE_IMAGE_INVALID 0x00000301//The image to be decode is invalid.
#define PT_QRDECODE_PARAMETERS_INVALID 0x00000302//The parameters input to a function are invalid.
class CPtQRDecode : public CBase
{
public: // new functions
IMPORT_C int PtQRDecodeRegister( char* pKeyStr );
IMPORT_C void PtQRDecodeInit( PTTOTALBARCODEINFO* pInfo );
IMPORT_C int PtQRDecode( PTIMAGE* pImage, PTDECODEPARA* pPara, PTTOTALBARCODEINFO* pInfo );
IMPORT_C int PtQRDecodeFromBitmap( CFbsBitmap* pBitmap, PTDECODEPARA* pPara, PTTOTALBARCODEINFO* pInfo );
IMPORT_C void PtQRDecodeFree( PTTOTALBARCODEINFO* pInfo );
IMPORT_C CPtQRDecode();
int Reserved1;//don't delete it
int Reserved2;//don't delete it
};
// * **********************************************************
// * Data Matrix symbol reading APIs and definitions
// * **********************************************************
#define PT_DMDECODE_FAIL 0x00000000//An error occurred in an operation.
#define PT_DMDECODE_SUCCESS 0x00000001//An operation is successful.
#define PT_DMDECODE_ALLOC_ERROR 0x00000300//Error while allocating the memory.
#define PT_DMDECODE_IMAGE_INVALID 0x00000301//The image to be decode is invalid.
#define PT_DMDECODE_PARAMETERS_INVALID 0x00000302//The parameters input to a function are invalid.
class CPtDMDecode : public CBase
{
public: // new functions
IMPORT_C int PtDMDecodeRegister( char* pKeyStr );
IMPORT_C void PtDMDecodeInit( PTTOTALBARCODEINFO* pInfo );
IMPORT_C int PtDMDecode( PTIMAGE* pImage, PTDECODEPARA* pPara, PTTOTALBARCODEINFO* pInfo );
IMPORT_C int PtDMDecodeFromBitmap( CFbsBitmap* pBitmap, PTDECODEPARA* pPara, PTTOTALBARCODEINFO* pInfo );
IMPORT_C void PtDMDecodeFree( PTTOTALBARCODEINFO* pInfo );
IMPORT_C CPtDMDecode();
int Reserved1;//don't delete it
int Reserved2;//don't delete it
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -