1 /**************************************************************************/ 2 /* Klavaro - a flexible touch typing tutor */ 3 /* Copyright (C) from 2005 until 2008 Felipe Castro */ 4 /* Copyright (C) from 2009 until 2019 The Free Software Foundation */ 5 /* */ 6 /* This program is free software, licensed under the terms of the GNU */ 7 /* General Public License as published by the Free Software Foundation, */ 8 /* either version 3 of the License, or (at your option) any later */ 9 /* version. You should have received a copy of the GNU General Public */ 10 /* License along with this program. If not, */ 11 /* see <https://www.gnu.org/licenses/>. */ 12 /**************************************************************************/ 13 14 #include <plot.h> 15 #include <glib.h> 16 17 #define ACCUR_LOG_FILE "accuracy.log" 18 #define PROFI_LOG_FILE "proficiency.log" 19 #define MAX_CHARS_EVALUATED 130 20 #define MAX_TT_SAVED 30 21 #define ERROR_INERTIA 10 /* How many correct touchs to eliminate a wrong one (it was 30 first) */ 22 #define ERROR_LIMIT 60 /* How many errors to start a special practice on adaptability */ 23 #define PROFI_LIMIT 2.2 /* How many times the 10th slowest key-touch-time should be relative to the 40th slowest one, 24 in order to start a special practice on adaptability */ 25 #define UTF8_BUFFER 7 26 27 void accur_init (void); 28 void accur_terror_reset (void); 29 void accur_ttime_reset (void); 30 void accur_reset (void); 31 gint accur_terror_n_get (void); 32 gint accur_ttime_n_get (void); 33 gchar * accur_terror_char_utf8 (gint i); 34 gchar * accur_ttime_char_utf8 (gint i); 35 gulong accur_wrong_get (gint i); 36 gdouble accur_profi_aver (gint i); 37 gint accur_profi_aver_norm (gint i); 38 void accur_correct (gunichar uchr, double touch_time); 39 void accur_wrong (gunichar uchr); 40 gulong accur_error_total (void); 41 void accur_terror_sort (void); 42 void accur_ttime_sort (void); 43 void accur_sort (void); 44 gboolean accur_create_word (gunichar *word); 45 void accur_close (void); 46