RetroArch
translation_driver.h
Go to the documentation of this file.
1 #ifndef __TRANSLATION_DRIVER__H
2 #define __TRANSLATION_DRIVER__H
3 
4 #include <boolean.h>
5 #include <retro_common_api.h>
6 
7 #include "ocr_driver.h"
8 
10 
12 {
18 };
19 
21 {
24 };
25 
26 typedef struct translation_driver
27 {
28  void* (*init)(const struct translation_driver_info *params);
29  void (*free)(void* data);
30 
31  /* use translate_image if non NULL else run image through ocr driver then run translate_text */
32  /* returned char pointers do not need to be freed but are 1 time use, they may be destroyed on the next call to translate_image/text */
33  /* NOTE: translate_image is allowed to call the ocr driver itself if it wants */
34  char* (*translate_text)(void* data, const char* game_text);
35  char* (*translate_image)(void* data, struct ocr_image_info image);
36 
37  const char *ident;
39 
42 
43 bool translation_driver_init(void);
44 void translation_driver_free(void);
45 
46 /* returned char pointers do not need to be freed but are 1 time use, they may be destroyed on the next call to translation_driver_translate_image */
48 
50 
51 #endif
#define RETRO_BEGIN_DECLS
Definition: retro_common_api.h:41
GLenum const GLfloat * params
Definition: glext.h:6297
typedef void(__stdcall *PFN_DESTRUCTION_CALLBACK)(void *pData)
int game_language
Definition: translation_driver.h:23
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: glext.h:6303
Definition: translation_driver.h:26
void translation_driver_free(void)
Definition: translation_driver.c:46
Definition: translation_driver.h:15
Definition: ocr_driver.h:9
char * translation_driver_translate_image(struct ocr_image_info image)
Definition: translation_driver.c:52
int device_language
Definition: translation_driver.h:22
Definition: translation_driver.h:20
GLenum GLsizei GLenum GLenum const GLvoid * image
Definition: glext.h:6305
Definition: translation_driver.h:13
#define RETRO_END_DECLS
Definition: retro_common_api.h:42
Definition: translation_driver.h:16
Definition: translation_driver.h:17
Definition: translation_driver.h:14
translation_init_errors
Definition: translation_driver.h:11
bool translation_driver_init(void)
Definition: translation_driver.c:30
void(* free)(void *data)
Definition: translation_driver.h:29
const translation_driver_t translation_cached_google
Definition: translation_cached_google.c:22
const char * ident
Definition: translation_driver.h:37
struct translation_driver translation_driver_t
const translation_driver_t translation_null
Definition: translation_null.c:17