#ifndef PRINTER_WIN32_CPCL_SDK_H
#define PRINTER_WIN32_CPCL_SDK_H

#ifdef HPRT_FOR_PB_ENV_EXPORTS
#define HPRT_SDK_API
#define CALL_STACK __stdcall
#else
#ifdef __cplusplus
#define HPRT_SDK_API extern "C" __declspec(dllexport)
#define CALL_STACK __cdecl
#else
#define HPRT_SDK_API __declspec(dllexport)
#define CALL_STACK __cdecl
#endif
#endif


SDK_API void CALL_STACK FormatError(int errorNo, int langid, unsigned char* buf, int pos, int bufSize);
SDK_API int CALL_STACK PrinterCreator(void** phandle, const TCHAR* model);
SDK_API void* CALL_STACK PrinterCreatorS(char* model);
SDK_API int CALL_STACK PrinterDestroy(void* handle);
SDK_API int CALL_STACK PortOpen(void* handle, const TCHAR* ioSettings);
SDK_API int CALL_STACK PortClose(void* handle);
SDK_API int CALL_STACK DirectIO(void* handle, unsigned char* writedata, unsigned int writeNum, unsigned char* readData, unsigned int readNum, unsigned int* preadedNum);


HPRT_SDK_API int CALL_STACK CPCL_AddLabel(void* handle, int offSet, int height, int qty);
HPRT_SDK_API int CALL_STACK CPCL_SetAlign(void* handle, int align);
HPRT_SDK_API int CALL_STACK CPCL_AddText(void* handle, int rotate, int fontType, int fontSize, int xPos, int yPos, const char* data);
HPRT_SDK_API int CALL_STACK CPCL_AddBarCode(void* handle, int rotate, int type, int width, int ratio, int height, int xPos, int yPos, const char* data);
HPRT_SDK_API int CALL_STACK CPCL_AddBarCodeText(void* handle, int enable, int fontType, int fontSize, int offSet);
HPRT_SDK_API int CALL_STACK CPCL_AddQRCode(void* handle, int rotate, int xPos, int yPos, int model, int unitWidth, int eccLevel, const char* data);
HPRT_SDK_API int CALL_STACK CPCL_AddPDF417(void* handle, int rotate, int xPos, int yPos, int xDots, int yDots, int columns, int rows, int eccLevel, const char* data);
HPRT_SDK_API int CALL_STACK CPCL_AddBox(void* handle, int xPos, int yPos, int endXPos, int endYPos, int thickness);
HPRT_SDK_API int CALL_STACK CPCL_AddLine(void* handle, int xPos, int yPos, int endXPos, int endYPos, int thickness);
HPRT_SDK_API int CALL_STACK CPCL_AddImage(void* handle, int rotate, int xPos, int yPos, char* imagePath);
HPRT_SDK_API int CALL_STACK CPCL_AddImageData(void* handle, int rotate, int widthBytes, int height, int xPos, int yPos, const char* data);

//Setting
HPRT_SDK_API int CALL_STACK CPCL_SetFontSize(void* handle, int width, int height);
HPRT_SDK_API int CALL_STACK CPCL_SetDensity(void* handle, int density);
HPRT_SDK_API int CALL_STACK CPCL_SetSpeed(void* handle, int speed);
HPRT_SDK_API int CALL_STACK CPCL_SetTextSpacing(void* handle, int spacing);
HPRT_SDK_API int CALL_STACK CPCL_SetLeftMargin(void* handle, int margin);
HPRT_SDK_API int CALL_STACK CPCL_SetTextBold(void* handle, int bold);
HPRT_SDK_API int CALL_STACK CPCL_SetTextUnderline(void* handle, int underline);

//control
HPRT_SDK_API int CALL_STACK CPCL_Abort(void* handle);
HPRT_SDK_API int CALL_STACK CPCL_Print(void* handle);
HPRT_SDK_API int CALL_STACK CPCL_NextLabelPos(void* handle);
HPRT_SDK_API int CALL_STACK CPCL_PreFeed(void* handle, int distance);
HPRT_SDK_API int CALL_STACK CPCL_PostFeed(void* handle, int distance);
#endif