
/**********************************************************************************
 * @func Retrieves the amount of RAM needed to be allocated by the host application for the recognizer.
 *
 * @parm WORD | maxModels | Indicates the maximal number of symbols that can be trained by the recognizer
 *
 * @rdesc If successful returns the amount of memory in bytes to be allocated for the recognizer, otherwise zero is returned.
 *
 * @normal
 ***********************************************************************************/

DWORD ARTHWRGetRamSize(WORD maxModels);
DWORD ARTHWRGetRamSize(WORD maxModels) { return 0; }

/**********************************************************************************
 * @func Initializes the engine. This function should be called after <c ART_HWRData> has been allocated.
 *
 * 
 * @parm ART_HWRData *| pData |	Pointer to the recognizer data
 * @parm WORD | maxModels | Indicates the maximal number of symbols that can be trained by the recognizer	
 * 
 * @comm This function assumes that pData is initialized with allocated memory 
 * in pHwr, pInternalDict contains a pointer to the memory read from the dictionary file, this memory must not be changed during the lifetime of 
 * the recognizer, iHwrLen should indicate the size of the memory allocated for pHwr.

 *
 * @rdesc Success/error code:
 * @flag ART_STATUS_OK  | If initialization was successful
 * @flag ART_STATUS_NO_ENOUGH_RAM | If dynamic memory assigned was not enough
 * @flag ART_STATUS_INVALID_DICT | Dictionary has wrong format			
 * @flag ART_STATUS_UNKNOWN | If an error occured
 * 
 * @normal
 ***********************************************************************************/
	
ART_RETURN_STATUS ARTHWRInit(ART_HWRData *pData,WORD maxModels);
ART_RETURN_STATUS ARTHWRInit(ART_HWRData *pData,WORD maxModels) { return 1; }

/**********************************************************************************
 * @func Sets the writing area of the host application (needs to 
 * be called after a call to ARTHWRInit and then only if the writing area has changed).
 *
 * @parm ART_HWRData * | pData | Pointer to the recognizer data
 * @parm ART_WritingAreaInfo | writingArea | The writing area data to set
 *
 * @rdesc Success/error code:
 * @flag ART_STATUS_OK | Success
 * @flag ART_STATUS_UNKNOWN | Error
 *
 * @normal
 ***********************************************************************************/

ART_RETURN_STATUS ARTHWRSetInputBoxSize(ART_HWRData *pData,  ART_WritingAreaInfo writingArea);
ART_RETURN_STATUS ARTHWRSetInputBoxSize(ART_HWRData *pData,  ART_WritingAreaInfo writingArea) { return 1; }

/**********************************************************************************
 * @func Closes the handwriting recognizer
 *
 * @parm ART_HWRData *| pData | Pointer to the recognizer data
 *
 * @rdesc Success/error code:
 * @flag ART_STATUS_OK | Success
 * @flag ART_STATUS_UNKNOWN | Error
 *
 * @normal
 ***********************************************************************************/

ART_RETURN_STATUS ARTHWREnd(ART_HWRData *pData);
ART_RETURN_STATUS ARTHWREnd(ART_HWRData *pData) { return 1; }
/**********************************************************************************
 * @func Sets the language for recognition
 *
 * @parm ART_HWRData *| pData |	Pointer to the recognizer data
 * @parm DWORD | language | Value of the language ( e.g. ARTHWR_LANG_ENGLISH)
 *
 * @rdesc Success/error code:
 * @flag ART_STATUS_OK | Success
 * @flag ART_STATUS_UNKNOWN | Error
 *
 * @normal
 ***********************************************************************************/

ART_RETURN_STATUS ARTHWRSetLanguage(ART_HWRData *pData, DWORD language);
ART_RETURN_STATUS ARTHWRSetLanguage(ART_HWRData *pData, DWORD language) { return 1; }
/**********************************************************************************
 * @func Gets the current language in the recognizer
 *
 * @parm ART_HWRData * | pData |	Pointer to the recognizer data
 *
 * @rdesc The value of the language currently set
 *
 * @normal
 ***********************************************************************************/

DWORD ARTHWRGetLanguage(ART_HWRData *pData);
DWORD ARTHWRGetLanguage(ART_HWRData *pData) { return 0; }
/**********************************************************************************
 * @func Sets a new recognition mode letters(upper/lower), punctuation,  numeric
 *
 * @parm ART_HWRData *| pData |	Pointer to the recognizer data
 * @parm ART_RecognitionMode | recMode | New recognition mode
 *
 * @rdesc Success/error code:
 * @flag ART_STATUS_OK | Success
 * @flag ART_STATUS_UNKNOWN | Error
 *
 * @normal
 ***********************************************************************************/

ART_RETURN_STATUS ARTHWRSetRecognitionMode(ART_HWRData* pData, ART_RecognitionMode recMode);
ART_RETURN_STATUS ARTHWRSetRecognitionMode(ART_HWRData* pData, ART_RecognitionMode recMode) { return 1; }
/**********************************************************************************
 * @func  Gets the current recognition mode
 *
 * @parm ART_HWRData *| pData |	Pointer to the recognizer data
 * @rdesc Current recognition mode
 * @flag <bl EUpperMode> | Letters - recognition results are in uppercase
 * @flag <bl ELowerMode> | Letters - recognition results are in lowercase
 * @flag <bl ENumericMode> | Numbers
 * @flag <bl EPuncMode>	  | Punctuation marks
 *
 * @normal
 ***********************************************************************************/

ART_RecognitionMode ARTHWRGetRecognitionMode (ART_HWRData *pData);
ART_RecognitionMode ARTHWRGetRecognitionMode (ART_HWRData *pData) { return 1; }
/**********************************************************************************
 * @func  Sets the current intermediate state 
 *
 * @parm ART_HWRData *| pData |	Pointer to the recognizer data
 * @parm BYTE | intermediateOn | New intermediate state ( 0 - off , 1 - on )
 *
 * @rdesc Success/error code:
 * @flag ART_STATUS_OK | Success
 * @flag ART_STATUS_UNKNOWN | Error
 *
 * @normal
 ***********************************************************************************/

ART_RETURN_STATUS ARTHWRSetIntermediate (ART_HWRData *pData, BYTE intermediateOn);
ART_RETURN_STATUS ARTHWRSetIntermediate (ART_HWRData *pData, BYTE intermediateOn) { return 1; }
/**********************************************************************************
 * @func  Gets the current recognition state
 *
 * @parm ART_HWRData *| pData |	Pointer to the recognizer data
 * @rdesc Current intermediate state
 * @flag 0 | Intermediate results in-active
 * @flag 1 | Intermediate results active
 *
 * @normal
 ***********************************************************************************/

BYTE ARTHWRGetIntermediate (ART_HWRData *pData);
BYTE ARTHWRGetIntermediate (ART_HWRData *pData) { return 1; }
/**********************************************************************************
 * Function name: ARTHWRAddPoint
 * ARTHWRAddPoint function adds a point written by the user to the recognizer
 *
 * Parameters:
 * pData:		Pointer to the recognizer data
 * point:		The point written, the recognizer assumes cartesian coordinates
 *				with (0,0) being the buttom left corner.
 *
 * Return:
 * Success:								ART_STATUS_OK
 * Error:								ART_STATUS_UNKNOWN
 ***********************************************************************************/

ART_RETURN_STATUS ARTHWRAddPoint(ART_HWRData *pData, ART_Point point);
ART_RETURN_STATUS ARTHWRAddPoint(ART_HWRData *pData, ART_Point point) { return 1; }

/**********************************************************************************
 * @func Notifies the recognizer that the stroke has ended, meaning that 
 * all the points that have been input since the previous call constitute a stroke.
 *
 * @parm ART_HWRData *| pData |	Pointer to the recognizer data
 * @parm ART_RecResults | pResults | Pointer to a structure that will contain the recognition results
 *
 * @rdesc The return value will indicate if the results are final or intermediate, or if no results are available. If the results are final the host application 
 * should clear the ink of the writing area
 * @flag ART_STATUS_NO_RESULTS_AVAILABLE | No results are available, or while training
 * @flag ART_STATUS_INCOMPLETE_RESULTS | Only intermediate results are available
 * @flag ART_STATUS_FINAL_RESULTS | Final results are available
 * @flag ART_STATUS_TRAIN_TOO_MANY_STROKES | While training, this error will be returned to indicate that the user has written too many strokes (more than 4).
 * @flag ART_STATUS_UNKNOWN | An error occured
 *
 * @normal
 ***********************************************************************************/

ART_RETURN_STATUS ARTHWREndOfStroke(ART_HWRData *pData, ART_RecResults *pResults);
ART_RETURN_STATUS ARTHWREndOfStroke(ART_HWRData *pData, ART_RecResults *pResults) { return 1; }
/**********************************************************************************
 * @func This function is called by the host application on a timeout event, that is, when a certain amount of time has elapsed since a pen-up event,
 * and recogniton results should be retrieved. After calling this function the writing area should be cleared.
 *
 * @parm ART_HWRData *| pData |	Pointer to the recognizer data
 * @parm ART_RecResults | pResults | Pointer to a structure that will contain the recognition results
 *
 * @rdesc Indicates if results are available or not		
 * @flag ART_STATUS_NO_RESULTS_AVAILABLE | No results are available, or while training.
 * @flag ART_STATUS_FINAL_RESULTS | Final results are available
 *
 * @normal
 ***********************************************************************************/

ART_RETURN_STATUS ARTHWRRecognizeData(ART_HWRData *pData, ART_RecResults *pResults);
ART_RETURN_STATUS ARTHWRRecognizeData(ART_HWRData *pData, ART_RecResults *pResults) { return 1; }
/**********************************************************************************
 * @func Resets the recognizer in case the recogniton or training process should be aborted
 *
 * @parm ART_HWRData *| pData |	Pointer to the recognizer data
 *
 * @rdesc Success/error code:
 * @flag ART_STATUS_OK | Success
 * @flag ART_STATUS_UNKNOWN | Error
 *
 * @normal
 ***********************************************************************************/

ART_RETURN_STATUS ARTHWRResetData(ART_HWRData *pData);
ART_RETURN_STATUS ARTHWRResetData(ART_HWRData *pData) { return 1; }
/**********************************************************************************
 * @func Retrieves the recognizer version
 *
 * @parm int * | version | Pointer to the version, upon return will contain the recognizer version
 *
 * @rdesc Success/error code:
 * @flag ART_STATUS_OK | Success
 * @flag ART_STATUS_UNKNOWN | Error
 *
 * @normal
 ***********************************************************************************/

ART_RETURN_STATUS ARTHWRGetRecognizerVersion(int *version);
ART_RETURN_STATUS ARTHWRGetRecognizerVersion(int *version) { return 1; }
/**********************************************************************************
 * @func Retrieves the recognizer brand (in this case the return value will always be "simpliWrite")
 *
 * @rdesc A char* containing the recognizer brand
 *
 * @normal
 ***********************************************************************************/

char * ARTHWRGetRecognizerBrand(void);
char * ARTHWRGetRecognizerBrand(void) { return NULL; }
/**********************************************************************************
 * @func Retrieves the version of the dictionary currently in use
 *
 * @parm ART_HWRData *| pData |	Pointer to the recognizer data
 *
 * @rdesc A char* of length 6, containing the dictionary version.
 *
 * @normal
 ***********************************************************************************/

char * ARTHWRGetDictVersion(ART_HWRData* pData);
char * ARTHWRGetDictVersion(ART_HWRData* pData) { return NULL; }
/**********************************************************************************
 *
 * @func Starts a training session for one symbol
 * 
 * @parm ART_HWRData *| pData |	Pointer to the recognizer data
 *
 * @rdesc Success/error code:
 * @flag ART_STATUS_OK | Success
 * @flag ART_STATUS_LIB_NOT_INITIALIZED	| If a user library was not loaded
 * @flag ART_STATUS_UNKNOWN | If the function failed to start a training session
 *
 * @comm Once this function has been called, all the points that are fed into the recognizer 
 * are used for the training of one symbol until the <mf ARTHWRFinishTraining function is called.
 * 
 * @normal
 *
 ***********************************************************************************/

ART_RETURN_STATUS ARTHWRStartTraining(ART_HWRData *pData);
ART_RETURN_STATUS ARTHWRStartTraining(ART_HWRData *pData) { return 1; }
/**********************************************************************************
 *
 * @func Terminates a training session for one symbol
 *
 * @parm ART_HWRData *| pData |	Pointer to the recognizer data
 * @parm WORD | symbolCode | The code of the trained symbol
 * @parm ART_TrainConflictInfo * | conflictInfo | Pointer to a structure that will hold the information about conflicting symbols
 *
 * @rdesc Success/error code:
 * @flag ART_STATUS_OK | Success
 * @flag ART_STATUS_LIB_NOT_INITIALIZED	| If a user library was not loaded
 * @flag ART_STATUS_TRAIN_CONFLICT	| If the model drawn by the user is too similar to an existing model.
 * Information about the conflicting model will be returned in conflictInfo parameter.
 * @flag ART_STATUS_TRAIN_TOO_MANY_STROKES | If the model drawn by the user has too many strokes
 * @flag ART_STATUS_TRAIN_CODE_NOT_ALLOWED | If the symbol code, given in sSymbolCode, is illegal
 * (for example, if this code does not exist in the library)
 * @flag ART_STATUS_LIB_WRITE_FAILURE		| If there was a failure writing the library file to disk
 * @flag ART_STATUS_UNKNOWN | If the function failed to terminate a training session for a reason other 
 * than those described above
 *
 * @comm Training has the following limitations:
 * @bullet Training is allowed only for symbols that are already supported by the recognizer.
 * @bullet The trained ink may not be too similar to an existing model of a different symbol; if it is, ART_STATUS_TRAIN_CONFLICT is returned.
 * @bullet Trained models of letters may contain no more than three strokes.
 * @bullet Trained models of digits, and those punctuation marks that are recognized
 * in Letters or Numbers mode may contain no more than two strokes.
 * @bullet Trained models of punctuation marks recognized in Punctuation mode may contain no more than 4 strokes.
 * @bullet Accents cannot be trained. However, trained models of letters are available for recognition of their 
 * accented variants (for example, ?and ?.
 *
 * @normal
 *
 ***********************************************************************************/

ART_RETURN_STATUS ARTHWRFinishTraining(ART_HWRData *pData,WORD symbolCode, ART_TrainConflictInfo* pConflictInfo);
ART_RETURN_STATUS ARTHWRFinishTraining(ART_HWRData *pData,WORD symbolCode, ART_TrainConflictInfo* pConflictInfo) { return 1; }
/**********************************************************************************
 *
 * @func Gets the number of trained symbols in the library
 *
 * @parm ART_HWRData *| pData |	Pointer to the recognizer data
 *
 * @rdesc If the function was successful - the number of trained symbols in the library
 * <nl>If the function failed:
 * @flag ART_STATUS_LIB_NOT_INITIALIZED	| If a user library was not loaded 
 * @flag ART_STATUS_UNKNOWN	| If the function failed for any other reason.
 *
 * @normal
 *
 ***********************************************************************************/

int ARTHWRNumberOfTrainedSymbols(ART_HWRData *pData);
int ARTHWRNumberOfTrainedSymbols(ART_HWRData *pData) { return 1; }
/**********************************************************************************
 *
 * @func Gets the list of trained symbols
 *
 * @parm ART_HWRData *| pData |	Pointer to the recognizer data
 * @parm ART_CharactersTrainedInfo * | symbols | Pointer to structure that will hold the list trained symbols.
 * 
 *
 * @rdesc If the function was succesful - it returns a positive number indicating the 
 * number of trained symbols in the library.
 * If the function failed, the following error codes are  returned:
 *
 * @flag ART_STATUS_LIB_NOT_INITIALIZED	| If a user library was not loaded 
 * @flag ART_STATUS_UNKNOWN	| If the function failed for any other reason.
 *
 * @comm The host application should allocate space for the list of trained characters 
 * (Characters element of <c ART_CharactersTrainedInfo>). The size of this list should be 
 * determined by the host application (will be referred to as MAX_MODELS) and should be the maximum number of models that can be trained.
 * This size should be indicated by nCharacters element of <c ART_CharactersTrainedInfo>.  
 * If the maximum size of the array is too small, only the first MAX_MODELS symbols will be returned. 
 * If the function was succesful, it returns the actual number of trained symbols
 * in the library. This number may be bigger than the size of the array of symbols, 
 * if the maximum size of the array is not sufficient to hold all trained symbols.
 * Each data item in the array is the Unicode of one trained symbol.
 *
 * @normal
 *
 ***********************************************************************************/

int ARTHWRTrainedSymbols(ART_HWRData *pData,ART_CharactersTrainedInfo* symbols);
int ARTHWRTrainedSymbols(ART_HWRData *pData,ART_CharactersTrainedInfo* symbols) { return 1; }
/**********************************************************************************
 *
 * @func Gets the number of models trained for a specific symbol
 *
 * @parm ART_HWRData *| pData |	Pointer to the recognizer data
 * @parm WORD | symbolCode | a symbol code
 *
 * @rdesc If the function was successful - the number of trained models for the
 * input code (may be 0)
 * <nl>If the function failed:
 * @flag ART_STATUS_LIB_NOT_INITIALIZED	| If a user library was not loaded 
 * @flag ART_STATUS_TRAIN_CODE_NOT_ALLOWED | If symbolCode is not supported by the recognizer
 * @flag ART_STATUS_UNKNOWN | If the function failed for a reason other than those described above
 *
 * @comm The symbol code should be a Unicode of a symbol that is supported 
 * by the recognizer, or ART_STATUS_TRAIN_CODE_NOT_ALLOWED will be returned.
 *
 * @normal
 *
 ***********************************************************************************/

int ARTHWRNumberOfTrainedModels(ART_HWRData *pData,WORD symbolCode);
int ARTHWRNumberOfTrainedModels(ART_HWRData *pData,WORD symbolCode) { return 1; }
/**********************************************************************************
 *
 * @func Get the list of strokes and points for drawing a trained model
 * @parm ART_HWRData *| pData |	Pointer to the recognizer data
 * @parm WORD | symbolCode | a symbol code
 * @parm WORD | index	 | A serial index of the required model - starts from 0
 * @parm <c ART_ModelPoints >* | pStrokes | An array that holds the strokes and points of the model
 * @parm <c ART_WritingAreaInfo | info | The writing area for the model's points
 *
 * @rdesc Success/error code:
 * @flag ART_STATUS_OK | If no error occured
 * @flag ART_STATUS_LIB_NOT_INITIALIZED	| If a user library was not loaded 
 * @flag ART_STATUS_UNKNOWN | If the function failed for a reason other than those described above
 *
 * @comm The model's points are returned in a <it points> element of <c ART_ModelPoints> structure, which is an array of all the model points.
 * An end of stroke is indicated by a (-1,-1) point. The number of points in the model, including the end of stroke (-1,-1) points are indicated
 * in <it nPoints> element of pStrokes. The model's points are returned in <it points> element of <c ART_ModelPoints>.
 * 
 * The model points are scaled to the size of the writing area info given to the function. 
 * 
 * @normal
 *
 ***********************************************************************************/

ART_RETURN_STATUS ARTHWRTrainedModelPoints(ART_HWRData *pData,WORD symbolCode, WORD index, ART_ModelPoints *pStrokes, ART_WritingAreaInfo info);
ART_RETURN_STATUS ARTHWRTrainedModelPoints(ART_HWRData *pData,WORD symbolCode, WORD index, ART_ModelPoints *pStrokes, ART_WritingAreaInfo info) { return 1; }
/**********************************************************************************
 *
 * @func Deletes a trained model from the library
 *
 * @parm ART_HWRData *| pData |	Pointer to the recognizer data
 * @parm WORD | symbolCode | a symbol code
 * @parm BYTE	| index	 | A serial index of the required model. 
 *
 * @rdesc Success/error code:
 * @flag ART_STATUS_OK | If there is no error
 * @flag ART_STATUS_LIB_NOT_INITIALIZED	| If a user library was not loaded
 * @flag ART_STATUS_LIB_WRITE_FAILURE | If there was a failure writing the library file to disk
 * @flag ART_STATUS_UNKNOWN | If the function failed for a reason other than those described above
 *
 * @comm In order to delete all the models for the symbol code, the value of index should be set to -1 (HWRAllModelsIndex)
 *
 * @normal
 *
 ***********************************************************************************/

ART_RETURN_STATUS ARTHWRDeleteTrainedModel(ART_HWRData *pData,WORD symbolCode, char index);
ART_RETURN_STATUS ARTHWRDeleteTrainedModel(ART_HWRData *pData,WORD symbolCode, char index) { return 1; }

/**********************************************************************************
 *
 * @func Loads a new library of trained models
 *
 * @parm ART_HWRData *| pData |	Pointer to the recognizer data
 * @parm char* | libPath | The path and file name of the library
 *
 * @rdesc Success/error code:
 * @flag ART_STATUS_OK | If there is no error
 * @flag ART_STATUS_LIB_READ_FAILURE | If there was a failure during the opening or reading of the library file
 * @flag ART_STATUS_LIB_CORRUPT | If the library file is corrupted
 * @flag ART_STATUS_UNKNOWN | If the function failed for a reason other than those described above
 *
 * @comm The library of trained models is saved to the file specified in libPath.
 * If the path or the file does not exist a new library file is created. 
 *
 * @normal
 *
 ***********************************************************************************/

ART_RETURN_STATUS ARTHWRSetLibrary(ART_HWRData *pData,char* libPath);
ART_RETURN_STATUS ARTHWRSetLibrary(ART_HWRData *pData,char* libPath) { return 1; }


