Label troep
[sgc.git] / sgc.h
blob6532faa5ea051cf89f3604097d5747ce99aae5ed
1 #include <glib/gi18n.h>
2 #include <gtk/gtk.h>
3 #include <glade/glade.h>
4 #include <glib/gstdio.h>
5 #include <pango/pango-utils.h>
6 #include <unistd.h>
7 #include "Thing.h"
8 #include "PitchTier.h"
9 #include "Pitch.h"
11 /* Paths to files and directories */
12 #define DISTPATH "distfiles" /* This is the output direcory for new distfiles */
13 #define LOCALEDIR "locale" /* This is the directory for localizations */
14 #define PINYINPATH "pinyin" /* Here we store the common audioexamples */
15 #define PITCHPATH "PitchTiers" /* This is the temporary output for praatscripts */
16 #define RECORDPATH "records" /* Here we store the voice recordings */
17 #define GLADESOURCE "sgc.glade" /* Filename that stores the Glade GUI */
18 #define CONFIGFILE "sgc.ini" /* Filename that stores the configuration file */
19 #define SCRIPTPATH "SGC_ToneProt" /* This is the recognizer path for SGC */
20 #define WORDLISTS "wordlists" /* This is the directory with wordlists */
21 #define TESTFILE "tests.txt" /* If everything fails use this filename */
23 /* Hardcodec configs */
24 #define MAXTESTS 0 /* Maximum amount of word splits from a file */
26 /* Use our own PitchTier Parser, or use the one that was copied from praat.
27 * On windows we use this one because of compatibility issues
29 //#define PITCHTIER 1
31 /* Which binary do we need to invoke in order to start a script */
32 #ifdef MINGW
33 #define PRAATBIN "praatcon.exe"
34 #elif PPC
35 #define PRAATBIN "./praat.ppc"
36 #else
37 #define PRAATBIN "./praat"
38 #endif
40 extern GladeXML *xml;
41 extern gdouble upperRegister;
43 gpointer sound_init(void *args);
44 gpointer play(void *args);
45 gpointer example(void *args);
46 gpointer record(void *args);
48 void drawPitchTier(cairo_t *cr, gchar *filename, gint width, gint height, gdouble top);
50 void on_buttonNext_clicked(GtkWidget *widget, gpointer user_data);
51 void on_treeview_edited (GtkCellRendererText *celltext, const gchar *string_path, const gchar *new_text, gpointer data);
52 void on_windowMain_realize(GtkWidget *widget, gpointer user_data);
55 void create_list_view();
57 void add_entry(gchar *txt);
59 void fileOpen(gchar *filename);
60 void fileSave(gchar *filename);
61 void fileClose();
62 void updateWidgets();
64 enum
66 COL_TEXT = 0,
67 NUM_COLS
71 GtkListStore *liststore;
72 GtkTreeIter mainIter;
73 gboolean treevalid;
74 gchar *base;
75 gchar *file;
77 void clear();
78 gboolean next(GtkWidget *next);
79 gboolean prev(GtkWidget *prev);
80 void removeRecordings();
81 void setBase(gchar *newbase);
82 void setFile(gchar *newfile);
84 void configOpen();
85 void configSave();
87 gboolean openSGC(gchar *oldfilename);
88 void saveSGC(gchar *dir, gchar *path);