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

gocr.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_API_H 00023 #define _GOCR_API_H 00024 00025 #ifdef __cplusplus 00026 extern "C" { 00027 #endif 00028 00036 #define GOCR_FALSE 0 00037 00039 #define GOCR_TRUE 1 00040 00041 /* 00042 * Initialization/finalization 00043 */ 00047 extern int gocr_init ( int argc, char **argv ); 00048 extern void gocr_finalize ( void ); 00051 /* gocr options */ 00058 enum gocr_attributetype { 00059 LIBVERSION, 00060 VERBOSE, 00062 BLOCK_OVERLAP, 00063 NO_BLOCK, 00065 CHAR_OVERLAP, 00066 CHAR_RECTANGLES, 00067 FIND_ALL, 00069 ERROR_FILE, 00070 PRINT, 00071 PRINT_IMAGE 00072 }; 00076 typedef enum gocr_attributetype gocr_AttributeType; 00077 00078 extern int gocr_setAttribute ( gocr_AttributeType t, void *value ); 00079 extern void * gocr_getAttribute ( gocr_AttributeType t ); 00085 int (*gocr_imageLoad) ( const char *filename, void *data ); 00086 extern void gocr_imageClose ( void ); 00089 /* 00090 * Module system. 00091 * 00092 */ 00099 enum gocr_moduletype { 00100 imageLoader = 0, 00101 imageFilter, 00102 blockFinder, 00104 charFinder, 00105 charRecognizer, 00106 contextCorrection, 00107 outputFormatter, 00108 allModules 00109 }; 00113 typedef enum gocr_moduletype gocr_ModuleType; 00114 00115 typedef int gocr_ModuleId; 00116 typedef int gocr_ModuleFunctionId; 00117 00118 extern gocr_ModuleId gocr_moduleLoad ( char *filename ); 00119 extern void gocr_moduleClose ( gocr_ModuleId id ); 00120 extern int gocr_moduleSetAttribute ( gocr_ModuleId id, char *a, 00121 char *b ); 00122 extern const struct gocr_moduleattributeinfo * 00123 gocr_moduleGetAttributeList ( gocr_ModuleId id ); 00124 extern const struct gocr_modulefunctioninfo * 00125 gocr_moduleGetFunctionList ( gocr_ModuleId id ); 00126 00127 extern gocr_ModuleFunctionId 00128 gocr_functionInsertBefore ( char *functionname, 00129 gocr_ModuleId mid, void *data, 00130 gocr_ModuleFunctionId func ); 00131 extern gocr_ModuleFunctionId 00132 gocr_functionAppend ( char *functionname, 00133 gocr_ModuleId mid, void *data); 00134 extern void * gocr_functionDeleteById ( gocr_ModuleFunctionId id ); 00135 00136 /*extern int gocr_runModuleFunction ( gocr_ModuleFunctionId id ); 00137 extern int gocr_runModuleType ( gocr_ModuleType t ); */ 00138 extern int gocr_runAllModules ( void ); 00145 enum gocr_guifunction { 00146 gocr_BeginWindow, 00147 gocr_EndWindow, 00148 gocr_DisplayCheckButton, 00149 gocr_DisplayImage, 00150 gocr_DisplayRadioButtons, 00151 gocr_DisplaySpinButton, 00152 gocr_DisplayText, 00153 gocr_DisplayTextField 00154 }; 00155 typedef enum gocr_guifunction gocr_GUIFunction; 00156 00157 extern int gocr_guiSetFunction ( gocr_GUIFunction type, void *func ); 00158 00161 #ifdef __cplusplus 00162 } 00163 #endif 00164 00165 00166 #endif /* GOCR_API_H */

Generated on Thu Jul 29 16:43:27 2004 for GOCR API by doxygen 1.3.7