RetroArch
ocr_driver.h
Go to the documentation of this file.
1 #ifndef __OCR_DRIVER__H
2 #define __OCR_DRIVER__H
3 
4 #include <boolean.h>
5 #include <retro_common_api.h>
6 
8 
10 {
11  unsigned width;
12  unsigned height;
13  unsigned pixel_format;
14  void* data;
15 };
16 
17 typedef struct ocr_driver
18 {
19  void* (*init)(int game_character_set);
20  void (*free)(void* data);
21 
22  /* returned char pointers do not need to be freed but are 1 time use, they may be destroyed on the next call to get_text */
23  char* (*get_text)(void* data, struct ocr_image_info image);
24 
25  const char *ident;
26 } ocr_driver_t;
27 
28 #ifdef HAVE_TESSERACT
29 extern const ocr_driver_t ocr_tesseract;
30 #endif
31 extern const ocr_driver_t ocr_null;
32 
33 bool ocr_driver_init(void);
34 void ocr_driver_free(void);
35 
36 /* returned char pointers do not need to be freed but are 1 time use, they may be destroyed on the next call to ocr_driver_get_text */
38 
40 
41 #endif
void(* free)(void *data)
Definition: ocr_driver.h:20
void * data
Definition: ocr_driver.h:14
const char * ident
Definition: ocr_driver.h:25
#define RETRO_BEGIN_DECLS
Definition: retro_common_api.h:41
const ocr_driver_t ocr_null
Definition: ocr_null.c:17
char * ocr_driver_get_text(struct ocr_image_info image)
Definition: ocr_driver.c:52
Definition: ocr_driver.h:17
typedef void(__stdcall *PFN_DESTRUCTION_CALLBACK)(void *pData)
unsigned pixel_format
Definition: ocr_driver.h:13
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: glext.h:6303
Definition: ocr_driver.h:9
struct ocr_driver ocr_driver_t
bool ocr_driver_init(void)
Definition: ocr_driver.c:32
GLenum GLsizei GLenum GLenum const GLvoid * image
Definition: glext.h:6305
#define RETRO_END_DECLS
Definition: retro_common_api.h:42
unsigned width
Definition: ocr_driver.h:11
const ocr_driver_t ocr_tesseract
Definition: ocr_tesseract.c:71
unsigned height
Definition: ocr_driver.h:12
void ocr_driver_free(void)
Definition: ocr_driver.c:46