1 /* raw_engine.h -- not a real recognizer, just a way to store raw strokes
2 
3    Copyright (C) 2000 Carl Worth
4 
5    This program is free software; you can redistribute it and/or modify
6    it under the terms of the GNU General Public License as published by
7    the Free Software Foundation; either version 2, or (at your option)
8    any later version.
9 
10    This program is distributed in the hope that it will be useful,
11    but WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13    GNU General Public License for more details.
14 */
15 
16 #ifndef RAW_ENGINE_H
17 #define RAW_ENGINE_H
18 
19 #include "rec_engine.h"
20 #include "stroke.h"
21 
22 /* How many pixels can we drift, (both directions), and still be a tap? */
23 #define RAW_DEFAULT_TAP_DRIFT 6
24 
25 struct raw_priv
26 {
27     stroke_t stroke;
28 };
29 typedef struct raw_priv raw_priv_t;
30 
31 int raw_priv_alloc(rec_engine_t *engine);
32 void raw_priv_free(rec_engine_t *engine);
33 
34 void *raw_feature_data_alloc(rec_engine_t *engine,
35 			      char *feature_data_str);
36 void raw_feature_data_free(rec_engine_t *engine, void *feature_data);
37 
38 void raw_classify_stroke(rec_engine_t *engine, stroke_t *stroke);
39 char *raw_classification_str_alloc(rec_engine_t *engine, stroke_t *stroke);
40 void raw_free_classification(rec_engine_t *engine, stroke_t *stroke);
41 
42 double raw_recognize_stroke(rec_engine_t *engine, stroke_t *stroke,
43 			     void *feature_data);
44 
45 int raw_set_option(rec_engine_t *engine, char *name, char *value);
46 
47 #endif
48