27 #ifndef CCUTIL_OCRCLASS_H_ 28 #define CCUTIL_OCRCLASS_H_ 32 #include "gettimeofday.h" 41 #define MAX_FONT_NAME 34 42 #define MAX_OCR_NAME 32 43 #define MAX_OCR_VERSION 17 148 inT32 deadline_secs = deadline_msecs / 1000;
150 end_time.tv_usec += (deadline_msecs - deadline_secs * 1000) * 1000;
161 gettimeofday(&now, NULL);
167 #endif // CCUTIL_OCRCLASS_H_ PROGRESS_FUNC progress_callback
returns true to cancel
struct timeval end_time
this or other data for cancel
CANCEL_FUNC cancel
for errcode use
ETEXT_DESC()
character data
bool(* CANCEL_FUNC)(void *cancel_this, int words)
inT16 progress
chars in this buffer(0)
bool(* PROGRESS_FUNC)(int progress, int left, int right, int top, int bottom)
void * cancel_this
called whenever progress increases
volatile inT8 ocr_alive
true if not last
bool deadline_exceeded() const
inT8 err_code
ocr sets to 1, HP 0
inT8 more_to_come
percent complete increasing (0-100)
void set_deadline_msecs(inT32 deadline_msecs)