Main Page | Class List | Directories | File List | Class Members | File Members

gocr_block.h

Go to the documentation of this file.
00001 /*
00002 GOCR Copyright (C) 2000  Joerg Schulenburg Joerg.Schulenburg@physik.uni-magdeburg.de 
00003 GOCR API Copyright (C) 2001 Bruno Barberi Gnecco <brunobg@sourceforge.net>
00004 
00005 This program is free software; you can redistribute it and/or
00006 modify it under the terms of the GNU General Public License
00007 as published by the Free Software Foundation; either version 2
00008 of the License, or (at your option) any later version.
00009 
00010 This program is distributed in the hope that it will be useful,
00011 but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 GNU General Public License for more details.
00014 
00015 You should have received a copy of the GNU General Public License
00016 along with this program; if not, write to the Free Software
00017 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
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  * block definition
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;         /* x-boundaries */
00076         int             m0, m1, m2, m3; /* y-boundaries */
00077 };
00078 typedef struct gocr_line gocr_Line;
00079 
00080 struct gocr_textblock {
00081         gocr_Block      b;                      /* parent; must be first field */
00082 };
00083 typedef struct gocr_textblock gocr_TextBlock;
00084 
00085 struct gocr_pictureblock {
00086         gocr_Block      b;                      /* parent; must be first field */
00087         char            *name;
00088 };
00089 typedef struct gocr_pictureblock gocr_PictureBlock;
00090 
00091 struct gocr_mathblock {
00092         gocr_Block      b;                      /* parent; must be first field */
00093 
00094         /* to be done */
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 /* _GOCR_MODULE_H */

Generated on Sun Jul 31 13:19:14 2005 for GOCR API by  doxygen 1.4.3-20050530