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)  

main.c File Reference
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <glib.h>
#include <glib/gstdio.h>
#include <pango/pango-attributes.h>
#include <gtk/gtk.h>
#include <curl/curl.h>
#include "auxiliar.h"
#include "callbacks.h"
#include "translation.h"
#include "keyboard.h"
#include "tutor.h"
#include "accuracy.h"
#include "top10.h"
#include "main.h"
Include dependency graph for main.c:

Go to the source code of this file.

Functions

gchar * main_path_user ()
 
gchar * main_path_stats ()
 
gchar * main_path_data ()
 
gchar * main_path_score ()
 
gboolean main_curl_ok ()
 
gboolean main_velo_txt ()
 
gboolean main_preferences_exist (gchar *group, gchar *key)
 
void main_preferences_remove (gchar *group, gchar *key)
 
gchar * main_preferences_get_string (gchar *group, gchar *key)
 
void main_preferences_set_string (gchar *group, gchar *key, gchar *value)
 
gint main_preferences_get_int (gchar *group, gchar *key)
 
void main_preferences_set_int (gchar *group, gchar *key, gint value)
 
gboolean main_preferences_get_boolean (gchar *group, gchar *key)
 
void main_preferences_set_boolean (gchar *group, gchar *key, gboolean value)
 
gboolean main_altcolor_exist (gchar *group, gchar *key)
 
gchar * main_altcolor_get_string (gchar *group, gchar *key)
 
gboolean main_altcolor_get_boolean (gchar *group, gchar *key)
 
void main_altcolor_set_boolean (gchar *group, gchar *key, gboolean value)
 
void main_preferences_save ()
 
static void main_initialize_global_variables ()
 
static void main_gtkbuilder_translation_workaround ()
 
static void main_window_init ()
 
int main (int argc, char *argv[])
 
void main_window_pass_away ()
 

Variables

GtkBuilder * gui
 
gchar * KEYB_CUSTOM
 
gchar * KEYB_EDIT
 
gchar * OTHER_DEFAULT
 
static GKeyFile * preferences = NULL
 
static GKeyFile * altcolor = NULL
 
static gboolean curl_ok
 
static gboolean velo_txt
 
struct {
   gchar *   user
 
   gchar *   stats
 
   gchar *   data
 
   gchar *   score
 
path
 

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

◆ main_altcolor_exist()

gboolean main_altcolor_exist ( gchar *  group,
gchar *  key 
)

Definition at line 145 of file main.c.

References altcolor.

Referenced by main_window_init().

◆ main_altcolor_get_boolean()

gboolean main_altcolor_get_boolean ( gchar *  group,
gchar *  key 
)

◆ main_altcolor_get_string()

gchar* main_altcolor_get_string ( gchar *  group,
gchar *  key 
)

◆ main_altcolor_set_boolean()

void main_altcolor_set_boolean ( gchar *  group,
gchar *  key,
gboolean  value 
)

Definition at line 164 of file main.c.

References altcolor.

Referenced by main_window_init(), and on_togglebutton_altcolor_toggled().

◆ main_curl_ok()

gboolean main_curl_ok ( void  )

Definition at line 85 of file main.c.

References curl_ok.

Referenced by top10_global_publish(), and top10_global_update().

◆ main_gtkbuilder_translation_workaround()

static void main_gtkbuilder_translation_workaround ( )
static

Definition at line 314 of file main.c.

References _, and gui.

Referenced by main_window_init().

◆ main_initialize_global_variables()

static void main_initialize_global_variables ( )
static

◆ main_path_data()

◆ main_path_score()

gchar* main_path_score ( void  )

Definition at line 79 of file main.c.

References path.

Referenced by top10_global_publish(), top10_global_update(), top10_read_stats(), and top10_write_stats().

◆ main_path_stats()

gchar* main_path_stats ( void  )

◆ main_path_user()

◆ main_preferences_exist()

◆ main_preferences_get_boolean()

gboolean main_preferences_get_boolean ( gchar *  group,
gchar *  key 
)

Definition at line 133 of file main.c.

References preferences.

Referenced by get_par(), main_window_init(), on_text_tutor_realize(), tutor_beep(), and tutor_calc_stats().

◆ main_preferences_get_int()

gint main_preferences_get_int ( gchar *  group,
gchar *  key 
)

Definition at line 121 of file main.c.

References preferences.

Referenced by basic_init(), fluid_draw_random_paragraphs(), fluid_init(), main_window_init(), and window_restore().

◆ main_preferences_get_string()

◆ main_preferences_remove()

void main_preferences_remove ( gchar *  group,
gchar *  key 
)

Definition at line 103 of file main.c.

References preferences.

Referenced by fluid_init_paragraph_list(), keyb_set_chars(), trans_init_language_env(), and velo_init_dict().

◆ main_preferences_save()

void main_preferences_save ( void  )

◆ main_preferences_set_boolean()

void main_preferences_set_boolean ( gchar *  group,
gchar *  key,
gboolean  value 
)

◆ main_preferences_set_int()

void main_preferences_set_int ( gchar *  group,
gchar *  key,
gint  value 
)

◆ main_preferences_set_string()

◆ main_velo_txt()

◆ main_window_init()

◆ main_window_pass_away()

void main_window_pass_away ( void  )

Quit the application

Definition at line 572 of file main.c.

References accur_close(), curl_ok, and main_preferences_save().

Referenced by on_window_main_destroy(), and on_window_tutor_destroy().

Variable Documentation

◆ altcolor

◆ curl_ok

gboolean curl_ok
static

Definition at line 47 of file main.c.

Referenced by main(), main_curl_ok(), and main_window_pass_away().

◆ data

gchar* data

Definition at line 53 of file main.c.

Referenced by accur_init(), hints_demo_fingers_move(), and keyb_set_keyboard_layouts().

◆ gui

GtkBuilder* gui

Variables

Definition at line 39 of file main.c.

Referenced by get_obj(), get_wg(), get_win(), main(), and main_gtkbuilder_translation_workaround().

◆ KEYB_CUSTOM

◆ KEYB_EDIT

◆ OTHER_DEFAULT

◆ 

◆ preferences

◆ score

gchar* score

◆ stats

gchar* stats

Definition at line 52 of file main.c.

◆ user

gchar* user

Definition at line 51 of file main.c.

◆ velo_txt

gboolean velo_txt
static

Definition at line 48 of file main.c.

Referenced by main(), main_velo_txt(), and main_window_init().