aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/config.c26
-rw-r--r--src/experiment-player.h40
-rw-r--r--src/format-selection.c30
-rw-r--r--src/main.c35
-rw-r--r--src/quick-open.c24
5 files changed, 152 insertions, 3 deletions
diff --git a/src/config.c b/src/config.c
index 951a9e2..4d6a409 100644
--- a/src/config.c
+++ b/src/config.c
@@ -1,3 +1,25 @@
+/**
+ * @file
+ * Configuration file handling functions
+ */
+
+/*
+ * Copyright (C) 2012 Otto-von-Guericke-Universität Magdeburg
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -97,6 +119,7 @@ get_group_by_actor(const gchar *actor)
return group;
}
+/** @private */
void
config_generic_set_transcript_font(const gchar *actor, const gchar *key,
const PangoFontDescription *font)
@@ -112,6 +135,7 @@ config_generic_set_transcript_font(const gchar *actor, const gchar *key,
}
}
+/** @private */
PangoFontDescription *
config_generic_get_transcript_font(const gchar *actor, const gchar *key)
{
@@ -128,6 +152,7 @@ config_generic_get_transcript_font(const gchar *actor, const gchar *key)
return font_desc;
}
+/** @private */
void
config_generic_set_transcript_color(const gchar *actor, const gchar *key,
const GdkColor *color)
@@ -143,6 +168,7 @@ config_generic_set_transcript_color(const gchar *actor, const gchar *key,
}
}
+/** @private */
gboolean
config_generic_get_transcript_color(const gchar *actor, const gchar *key,
GdkColor *color)
diff --git a/src/experiment-player.h b/src/experiment-player.h
index 9bbe592..2aa3fb3 100644
--- a/src/experiment-player.h
+++ b/src/experiment-player.h
@@ -1,3 +1,25 @@
+/**
+ * @file
+ * Main program header
+ */
+
+/*
+ * Copyright (C) 2012 Otto-von-Guericke-Universität Magdeburg
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
#ifndef __EXPERIMENT_PLAYER_H
#define __EXPERIMENT_PLAYER_H
@@ -44,32 +66,40 @@ gchar *config_get_quickopen_directory(void);
void config_set_formats_directory(const gchar *dir);
gchar *config_get_formats_directory(void);
+/** @private */
void config_generic_set_transcript_font(const gchar *actor, const gchar *key,
const PangoFontDescription *font);
+/** @private */
PangoFontDescription *config_generic_get_transcript_font(const gchar *actor,
const gchar *key);
+/** @private */
void config_generic_set_transcript_color(const gchar *actor, const gchar *key,
const GdkColor *color);
+/** @private */
gboolean config_generic_get_transcript_color(const gchar *actor, const gchar *key,
GdkColor *color);
+/** @public */
static inline void
config_set_transcript_font(const gchar *actor, const PangoFontDescription *font)
{
config_generic_set_transcript_font(actor, "Widget-Font", font);
}
+/** @public */
static inline PangoFontDescription *
config_get_transcript_font(const gchar *actor)
{
return config_generic_get_transcript_font(actor, "Widget-Font");
}
+/** @public */
static inline void
config_set_transcript_text_color(const gchar *actor, const GdkColor *color)
{
config_generic_set_transcript_color(actor, "Widget-Text-Color", color);
}
+/** @public */
static inline gboolean
config_get_transcript_text_color(const gchar *actor, GdkColor *color)
{
@@ -77,11 +107,13 @@ config_get_transcript_text_color(const gchar *actor, GdkColor *color)
color);
}
+/** @public */
static inline void
config_set_transcript_bg_color(const gchar *actor, const GdkColor *color)
{
config_generic_set_transcript_color(actor, "Widget-BG-Color", color);
}
+/** @public */
static inline gboolean
config_get_transcript_bg_color(const gchar *actor, GdkColor *color)
{
@@ -89,18 +121,21 @@ config_get_transcript_bg_color(const gchar *actor, GdkColor *color)
color);
}
+/** @public */
static inline void
config_set_transcript_default_format_font(const gchar *actor,
const PangoFontDescription *font)
{
config_generic_set_transcript_font(actor, "Default-Format-Font", font);
}
+/** @public */
static inline PangoFontDescription *
config_get_transcript_default_format_font(const gchar *actor)
{
return config_generic_get_transcript_font(actor, "Default-Format-Font");
}
+/** @public */
static inline void
config_set_transcript_default_format_text_color(const gchar *actor,
const GdkColor *color)
@@ -108,6 +143,7 @@ config_set_transcript_default_format_text_color(const gchar *actor,
config_generic_set_transcript_color(actor, "Default-Format-Text-Color",
color);
}
+/** @public */
static inline gboolean
config_get_transcript_default_format_text_color(const gchar *actor,
GdkColor *color)
@@ -116,6 +152,7 @@ config_get_transcript_default_format_text_color(const gchar *actor,
color);
}
+/** @public */
static inline void
config_set_transcript_default_format_bg_color(const gchar *actor,
const GdkColor *color)
@@ -123,6 +160,7 @@ config_set_transcript_default_format_bg_color(const gchar *actor,
config_generic_set_transcript_color(actor, "Default-Format-BG-Color",
color);
}
+/** @public */
static inline gboolean
config_get_transcript_default_format_bg_color(const gchar *actor,
GdkColor *color)
@@ -158,10 +196,12 @@ extern GtkWidget *transcript_wizard_combo,
/*
* macros and inline functions
*/
+/** @private */
#define BUILDER_INIT(BUILDER, VAR) do { \
VAR = GTK_WIDGET(gtk_builder_get_object(BUILDER, #VAR)); \
} while (0)
+/** @public */
static inline gchar *
path_strip_extension(const gchar *filename)
{
diff --git a/src/format-selection.c b/src/format-selection.c
index 73c1ca5..d61b381 100644
--- a/src/format-selection.c
+++ b/src/format-selection.c
@@ -1,3 +1,26 @@
+/**
+ * @file
+ * Functions for handling the transcripts' format file selection and
+ * interactive format entry.
+ */
+
+/*
+ * Copyright (C) 2012 Otto-von-Guericke-Universität Magdeburg
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -32,6 +55,7 @@ enum {
* NOTE: for some strange reason the parameters are switched
*/
+/** @private */
void
formats_menu_choosedir_item_activate_cb(GtkWidget *widget,
gpointer data __attribute__((unused)))
@@ -65,6 +89,7 @@ formats_menu_choosedir_item_activate_cb(GtkWidget *widget,
gtk_widget_destroy(dialog);
}
+/** @private */
void
formats_menu_refresh_item_activate_cb(GtkWidget *widget,
gpointer data __attribute__((unused)))
@@ -74,6 +99,7 @@ formats_menu_refresh_item_activate_cb(GtkWidget *widget,
refresh_formats_store(GTK_LIST_STORE(model));
}
+/** @private */
void
generic_transcript_combo_changed_cb(gpointer user_data, GtkComboBox *combo)
{
@@ -98,8 +124,7 @@ generic_transcript_combo_changed_cb(gpointer user_data, GtkComboBox *combo)
#endif
}
-
-
+/** @private */
void
generic_transcript_entry_changed_cb(gpointer user_data, GtkEditable *editable)
{
@@ -128,6 +153,7 @@ generic_transcript_entry_changed_cb(gpointer user_data, GtkEditable *editable)
text != NULL && *text);
}
+/** @private */
void
generic_transcript_entry_check_toggled_cb(gpointer user_data,
GtkToggleButton *widget __attribute__((unused)))
diff --git a/src/main.c b/src/main.c
index 6594e24..d18717d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,3 +1,26 @@
+/**
+ * @file
+ * Program entry point, UI initialization, widget connections and GTK event
+ * loop.
+ */
+
+/*
+ * Copyright (C) 2012 Otto-von-Guericke-Universität Magdeburg
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -27,7 +50,8 @@
#include "experiment-player.h"
-static inline void button_image_set_from_stock(GtkButton *widget, const gchar *name);
+static inline void button_image_set_from_stock(GtkButton *widget,
+ const gchar *name);
GtkWidget *about_dialog;
@@ -55,6 +79,7 @@ gchar *current_filename = NULL;
* NOTE: for some strange reason the parameters are switched
*/
+/** @private */
void
help_menu_about_item_activate_cb(GtkWidget *widget,
gpointer data __attribute__((unused)))
@@ -63,6 +88,7 @@ help_menu_about_item_activate_cb(GtkWidget *widget,
gtk_widget_hide(widget);
}
+/** @private */
void
playpause_button_clicked_cb(GtkWidget *widget, gpointer data)
{
@@ -73,6 +99,7 @@ playpause_button_clicked_cb(GtkWidget *widget, gpointer data)
: GTK_STOCK_MEDIA_PAUSE);
}
+/** @private */
void
stop_button_clicked_cb(GtkWidget *widget,
gpointer data __attribute__((unused)))
@@ -82,6 +109,7 @@ stop_button_clicked_cb(GtkWidget *widget,
GTK_STOCK_MEDIA_PLAY);
}
+/** @private */
void
file_menu_openmovie_item_activate_cb(GtkWidget *widget,
gpointer data __attribute__((unused)))
@@ -110,6 +138,7 @@ file_menu_openmovie_item_activate_cb(GtkWidget *widget,
gtk_widget_destroy(dialog);
}
+/** @private */
void
file_menu_opentranscript_item_activate_cb(GtkWidget *widget,
gpointer data __attribute__((unused)))
@@ -138,6 +167,7 @@ file_menu_opentranscript_item_activate_cb(GtkWidget *widget,
gtk_widget_destroy(dialog);
}
+/** @private */
void
help_menu_manual_item_activate_cb(GtkWidget *widget __attribute__((unused)),
gpointer data __attribute__((unused)))
@@ -161,6 +191,7 @@ help_menu_manual_item_activate_cb(GtkWidget *widget __attribute__((unused)),
}
}
+/** @private */
void
navigator_widget_time_selected_cb(GtkWidget *widget, gint64 selected_time,
gpointer user_data __attribute__((unused)))
@@ -168,6 +199,7 @@ navigator_widget_time_selected_cb(GtkWidget *widget, gint64 selected_time,
gtk_vlc_player_seek(GTK_VLC_PLAYER(widget), selected_time);
}
+/** @private */
void
generic_quit_cb(GtkWidget *widget __attribute__((unused)),
gpointer data __attribute__((unused)))
@@ -258,6 +290,7 @@ show_message_dialog_gerror(GError *err)
gtk_widget_destroy(dialog);
}
+/** @private */
int
main(int argc, char *argv[])
{
diff --git a/src/quick-open.c b/src/quick-open.c
index e0a5a5f..ee614e1 100644
--- a/src/quick-open.c
+++ b/src/quick-open.c
@@ -1,3 +1,25 @@
+/**
+ * @file
+ * Functions for handling the "Quick Open" menu
+ */
+
+/*
+ * Copyright (C) 2012 Otto-von-Guericke-Universität Magdeburg
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -28,6 +50,7 @@ GtkWidget *quickopen_menu,
* NOTE: for some strange reason the parameters are switched
*/
+/** @private */
void
quickopen_menu_choosedir_item_activate_cb(GtkWidget *widget,
gpointer data __attribute__((unused)))
@@ -59,6 +82,7 @@ quickopen_menu_choosedir_item_activate_cb(GtkWidget *widget,
}
/** @todo refresh item unnecessary, rebuild menu when it is opened */
+/** @private */
void
quickopen_menu_refresh_item_activate_cb(GtkWidget *widget,
gpointer data __attribute__((unused)))