klavaro  3.13
About: Klavaro is a touch typing tutor program.
  Fossies Dox: klavaro-3.13.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

fluidness.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib/gstdio.h>
#include <gtk/gtk.h>
#include "auxiliar.h"
#include "main.h"
#include "callbacks.h"
#include "translation.h"
#include "keyboard.h"
#include "tutor.h"
#include "velocity.h"
#include "fluidness.h"
Include dependency graph for fluidness.c:

Go to the source code of this file.

Data Structures

struct  Paragraph
 

Macros

#define FLUID_PARBUF   50
 
#define FLUID_1   60
 

Functions

gchar * fluid_get_paragraph_name ()
 
void fluid_reset_paragraph ()
 
gchar * get_par (gint index)
 
void fluid_init ()
 
void fluid_init_paragraph_list (gchar *list_name)
 
void fluid_draw_random_paragraphs ()
 
gchar * fluid_filter_utf8 (gchar *text)
 
void fluid_text_write_to_file (gchar *text_raw)
 
void fluid_copy_text_file (gchar *file_name)
 
void fluid_comment (gdouble accuracy, gdouble velocity, gdouble fluidness)
 

Variables

Paragraph par = { NULL, 0, "" }
 
gchar * OTHER_DEFAULT
 

Macro Definition Documentation

◆ FLUID_1

#define FLUID_1   60

Put on the screen the final comments

Definition at line 529 of file fluidness.c.

◆ FLUID_PARBUF

#define FLUID_PARBUF   50

Function Documentation

◆ fluid_comment()

void fluid_comment ( gdouble  accuracy,
gdouble  velocity,
gdouble  fluidness 
)

◆ fluid_copy_text_file()

void fluid_copy_text_file ( gchar *  file_name)

Copy the file 'file_name' so that it can be used as a customized exercise.

Definition at line 474 of file fluidness.c.

References assert_user_dir(), fluid_filter_utf8(), fluid_init_paragraph_list(), main_path_user(), QUERY_INTRO, tutor_process_touch(), tutor_set_query(), and velo_create_dict().

Referenced by on_button_filechooser_open_clicked().

◆ fluid_draw_random_paragraphs()

void fluid_draw_random_paragraphs ( void  )

Draw random sentences selected from a '.paragraphs' file

Definition at line 253 of file fluidness.c.

References FLUID_PARBUF, get_par(), i, j, Paragraph::len, main_preferences_get_int(), main_velo_txt(), par, TT_VELO, tutor_draw_paragraph(), and tutor_get_type().

Referenced by tutor_update_start().

◆ fluid_filter_utf8()

gchar* fluid_filter_utf8 ( gchar *  text)

Takes text and validate it as UTF-8

Definition at line 313 of file fluidness.c.

References i, keyb_get_symbols(), len, and MAX_PARAGRAPHS.

Referenced by fluid_copy_text_file(), and fluid_text_write_to_file().

◆ fluid_get_paragraph_name()

gchar* fluid_get_paragraph_name ( void  )

Interface functions

Definition at line 52 of file fluidness.c.

References Paragraph::name, and par.

Referenced by tutor_calc_stats().

◆ fluid_init()

◆ fluid_init_paragraph_list()

◆ fluid_reset_paragraph()

void fluid_reset_paragraph ( void  )

Definition at line 58 of file fluidness.c.

References Paragraph::buffer, Paragraph::len, Paragraph::name, and par.

Referenced by trans_change_language().

◆ fluid_text_write_to_file()

void fluid_text_write_to_file ( gchar *  text_raw)

Paste clipboard or dropped text in a file, so that it can be used as a customized exercise.

Definition at line 433 of file fluidness.c.

References _, assert_user_dir(), fluid_filter_utf8(), fluid_init_paragraph_list(), main_path_user(), QUERY_INTRO, tutor_process_touch(), tutor_set_query(), and velo_text_write_to_file().

Referenced by on_button_other_paste_clicked(), and on_entry_mesg_insert_text().

◆ get_par()

gchar* get_par ( gint  index)

Definition at line 71 of file fluidness.c.

References Paragraph::buffer, i, Paragraph::len, main_preferences_get_boolean(), and par.

Referenced by fluid_draw_random_paragraphs().

Variable Documentation

◆ OTHER_DEFAULT

gchar* OTHER_DEFAULT
extern

Definition at line 43 of file main.c.

Referenced by fluid_init_paragraph_list().

◆ par