00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _GOCR_CHAR_H
00022 #define _GOCR_CHAR_H
00023
00024 #ifndef _GOCR_MODULE_H
00025 # error "Do not call gocr_gui.h directly; call gocr_module.h instead."
00026 #endif.
00027
00028 #ifdef __cplusplus
00029 extern "C" {
00030 #endif
00031
00037
00038
00039
00047 struct gocr_char {
00048 wchar_t c;
00049 float prob;
00050 };
00054 typedef struct gocr_char gocr_Char;
00055
00059 struct gocr_box {
00060 int x0, y0, x1, y1;
00061 wchar_t *attributes;
00062 gocr_Image *image;
00064 List possible;
00065 gocr_Char *ch;
00066 wchar_t modifier;
00068
00069 wchar_t c, ac;
00070 int num;
00071 int x, y, dots;
00072 };
00076 typedef struct gocr_box gocr_Box;
00077
00078 enum gocr_charattributetype {
00079 SETTABLE, UNTIL_OVERRIDEN
00080 };
00084 typedef enum gocr_charattributetype gocr_CharAttributeType;
00087
00088
00089
00093
00094 #define GOCR_SET 1
00095 #define GOCR_UNSET 0
00096
00097 extern int gocr_charBegin ( void );
00098 extern int gocr_charEnd ( void );
00099 extern int gocr_charSetAllNearPixels ( int action, int x, int y , int connect );
00100 extern int gocr_charSetAttribute ( int action, char *name, ... );
00101 extern int gocr_charSetPixel ( int action, int x, int y );
00102 extern int gocr_charSetRect ( int action, int x0, int y0, int x1, int y1 );
00105
00106
00107
00111 extern int gocr_charAttributeRegister ( char *name, gocr_CharAttributeType t,
00112 char *format );
00113 extern int gocr_charAttributeInsert ( char *name, ... );
00114 extern int gocr_boxCharSet( gocr_Box *b, wchar_t w, float prob );
00117 #ifdef __cplusplus
00118 }
00119 #endif
00120
00121 #endif