00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _GOCR_BLOCK_H
00023 #define _GOCR_BLOCK_H
00024
00025 #ifndef _GOCR_MODULE_H
00026 # error "Do not call gocr_gui.h directly; call gocr_module.h instead."
00027 #endif.
00028
00029 #ifdef __cplusplus
00030 extern "C" {
00031 #endif
00032
00038
00039
00040
00044 typedef int gocr_blockType;
00045
00046
00047 typedef int gocr_blockId;
00048
00052 struct gocr_block {
00053 gocr_blockType t;
00054 gocr_blockId id;
00055
00056 int x0, y0, x1, y1;
00057 gocr_Image *image;
00059 List boxlist;
00061 struct {
00062 unsigned int min_height, max_height;
00063 unsigned int min_width, max_width;
00064 float av_height, av_width;
00065 } boxinfo;
00067 wchar_t *text;
00068 };
00072 typedef struct gocr_block gocr_Block;
00073
00074 struct gocr_line {
00075 int x0, x1;
00076 int m0, m1, m2, m3;
00077 };
00078 typedef struct gocr_line gocr_Line;
00079
00080 struct gocr_textblock {
00081 gocr_Block b;
00082 };
00083 typedef struct gocr_textblock gocr_TextBlock;
00084
00085 struct gocr_pictureblock {
00086 gocr_Block b;
00087 char *name;
00088 };
00089 typedef struct gocr_pictureblock gocr_PictureBlock;
00090
00091 struct gocr_mathblock {
00092 gocr_Block b;
00093
00094
00095 };
00096 typedef struct gocr_mathblock gocr_MathBlock;
00097
00098 extern List blocklist;
00099 extern gocr_blockType gocr_blockTypeRegister ( char *name );
00100 extern gocr_blockType gocr_blockTypeGetByName ( char *name );
00101 extern const char *gocr_blockTypeGetNameByType ( gocr_blockType t );
00102
00103 extern int gocr_blockAdd ( gocr_Block *b );
00106 #ifdef __cplusplus
00107 }
00108 #endif
00109
00110 #endif