From bef5fb5d5d7fecfed21a13004deb83bd90c2cdfe Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Fri, 19 Jul 2013 16:34:22 +0200 Subject: removed everything unrelated to the GtkVlcPlayer widget --- .gitignore | 11 - AUTHORS | 3 +- INSTALL | 1 + Makefile.am | 5 +- build_mingw_binaries.sh | 35 - configure.ac | 141 +-- doc/Makefile.am | 28 +- doc/experiment-player.xml | 450 -------- doc/html_custom.xsl | 6 - doc/html_titlepage.spec.xml | 688 ------------- doc/images/data-window-new.png | Bin 29626 -> 0 bytes doc/images/data-window-new.xcf | Bin 79021 -> 0 bytes doc/images/format-expressions.png | Bin 49243 -> 0 bytes doc/images/format-file-selection.png | Bin 41771 -> 0 bytes doc/images/format-menu.png | Bin 5214 -> 0 bytes doc/images/player-window-new.png | Bin 21098 -> 0 bytes doc/images/player-window-new.xcf | Bin 49846 -> 0 bytes doc/images/quick-open-empty.png | Bin 8691 -> 0 bytes doc/images/quick-open.png | Bin 7090 -> 0 bytes lib/Makefile.am | 3 - lib/experiment-reader/Makefile.am | 37 - lib/experiment-reader/cclosure-marshallers.list | 2 - lib/experiment-reader/experiment-reader.c | 607 ----------- lib/experiment-reader/experiment-reader.h | 133 --- lib/experiment-reader/session.dtd | 130 --- lib/experiment-reader/tests/Makefile.am | 21 - .../tests/test-experiment-valid.xml | 914 ----------------- lib/experiment-reader/tests/unit-tests.c | 104 -- lib/gtk-experiment-widgets/Makefile.am | 46 - .../cclosure-marshallers.list | 5 - .../gtk-experiment-navigator.c | 638 ------------ .../gtk-experiment-navigator.h | 114 --- .../gtk-experiment-transcript-formats.c | 417 -------- .../gtk-experiment-transcript-private.h | 140 --- .../gtk-experiment-transcript.c | 1082 -------------------- .../gtk-experiment-transcript.h | 144 --- .../gtk-experiment-widgets-catalog.xml | 23 - makemake_mingw_dev.sh | 8 - src/Makefile.am | 2 +- 39 files changed, 20 insertions(+), 5918 deletions(-) delete mode 100755 build_mingw_binaries.sh delete mode 100644 doc/experiment-player.xml delete mode 100644 doc/html_custom.xsl delete mode 100644 doc/html_titlepage.spec.xml delete mode 100644 doc/images/data-window-new.png delete mode 100644 doc/images/data-window-new.xcf delete mode 100644 doc/images/format-expressions.png delete mode 100644 doc/images/format-file-selection.png delete mode 100644 doc/images/format-menu.png delete mode 100644 doc/images/player-window-new.png delete mode 100644 doc/images/player-window-new.xcf delete mode 100644 doc/images/quick-open-empty.png delete mode 100644 doc/images/quick-open.png delete mode 100644 lib/Makefile.am delete mode 100644 lib/experiment-reader/Makefile.am delete mode 100644 lib/experiment-reader/cclosure-marshallers.list delete mode 100644 lib/experiment-reader/experiment-reader.c delete mode 100644 lib/experiment-reader/experiment-reader.h delete mode 100755 lib/experiment-reader/session.dtd delete mode 100644 lib/experiment-reader/tests/Makefile.am delete mode 100644 lib/experiment-reader/tests/test-experiment-valid.xml delete mode 100644 lib/experiment-reader/tests/unit-tests.c delete mode 100644 lib/gtk-experiment-widgets/Makefile.am delete mode 100644 lib/gtk-experiment-widgets/cclosure-marshallers.list delete mode 100644 lib/gtk-experiment-widgets/gtk-experiment-navigator.c delete mode 100644 lib/gtk-experiment-widgets/gtk-experiment-navigator.h delete mode 100644 lib/gtk-experiment-widgets/gtk-experiment-transcript-formats.c delete mode 100644 lib/gtk-experiment-widgets/gtk-experiment-transcript-private.h delete mode 100644 lib/gtk-experiment-widgets/gtk-experiment-transcript.c delete mode 100644 lib/gtk-experiment-widgets/gtk-experiment-transcript.h delete mode 100644 lib/gtk-experiment-widgets/gtk-experiment-widgets-catalog.xml delete mode 100755 makemake_mingw_dev.sh diff --git a/.gitignore b/.gitignore index 0fb871f..d0fae48 100644 --- a/.gitignore +++ b/.gitignore @@ -19,17 +19,6 @@ Makefile.in stamp-* # Generated -unit-tests -gtester-log.xml -gtester-log.html - cclosure-marshallers.[ch] /doc/Doxyfile /doc/doxygen -/doc/experiment-player.html -/doc/html_titlepage.xsl - -/src/experiment-player - -# Backup files -*~ diff --git a/AUTHORS b/AUTHORS index 3460e72..6470c1d 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,2 +1 @@ -Jens Lammert -Robin Haberkorn +Robin Haberkorn = 1.1.10 vlc-plugin]) -PKG_CHECK_MODULES(LIBXML2, [libxml-2.0], , [ - AC_CHECK_PROG(XML2_CONFIG, xml2-config, xml2-config) - if [[ x$XML2_CONFIG != x ]]; then - LIBXML2_CFLAGS="`$XML2_CONFIG --cflags`" - AC_SUBST(LIBXML2_CFLAGS) - LIBXML2_LIBS="`$XML2_CONFIG --libs`" - AC_SUBST(LIBXML2_LIBS) - else - temp_CFLAGS="$CFLAGS" - temp_LIBS="$LIBS" - CFLAGS= - LIBS= - - AC_CHECK_LIB(xml2, xmlParseFile, , [ - AC_MSG_ERROR([Required libxml-2.0 package or library missing!]) - ]) - - AC_CHECK_HEADERS([libxml/tree.h libxml/parser.h \ - libxml/xpath.h libxml/xpathInternals.h], , [ - AC_MSG_ERROR([Required libxml headers are missing!]) - ]) - - LIBXML2_CFLAGS="$CFLAGS" - AC_SUBST(LIBXML2_CFLAGS) - LIBXML2_LIBS="$LIBS" - AC_SUBST(LIBXML2_LIBS) - - CFLAGS="$temp_CFLAGS" - LIBS="$temp_LIBS" - fi -]) - # # Checks for header files. # @@ -146,22 +86,6 @@ AC_FUNC_REALLOC # # Config options # -AC_ARG_WITH(default-ui, - AS_HELP_STRING([--with-default-ui=PATH], - [Specify default UI definition to use [default=DATAROOTDIR/experiment-player/default.ui]]), - [DEFAULT_UI=$withval], [DEFAULT_UI=$player_datadir/default.ui]) -# NOTE: cannot use AC_DEFINE_UNQUOTED since installation directories -# must be expanded by the Makefiles -AC_SUBST(DEFAULT_UI) - -AC_ARG_WITH(help-uri, - AS_HELP_STRING([--with-help-uri=URI], - [Specify help (manual) URI [default=file://DOCDIR/experiment-player.html]]), - [HELP_URI=$withval], [HELP_URI=file://$docdir/experiment-player.html]) -# NOTE: cannot use AC_DEFINE_UNQUOTED since installation directories -# must be expanded by the Makefiles -AC_SUBST(HELP_URI) - AC_ARG_ENABLE(doxygen-doc, AS_HELP_STRING([--enable-doxygen-doc], [Generate Doxygen documentation [default=no]]), @@ -184,54 +108,17 @@ AC_ARG_ENABLE(doxygen-extract-private, ]) AC_SUBST(DOXYGEN_EXTRACT_PRIVATE) -AC_ARG_ENABLE(html-doc, - AS_HELP_STRING([--enable-html-doc], - [Generate HTML documentation [default=yes]]), - [html_doc=$enableval], [html_doc=yes]) -if [[ $html_doc = yes -a x$XSLTPROC = x ]]; then - AC_MSG_ERROR([Enabled generating HTML documentation, but XSLTProc not found! Try --disable-html-doc.]) -fi -AM_CONDITIONAL(BUILD_HTML, [test $html_doc = yes]) - -AC_ARG_ENABLE(console, - AS_HELP_STRING([--enable-console], - [Enable console-mode binaries [default=no]]), - [console=$enableval], [console=no]) -if [[ $console = no ]]; then - case $host in - *-*-mingw*) GTKAPP_LDFLAGS="$GTKAPP_LDFLAGS -mwindows" ;; - esac -fi - -AC_SUBST(GTKAPP_CFLAGS) -AC_SUBST(GTKAPP_LDFLAGS) - -# Some constants -AC_DEFINE_UNQUOTED(CONFIG_KEY_FILE, [".$PACKAGE_TARNAME"], [Configuration filename (relative)]) - +# +# Some minor configuration options. +# Can only be changed here in the Autoconf script +# AC_DEFINE(GTK_VLC_PLAYER_TIME_ADJ_STEP, [1000.], [VLC Player time adjustment step increment]) AC_DEFINE(GTK_VLC_PLAYER_TIME_ADJ_PAGE, [30000.], [VLC Player time adjustment page increment]) AC_DEFINE(GTK_VLC_PLAYER_VOL_ADJ_STEP, [0.02], [VLC Player volume adjustment step increment]) AC_DEFINE(GTK_VLC_PLAYER_VOL_ADJ_PAGE, [0.], [VLC Player volume adjustment page increment]) -AC_DEFINE(GTK_EXPERIMENT_TRANSCRIPT_BACKDROP, [16], [Experiment Transcript backdrop area color change (percent)]) - -AC_DEFINE(DEFAULT_QUICKOPEN_DIR, ["."], [Default directory for listing experiments]) -AC_DEFINE(EXPERIMENT_MOVIE_FILTER, ["*.mp4;*.avi"], [Filters for (quick) opening movies]) -AC_DEFINE(EXPERIMENT_TRANSCRIPT_EXT, ["xml"], [File extension of experiment transcripts]) - -AC_DEFINE(DEFAULT_FORMATS_DIR, ["."], [Default directory for selecting formats]) -AC_DEFINE(EXPERIMENT_FORMATS_FILTER, ["*.fmt"], [Format file filter]) - -AC_DEFINE(DEFAULT_INTERACTIVE_FORMAT_FONT, ["bold"], [Default interactive format font description]) -### AC_DEFINE(DEFAULT_INTERACTIVE_FORMAT_FGCOLOR, ["white"], [Default interactive format foreground color]) -### AC_DEFINE(DEFAULT_INTERACTIVE_FORMAT_BGCOLOR, ["red"], [Default interactive format background color]) - -AC_CONFIG_FILES([Makefile lib/Makefile src/Makefile]) -AC_CONFIG_FILES([lib/gtk-vlc-player/Makefile]) -AC_CONFIG_FILES([lib/experiment-reader/Makefile lib/experiment-reader/tests/Makefile]) -AC_CONFIG_FILES([lib/gtk-experiment-widgets/Makefile]) +AC_CONFIG_FILES([Makefile src/Makefile]) AC_CONFIG_FILES([doc/Makefile doc/Doxyfile]) AC_OUTPUT diff --git a/doc/Makefile.am b/doc/Makefile.am index c555b78..05d48c0 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,32 +1,8 @@ - -# -# Docbook processing -# TODO: might also generate a man page -# -DB_URI = http://docbook.sourceforge.net/release/xsl/current - -if BUILD_HTML -nobase_dist_html_DATA = experiment-player.html \ - images/data-window-new.png images/player-window-new.png \ - images/quick-open-empty.png images/quick-open.png \ - images/format-expressions.png images/format-file-selection.png \ - images/format-menu.png - -endif -CLEANFILES = experiment-player.html html_titlepage.xsl -EXTRA_DIST = experiment-player.xml html_custom.xsl html_titlepage.spec.xml - -experiment-player.html : experiment-player.xml html_custom.xsl html_titlepage.xsl - @XSLTPROC@ @XSLT_FLAGS@ -o $@ html_custom.xsl $< - -html_titlepage.xsl : html_titlepage.spec.xml - @XSLTPROC@ @XSLT_FLAGS@ -o $@ $(DB_URI)/template/titlepage.xsl $< - # -# Doxygen processing (do not install or distribute) +# Doxygen processing # if BUILD_DOXYGEN -noinst_DATA = doxygen/ +doc_DATA = doxygen/ endif .PHONY: doxygen/ diff --git a/doc/experiment-player.xml b/doc/experiment-player.xml deleted file mode 100644 index a9dcc34..0000000 --- a/doc/experiment-player.xml +++ /dev/null @@ -1,450 +0,0 @@ - - - - - Experiment Player - A tool to analyze audiovisual experiment recordings and transcripts - - - Jens Lammert - jens.lammert@st.ovgu.de - - - 2012 - 2013 - Otto-von-Guericke Universität Magdeburg - - - - The following document illustrates how to install, configure - and use the Experiment Player to analyze experiments. - - -
- - https://github.com/rhaberkorn/experiment-player - -
- - http://sourceforge.net/projects/exp-player/ - -
-
- - - Installation -
- Windows - - To install the Experiment Player on a Windows-based operating system, - the GTK+ 2 widget toolkit must first be downloaded and installed. - A convenient GTK+ installer can be downloaded from the - - "GTK+ for Windows Runtime Environment Installer" project page. - It is only necessary to install the - - GTK+ runtime. - - Additional themes may be installed as well - but the default GTK+ theme should be sufficient. - - Precompiled Windows 32-bit binaries of the Experiment Player itself - are available as ZIP archives from the - Sourceforge project page. - The ZIP archive merely has to be extracted somewhere. - Afterwards the included experiment-player.exe can be executed. - All library dependencies except GTK+ are included in the ZIP archive. - -
-
- Linux - - To install the Experiment Player on a Linux-based operating system, - it first has to be built from source. - It can either be built from a local - Git repository clone, - or from a source code package that can be downloaded from the - project's download archive - on Sourceforge. - In either case, further build instructions are given in the included - INSTALL file. - -
-
- - Graphical User Interface - - After startup there will be two windows, a player - window and a data window. - They are explained in the following sections. - -
- Player Window - - - - - - - Player Window after startup - - - - The image above depicts the player window after startup. - No experiment is yet opened in the application, so several - controls are greyed out. - - Experiments can be opened via the File menu - or the Quick Open menu. - The process of opening experiments via the Quick Open menu - is explained later on. - The remaining interface components are self-explanatory. - -
-
- Data Window - - - - - - - Data Window after startup - - - - The image above depicts the data window after startup. - The data window is used to display additional information of an - experiment. - This information is time-dependant and synchronized with other - time-dependant data, like the current video position. - If the time is changed in one component, it changes in all the - other ones as well. - - The current implementation is able to display an experiment - transcript (in the Transcript view area). - The transcript view is divided into a left part showing the - wizard's text contributions and a right part showing the - proband's text contributions. - The different experiment phases are displayed hierachically - in the Transcript navigation area. - Transcripts may also be searched and highlighted but this feature is - explained later on. - - Furthermore the look of the Transcript View may be customized - after loading an experiment by right-clicking the Transcript view. - Foreground and background colors, text alignment and scroll direction - can be changed this way. - - The playback position of the experiment may be influenced in the - following ways: - - - by clicking or scrolling the slider in the - data window with the mouse - wheel, - - - by scrolling the transcript widgets with the mouse wheel, - - - by using the transcript view's scroll bar, or - - - by double-clicking an entry in the navigation hierarchy. - - - Single clicking an entry in the navigation hierarchy - mereley highlights that part of the transcript by the shading the - transcript view's background. - -
-
- - Getting Started -
- How to load a file with Quick Open - - A video recording of an experiment and its correspondig transcript file - are considered as an experiment. A video is an AVI or MP4 file - while transcript files are special XML applications generated from - - FOLKER XML transcripts. - Transcript XML files must conform to the session.dtd - schema shipped with the Experiment Player - application. - Experiment's files can be opened separately or by using the - Quick Open feature. - - - - - - - Empty Quick Open menu - - - - Quick Open can be performed using the - Quick Open menu. - The menu has items for all experiments found in a selected - directory. - The directory may be selected using the Choose Directory... - menu item. - Experiment files with identical basenames (file name without extension) are - listed as single menu items. - For instance, if the directory contains two files 20101117.xml and - 20101117.mp4, the menu will look like: - - - - - - - - - - When an experiment item is activated in the menu, the - corresponding experiment files are loaded (replacing any - already opened experiment). - The configured location of the Quick Open directory - persists after application restarts. - -
-
- Transcript Highlighting - - To analyze the dialog between proband and wizard the Experiment-Player offers - a feature to search for text patterns in the dialog and for highlighting the matches - in the transcript. - After loading an experiment via the Quick Open menu, - the dialog between proband and wizard will be displayed in the transcript widgets. - The highlighting feature can be used for both the wizard's and the proband's part - of the dialog independently of each other. - By entering a search expression in the - text boxes for interactive highlighting - of the transcript will be highlighted on the fly. - The syntax of these search expressions and their exact semantics are - described in the following sections. - -
- Regular Expressions - - By default, if the Markup toggles are inactive, - search expressions are interpreted as regular expressions. - The system will iterate all text fragments (dialog contributions - with distinct timestamps) and tries to match the regular expression - against them. - All the matches will be highlighted. - By default they will be formatted bold, but this may be changed - in the configuration file. - Regular Expressions - are case-insensitive so both lower-case and upper-case character - will match both lower and upper case text. - For more information about the Regular Expression - syntax supported by the program, have a look at the - - glib documentation for Perl compatible Regular Expression. - All constructs are supported, except captures. - - An icon next to the pattern entry box signals well-formedness of - the entered search expression. - -
-
- Format Expression - - By default a search term will be regarded as - Regular Expression and matches found - will be highlighted bold. - However if the Markup toggle is activated - the input expression will be regarded as a - Format Expression which is a combination of - Regular Expression and Pango Markup. - Pango Markup is a simple HTML-like formatting - markup language. - - Just like with plain regular expressions, all text fragments are iterated - and the format expression is matched against each of them. - The markup does not matter for matching but only the regular expressions - contained within the markup tags. - For every match in each of the text fragments, the markup will be applied - to all of the text matched by the regular expression within the - corresponding markup tag. - So for instance the format expression - ABC]]>, - case-insensitively matches against all occurrences of ABC, - formatting all the characters bold and only B in italics. - - The following screenshot shows a transcript with all consonants followed - by vowels highlighted - (expression [^aeiou][aeiou]]]>): - - - - - - - - - - For more information about Pango Markup, please read the - - Pango Markup documentation. - -
-
- Format Files - - Format Files are files which contain a sequence of - format expressions. - So any collection of format expressions for - analyzing dialogs can be saved in those files and used with different - experiments. - - - Sample Format File (sample.fmt) - ABC -[^aeiou][aeiou]]]> - - - Format Files are loaded in a similar manner as experiments - when using the Quick Open feature. - First a directory containing format files must be chosen via the - Choose Directory... item in the Formats - menu of the data window. - - - - - - - "Formats" menu - - - - A format file may then be selected via the drop-down boxes below the - transcript view area. - The first entry of those boxes is always empty and may be selected to - disable format file processing. - The following screenshot shows - sample.fmt - being selected: - - - - - - - - - - If a format file is selected, for each text fragment every format expression - in the format file is evaluated (highlighting all matches as described earlier). - At last, any interactively entered search expression (plain regular expression or - format expression) is evaluated for each text fragment after the format expressions - in the currently selected Format File. - All formattings are applied cumulatively. - Where subsequent styles cannot be merged, later ones overwrite earlier ones. - For instance, when loading the following format file, the word program - is formatted blue instead of red: - - programm -programm]]> - - The syntax of format files is as follows: - - - Format Files have the file extension - fmt. - - - Every line will be regarded as a distinct - Format Expression. - - - Leading whitespace characters are ignored. - - - A line beginning with # - is ignored completely (comment line). - - - Empty lines are ignored. - - - Incorrect lines will cause an error message. - - - -
-
-
- - Config File - - The Experiment Player's configuration file - is located in different locations depending on the platform: - - - - Under Linux, it will be located in the user's data directory as specified - in the - XDG Base Directory Specification - (usually $HOME/.local/share/.experiment-player). - - - Under Windows, it will be located in the local application data directory - (usually C:\Documents and Settings\%USERNAME%\Local Settings\Application Data\.experiment-player). - - - - The syntax of the configuration file is documented in the - glib documentation. - - Sometimes it is useful to edit the configuration file directly in order to tweak options that are not - accessible via the Experiment Player GUI. - The following table lists such configuration keys: - - - Configuration Keys - - - - - - - - - - - - - - - - - - - - - -
KeyDescriptionFormat
Default-Format-Font - The font used for highlighting plain regular expressions. - - See - Pango Font description -
Default-Format-Text-Color - The foreground color used for highlighting plain regular expressions. - - An RGB color specification such as #FF0000 or a color name such as - red. -
Default-Format-BG-Color - The background color used for highlighting plain regular expressions. - - An RGB color specification such as #FF0000 or a color name such as - red. -
-
-
diff --git a/doc/html_custom.xsl b/doc/html_custom.xsl deleted file mode 100644 index af94064..0000000 --- a/doc/html_custom.xsl +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/doc/html_titlepage.spec.xml b/doc/html_titlepage.spec.xml deleted file mode 100644 index ea44036..0000000 --- a/doc/html_titlepage.spec.xml +++ /dev/null @@ -1,688 +0,0 @@ - - - - - - - - - <subtitle/> - <corpauthor/> - <authorgroup/> - <author/> - <othercredit/> - <releaseinfo/> - <copyright/> - <legalnotice/> - <pubdate/> - <revision/> - <revhistory/> - <abstract/> - </t:titlepage-content> - - <t:titlepage-content t:side="verso"> - </t:titlepage-content> - - <t:titlepage-separator> - <hr/> - </t:titlepage-separator> - - <t:titlepage-before t:side="recto"> - </t:titlepage-before> - - <t:titlepage-before t:side="verso"> - </t:titlepage-before> -</t:titlepage> - -<!-- ==================================================================== --> - -<t:titlepage t:element="set" t:wrapper="div" class="titlepage"> - <t:titlepage-content t:side="recto"> - <title/> - <subtitle/> - <corpauthor/> - <authorgroup/> - <author/> - <othercredit/> - <releaseinfo/> - <copyright/> - <legalnotice/> - <pubdate/> - <revision/> - <revhistory/> - <abstract/> - </t:titlepage-content> - - <t:titlepage-content t:side="verso"> - </t:titlepage-content> - - <t:titlepage-separator> - <hr/> - </t:titlepage-separator> - - <t:titlepage-before t:side="recto"> - </t:titlepage-before> - - <t:titlepage-before t:side="verso"> - </t:titlepage-before> -</t:titlepage> - -<!-- ==================================================================== --> - -<t:titlepage t:element="book" t:wrapper="div" class="titlepage"> - <t:titlepage-content t:side="recto"> - <mediaobject/> - <title/> - <subtitle/> - <corpauthor/> - <authorgroup/> - <author/> - <othercredit/> - <releaseinfo/> - <copyright/> - <legalnotice/> - <pubdate/> - <revision/> - <revhistory/> - <abstract/> - </t:titlepage-content> - - <t:titlepage-content t:side="verso"> - </t:titlepage-content> - - <t:titlepage-separator> - <hr/> - </t:titlepage-separator> - - <t:titlepage-before t:side="recto"> - </t:titlepage-before> - - <t:titlepage-before t:side="verso"> - </t:titlepage-before> -</t:titlepage> - -<!-- ==================================================================== --> - -<t:titlepage t:element="part" t:wrapper="div" class="titlepage"> - <t:titlepage-content t:side="recto"> - <title - t:force="1" - t:named-template="division.title" - param:node="ancestor-or-self::part[1]"/> - <subtitle/> - <corpauthor/> - <authorgroup/> - <author/> - <othercredit/> - <releaseinfo/> - <copyright/> - <legalnotice/> - <pubdate/> - <revision/> - <revhistory/> - <abstract/> - </t:titlepage-content> - - <t:titlepage-content t:side="verso"> - </t:titlepage-content> - - <t:titlepage-separator> - </t:titlepage-separator> - - <t:titlepage-before t:side="recto"> - </t:titlepage-before> - - <t:titlepage-before t:side="verso"> - </t:titlepage-before> -</t:titlepage> - -<t:titlepage t:element="partintro" t:wrapper="div"> - <t:titlepage-content t:side="recto"> - <title/> - <subtitle/> - <corpauthor/> - <authorgroup/> - <author/> - <othercredit/> - <releaseinfo/> - <copyright/> - <legalnotice/> - <pubdate/> - <revision/> - <revhistory/> - <abstract/> - </t:titlepage-content> - - <t:titlepage-content t:side="verso"> - </t:titlepage-content> - - <t:titlepage-separator> - </t:titlepage-separator> - - <t:titlepage-before t:side="recto"> - </t:titlepage-before> - - <t:titlepage-before t:side="verso"> - </t:titlepage-before> -</t:titlepage> - -<!-- ==================================================================== --> - -<t:titlepage t:element="reference" t:wrapper="div" class="titlepage"> - <t:titlepage-content t:side="recto"> - <title/> - <subtitle/> - <corpauthor/> - <authorgroup/> - <author/> - <othercredit/> - <releaseinfo/> - <copyright/> - <legalnotice/> - <pubdate/> - <revision/> - <revhistory/> - <abstract/> - </t:titlepage-content> - - <t:titlepage-content t:side="verso"> - </t:titlepage-content> - - <t:titlepage-separator> - <hr/> - </t:titlepage-separator> - - <t:titlepage-before t:side="recto"> - </t:titlepage-before> - - <t:titlepage-before t:side="verso"> - </t:titlepage-before> -</t:titlepage> - -<!-- ==================================================================== --> - -<t:titlepage t:element="refentry" t:wrapper="div" class="titlepage"> - <t:titlepage-content t:side="recto"> -<!-- uncomment this if you want refentry titlepages - <title t:force="1" - t:named-template="refentry.title" - param:node="ancestor-or-self::refentry[1]"/> ---> - </t:titlepage-content> - - <t:titlepage-content t:side="verso"> - </t:titlepage-content> - - <t:titlepage-separator/> - - <t:titlepage-before t:side="recto"> - </t:titlepage-before> - - <t:titlepage-before t:side="verso"> - </t:titlepage-before> -</t:titlepage> - -<!-- ==================================================================== --> - - <t:titlepage t:element="dedication" t:wrapper="div" class="titlepage"> - <t:titlepage-content t:side="recto"> - <title - t:force="1" - t:named-template="component.title" - param:node="ancestor-or-self::dedication[1]"/> - <subtitle/> - </t:titlepage-content> - - <t:titlepage-content t:side="verso"> - </t:titlepage-content> - - <t:titlepage-separator> - </t:titlepage-separator> - - <t:titlepage-before t:side="recto"> - </t:titlepage-before> - - <t:titlepage-before t:side="verso"> - </t:titlepage-before> -</t:titlepage> - -<!-- ==================================================================== --> - -<t:titlepage t:element="acknowledgements" t:wrapper="div" class="titlepage"> - <t:titlepage-content t:side="recto"> - <title - t:force="1" - t:named-template="component.title" - param:node="ancestor-or-self::acknowledgements[1]"/> - <subtitle/> - </t:titlepage-content> - - <t:titlepage-content t:side="verso"> - </t:titlepage-content> - - <t:titlepage-separator> - </t:titlepage-separator> - - <t:titlepage-before t:side="recto"> - </t:titlepage-before> - - <t:titlepage-before t:side="verso"> - </t:titlepage-before> -</t:titlepage> - -<!-- ==================================================================== --> - -<t:titlepage t:element="preface" t:wrapper="div" class="titlepage"> - <t:titlepage-content t:side="recto"> - <title/> - <subtitle/> - <corpauthor/> - <authorgroup/> - <author/> - <othercredit/> - <releaseinfo/> - <copyright/> - <legalnotice/> - <pubdate/> - <revision/> - <revhistory/> - <abstract/> - </t:titlepage-content> - - <t:titlepage-content t:side="verso"> - </t:titlepage-content> - - <t:titlepage-separator> - </t:titlepage-separator> - - <t:titlepage-before t:side="recto"> - </t:titlepage-before> - - <t:titlepage-before t:side="verso"> - </t:titlepage-before> -</t:titlepage> - -<!-- ==================================================================== --> - -<t:titlepage t:element="chapter" t:wrapper="div" class="titlepage"> - <t:titlepage-content t:side="recto"> - <title/> - <subtitle/> - <corpauthor/> - <authorgroup/> - <author/> - <othercredit/> - <releaseinfo/> - <copyright/> - <legalnotice/> - <pubdate/> - <revision/> - <revhistory/> - <abstract/> - </t:titlepage-content> - - <t:titlepage-content t:side="verso"> - </t:titlepage-content> - - <t:titlepage-separator> - </t:titlepage-separator> - - <t:titlepage-before t:side="recto"> - </t:titlepage-before> - - <t:titlepage-before t:side="verso"> - </t:titlepage-before> -</t:titlepage> - -<!-- ==================================================================== --> - -<t:titlepage t:element="appendix" t:wrapper="div" class="titlepage"> - <t:titlepage-content t:side="recto"> - <title/> - <subtitle/> - <corpauthor/> - <authorgroup/> - <author/> - <othercredit/> - <releaseinfo/> - <copyright/> - <legalnotice/> - <pubdate/> - <revision/> - <revhistory/> - <abstract/> - </t:titlepage-content> - - <t:titlepage-content t:side="verso"> - </t:titlepage-content> - - <t:titlepage-separator> - </t:titlepage-separator> - - <t:titlepage-before t:side="recto"> - </t:titlepage-before> - - <t:titlepage-before t:side="verso"> - </t:titlepage-before> -</t:titlepage> - -<!-- ==================================================================== --> - -<t:titlepage t:element="section" t:wrapper="div" class="titlepage"> - <t:titlepage-content t:side="recto"> - <title/> - <subtitle/> - <corpauthor/> - <authorgroup/> - <author/> - <othercredit/> - <releaseinfo/> - <copyright/> - <legalnotice/> - <pubdate/> - <revision/> - <revhistory/> - <abstract/> - </t:titlepage-content> - - <t:titlepage-content t:side="verso"> - </t:titlepage-content> - - <t:titlepage-separator> - <xsl:if test="count(parent::*)='0'"><hr/></xsl:if> - </t:titlepage-separator> - - <t:titlepage-before t:side="recto"> - </t:titlepage-before> - - <t:titlepage-before t:side="verso"> - </t:titlepage-before> -</t:titlepage> - -<t:titlepage t:element="sect1" t:wrapper="div" class="titlepage"> - <t:titlepage-content t:side="recto"> - <title/> - <subtitle/> - <corpauthor/> - <authorgroup/> - <author/> - <othercredit/> - <releaseinfo/> - <copyright/> - <legalnotice/> - <pubdate/> - <revision/> - <revhistory/> - <abstract/> - </t:titlepage-content> - - <t:titlepage-content t:side="verso"> - </t:titlepage-content> - - <t:titlepage-separator> - <xsl:if test="count(parent::*)='0'"><hr/></xsl:if> - </t:titlepage-separator> - - <t:titlepage-before t:side="recto"> - </t:titlepage-before> - - <t:titlepage-before t:side="verso"> - </t:titlepage-before> -</t:titlepage> - -<t:titlepage t:element="sect2" t:wrapper="div" class="titlepage"> - <t:titlepage-content t:side="recto"> - <title/> - <subtitle/> - <corpauthor/> - <authorgroup/> - <author/> - <othercredit/> - <releaseinfo/> - <copyright/> - <legalnotice/> - <pubdate/> - <revision/> - <revhistory/> - <abstract/> - </t:titlepage-content> - - <t:titlepage-content t:side="verso"> - </t:titlepage-content> - - <t:titlepage-separator> - <xsl:if test="count(parent::*)='0'"><hr/></xsl:if> - </t:titlepage-separator> - - <t:titlepage-before t:side="recto"> - </t:titlepage-before> - - <t:titlepage-before t:side="verso"> - </t:titlepage-before> -</t:titlepage> - -<t:titlepage t:element="sect3" t:wrapper="div" class="titlepage"> - <t:titlepage-content t:side="recto"> - <title/> - <subtitle/> - <corpauthor/> - <authorgroup/> - <author/> - <othercredit/> - <releaseinfo/> - <copyright/> - <legalnotice/> - <pubdate/> - <revision/> - <revhistory/> - <abstract/> - </t:titlepage-content> - - <t:titlepage-content t:side="verso"> - </t:titlepage-content> - - <t:titlepage-separator> - <xsl:if test="count(parent::*)='0'"><hr/></xsl:if> - </t:titlepage-separator> - - <t:titlepage-before t:side="recto"> - </t:titlepage-before> - - <t:titlepage-before t:side="verso"> - </t:titlepage-before> -</t:titlepage> - -<t:titlepage t:element="sect4" t:wrapper="div" class="titlepage"> - <t:titlepage-content t:side="recto"> - <title/> - <subtitle/> - <corpauthor/> - <authorgroup/> - <author/> - <othercredit/> - <releaseinfo/> - <copyright/> - <legalnotice/> - <pubdate/> - <revision/> - <revhistory/> - <abstract/> - </t:titlepage-content> - - <t:titlepage-content t:side="verso"> - </t:titlepage-content> - - <t:titlepage-separator> - <xsl:if test="count(parent::*)='0'"><hr/></xsl:if> - </t:titlepage-separator> - - <t:titlepage-before t:side="recto"> - </t:titlepage-before> - - <t:titlepage-before t:side="verso"> - </t:titlepage-before> -</t:titlepage> - -<t:titlepage t:element="sect5" t:wrapper="div" class="titlepage"> - <t:titlepage-content t:side="recto"> - <title/> - <subtitle/> - <corpauthor/> - <authorgroup/> - <author/> - <othercredit/> - <releaseinfo/> - <copyright/> - <legalnotice/> - <pubdate/> - <revision/> - <revhistory/> - <abstract/> - </t:titlepage-content> - - <t:titlepage-content t:side="verso"> - </t:titlepage-content> - - <t:titlepage-separator> - <xsl:if test="count(parent::*)='0'"><hr/></xsl:if> - </t:titlepage-separator> - - <t:titlepage-before t:side="recto"> - </t:titlepage-before> - - <t:titlepage-before t:side="verso"> - </t:titlepage-before> -</t:titlepage> - -<t:titlepage t:element="simplesect" t:wrapper="div" class="titlepage"> - <t:titlepage-content t:side="recto"> - <title/> - <subtitle/> - <corpauthor/> - <authorgroup/> - <author/> - <othercredit/> - <releaseinfo/> - <copyright/> - <legalnotice/> - <pubdate/> - <revision/> - <revhistory/> - <abstract/> - </t:titlepage-content> - - <t:titlepage-content t:side="verso"> - </t:titlepage-content> - - <t:titlepage-separator> - <xsl:if test="count(parent::*)='0'"><hr/></xsl:if> - </t:titlepage-separator> - - <t:titlepage-before t:side="recto"> - </t:titlepage-before> - - <t:titlepage-before t:side="verso"> - </t:titlepage-before> -</t:titlepage> - -<!-- ==================================================================== --> - -<t:titlepage t:element="bibliography" t:wrapper="div" class="titlepage"> - <t:titlepage-content t:side="recto"> - <title - t:force="1" - t:named-template="component.title" - param:node="ancestor-or-self::bibliography[1]"/> - <subtitle/> - </t:titlepage-content> - - <t:titlepage-content t:side="verso"> - </t:titlepage-content> - - <t:titlepage-separator> - </t:titlepage-separator> - - <t:titlepage-before t:side="recto"> - </t:titlepage-before> - - <t:titlepage-before t:side="verso"> - </t:titlepage-before> -</t:titlepage> - -<!-- ==================================================================== --> - -<t:titlepage t:element="glossary" t:wrapper="div" class="titlepage"> - <t:titlepage-content t:side="recto"> - <title - t:force="1" - t:named-template="component.title" - param:node="ancestor-or-self::glossary[1]"/> - <subtitle/> - </t:titlepage-content> - - <t:titlepage-content t:side="verso"> - </t:titlepage-content> - - <t:titlepage-separator> - </t:titlepage-separator> - - <t:titlepage-before t:side="recto"> - </t:titlepage-before> - - <t:titlepage-before t:side="verso"> - </t:titlepage-before> -</t:titlepage> - -<!-- ==================================================================== --> - -<t:titlepage t:element="index" t:wrapper="div" class="titlepage"> - <t:titlepage-content t:side="recto"> - <title - t:force="1" - t:named-template="component.title" - param:node="ancestor-or-self::index[1]"/> - <subtitle/> - </t:titlepage-content> - - <t:titlepage-content t:side="verso"> - </t:titlepage-content> - - <t:titlepage-separator> - </t:titlepage-separator> - - <t:titlepage-before t:side="recto"> - </t:titlepage-before> - - <t:titlepage-before t:side="verso"> - </t:titlepage-before> -</t:titlepage> - -<!-- ==================================================================== --> - -<t:titlepage t:element="setindex" t:wrapper="div" class="titlepage"> - <t:titlepage-content t:side="recto"> - <title - t:force="1" - t:named-template="component.title" - param:node="ancestor-or-self::setindex[1]"/> - <subtitle/> - </t:titlepage-content> - - <t:titlepage-content t:side="verso"> - </t:titlepage-content> - - <t:titlepage-separator> - </t:titlepage-separator> - - <t:titlepage-before t:side="recto"> - </t:titlepage-before> - - <t:titlepage-before t:side="verso"> - </t:titlepage-before> -</t:titlepage> - -<!-- ==================================================================== --> - -</t:templates> diff --git a/doc/images/data-window-new.png b/doc/images/data-window-new.png deleted file mode 100644 index b07dd5f..0000000 Binary files a/doc/images/data-window-new.png and /dev/null differ diff --git a/doc/images/data-window-new.xcf b/doc/images/data-window-new.xcf deleted file mode 100644 index d911fa3..0000000 Binary files a/doc/images/data-window-new.xcf and /dev/null differ diff --git a/doc/images/format-expressions.png b/doc/images/format-expressions.png deleted file mode 100644 index 7d49b6c..0000000 Binary files a/doc/images/format-expressions.png and /dev/null differ diff --git a/doc/images/format-file-selection.png b/doc/images/format-file-selection.png deleted file mode 100644 index 8210491..0000000 Binary files a/doc/images/format-file-selection.png and /dev/null differ diff --git a/doc/images/format-menu.png b/doc/images/format-menu.png deleted file mode 100644 index 463cc0e..0000000 Binary files a/doc/images/format-menu.png and /dev/null differ diff --git a/doc/images/player-window-new.png b/doc/images/player-window-new.png deleted file mode 100644 index 796671a..0000000 Binary files a/doc/images/player-window-new.png and /dev/null differ diff --git a/doc/images/player-window-new.xcf b/doc/images/player-window-new.xcf deleted file mode 100644 index 685b154..0000000 Binary files a/doc/images/player-window-new.xcf and /dev/null differ diff --git a/doc/images/quick-open-empty.png b/doc/images/quick-open-empty.png deleted file mode 100644 index f878166..0000000 Binary files a/doc/images/quick-open-empty.png and /dev/null differ diff --git a/doc/images/quick-open.png b/doc/images/quick-open.png deleted file mode 100644 index 78d24c6..0000000 Binary files a/doc/images/quick-open.png and /dev/null differ diff --git a/lib/Makefile.am b/lib/Makefile.am deleted file mode 100644 index e5eacdd..0000000 --- a/lib/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ - -SUBDIRS = gtk-vlc-player \ - experiment-reader gtk-experiment-widgets diff --git a/lib/experiment-reader/Makefile.am b/lib/experiment-reader/Makefile.am deleted file mode 100644 index dc2c231..0000000 --- a/lib/experiment-reader/Makefile.am +++ /dev/null @@ -1,37 +0,0 @@ -AM_CFLAGS = -Wall - -SUBDIRS = . tests - -reader_datadir = @datarootdir@/libexperiment-reader - -BUILT_SOURCES = cclosure-marshallers.c cclosure-marshallers.h - -lib_LTLIBRARIES = libexperiment-reader.la -libexperiment_reader_la_SOURCES = experiment-reader.c experiment-reader.h -nodist_libexperiment_reader_la_SOURCES = $(BUILT_SOURCES) - -libexperiment_reader_la_CFLAGS = $(AM_CFLAGS) -libexperiment_reader_la_CPPFLAGS = -libexperiment_reader_la_LDFLAGS = -no-undefined -bindir @bindir@ -libexperiment_reader_la_LIBADD = - -libexperiment_reader_la_CFLAGS += @LIBGLIB_CFLAGS@ -libexperiment_reader_la_LIBADD += @LIBGLIB_LIBS@ - -libexperiment_reader_la_CFLAGS += @LIBXML2_CFLAGS@ -libexperiment_reader_la_LIBADD += @LIBXML2_LIBS@ - -include_HEADERS = experiment-reader.h - -dist_reader_data_DATA = session.dtd - -dist_noinst_DATA = cclosure-marshallers.list -CLEANFILES = $(BUILT_SOURCES) - -MARSHAL_PREFIX = experiment_reader_marshal - -cclosure-marshallers.c : cclosure-marshallers.list - @GLIB_GENMARSHAL@ --prefix $(MARSHAL_PREFIX) --body $< >$@ - -cclosure-marshallers.h : cclosure-marshallers.list - @GLIB_GENMARSHAL@ --prefix $(MARSHAL_PREFIX) --header $< >$@ diff --git a/lib/experiment-reader/cclosure-marshallers.list b/lib/experiment-reader/cclosure-marshallers.list deleted file mode 100644 index 70ffabb..0000000 --- a/lib/experiment-reader/cclosure-marshallers.list +++ /dev/null @@ -1,2 +0,0 @@ -# ExperimentReaderTopicCallback marshaller -VOID:STRING,INT64,INT64 diff --git a/lib/experiment-reader/experiment-reader.c b/lib/experiment-reader/experiment-reader.c deleted file mode 100644 index c6bf02e..0000000 --- a/lib/experiment-reader/experiment-reader.c +++ /dev/null @@ -1,607 +0,0 @@ -/** - * @file - * Auxiliary class to handle "session" XML files (augmented Folker). - * It is a GObject that must be freed using \e g_object_unref. - */ - -/* - * Copyright (C) 2012-2013 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 - -#include <string.h> -#include <assert.h> - -#include <glib-object.h> -#include <glib.h> -#include <glib/gprintf.h> - -#include <libxml/tree.h> -#include <libxml/parser.h> -#include <libxml/xpath.h> -#include <libxml/xpathInternals.h> - -#include "cclosure-marshallers.h" -#include "experiment-reader.h" - -static void experiment_reader_class_init(ExperimentReaderClass *klass); -static void experiment_reader_init(ExperimentReader *klass); -static void experiment_reader_finalize(GObject *gobject); - -static gint64 get_timepoint_by_ref(xmlDoc *doc, xmlChar *ref); -static xmlNode *get_first_element(xmlNode *children, const gchar *name); -static xmlNode *get_last_element(xmlNode *children, const gchar *name); - -static GClosure *experiment_reader_topic_callback_new(ExperimentReaderTopicCallback, - gpointer); -static void experiment_reader_topic_callback_invoke(ExperimentReader *reader, - GClosure *closure, - const gchar *topic_id, - gint64 start_time, - gint64 end_time); -static gboolean generic_foreach_topic(ExperimentReader *reader, xmlNodeSet *nodes, - GClosure *closure); - -static gint experiment_reader_contrib_cmp(const ExperimentReaderContrib *a, - const ExperimentReaderContrib *b); -static void insert_contribution(gint64 start_time, gchar *text, GList **list); -static inline void process_contribution(xmlDoc *doc, xmlNode *contrib, - GList **list); - -/** @private */ -#define XML_CHAR(STR) \ - ((const xmlChar *)(STR)) - -/** @private */ -#define EXPERIMENT_READER_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE((obj), EXPERIMENT_TYPE_READER, ExperimentReaderPrivate)) - -/** @private */ -struct _ExperimentReaderPrivate { - xmlDoc *doc; -}; - -/** - * @private - * Will create \e experiment_reader_get_type and set - * \e experiment_reader_parent_class - */ -G_DEFINE_TYPE(ExperimentReader, experiment_reader, G_TYPE_OBJECT); - -static void -experiment_reader_class_init(ExperimentReaderClass *klass) -{ - GObjectClass *gobject_class = G_OBJECT_CLASS(klass); - - /* gobject_class->dispose = experiment_reader_dispose; */ - gobject_class->finalize = experiment_reader_finalize; - - g_type_class_add_private(klass, sizeof(ExperimentReaderPrivate)); -} - -static void -experiment_reader_init(ExperimentReader *klass) -{ - klass->priv = EXPERIMENT_READER_GET_PRIVATE(klass); - - klass->priv->doc = NULL; -} - -static void -experiment_reader_finalize(GObject *gobject) -{ - ExperimentReader *reader = EXPERIMENT_READER(gobject); - - if (reader->priv->doc != NULL) - xmlFreeDoc(reader->priv->doc); - - /* Chain up to the parent class */ - G_OBJECT_CLASS(experiment_reader_parent_class)->finalize(gobject); -} - -static gint64 -get_timepoint_by_ref(xmlDoc *doc, xmlChar *ref) -{ - xmlChar expr[255]; - - xmlXPathContext *xpathCtx; - xmlXPathObject *xpathObj; - - double value; - - xpathCtx = xmlXPathNewContext(doc); - assert(xpathCtx != NULL); - - /** @todo precompile XPath expression */ - xmlStrPrintf(expr, sizeof(expr), - XML_CHAR("/session/timeline/" - "timepoint[@timepoint-id = '%s']/" - "@absolute-time"), ref); - - xpathObj = xmlXPathEvalExpression(expr, xpathCtx); - assert(xpathObj != NULL); - - value = xmlXPathCastToNumber(xpathObj); - - xmlXPathFreeObject(xpathObj); - xmlXPathFreeContext(xpathCtx); - - return (gint64)(value*1000.); -} - -static xmlNode * -get_first_element(xmlNode *children, const gchar *name) -{ - for (xmlNode *cur = children; cur != NULL; cur = cur->next) - if (cur->type == XML_ELEMENT_NODE && - !g_strcmp0((const gchar *)cur->name, name)) - return cur; - - return NULL; -} - -static xmlNode * -get_last_element(xmlNode *children, const gchar *name) -{ - xmlNode *ret = NULL; - - for (xmlNode *cur = children; cur != NULL; cur = cur->next) - if (cur->type == XML_ELEMENT_NODE && - !g_strcmp0((const gchar *)cur->name, name)) - ret = cur; - - return ret; -} - -static GClosure * -experiment_reader_topic_callback_new(ExperimentReaderTopicCallback callback, - gpointer data) -{ - GClosure *closure = g_cclosure_new(G_CALLBACK(callback), data, NULL); - - g_closure_set_marshal(closure, - experiment_reader_marshal_VOID__STRING_INT64_INT64); - g_closure_ref(closure); - g_closure_sink(closure); - - return closure; -} - -static void -experiment_reader_topic_callback_invoke(ExperimentReader *reader, - GClosure *closure, - const gchar *topic_id, - gint64 start_time, gint64 end_time) -{ - GValue params[4]; - - memset(params, 0, sizeof(params)); - g_value_init(params + 0, G_TYPE_OBJECT); - g_value_set_object(params + 0, reader); - g_value_init(params + 1, G_TYPE_STRING); - g_value_set_string(params + 1, topic_id); - g_value_init(params + 2, G_TYPE_INT64); - g_value_set_int64(params + 2, start_time); - g_value_init(params + 3, G_TYPE_INT64); - g_value_set_int64(params + 3, end_time); - - g_closure_invoke(closure, NULL, G_N_ELEMENTS(params), params, NULL); - - for (gint i = 0; i < G_N_ELEMENTS(params); i++) - g_value_unset(params + i); -} - -static gboolean -generic_foreach_topic(ExperimentReader *reader, xmlNodeSet *nodes, - GClosure *closure) -{ - if (nodes == NULL) - return TRUE; - - for (int i = 0; i < nodes->nodeNr; i++) { - xmlNode *cur = nodes->nodeTab[i]; - assert(cur != NULL && cur->type == XML_ELEMENT_NODE); - - xmlNode *first_contrib = get_first_element(cur->children, - "contribution"); - xmlNode *last_contrib = get_last_element(cur->children, - "contribution"); - - xmlChar *topic_id = xmlGetProp(cur, XML_CHAR("id")); - gint64 start_time = -1; - gint64 end_time = -1; - - if (first_contrib != NULL) { - xmlChar *contrib_start_ref; - - contrib_start_ref = xmlGetProp(first_contrib, - XML_CHAR("start-reference")); - start_time = get_timepoint_by_ref(reader->priv->doc, - contrib_start_ref); - xmlFree(contrib_start_ref); - } - if (last_contrib != NULL) { - xmlChar *contrib_end_ref; - - contrib_end_ref = xmlGetProp(last_contrib, - XML_CHAR("end-reference")); - end_time = get_timepoint_by_ref(reader->priv->doc, - contrib_end_ref); - xmlFree(contrib_end_ref); - } - - experiment_reader_topic_callback_invoke(reader, closure, - (const gchar *)topic_id, - start_time, end_time); - - xmlFree(topic_id); - } - - return FALSE; -} - -static gint -experiment_reader_contrib_cmp(const ExperimentReaderContrib *a, - const ExperimentReaderContrib *b) -{ - if (a->start_time < b->start_time) - return -1; - if (a->start_time > b->start_time) - return 1; - return 0; -} - -static void -insert_contribution(gint64 start_time, gchar *text, GList **list) -{ - ExperimentReaderContrib *contrib; - - if (text == NULL) - return; - - contrib = g_malloc(sizeof(ExperimentReaderContrib) + strlen(text) + 1); - contrib->start_time = start_time; - g_stpcpy(contrib->text, g_strchomp(text)); - - *list = g_list_insert_sorted(*list, contrib, - (GCompareFunc)experiment_reader_contrib_cmp); -} - -static inline void -process_contribution(xmlDoc *doc, xmlNode *contrib, GList **list) -{ - xmlChar *ref; - gint64 start_time; - - gchar *text = NULL; - - ref = xmlGetProp(contrib, XML_CHAR("start-reference")); - start_time = get_timepoint_by_ref(doc, ref); - xmlFree(ref); - - for (xmlNode *cur = contrib->children; cur != NULL; cur = cur->next) { - xmlChar *content; - gchar *new; - - switch (cur->type) { - case XML_TEXT_NODE: - content = xmlNodeGetContent(cur); - - new = g_strconcat(text != NULL ? text : "", - g_strstrip((gchar *)content), - " ", NULL); - g_free(text); - text = new; - - xmlFree(content); - break; - - case XML_ELEMENT_NODE: - if (!xmlStrcmp(cur->name, XML_CHAR("pause"))) { - xmlChar *duration; - - duration = xmlGetProp(cur, XML_CHAR("duration")); - if (duration == NULL) - break; - - if (!xmlStrcmp(duration, XML_CHAR("micro")) || - !xmlStrcmp(duration, XML_CHAR("short"))) - new = g_strconcat(text != NULL ? text : "", - "... ", NULL); - else if (text == NULL) - new = g_strdup("...\n"); - else - new = g_strconcat(g_strchomp(text), - "\n", NULL); - g_free(text); - text = new; - - xmlFree(duration); - } else if (!xmlStrcmp(cur->name, XML_CHAR("time"))) { - insert_contribution(start_time, text, list); - g_free(text); - text = NULL; - - ref = xmlGetProp(cur, - XML_CHAR("timepoint-reference")); - start_time = get_timepoint_by_ref(doc, ref); - xmlFree(ref); - } - break; - - default: - break; - } - } - - insert_contribution(start_time, text, list); - g_free(text); -} - -/* - * API - */ - -/** - * @brief Constructs a new ExperimentReader object - * - * @param filename Filename of XML file to open - * @return A new \e ExperimentReader object. Free with \e g_object_unref. - */ -ExperimentReader * -experiment_reader_new(const gchar *filename) -{ - ExperimentReader *reader; - - reader = EXPERIMENT_READER(g_object_new(EXPERIMENT_TYPE_READER, NULL)); - reader->priv->doc = xmlParseFile(filename); - if (reader->priv->doc == NULL) { - g_object_unref(G_OBJECT(reader)); - return NULL; - } - - /** @todo validate against session.dtd */ - - return reader; -} - -/** - * @brief Retrieve list of contributions by speaker - * - * Returns a newly-allocated doubly-linked list of - * \ref ExperimentReaderContrib structures representing all contributions - * by a given speaker. Every text fragment with a \e timepoint reference is - * considered a contribution. - * The list is sorted by the contributions' start times, in ascending order. - * - * @sa ExperimentReaderContrib - * @sa experiment_reader_get_contribution_by_time - * @sa experiment_reader_free_contributions - * - * @param reader \e ExperimentReader instance - * @param speaker Full name of the speaker (e.g. "Wizard") - * @return Newly allocated list of contributions (must be freed with - * \ref experiment_reader_free_contributions) - */ -GList * -experiment_reader_get_contributions_by_speaker(ExperimentReader *reader, - const gchar *speaker) -{ - GList *list = NULL; - - xmlXPathContext *xpathCtx; - xmlXPathObject *xpathObj; - - xmlChar expr[255]; - - xpathCtx = xmlXPathNewContext(reader->priv->doc); - - /* Evaluate xpath expression */ - xmlStrPrintf(expr, sizeof(expr), - XML_CHAR("//contribution[@speaker-reference = " - "/session/speakers/speaker[name = '%s']/@speaker-id]"), - speaker); - xpathObj = xmlXPathEvalExpression(expr, xpathCtx); - - for (int i = 0; i < xpathObj->nodesetval->nodeNr; i++) { - xmlNode *contrib = xpathObj->nodesetval->nodeTab[i]; - - process_contribution(reader->priv->doc, contrib, &list); - } - - xmlXPathFreeObject(xpathObj); - xmlXPathFreeContext(xpathCtx); - - return list; -} - -/** - * @brief Get a contribution by time - * - * Gets the closest contribution after the specified time or the last one - * if there is no contribution after the specified time. - * The contribution is returned as a pointer into the contribution list - * so that the list may be traversed by the caller. - * - * @param contribs List of \ref ExperimentReaderContrib structures as returned - * by \ref experiment_reader_get_contributions_by_speaker - * @param timept Time in milliseconds - * @return List of contributions beginning with the desired contribution. - * It is a pointer into contribs and must not be freed directly. - */ -GList * -experiment_reader_get_contribution_by_time(GList *contribs, gint64 timept) -{ - for (GList *cur = contribs; cur != NULL; cur = cur->next) { - ExperimentReaderContrib *contrib = - (ExperimentReaderContrib *)cur->data; - - if (contrib->start_time > timept || - cur->next == NULL) - return cur; - } - - return NULL; -} - -/** - * @brief Free list of contributions and associated data - * - * @sa experiment_reader_get_contributions_by_speaker - * - * @param contribs List of \ref ExperimentReaderContrib structures to free - */ -void -experiment_reader_free_contributions(GList *contribs) -{ - for (GList *cur = contribs; cur != NULL; cur = cur->next) - g_free(cur->data); - - g_list_free(contribs); -} - -/** - * Calls \e callback with \e userdata for each \b topic in the \b greeting - * section of the experiment. - * - * @param reader \e ExperimentReader instance - * @param callback Function to invoke - * @param userdata User data to pass to \e callback - */ -void -experiment_reader_foreach_greeting_topic(ExperimentReader *reader, - ExperimentReaderTopicCallback callback, - gpointer userdata) -{ - xmlXPathContext *xpathCtx; - xmlXPathObject *xpathObj; - GClosure *closure; - - xpathCtx = xmlXPathNewContext(reader->priv->doc); - xpathObj = xmlXPathEvalExpression(XML_CHAR("/session/greeting/topic"), - xpathCtx); - - closure = experiment_reader_topic_callback_new(callback, userdata); - generic_foreach_topic(reader, xpathObj->nodesetval, closure); - g_closure_unref(closure); - - xmlXPathFreeObject(xpathObj); - xmlXPathFreeContext(xpathCtx); -} - -/** - * Calls \e callback with \e userdata for each \b topic in the - * \b initial-narrative subsection of the \b experiment section of - * the experiment. - * - * @param reader \e ExperimentReader instance - * @param callback Function to invoke - * @param userdata User data to pass to \e callback - */ -void -experiment_reader_foreach_exp_initial_narrative_topic(reader, callback, userdata) - ExperimentReader *reader; - ExperimentReaderTopicCallback callback; - gpointer userdata; -{ - xmlXPathContext *xpathCtx; - xmlXPathObject *xpathObj; - GClosure *closure; - - xpathCtx = xmlXPathNewContext(reader->priv->doc); - xpathObj = xmlXPathEvalExpression(XML_CHAR("/session/experiment/" - "initial-narrative/topic"), - xpathCtx); - - closure = experiment_reader_topic_callback_new(callback, userdata); - generic_foreach_topic(reader, xpathObj->nodesetval, closure); - g_closure_unref(closure); - - xmlXPathFreeObject(xpathObj); - xmlXPathFreeContext(xpathCtx); -} - -/** - * Calls \e callback with \e userdata for each \b topic in a \b phase of - * the \b last-minute subsection of the \b experiment section of - * the experiment. - * - * @param reader \e ExperimentReader instance - * @param phase \b Phase section (integer from 1 to 6) - * @param callback Function to invoke - * @param userdata User data to pass to \e callback - */ -void -experiment_reader_foreach_exp_last_minute_phase_topic(reader, phase, callback, userdata) - ExperimentReader *reader; - gint phase; - ExperimentReaderTopicCallback callback; - gpointer userdata; -{ - xmlXPathContext *xpathCtx; - xmlXPathObject *xpathObj; - GClosure *closure; - - xmlChar expr[255]; - - xpathCtx = xmlXPathNewContext(reader->priv->doc); - - /* Evaluate xpath expression */ - xmlStrPrintf(expr, sizeof(expr), - XML_CHAR("/session/experiment/last-minute/" - "phase[@id = '%d']/topic"), - phase); - xpathObj = xmlXPathEvalExpression(expr, xpathCtx); - - closure = experiment_reader_topic_callback_new(callback, userdata); - generic_foreach_topic(reader, xpathObj->nodesetval, closure); - g_closure_unref(closure); - - xmlXPathFreeObject(xpathObj); - xmlXPathFreeContext(xpathCtx); -} - -/** - * Calls \e callback with \e userdata for each \b topic in the \b farewell - * section of the experiment. - * - * @param reader \e ExperimentReader instance - * @param callback Function to invoke - * @param userdata User data to pass to \e callback - */ -void -experiment_reader_foreach_farewell_topic(ExperimentReader *reader, - ExperimentReaderTopicCallback callback, - gpointer userdata) -{ - xmlXPathContext *xpathCtx; - xmlXPathObject *xpathObj; - GClosure *closure; - - xpathCtx = xmlXPathNewContext(reader->priv->doc); - xpathObj = xmlXPathEvalExpression(XML_CHAR("/session/farewell/topic"), - xpathCtx); - - closure = experiment_reader_topic_callback_new(callback, userdata); - generic_foreach_topic(reader, xpathObj->nodesetval, closure); - g_closure_unref(closure); - - xmlXPathFreeObject(xpathObj); - xmlXPathFreeContext(xpathCtx); -} diff --git a/lib/experiment-reader/experiment-reader.h b/lib/experiment-reader/experiment-reader.h deleted file mode 100644 index a8e62e4..0000000 --- a/lib/experiment-reader/experiment-reader.h +++ /dev/null @@ -1,133 +0,0 @@ -/** - * @file - * Header file to include when using the \e ExperimentReader class. - */ - -/* - * Copyright (C) 2012-2013 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_READER_H -#define __EXPERIMENT_READER_H - -#include <glib.h> -#include <glib-object.h> - -G_BEGIN_DECLS - -#define EXPERIMENT_TYPE_READER \ - (experiment_reader_get_type()) -/** - * Cast instance pointer to \e ExperimentReader - * - * @param obj Object to cast to \e ExperimentReader - * @return \e obj casted to \e ExperimentReader - */ -#define EXPERIMENT_READER(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj), EXPERIMENT_TYPE_READER, ExperimentReader)) -#define EXPERIMENT_READER_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass), EXPERIMENT_TYPE_READER, ExperimentReaderClass)) -#define EXPERIMENT_IS_READER(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj), EXPERIMENT_TYPE_READER)) -#define EXPERIMENT_IS_READER_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE((klass), EXPERIMENT_TYPE_READER)) -#define EXPERIMENT_READER_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS((obj), EXPERIMENT_TYPE_READER, ExperimentReaderClass)) - -/** @private */ -typedef struct _ExperimentReaderPrivate ExperimentReaderPrivate; - -/** - * \e ExperimentReader instance structure - */ -typedef struct _ExperimentReader { - GObject parent_instance; /**< Parent instance structure */ - - ExperimentReaderPrivate *priv; /**< @private */ -} ExperimentReader; - -/** - * \e ExperimentReader class structure - */ -typedef struct _ExperimentReaderClass { - GObjectClass parent_class; /**< Parent class structure */ -} ExperimentReaderClass; - -/** @private */ -GType experiment_reader_get_type(void); - -/* - * Callbacks - */ -/** - * Type of function to use for \e topic callbacks. - * - * @param reader \e ExperimentReader the information refers to - * @param topic_id Symbolic identifier of experiment \b topic - * @param start_time Beginning of first \b contribution in \e topic (milliseconds) - * @param end_time End of last \b contribution in \e topic (milliseconds) - * @param data Callback user data - */ -typedef void (*ExperimentReaderTopicCallback)(ExperimentReader *reader, - const gchar *topic_id, - gint64 start_time, - gint64 end_time, - gpointer data); - -/** - * Structure describing a contribution. Every text-fragment identified by - * a distinct \e timepoint is considered a contribution. - */ -typedef struct { - gint64 start_time; /**< Contribution's start time in milliseconds */ - gchar text[]; /**< Contribution's text content (part of the structure) */ -} ExperimentReaderContrib; - -/* - * API - */ -ExperimentReader *experiment_reader_new(const gchar *filename); - -GList *experiment_reader_get_contributions_by_speaker( - ExperimentReader *reader, - const gchar *speaker); -GList *experiment_reader_get_contribution_by_time( - GList *contribs, - gint64 timept); -void experiment_reader_free_contributions( - GList *contribs); - -void experiment_reader_foreach_greeting_topic( - ExperimentReader *reader, - ExperimentReaderTopicCallback callback, - gpointer userdata); -void experiment_reader_foreach_exp_initial_narrative_topic( - ExperimentReader *reader, - ExperimentReaderTopicCallback callback, - gpointer userdata); -void experiment_reader_foreach_exp_last_minute_phase_topic( - ExperimentReader *reader, - gint phase, - ExperimentReaderTopicCallback callback, - gpointer userdata); -void experiment_reader_foreach_farewell_topic( - ExperimentReader *reader, - ExperimentReaderTopicCallback callback, - gpointer userdata); - -G_END_DECLS - -#endif diff --git a/lib/experiment-reader/session.dtd b/lib/experiment-reader/session.dtd deleted file mode 100755 index 386709a..0000000 --- a/lib/experiment-reader/session.dtd +++ /dev/null @@ -1,130 +0,0 @@ -<!-- ========================================================== - Elements refering to the target transcript structure - ========================================================== --> - -<!ELEMENT session (head, speakers, recording, timeline, greeting, experiment, farewell)> - -<!ELEMENT greeting (topic)+> -<!ELEMENT experiment (initial-narrative, last-minute)> -<!ELEMENT farewell (topic)+> - -<!ELEMENT initial-narrative (topic+)> -<!ELEMENT last-minute (phase, phase, phase, phase, phase, phase)> - -<!ELEMENT phase (topic)+> -<!ATTLIST phase id NMTOKEN #REQUIRED > - -<!ELEMENT topic (contribution)+> -<!ATTLIST topic - id (bz_1|bz_2| - i_1|i_2|i_3|i_4|i_5|i_6|i_7|i_8|i_10|i_12|i_14|i_15|i_16|i_17|i_19|i_20| - lm_1_1|lm_1_2|lm_1_3|lm_1_5|lm_1_6|lm_1_7|lm_1_8| - lm_2_1|lm_2_4|lm_2_6|lm_2_9| - lm_2_11|lm_2_13|lm_2_15|lm_2_16|lm_2_17|lm_2_20| - lm_2_23|lm_2_25|lm_2_27|lm_2_28|lm_2_30| - lm_2_31|lm_2_38| - lm_3_1|lm_3_2|lm_3_3|lm_3_4|lm_3_6|lm_3_7|lm_3_8| - lm_4_1|lm_4_2|lm_4_4|lm_4_6| - lm_5_1|lm_5_2|lm_5_5|lm_5_7| - lm_5_19|lm_5_20| - lm_5_21|lm_5_22|lm_5_24|lm_5_30| - lm_5_31|lm_5_32|lm_5_33| - a_6_1|a_6_3|a_6_5| - v_1) #REQUIRED -> - - - -<!-- ========================================================== - Elements inspired by Folker-Schema - ========================================================== --> - -<!ELEMENT head ANY> - - -<!ELEMENT speakers (speaker)*> -<!ELEMENT speaker (#PCDATA|name)*> -<!ATTLIST speaker - speaker-id ID #REQUIRED -> - -<!ELEMENT name (#PCDATA)> - -<!ELEMENT recording EMPTY> -<!ATTLIST recording - path CDATA #IMPLIED -> - - -<!ELEMENT timeline (timepoint, (timepoint)+)> -<!ELEMENT timepoint EMPTY> -<!ATTLIST timepoint - timepoint-id ID #REQUIRED - absolute-time NMTOKEN #REQUIRED -> - - -<!ELEMENT contribution (#PCDATA|segment|unparsed|breathe|non-phonological|uncertain|pause|time|phrase)*> -<!ATTLIST contribution - speaker-reference IDREF #IMPLIED - start-reference IDREF #REQUIRED - end-reference IDREF #REQUIRED - parse-level NMTOKEN #IMPLIED - id (addition|elaboration|removal|repetition|rejection|weight_limit|weight_limit_extended| - save_comment|make_comment|enumeration|selected_category|remaining_time|acknowledgement) #IMPLIED -> - - -<!ELEMENT segment (#PCDATA)> -<!ATTLIST segment - start-reference IDREF #IMPLIED - end-reference IDREF #IMPLIED -> - - -<!ELEMENT unparsed (time)*> - - -<!ELEMENT breathe EMPTY> -<!ATTLIST breathe - type (in|out) #IMPLIED - length NMTOKEN #REQUIRED -> - - -<!ELEMENT non-phonological EMPTY> -<!ATTLIST non-phonological - description CDATA #REQUIRED -> - - -<!ELEMENT uncertain (#PCDATA|time|stress|lengthening|alternative)*> - - -<!ELEMENT alternative (#PCDATA|time|stress|lengthening)*> - - -<!ELEMENT pause EMPTY> -<!ATTLIST pause - duration NMTOKEN #REQUIRED -> - - -<!ELEMENT time EMPTY> -<!ATTLIST time - timepoint-reference IDREF #REQUIRED -> - - -<!ELEMENT phrase (#PCDATA|breathe|non-phonological|uncertain|pause|time|stress|lengthening)*> -<!ATTLIST phrase - type (intonation-phrase|fragment|unaccentuated) #REQUIRED - boundary-intonation (high-rise|rise|steady|fall|low-fall) #IMPLIED -> - - -<!ELEMENT stress (time)*> -<!ELEMENT lengthening EMPTY> -<!ATTLIST lengthening - length NMTOKEN #IMPLIED -> \ No newline at end of file diff --git a/lib/experiment-reader/tests/Makefile.am b/lib/experiment-reader/tests/Makefile.am deleted file mode 100644 index 388496f..0000000 --- a/lib/experiment-reader/tests/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -AM_CFLAGS = -Wall -AM_CPPFLAGS = -I.. -LDADD = ../libexperiment-reader.la - -AM_CFLAGS += @LIBGLIB_CFLAGS@ -LDADD += @LIBGLIB_LIBS@ - -check_PROGRAMS = unit-tests -dist_noinst_DATA = test-experiment-valid.xml - -if USE_GTESTER -check-local : gtester-log.html -endif - -gtester-log.html : gtester-log.xml - @GTESTER_REPORT@ $< >$@ - -gtester-log.xml : $(check_PROGRAMS) - @GTESTER@ -m=quick -o=$@ $^ - -CLEANFILES = gtester-log.xml gtester-log.html diff --git a/lib/experiment-reader/tests/test-experiment-valid.xml b/lib/experiment-reader/tests/test-experiment-valid.xml deleted file mode 100644 index a7b8bec..0000000 --- a/lib/experiment-reader/tests/test-experiment-valid.xml +++ /dev/null @@ -1,914 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!DOCTYPE session SYSTEM "session.dtd"> - -<session> - <head/> - <speakers> - <speaker speaker-id="W"> - <name>Wizard</name> - </speaker> - <speaker speaker-id="P"> - <name>Proband</name> - </speaker> - </speakers> - - <recording path="test-experiment-valid.wav"/> - - <timeline> - <timepoint timepoint-id="TLI_0" absolute-time="7.214049251927732"/> - <timepoint timepoint-id="TLI_1" absolute-time="8.348253519252669"/> - <timepoint timepoint-id="TLI_2" absolute-time="10.228151350137683"/> - <timepoint timepoint-id="TLI_3" absolute-time="10.468148330350127"/> - <timepoint timepoint-id="TLI_4" absolute-time="11.628133734710278"/> - <timepoint timepoint-id="TLI_5" absolute-time="13.648297524768681"/> - <timepoint timepoint-id="TLI_6" absolute-time="15.914218445730855"/> - <timepoint timepoint-id="TLI_7" absolute-time="18.033208622734193"/> - <timepoint timepoint-id="TLI_8" absolute-time="19.697200908969947"/> - <timepoint timepoint-id="TLI_9" absolute-time="20.72419614813107"/> - <timepoint timepoint-id="TLI_10" absolute-time="23.844181684823106"/> - <timepoint timepoint-id="TLI_11" absolute-time="26.84716776388919"/> - <timepoint timepoint-id="TLI_12" absolute-time="29.83715390321906"/> - <timepoint timepoint-id="TLI_13" absolute-time="32.54114136835216"/> - <timepoint timepoint-id="TLI_14" absolute-time="35.64829780703222"/> - <timepoint timepoint-id="TLI_15" absolute-time="36.908294160025214"/> - <timepoint timepoint-id="TLI_16" absolute-time="40.96829190279636"/> - <timepoint timepoint-id="TLI_17" absolute-time="41.52775751951068"/> - <timepoint timepoint-id="TLI_18" absolute-time="41.77775437389864"/> - <timepoint timepoint-id="TLI_19" absolute-time="42.62774367881771"/> - <timepoint timepoint-id="TLI_20" absolute-time="44.367721785357936"/> - <timepoint timepoint-id="TLI_21" absolute-time="44.96771423588905"/> - <timepoint timepoint-id="TLI_22" absolute-time="48.5076696940226"/> - <timepoint timepoint-id="TLI_23" absolute-time="49.587656104978606"/> - <timepoint timepoint-id="TLI_24" absolute-time="53.327609046622534"/> - <timepoint timepoint-id="TLI_25" absolute-time="57.868294100469406"/> - <timepoint timepoint-id="TLI_26" absolute-time="61.519908309894845"/> - <timepoint timepoint-id="TLI_27" absolute-time="63.52829612507884"/> - <timepoint timepoint-id="TLI_28" absolute-time="64.36703373249568"/> - <timepoint timepoint-id="TLI_29" absolute-time="65.2170174085329"/> - <timepoint timepoint-id="TLI_30" absolute-time="65.95098649042936"/> - <timepoint timepoint-id="TLI_31" absolute-time="67.48497937930296"/> - <timepoint timepoint-id="TLI_32" absolute-time="70.3839659404793"/> - <timepoint timepoint-id="TLI_33" absolute-time="71.94466128838656"/> - <timepoint timepoint-id="TLI_34" absolute-time="75.96828798083035"/> - <timepoint timepoint-id="TLI_35" absolute-time="79.84792206844514"/> - <timepoint timepoint-id="TLI_36" absolute-time="84.03390266350696"/> - <timepoint timepoint-id="TLI_37" absolute-time="87.17988807967143"/> - <timepoint timepoint-id="TLI_38" absolute-time="88.14188362015146"/> - <timepoint timepoint-id="TLI_39" absolute-time="89.32487813614719"/> - <timepoint timepoint-id="TLI_40" absolute-time="90.33887343557211"/> - <timepoint timepoint-id="TLI_41" absolute-time="91.66486728866623"/> - <timepoint timepoint-id="TLI_42" absolute-time="93.41579885069328"/> - <timepoint timepoint-id="TLI_43" absolute-time="94.49329519655608"/> - <timepoint timepoint-id="TLI_44" absolute-time="94.66804448950987"/> - <timepoint timepoint-id="TLI_45" absolute-time="97.15084185734972"/> - <timepoint timepoint-id="TLI_46" absolute-time="98.94303316519402"/> - <timepoint timepoint-id="TLI_47" absolute-time="100.68682546560069"/> - <timepoint timepoint-id="TLI_48" absolute-time="103.5430209799653"/> - <timepoint timepoint-id="TLI_49" absolute-time="106.2637996124377"/> - <timepoint timepoint-id="TLI_50" absolute-time="109.09300627822196"/> - <timepoint timepoint-id="TLI_51" absolute-time="111.56777502481417"/> - <timepoint timepoint-id="TLI_52" absolute-time="113.76799389432104"/> - <timepoint timepoint-id="TLI_53" absolute-time="115.11799031822129"/> - <timepoint timepoint-id="TLI_54" absolute-time="117.76798329846997"/> - <timepoint timepoint-id="TLI_55" absolute-time="118.28048194087654"/> - <timepoint timepoint-id="TLI_56" absolute-time="120.16797694095935"/> - <timepoint timepoint-id="TLI_57" absolute-time="120.49297608004643"/> - <timepoint timepoint-id="TLI_58" absolute-time="122.86796978875986"/> - <timepoint timepoint-id="TLI_59" absolute-time="128.01829794257122"/> - <timepoint timepoint-id="TLI_60" absolute-time="129.71309701995418"/> - <timepoint timepoint-id="TLI_61" absolute-time="131.83468107357612"/> - <timepoint timepoint-id="TLI_62" absolute-time="133.4206737213946"/> - <timepoint timepoint-id="TLI_63" absolute-time="136.1506610660001"/> - <timepoint timepoint-id="TLI_64" absolute-time="139.36164618084567"/> - <timepoint timepoint-id="TLI_65" absolute-time="142.1566332241323"/> - <timepoint timepoint-id="TLI_66" absolute-time="143.98962472693887"/> - <timepoint timepoint-id="TLI_67" absolute-time="145.8429089288403"/> - <timepoint timepoint-id="TLI_68" absolute-time="147.36790488917208"/> - <timepoint timepoint-id="TLI_69" absolute-time="149.21830281955513"/> - <timepoint timepoint-id="TLI_70" absolute-time="152.49714766571643"/> - <timepoint timepoint-id="TLI_71" absolute-time="154.64330065593106"/> - <timepoint timepoint-id="TLI_72" absolute-time="160.64286972419137"/> - <timepoint timepoint-id="TLI_73" absolute-time="161.76786674410826"/> - <timepoint timepoint-id="TLI_74" absolute-time="166.36785455887954"/> - <timepoint timepoint-id="TLI_75" absolute-time="167.9745135402589"/> - <timepoint timepoint-id="TLI_76" absolute-time="169.87250474174652"/> - <timepoint timepoint-id="TLI_77" absolute-time="171.2504983537855"/> - <timepoint timepoint-id="TLI_78" absolute-time="173.01783694327716"/> - <timepoint timepoint-id="TLI_79" absolute-time="177.56830096345422"/> - <timepoint timepoint-id="TLI_80" absolute-time="180.6624547228065"/> - <timepoint timepoint-id="TLI_81" absolute-time="182.9172980245914"/> - <timepoint timepoint-id="TLI_82" absolute-time="184.31680603608694"/> - <timepoint timepoint-id="TLI_83" absolute-time="185.09280495705175"/> - <timepoint timepoint-id="TLI_84" absolute-time="192.44278548717543"/> - <timepoint timepoint-id="TLI_85" absolute-time="195.19277820252785"/> - <timepoint timepoint-id="TLI_86" absolute-time="195.6677769442705"/> - <timepoint timepoint-id="TLI_87" absolute-time="197.75737547593158"/> - <timepoint timepoint-id="TLI_88" absolute-time="201.21776224252716"/> - <timepoint timepoint-id="TLI_89" absolute-time="201.9177603882532"/> - <timepoint timepoint-id="TLI_90" absolute-time="205.5427507857632"/> - <timepoint timepoint-id="TLI_91" absolute-time="206.44274840169672"/> - <timepoint timepoint-id="TLI_92" absolute-time="208.78132437224343"/> - <timepoint timepoint-id="TLI_93" absolute-time="210.87431466977435"/> - <timepoint timepoint-id="TLI_94" absolute-time="212.76773164700722"/> - <timepoint timepoint-id="TLI_95" absolute-time="215.67129243243838"/> - <timepoint timepoint-id="TLI_96" absolute-time="216.51830764934473"/> - <timepoint timepoint-id="TLI_97" absolute-time="218.54330228519513"/> - <timepoint timepoint-id="TLI_98" absolute-time="218.9177153558862"/> - <timepoint timepoint-id="TLI_99" absolute-time="220.9667089516016"/> - <timepoint timepoint-id="TLI_100" absolute-time="223.7177026408649"/> - <timepoint timepoint-id="TLI_101" absolute-time="224.4927005879188"/> - <timepoint timepoint-id="TLI_102" absolute-time="225.31769840252448"/> - <timepoint timepoint-id="TLI_103" absolute-time="227.71769204501385"/> - <timepoint timepoint-id="TLI_104" absolute-time="230.91768356833302"/> - <timepoint timepoint-id="TLI_105" absolute-time="235.46829931972786"/> - <timepoint timepoint-id="TLI_106" absolute-time="238.62918600659725"/> - <timepoint timepoint-id="TLI_107" absolute-time="239.9811797391638"/> - <timepoint timepoint-id="TLI_108" absolute-time="242.0741700366947"/> - <timepoint timepoint-id="TLI_109" absolute-time="243.95916129844613"/> - <timepoint timepoint-id="TLI_110" absolute-time="245.54515394626458"/> - <timepoint timepoint-id="TLI_111" absolute-time="247.69329830992396"/> - <timepoint timepoint-id="TLI_112" absolute-time="250.9676304566296"/> - <timepoint timepoint-id="TLI_113" absolute-time="252.89262535737623"/> - <timepoint timepoint-id="TLI_114" absolute-time="253.47511718535685"/> - <timepoint timepoint-id="TLI_115" absolute-time="255.36661782728243"/> - <timepoint timepoint-id="TLI_116" absolute-time="257.89509669567053"/> - <timepoint timepoint-id="TLI_117" absolute-time="258.701092959316"/> - <timepoint timepoint-id="TLI_118" absolute-time="259.14260880135896"/> - <timepoint timepoint-id="TLI_119" absolute-time="260.2926057550518"/> - <timepoint timepoint-id="TLI_120" absolute-time="261.99260125181513"/> - <timepoint timepoint-id="TLI_121" absolute-time="263.59259701347474"/> - <timepoint timepoint-id="TLI_122" absolute-time="264.2425952916489"/> - <timepoint timepoint-id="TLI_123" absolute-time="265.5925917155492"/> - <timepoint timepoint-id="TLI_124" absolute-time="265.86759098708444"/> - <timepoint timepoint-id="TLI_125" absolute-time="268.2675846295738"/> - <timepoint timepoint-id="TLI_126" absolute-time="274.0675692655898"/> - <timepoint timepoint-id="TLI_127" absolute-time="274.94256694774737"/> - <timepoint timepoint-id="TLI_128" absolute-time="284.8925405905678"/> - <timepoint timepoint-id="TLI_129" absolute-time="287.00196176506"/> - <timepoint timepoint-id="TLI_130" absolute-time="289.5239500738861"/> - <timepoint timepoint-id="TLI_131" absolute-time="291.0665241007746"/> - <timepoint timepoint-id="TLI_132" absolute-time="291.8675221140525"/> - <timepoint timepoint-id="TLI_133" absolute-time="295.8682927661319"/> - <timepoint timepoint-id="TLI_134" absolute-time="298.4159088534584"/> - <timepoint timepoint-id="TLI_135" absolute-time="301.6918936669851"/> - <timepoint timepoint-id="TLI_136" absolute-time="304.86829333946486"/> - <timepoint timepoint-id="TLI_137" absolute-time="305.71748542591826"/> - <timepoint timepoint-id="TLI_138" absolute-time="309.0674765518929"/> - <timepoint timepoint-id="TLI_139" absolute-time="311.0424713201915"/> - <timepoint timepoint-id="TLI_140" absolute-time="311.8174692672453"/> - <timepoint timepoint-id="TLI_141" absolute-time="312.09246853878057"/> - <timepoint timepoint-id="TLI_142" absolute-time="315.44582990790246"/> - <timepoint timepoint-id="TLI_143" absolute-time="317.3414544992779"/> - <timepoint timepoint-id="TLI_144" absolute-time="318.29245211521146"/> - <timepoint timepoint-id="TLI_145" absolute-time="321.89329706886946"/> - <timepoint timepoint-id="TLI_146" absolute-time="324.4547881451007"/> - <timepoint timepoint-id="TLI_147" absolute-time="325.8067818776673"/> - <timepoint timepoint-id="TLI_148" absolute-time="328.66830353614455"/> - <timepoint timepoint-id="TLI_149" absolute-time="329.0924235064136"/> - <timepoint timepoint-id="TLI_150" absolute-time="330.46741986408983"/> - <timepoint timepoint-id="TLI_151" absolute-time="331.74241648666225"/> - <timepoint timepoint-id="TLI_152" absolute-time="332.5174144337161"/> - <timepoint timepoint-id="TLI_153" absolute-time="335.6433094736271"/> - <timepoint timepoint-id="TLI_154" absolute-time="338.10472486812836"/> - <timepoint timepoint-id="TLI_155" absolute-time="340.8347122127339"/> - <timepoint timepoint-id="TLI_156" absolute-time="344.1182870236677"/> - <timepoint timepoint-id="TLI_157" absolute-time="354.66735575919085"/> - <timepoint timepoint-id="TLI_158" absolute-time="357.3056358585206"/> - <timepoint timepoint-id="TLI_159" absolute-time="359.2556268189531"/> - <timepoint timepoint-id="TLI_160" absolute-time="360.34234072632717"/> - <timepoint timepoint-id="TLI_161" absolute-time="363.89330788242245"/> - <timepoint timepoint-id="TLI_162" absolute-time="365.1185996399869"/> - <timepoint timepoint-id="TLI_163" absolute-time="367.84858698459243"/> - <timepoint timepoint-id="TLI_164" absolute-time="370.8932893396831"/> - <timepoint timepoint-id="TLI_165" absolute-time="374.2673038395206"/> - <timepoint timepoint-id="TLI_166" absolute-time="374.9673019852467"/> - <timepoint timepoint-id="TLI_167" absolute-time="378.1932944162527"/> - <timepoint timepoint-id="TLI_168" absolute-time="379.7235058378855"/> - <timepoint timepoint-id="TLI_169" absolute-time="380.122505296356"/> - <timepoint timepoint-id="TLI_170" absolute-time="383.4047975382218"/> - <timepoint timepoint-id="TLI_171" absolute-time="385.13850683376074"/> - <timepoint timepoint-id="TLI_172" absolute-time="389.1682897578842"/> - <timepoint timepoint-id="TLI_173" absolute-time="390.2433113242471"/> - <timepoint timepoint-id="TLI_174" absolute-time="391.76780684060105"/> - <timepoint timepoint-id="TLI_175" absolute-time="393.302468988105"/> - <timepoint timepoint-id="TLI_176" absolute-time="395.12246055117527"/> - <timepoint timepoint-id="TLI_177" absolute-time="397.501449522903"/> - <timepoint timepoint-id="TLI_178" absolute-time="399.5814398806977"/> - <timepoint timepoint-id="TLI_179" absolute-time="401.66143023849236"/> - <timepoint timepoint-id="TLI_180" absolute-time="404.33941782415303"/> - <timepoint timepoint-id="TLI_181" absolute-time="406.4682993197279"/> - <timepoint timepoint-id="TLI_182" absolute-time="407.8682890502762"/> - <timepoint timepoint-id="TLI_183" absolute-time="409.4680760879715"/> - <timepoint timepoint-id="TLI_184" absolute-time="411.98338238904853"/> - <timepoint timepoint-id="TLI_185" absolute-time="413.99837304816214"/> - <timepoint timepoint-id="TLI_186" absolute-time="416.7673602119763"/> - <timepoint timepoint-id="TLI_187" absolute-time="419.61434701420774"/> - <timepoint timepoint-id="TLI_188" absolute-time="422.3833341780219"/> - <timepoint timepoint-id="TLI_189" absolute-time="425.45428655112926"/> - <timepoint timepoint-id="TLI_190" absolute-time="428.28530681826436"/> - <timepoint timepoint-id="TLI_191" absolute-time="430.9242945847164"/> - <timepoint timepoint-id="TLI_192" absolute-time="434.4933161776338"/> - <timepoint timepoint-id="TLI_193" absolute-time="435.4682993197279"/> - <timepoint timepoint-id="TLI_194" absolute-time="438.49228019387397"/> - <timepoint timepoint-id="TLI_195" absolute-time="439.01830419107733"/> - <timepoint timepoint-id="TLI_196" absolute-time="441.2932981646871"/> - <timepoint timepoint-id="TLI_197" absolute-time="443.10523811755155"/> - <timepoint timepoint-id="TLI_198" absolute-time="445.39322751112576"/> - <timepoint timepoint-id="TLI_199" absolute-time="448.50021310808154"/> - <timepoint timepoint-id="TLI_200" absolute-time="451.0092014771713"/> - <timepoint timepoint-id="TLI_201" absolute-time="453.1021917747023"/> - <timepoint timepoint-id="TLI_202" absolute-time="456.0661780345597"/> - <timepoint timepoint-id="TLI_203" absolute-time="458.7441656202204"/> - <timepoint timepoint-id="TLI_204" absolute-time="460.6432957352532"/> - <timepoint timepoint-id="TLI_205" absolute-time="461.34329388097916"/> - <timepoint timepoint-id="TLI_206" absolute-time="464.99328421226517"/> - <timepoint timepoint-id="TLI_207" absolute-time="465.6932823579912"/> - <timepoint timepoint-id="TLI_208" absolute-time="469.0791177105128"/> - <timepoint timepoint-id="TLI_209" absolute-time="471.3183162855713"/> - <timepoint timepoint-id="TLI_210" absolute-time="471.99204496963443"/> - <timepoint timepoint-id="TLI_211" absolute-time="473.4210975824092"/> - <timepoint timepoint-id="TLI_212" absolute-time="478.1530756463921"/> - <timepoint timepoint-id="TLI_213" absolute-time="481.2470613036116"/> - <timepoint timepoint-id="TLI_214" absolute-time="483.5932837695534"/> - <timepoint timepoint-id="TLI_215" absolute-time="484.76828065702216"/> - <timepoint timepoint-id="TLI_216" absolute-time="487.9160303882909"/> - <timepoint timepoint-id="TLI_217" absolute-time="490.8670167084121"/> - <timepoint timepoint-id="TLI_218" absolute-time="491.75101261047485"/> - <timepoint timepoint-id="TLI_219" absolute-time="494.5933034589586"/> - <timepoint timepoint-id="TLI_220" absolute-time="499.01697338141565"/> - <timepoint timepoint-id="TLI_221" absolute-time="499.50447209004625"/> - <timepoint timepoint-id="TLI_222" absolute-time="501.066967951042"/> - <timepoint timepoint-id="TLI_223" absolute-time="501.391967090129"/> - <timepoint timepoint-id="TLI_224" absolute-time="503.06696265311643"/> - <timepoint timepoint-id="TLI_225" absolute-time="504.9419576863113"/> - <timepoint timepoint-id="TLI_226" absolute-time="505.99195490490035"/> - <timepoint timepoint-id="TLI_227" absolute-time="506.56832056562513"/> - <timepoint timepoint-id="TLI_228" absolute-time="509.34331321475344"/> - <timepoint timepoint-id="TLI_229" absolute-time="510.8419420574309"/> - <timepoint timepoint-id="TLI_230" absolute-time="512.1419386137794"/> - <timepoint timepoint-id="TLI_231" absolute-time="512.3419380839869"/> - <timepoint timepoint-id="TLI_232" absolute-time="513.0419362297127"/> - <timepoint timepoint-id="TLI_233" absolute-time="513.1919358323685"/> - <timepoint timepoint-id="TLI_234" absolute-time="514.04193358075"/> - <timepoint timepoint-id="TLI_235" absolute-time="516.7932934799809"/> - <timepoint timepoint-id="TLI_236" absolute-time="519.0898858757389"/> - <timepoint timepoint-id="TLI_237" absolute-time="520.468299319728"/> - <timepoint timepoint-id="TLI_238" absolute-time="523.4919085480519"/> - <timepoint timepoint-id="TLI_239" absolute-time="526.0669017269728"/> - <timepoint timepoint-id="TLI_240" absolute-time="531.2183040966885"/> - <timepoint timepoint-id="TLI_241" absolute-time="534.0668805352706"/> - <timepoint timepoint-id="TLI_242" absolute-time="536.3418745088803"/> - <timepoint timepoint-id="TLI_243" absolute-time="538.0047981919341"/> - <timepoint timepoint-id="TLI_244" absolute-time="540.2168642441496"/> - <timepoint timepoint-id="TLI_245" absolute-time="544.4682993197279"/> - <timepoint timepoint-id="TLI_246" absolute-time="547.1183108061763"/> - <timepoint timepoint-id="TLI_247" absolute-time="547.7418443107049"/> - <timepoint timepoint-id="TLI_248" absolute-time="548.0418435160159"/> - <timepoint timepoint-id="TLI_249" absolute-time="548.3418427213271"/> - <timepoint timepoint-id="TLI_250" absolute-time="549.3668400061403"/> - <timepoint timepoint-id="TLI_251" absolute-time="549.6668392114515"/> - <timepoint timepoint-id="TLI_252" absolute-time="550.1168380194182"/> - <timepoint timepoint-id="TLI_253" absolute-time="550.4168372247293"/> - <timepoint timepoint-id="TLI_254" absolute-time="550.9908355691277"/> - <timepoint timepoint-id="TLI_255" absolute-time="552.1168327214928"/> - <timepoint timepoint-id="TLI_256" absolute-time="552.3668320592519"/> - <timepoint timepoint-id="TLI_257" absolute-time="553.6668286156004"/> - <timepoint timepoint-id="TLI_258" absolute-time="555.9432874290798"/> - <timepoint timepoint-id="TLI_259" absolute-time="558.3182811377932"/> - <timepoint timepoint-id="TLI_260" absolute-time="559.1182790186231"/> - <timepoint timepoint-id="TLI_261" absolute-time="560.7026929713687"/> - <timepoint timepoint-id="TLI_262" absolute-time="562.1716861615612"/> - <timepoint timepoint-id="TLI_263" absolute-time="563.6926791106985"/> - <timepoint timepoint-id="TLI_264" absolute-time="564.6416747114424"/> - <timepoint timepoint-id="TLI_265" absolute-time="566.6436654308197"/> - <timepoint timepoint-id="TLI_266" absolute-time="567.8183048006426"/> - <timepoint timepoint-id="TLI_267" absolute-time="568.4433031450409"/> - <timepoint timepoint-id="TLI_268" absolute-time="571.968293807447"/> - <timepoint timepoint-id="TLI_269" absolute-time="572.6417783515319"/> - <timepoint timepoint-id="TLI_270" absolute-time="573.7917753052247"/> - <timepoint timepoint-id="TLI_271" absolute-time="576.5682816222185"/> - <timepoint timepoint-id="TLI_272" absolute-time="578.8432755958281"/> - <timepoint timepoint-id="TLI_273" absolute-time="579.0917612657221"/> - <timepoint timepoint-id="TLI_274" absolute-time="580.216758285639"/> - <timepoint timepoint-id="TLI_275" absolute-time="583.0683132319562"/> - <timepoint timepoint-id="TLI_276" absolute-time="585.9183056824122"/> - <timepoint timepoint-id="TLI_277" absolute-time="586.0917427229828"/> - <timepoint timepoint-id="TLI_278" absolute-time="587.1917398091236"/> - <timepoint timepoint-id="TLI_279" absolute-time="588.6932983315405"/> - <timepoint timepoint-id="TLI_280" absolute-time="590.5115547865138"/> - <timepoint timepoint-id="TLI_281" absolute-time="592.3432886628264"/> - <timepoint timepoint-id="TLI_282" absolute-time="593.591722855762"/> - <timepoint timepoint-id="TLI_283" absolute-time="595.4417179551808"/> - <timepoint timepoint-id="TLI_284" absolute-time="597.8182741597553"/> - <timepoint timepoint-id="TLI_285" absolute-time="599.9183174249291"/> - <timepoint timepoint-id="TLI_286" absolute-time="600.3417049752634"/> - <timepoint timepoint-id="TLI_287" absolute-time="602.0417004720266"/> - <timepoint timepoint-id="TLI_288" absolute-time="604.1933061006133"/> - <timepoint timepoint-id="TLI_289" absolute-time="606.6932994782064"/> - <timepoint timepoint-id="TLI_290" absolute-time="606.8666876907813"/> - <timepoint timepoint-id="TLI_291" absolute-time="607.7916852404907"/> - <timepoint timepoint-id="TLI_292" absolute-time="609.9682908028534"/> - <timepoint timepoint-id="TLI_293" absolute-time="611.7182861671686"/> - <timepoint timepoint-id="TLI_294" absolute-time="612.041673982399"/> - <timepoint timepoint-id="TLI_295" absolute-time="613.3666704725233"/> - <timepoint timepoint-id="TLI_296" absolute-time="615.2682767633507"/> - <timepoint timepoint-id="TLI_297" absolute-time="617.1906837803276"/> - <timepoint timepoint-id="TLI_298" absolute-time="618.2666574926058"/> - <timepoint timepoint-id="TLI_299" absolute-time="620.0433129425492"/> - <timepoint timepoint-id="TLI_300" absolute-time="622.4524067183986"/> - <timepoint timepoint-id="TLI_301" absolute-time="625.4943926166733"/> - <timepoint timepoint-id="TLI_302" absolute-time="628.3432909561582"/> - <timepoint timepoint-id="TLI_303" absolute-time="628.6416300096171"/> - <timepoint timepoint-id="TLI_304" absolute-time="631.2666230560899"/> - <timepoint timepoint-id="TLI_305" absolute-time="633.4682993197279"/> - <timepoint timepoint-id="TLI_306" absolute-time="636.0183194533646"/> - <timepoint timepoint-id="TLI_307" absolute-time="636.266609811276"/> - <timepoint timepoint-id="TLI_308" absolute-time="637.9916052418153"/> - <timepoint timepoint-id="TLI_309" absolute-time="639.9183091224098"/> - <timepoint timepoint-id="TLI_310" absolute-time="642.1673266023304"/> - <timepoint timepoint-id="TLI_311" absolute-time="642.4923257414176"/> - <timepoint timepoint-id="TLI_312" absolute-time="643.6182993212476"/> - <timepoint timepoint-id="TLI_313" absolute-time="645.7682936259775"/> - <timepoint timepoint-id="TLI_314" absolute-time="647.5552903490333"/> - <timepoint timepoint-id="TLI_315" absolute-time="649.0682848844006"/> - <timepoint timepoint-id="TLI_316" absolute-time="652.8415659047181"/> - <timepoint timepoint-id="TLI_317" absolute-time="654.9415603418963"/> - <timepoint timepoint-id="TLI_318" absolute-time="657.4682993197279"/> - <timepoint timepoint-id="TLI_319" absolute-time="659.4682993197279"/> - <timepoint timepoint-id="TLI_320" absolute-time="659.6165479579953"/> - <timepoint timepoint-id="TLI_321" absolute-time="660.6165453090325"/> - <timepoint timepoint-id="TLI_322" absolute-time="662.5682979513989"/> - <timepoint timepoint-id="TLI_323" absolute-time="664.3642124279617"/> - <timepoint timepoint-id="TLI_324" absolute-time="665.9432890111495"/> - <timepoint timepoint-id="TLI_325" absolute-time="666.7665290179117"/> - <timepoint timepoint-id="TLI_326" absolute-time="667.7665263689489"/> - <timepoint timepoint-id="TLI_327" absolute-time="670.2182776868337"/> - <timepoint timepoint-id="TLI_328" absolute-time="672.2320907116789"/> - <timepoint timepoint-id="TLI_329" absolute-time="672.9674891542556"/> - <timepoint timepoint-id="TLI_330" absolute-time="673.891510144052"/> - <timepoint timepoint-id="TLI_331" absolute-time="676.4682993197279"/> - <timepoint timepoint-id="TLI_332" absolute-time="678.4682993197279"/> - <timepoint timepoint-id="TLI_333" absolute-time="678.6414975614789"/> - <timepoint timepoint-id="TLI_334" absolute-time="679.5664951111881"/> - <timepoint timepoint-id="TLI_335" absolute-time="681.8881311923818"/> - <timepoint timepoint-id="TLI_336" absolute-time="684.3971195614716"/> - <timepoint timepoint-id="TLI_337" absolute-time="687.2701062431755"/> - <timepoint timepoint-id="TLI_338" absolute-time="689.7270948533206"/> - <timepoint timepoint-id="TLI_339" absolute-time="692.8600803297488"/> - <timepoint timepoint-id="TLI_340" absolute-time="695.9540659869684"/> - <timepoint timepoint-id="TLI_341" absolute-time="698.4630543560583"/> - <timepoint timepoint-id="TLI_342" absolute-time="699.689382004508"/> - <timepoint timepoint-id="TLI_343" absolute-time="700.8680432072583"/> - <timepoint timepoint-id="TLI_344" absolute-time="702.1420373014076"/> - <timepoint timepoint-id="TLI_345" absolute-time="703.838529436984"/> - <timepoint timepoint-id="TLI_346" absolute-time="704.8330248268045"/> - <timepoint timepoint-id="TLI_347" absolute-time="706.3410178362057"/> - <timepoint timepoint-id="TLI_348" absolute-time="707.1600140395874"/> - <timepoint timepoint-id="TLI_349" absolute-time="708.0830097608588"/> - <timepoint timepoint-id="TLI_350" absolute-time="709.5520029510512"/> - <timepoint timepoint-id="TLI_351" absolute-time="710.7479974067832"/> - <timepoint timepoint-id="TLI_352" absolute-time="711.8932603903737"/> - <timepoint timepoint-id="TLI_353" absolute-time="712.9839870414124"/> - <timepoint timepoint-id="TLI_354" absolute-time="714.3537139777944"/> - <timepoint timepoint-id="TLI_355" absolute-time="716.2209720357304"/> - <timepoint timepoint-id="TLI_356" absolute-time="718.4172993197278"/> - <timepoint timepoint-id="TLI_357" absolute-time="718.7839416538685"/> - <timepoint timepoint-id="TLI_358" absolute-time="721.0957304801879"/> - <timepoint timepoint-id="TLI_359" absolute-time="723.7016336752315"/> - <timepoint timepoint-id="TLI_360" absolute-time="726.2349463173365"/> - <timepoint timepoint-id="TLI_361" absolute-time="727.2623467800488"/> - <timepoint timepoint-id="TLI_362" absolute-time="728.6623353454227"/> - <timepoint timepoint-id="TLI_363" absolute-time="731.2683036441011"/> - <timepoint timepoint-id="TLI_364" absolute-time="733.7016171029651"/> - <timepoint timepoint-id="TLI_365" absolute-time="734.2622896069179"/> - <timepoint timepoint-id="TLI_366" absolute-time="735.1446153171671"/> - <timepoint timepoint-id="TLI_367" absolute-time="736.5956038825409"/> - <timepoint timepoint-id="TLI_368" absolute-time="739.4016356513364"/> - <timepoint timepoint-id="TLI_369" absolute-time="741.9016152323611"/> - <timepoint timepoint-id="TLI_370" absolute-time="742.2955573272773"/> - <timepoint timepoint-id="TLI_371" absolute-time="743.3288822207676"/> - <timepoint timepoint-id="TLI_372" absolute-time="745.0016550164667"/> - <timepoint timepoint-id="TLI_373" absolute-time="747.3688276437059"/> - <timepoint timepoint-id="TLI_374" absolute-time="750.4746228784879"/> - <timepoint timepoint-id="TLI_375" absolute-time="754.0016466117905"/> - <timepoint timepoint-id="TLI_376" absolute-time="754.195460132955"/> - <timepoint timepoint-id="TLI_377" absolute-time="756.1954437977746"/> - <timepoint timepoint-id="TLI_378" absolute-time="758.4682993197279"/> - <timepoint timepoint-id="TLI_379" absolute-time="760.4284464724095"/> - <timepoint timepoint-id="TLI_380" absolute-time="761.3571783595758"/> - <timepoint timepoint-id="TLI_381" absolute-time="763.2682879238208"/> - <timepoint timepoint-id="TLI_382" absolute-time="766.6238407633667"/> - <timepoint timepoint-id="TLI_383" absolute-time="767.1121216181486"/> - <timepoint timepoint-id="TLI_384" absolute-time="768.9676756718051"/> - <timepoint timepoint-id="TLI_385" absolute-time="771.4682993197279"/> - <timepoint timepoint-id="TLI_386" absolute-time="773.6287059108638"/> - <timepoint timepoint-id="TLI_387" absolute-time="775.4616974136703"/> - <timepoint timepoint-id="TLI_388" absolute-time="776.6672598250482"/> - <timepoint timepoint-id="TLI_389" absolute-time="778.7116823477246"/> - <timepoint timepoint-id="TLI_390" absolute-time="780.8436724644642"/> - <timepoint timepoint-id="TLI_391" absolute-time="782.0136670407238"/> - <timepoint timepoint-id="TLI_392" absolute-time="784.9516534211087"/> - <timepoint timepoint-id="TLI_393" absolute-time="787.7076406451866"/> - <timepoint timepoint-id="TLI_394" absolute-time="790.2426288937488"/> - <timepoint timepoint-id="TLI_395" absolute-time="791.7636218428862"/> - <timepoint timepoint-id="TLI_396" absolute-time="794.2726102119761"/> - <timepoint timepoint-id="TLI_397" absolute-time="796.4682993197279"/> - <timepoint timepoint-id="TLI_398" absolute-time="796.6779524646015"/> - <timepoint timepoint-id="TLI_399" absolute-time="797.7039509537797"/> - <timepoint timepoint-id="TLI_400" absolute-time="800.4028981409589"/> - <timepoint timepoint-id="TLI_401" absolute-time="802.6683174556807"/> - <timepoint timepoint-id="TLI_402" absolute-time="804.8155613380479"/> - <timepoint timepoint-id="TLI_403" absolute-time="806.2183080518628"/> - <timepoint timepoint-id="TLI_404" absolute-time="806.6911583617965"/> - <timepoint timepoint-id="TLI_405" absolute-time="807.5161561764023"/> - <timepoint timepoint-id="TLI_406" absolute-time="809.4932993765098"/> - <timepoint timepoint-id="TLI_407" absolute-time="812.6423144723639"/> - <timepoint timepoint-id="TLI_408" absolute-time="813.768288052194"/> - <timepoint timepoint-id="TLI_409" absolute-time="815.0182847409905"/> - <timepoint timepoint-id="TLI_410" absolute-time="818.5682753371725"/> - <timepoint timepoint-id="TLI_411" absolute-time="820.291122335903"/> - <timepoint timepoint-id="TLI_412" absolute-time="821.0661202829568"/> - <timepoint timepoint-id="TLI_413" absolute-time="822.3911167730811"/> - <timepoint timepoint-id="TLI_414" absolute-time="825.0432581851387"/> - <timepoint timepoint-id="TLI_415" absolute-time="827.3432520925244"/> - <timepoint timepoint-id="TLI_416" absolute-time="827.541103130923"/> - <timepoint timepoint-id="TLI_417" absolute-time="828.3411010117528"/> - <timepoint timepoint-id="TLI_418" absolute-time="831.3933390202164"/> - <timepoint timepoint-id="TLI_419" absolute-time="832.7654317709141"/> - <timepoint timepoint-id="TLI_420" absolute-time="834.1552792183886"/> - <timepoint timepoint-id="TLI_421" absolute-time="834.8312760846719"/> - <timepoint timepoint-id="TLI_422" absolute-time="834.5984232737206"/> - <timepoint timepoint-id="TLI_423" absolute-time="835.5734187539368"/> - <timepoint timepoint-id="TLI_424" absolute-time="837.8874080269836"/> - <timepoint timepoint-id="TLI_425" absolute-time="839.0660726016271"/> - <timepoint timepoint-id="TLI_426" absolute-time="840.591068561959"/> - <timepoint timepoint-id="TLI_427" absolute-time="841.3160666414609"/> - <timepoint timepoint-id="TLI_428" absolute-time="843.8410599528298"/> - <timepoint timepoint-id="TLI_429" absolute-time="846.3432994182232"/> - <timepoint timepoint-id="TLI_430" absolute-time="848.2932942527458"/> - <timepoint timepoint-id="TLI_431" absolute-time="849.9410437941569"/> - <timepoint timepoint-id="TLI_432" absolute-time="850.7910415425387"/> - <timepoint timepoint-id="TLI_433" absolute-time="852.8682821337411"/> - <timepoint timepoint-id="TLI_434" absolute-time="854.5923010043672"/> - <timepoint timepoint-id="TLI_435" absolute-time="855.042276239799"/> - <timepoint timepoint-id="TLI_436" absolute-time="856.2432731934917"/> - <timepoint timepoint-id="TLI_437" absolute-time="858.8432663061886"/> - <timepoint timepoint-id="TLI_438" absolute-time="860.9682606771427"/> - <timepoint timepoint-id="TLI_439" absolute-time="862.6660100861058"/> - <timepoint timepoint-id="TLI_440" absolute-time="864.1160062451099"/> - <timepoint timepoint-id="TLI_441" absolute-time="866.6433433002703"/> - <timepoint timepoint-id="TLI_442" absolute-time="869.1933365454153"/> - <timepoint timepoint-id="TLI_443" absolute-time="870.1409902851093"/> - <timepoint timepoint-id="TLI_444" absolute-time="871.4159869076816"/> - <timepoint timepoint-id="TLI_445" absolute-time="874.1183234992737"/> - <timepoint timepoint-id="TLI_446" absolute-time="876.2923411778664"/> - <timepoint timepoint-id="TLI_447" absolute-time="877.3433149563688"/> - <timepoint timepoint-id="TLI_448" absolute-time="879.7183086650822"/> - <timepoint timepoint-id="TLI_449" absolute-time="882.6202006593056"/> - <timepoint timepoint-id="TLI_450" absolute-time="885.4182935659945"/> - <timepoint timepoint-id="TLI_451" absolute-time="885.765948895066"/> - <timepoint timepoint-id="TLI_452" absolute-time="887.0401801696194"/> - <timepoint timepoint-id="TLI_453" absolute-time="889.9659377694223"/> - <timepoint timepoint-id="TLI_454" absolute-time="890.4682993197279"/> - <timepoint timepoint-id="TLI_455" absolute-time="893.6526549524397"/> - <timepoint timepoint-id="TLI_456" absolute-time="896.0409216769735"/> - <timepoint timepoint-id="TLI_457" absolute-time="896.418264427404"/> - <timepoint timepoint-id="TLI_458" absolute-time="899.4811224971787"/> - <timepoint timepoint-id="TLI_459" absolute-time="901.8991112881151"/> - <timepoint timepoint-id="TLI_460" absolute-time="904.9408981012049"/> - <timepoint timepoint-id="TLI_461" absolute-time="905.2433387062989"/> - <timepoint timepoint-id="TLI_462" absolute-time="907.2940862786452"/> - <timepoint timepoint-id="TLI_463" absolute-time="908.9060788059361"/> - <timepoint timepoint-id="TLI_464" absolute-time="910.9600692842583"/> - <timepoint timepoint-id="TLI_465" absolute-time="912.143063800254"/> - <timepoint timepoint-id="TLI_466" absolute-time="913.6183165212358"/> - <timepoint timepoint-id="TLI_467" absolute-time="914.3683145345137"/> - <timepoint timepoint-id="TLI_468" absolute-time="915.1460498793201"/> - <timepoint timepoint-id="TLI_469" absolute-time="917.7683055280403"/> - <timepoint timepoint-id="TLI_470" absolute-time="918.4682993197279"/> - <timepoint timepoint-id="TLI_471" absolute-time="921.4682993197279"/> - <timepoint timepoint-id="TLI_472" absolute-time="922.7182924156747"/> - <timepoint timepoint-id="TLI_473" absolute-time="924.3890070317702"/> - <timepoint timepoint-id="TLI_474" absolute-time="926.5079972087736"/> - <timepoint timepoint-id="TLI_475" absolute-time="929.2432751311925"/> - <timepoint timepoint-id="TLI_476" absolute-time="929.6182741378316"/> - <timepoint timepoint-id="TLI_477" absolute-time="932.6682660584951"/> - <timepoint timepoint-id="TLI_478" absolute-time="933.043265065134"/> - <timepoint timepoint-id="TLI_479" absolute-time="936.2158152548944"/> - <timepoint timepoint-id="TLI_480" absolute-time="936.8908134668446"/> - <timepoint timepoint-id="TLI_481" absolute-time="937.5908116125705"/> - <timepoint timepoint-id="TLI_482" absolute-time="939.6933451055229"/> - <timepoint timepoint-id="TLI_483" absolute-time="940.9769301351829"/> - <timepoint timepoint-id="TLI_484" absolute-time="943.9433338474312"/> - <timepoint timepoint-id="TLI_485" absolute-time="944.4183325891739"/> - <timepoint timepoint-id="TLI_486" absolute-time="947.531159164819"/> - <timepoint timepoint-id="TLI_487" absolute-time="949.8657790965527"/> - <timepoint timepoint-id="TLI_488" absolute-time="950.5683162980529"/> - <timepoint timepoint-id="TLI_489" absolute-time="953.7168710766754"/> - <timepoint timepoint-id="TLI_490" absolute-time="956.147859807348"/> - <timepoint timepoint-id="TLI_491" absolute-time="959.1932934507491"/> - <timepoint timepoint-id="TLI_492" absolute-time="959.540753467838"/> - <timepoint timepoint-id="TLI_493" absolute-time="961.6078344965589"/> - <timepoint timepoint-id="TLI_494" absolute-time="963.2068270841137"/> - <timepoint timepoint-id="TLI_495" absolute-time="965.2478176226997"/> - <timepoint timepoint-id="TLI_496" absolute-time="966.4568120181679"/> - <timepoint timepoint-id="TLI_497" absolute-time="967.9432702723249"/> - <timepoint timepoint-id="TLI_498" absolute-time="968.7432681531546"/> - <timepoint timepoint-id="TLI_499" absolute-time="972.1432591466812"/> - <timepoint timepoint-id="TLI_500" absolute-time="972.8657181704091"/> - <timepoint timepoint-id="TLI_501" absolute-time="975.8183470677344"/> - <timepoint timepoint-id="TLI_502" absolute-time="976.4682993197279"/> - <timepoint timepoint-id="TLI_503" absolute-time="978.1697577204992"/> - <timepoint timepoint-id="TLI_504" absolute-time="980.2757479577663"/> - <timepoint timepoint-id="TLI_505" absolute-time="983.0683278627544"/> - <timepoint timepoint-id="TLI_506" absolute-time="983.4433268693933"/> - <timepoint timepoint-id="TLI_507" absolute-time="986.4183189887291"/> - <timepoint timepoint-id="TLI_508" absolute-time="986.7406814160507"/> - <timepoint timepoint-id="TLI_509" absolute-time="989.6923101809278"/> - <timepoint timepoint-id="TLI_510" absolute-time="990.3183086577743"/> - <timepoint timepoint-id="TLI_511" absolute-time="991.7183049492264"/> - <timepoint timepoint-id="TLI_512" absolute-time="993.691685765542"/> - <timepoint timepoint-id="TLI_513" absolute-time="995.818294088479"/> - <timepoint timepoint-id="TLI_514" absolute-time="996.2932928302217"/> - <timepoint timepoint-id="TLI_515" absolute-time="997.6696673248244"/> - <timepoint timepoint-id="TLI_516" absolute-time="999.9182832277318"/> - <timepoint timepoint-id="TLI_517" absolute-time="1000.4682993197279"/> - <timepoint timepoint-id="TLI_518" absolute-time="1003.2336415319252"/> - <timepoint timepoint-id="TLI_519" absolute-time="1004.780634360535"/> - <timepoint timepoint-id="TLI_520" absolute-time="1007.042287793959"/> - <timepoint timepoint-id="TLI_521" absolute-time="1007.4932631618387"/> - <timepoint timepoint-id="TLI_522" absolute-time="1007.7692625658223"/> - <timepoint timepoint-id="TLI_523" absolute-time="1008.2373697593724"/> - <timepoint timepoint-id="TLI_524" absolute-time="1008.5343142551429"/> - <timepoint timepoint-id="TLI_525" absolute-time="1013.0423695561735"/> - <timepoint timepoint-id="TLI_526" absolute-time="1013.6906100265041"/> - <timepoint timepoint-id="TLI_527" absolute-time="1015.5450652452579"/> - <timepoint timepoint-id="TLI_528" absolute-time="1016.011763227739"/> - <timepoint timepoint-id="TLI_529" absolute-time="1018.2747455144173"/> - <timepoint timepoint-id="TLI_530" absolute-time="1019.3022818550045"/> - <timepoint timepoint-id="TLI_531" absolute-time="1022.5933208184922"/> - <timepoint timepoint-id="TLI_532" absolute-time="1023.043319626459"/> - <timepoint timepoint-id="TLI_533" absolute-time="1022.5784686240823"/> - <timepoint timepoint-id="TLI_534" absolute-time="1024.2252180330454"/> - <timepoint timepoint-id="TLI_535" absolute-time="1026.3865342021272"/> - <timepoint timepoint-id="TLI_536" absolute-time="1028.7183045935953"/> - <timepoint timepoint-id="TLI_537" absolute-time="1029.843301613512"/> - <timepoint timepoint-id="TLI_538" absolute-time="1032.2625069628973"/> - <timepoint timepoint-id="TLI_539" absolute-time="1034.58949617568"/> - <timepoint timepoint-id="TLI_540" absolute-time="1036.3461778542262"/> - <timepoint timepoint-id="TLI_541" absolute-time="1038.1384797236672"/> - <timepoint timepoint-id="TLI_542" absolute-time="1040.6604680324933"/> - <timepoint timepoint-id="TLI_543" absolute-time="1043.5854544731421"/> - <timepoint timepoint-id="TLI_544" absolute-time="1046.458441154846"/> - <timepoint timepoint-id="TLI_545" absolute-time="1048.2914326576529"/> - <timepoint timepoint-id="TLI_546" absolute-time="1050.2154237386128"/> - <timepoint timepoint-id="TLI_547" absolute-time="1053.582408130293"/> - <timepoint timepoint-id="TLI_548" absolute-time="1055.643330926264"/> - <timepoint timepoint-id="TLI_549" absolute-time="1056.0904977104829"/> - <timepoint timepoint-id="TLI_550" absolute-time="1058.8654903596114"/> - <timepoint timepoint-id="TLI_551" absolute-time="1062.4682993197277"/> - <timepoint timepoint-id="TLI_552" absolute-time="1064.4682993197277"/> - <timepoint timepoint-id="TLI_553" absolute-time="1065.9654715519757"/> - <timepoint timepoint-id="TLI_554" absolute-time="1069.6763335237295"/> - <timepoint timepoint-id="TLI_555" absolute-time="1071.5154568502323"/> - <timepoint timepoint-id="TLI_556" absolute-time="1072.1904550621823"/> - <timepoint timepoint-id="TLI_557" absolute-time="1074.8154481086551"/> - <timepoint timepoint-id="TLI_558" absolute-time="1076.4904436716424"/> - <timepoint timepoint-id="TLI_559" absolute-time="1079.4404358572024"/> - <timepoint timepoint-id="TLI_560" absolute-time="1080.1404340029285"/> - <timepoint timepoint-id="TLI_561" absolute-time="1081.5154303606046"/> - <timepoint timepoint-id="TLI_562" absolute-time="1081.9404292347954"/> - <timepoint timepoint-id="TLI_563" absolute-time="1083.240425791144"/> - <timepoint timepoint-id="TLI_564" absolute-time="1084.9404212879072"/> - <timepoint timepoint-id="TLI_565" absolute-time="1086.3154176455835"/> - <timepoint timepoint-id="TLI_566" absolute-time="1087.1904153277408"/> - <timepoint timepoint-id="TLI_567" absolute-time="1088.8654108907283"/> - <timepoint timepoint-id="TLI_568" absolute-time="1089.7404085728858"/> - <timepoint timepoint-id="TLI_569" absolute-time="1090.9154054603546"/> - <timepoint timepoint-id="TLI_570" absolute-time="1094.7933248753632"/> - <timepoint timepoint-id="TLI_571" absolute-time="1096.322907979507"/> - <timepoint timepoint-id="TLI_572" absolute-time="1098.6456082487625"/> - <timepoint timepoint-id="TLI_573" absolute-time="1099.277196303095"/> - <timepoint timepoint-id="TLI_574" absolute-time="1100.9683085180181"/> - <timepoint timepoint-id="TLI_575" absolute-time="1102.8903737390256"/> - <timepoint timepoint-id="TLI_576" absolute-time="1105.5691671354239"/> - <timepoint timepoint-id="TLI_577" absolute-time="1107.4403616862448"/> - <timepoint timepoint-id="TLI_578" absolute-time="1109.215356984336"/> - <timepoint timepoint-id="TLI_579" absolute-time="1109.5153561896473"/> - <timepoint timepoint-id="TLI_580" absolute-time="1110.0682844124572"/> - <timepoint timepoint-id="TLI_581" absolute-time="1110.7041433312297"/> - <timepoint timepoint-id="TLI_582" absolute-time="1111.757138449863"/> - <timepoint timepoint-id="TLI_583" absolute-time="1113.655129651351"/> - <timepoint timepoint-id="TLI_584" absolute-time="1115.442293614369"/> - <timepoint timepoint-id="TLI_585" absolute-time="1117.590334799273"/> - <timepoint timepoint-id="TLI_586" absolute-time="1117.9903337396877"/> - <timepoint timepoint-id="TLI_587" absolute-time="1118.615332084086"/> - <timepoint timepoint-id="TLI_588" absolute-time="1119.893258386398"/> - <timepoint timepoint-id="TLI_589" absolute-time="1121.039095421522"/> - <timepoint timepoint-id="TLI_590" absolute-time="1123.6390833687651"/> - <timepoint timepoint-id="TLI_591" absolute-time="1125.2250760165837"/> - <timepoint timepoint-id="TLI_592" absolute-time="1127.4454657235294"/> - <timepoint timepoint-id="TLI_593" absolute-time="1129.9830539600391"/> - <timepoint timepoint-id="TLI_594" absolute-time="1132.6220417264913"/> - <timepoint timepoint-id="TLI_595" absolute-time="1133.6750368451249"/> - <timepoint timepoint-id="TLI_596" absolute-time="1136.7183114735906"/> - <timepoint timepoint-id="TLI_597" absolute-time="1138.0091604230213"/> - <timepoint timepoint-id="TLI_598" absolute-time="1138.0678703716653"/> - <timepoint timepoint-id="TLI_599" absolute-time="1138.4708685034882"/> - <timepoint timepoint-id="TLI_600" absolute-time="1138.7568671776849"/> - <timepoint timepoint-id="TLI_601" absolute-time="1139.4210102085324"/> - <timepoint timepoint-id="TLI_602" absolute-time="1141.8682978314325"/> - <timepoint timepoint-id="TLI_603" absolute-time="1142.6902683103076"/> - <timepoint timepoint-id="TLI_604" absolute-time="1143.190266985826"/> - <timepoint timepoint-id="TLI_605" absolute-time="1145.618287897822"/> - <timepoint timepoint-id="TLI_606" absolute-time="1147.4182831296891"/> - <timepoint timepoint-id="TLI_607" absolute-time="1147.6402551979415"/> - <timepoint timepoint-id="TLI_608" absolute-time="1148.690252416531"/> - <timepoint timepoint-id="TLI_609" absolute-time="1149.99327630861"/> - <timepoint timepoint-id="TLI_610" absolute-time="1151.7449530784663"/> - <timepoint timepoint-id="TLI_611" absolute-time="1153.543266904792"/> - <timepoint timepoint-id="TLI_612" absolute-time="1153.8652387081486"/> - <timepoint timepoint-id="TLI_613" absolute-time="1155.0652355293932"/> - <timepoint timepoint-id="TLI_614" absolute-time="1157.0682575671983"/> - <timepoint timepoint-id="TLI_615" absolute-time="1158.9079198731215"/> - <timepoint timepoint-id="TLI_616" absolute-time="1160.727911436192"/> - <timepoint timepoint-id="TLI_617" absolute-time="1163.3278993834354"/> - <timepoint timepoint-id="TLI_618" absolute-time="1165.2433335679193"/> - <timepoint timepoint-id="TLI_619" absolute-time="1165.5402077815083"/> - <timepoint timepoint-id="TLI_620" absolute-time="1167.6652021524621"/> - <timepoint timepoint-id="TLI_621" absolute-time="1169.7433216475868"/> - <timepoint timepoint-id="TLI_622" absolute-time="1171.5433168794536"/> - <timepoint timepoint-id="TLI_623" absolute-time="1171.9401908281466"/> - <timepoint timepoint-id="TLI_624" absolute-time="1173.565186523582"/> - <timepoint timepoint-id="TLI_625" absolute-time="1175.4682993197277"/> - <timepoint timepoint-id="TLI_626" absolute-time="1176.8683027737268"/> - <timepoint timepoint-id="TLI_627" absolute-time="1177.0651772522124"/> - <timepoint timepoint-id="TLI_628" absolute-time="1178.8651724840793"/> - <timepoint timepoint-id="TLI_629" absolute-time="1180.5932929063406"/> - <timepoint timepoint-id="TLI_630" absolute-time="1182.3432882706559"/> - <timepoint timepoint-id="TLI_631" absolute-time="1182.5651626829172"/> - <timepoint timepoint-id="TLI_632" absolute-time="1183.665159769058"/> - <timepoint timepoint-id="TLI_633" absolute-time="1186.1432782045972"/> - <timepoint timepoint-id="TLI_634" absolute-time="1188.4682993197277"/> - <timepoint timepoint-id="TLI_635" absolute-time="1188.6151466566926"/> - <timepoint timepoint-id="TLI_636" absolute-time="1189.7151437428336"/> - <timepoint timepoint-id="TLI_637" absolute-time="1191.9432628406132"/> - <timepoint timepoint-id="TLI_638" absolute-time="1194.218256814223"/> - <timepoint timepoint-id="TLI_639" absolute-time="1194.3901313589324"/> - <timepoint timepoint-id="TLI_640" absolute-time="1195.4901284450734"/> - <timepoint timepoint-id="TLI_641" absolute-time="1198.1433440730355"/> - <timepoint timepoint-id="TLI_642" absolute-time="1199.7407305845786"/> - <timepoint timepoint-id="TLI_643" absolute-time="1202.7957164225895"/> - <timepoint timepoint-id="TLI_644" absolute-time="1204.1347102154198"/> - <timepoint timepoint-id="TLI_645" absolute-time="1205.343704610888"/> - <timepoint timepoint-id="TLI_646" absolute-time="1207.5503824604257"/> - <timepoint timepoint-id="TLI_647" absolute-time="1206.2242476418653"/> - <timepoint timepoint-id="TLI_648" absolute-time="1209.2436865317532"/> - <timepoint timepoint-id="TLI_649" absolute-time="1211.037678215351"/> - <timepoint timepoint-id="TLI_650" absolute-time="1213.1826682718267"/> - <timepoint timepoint-id="TLI_651" absolute-time="1214.3266629686136"/> - <timepoint timepoint-id="TLI_652" absolute-time="1216.8432945374318"/> - <timepoint timepoint-id="TLI_653" absolute-time="1217.1650710288054"/> - <timepoint timepoint-id="TLI_654" absolute-time="1217.5400700354444"/> - <timepoint timepoint-id="TLI_655" absolute-time="1218.5150674527058"/> - <timepoint timepoint-id="TLI_656" absolute-time="1219.9400636779337"/> - <timepoint timepoint-id="TLI_657" absolute-time="1222.068280696601"/> - <timepoint timepoint-id="TLI_658" absolute-time="1223.7256193978985"/> - <timepoint timepoint-id="TLI_659" absolute-time="1225.6182712927834"/> - <timepoint timepoint-id="TLI_660" absolute-time="1228.3150414928707"/> - <timepoint timepoint-id="TLI_661" absolute-time="1230.4150359300488"/> - <timepoint timepoint-id="TLI_662" absolute-time="1232.9432518891313"/> - <timepoint timepoint-id="TLI_663" absolute-time="1234.7173447107655"/> - <timepoint timepoint-id="TLI_664" absolute-time="1234.9923675548355"/> - <timepoint timepoint-id="TLI_665" absolute-time="1236.6683396777362"/> - <timepoint timepoint-id="TLI_666" absolute-time="1238.0900155992597"/> - <timepoint timepoint-id="TLI_667" absolute-time="1238.365014870795"/> - <timepoint timepoint-id="TLI_668" absolute-time="1239.7933313997275"/> - <timepoint timepoint-id="TLI_669" absolute-time="1242.5933239826318"/> - <timepoint timepoint-id="TLI_670" absolute-time="1243.390001559757"/> - <timepoint timepoint-id="TLI_671" absolute-time="1244.4149988445702"/> - <timepoint timepoint-id="TLI_672" absolute-time="1246.6683131881086"/> - <timepoint timepoint-id="TLI_673" absolute-time="1249.0235021245765"/> - <timepoint timepoint-id="TLI_674" absolute-time="1251.918299281054"/> - <timepoint timepoint-id="TLI_675" absolute-time="1254.5432923275266"/> - <timepoint timepoint-id="TLI_676" absolute-time="1256.4899668583446"/> - <timepoint timepoint-id="TLI_677" absolute-time="1257.2649648053987"/> - <timepoint timepoint-id="TLI_678" absolute-time="1259.5932789502647"/> - <timepoint timepoint-id="TLI_679" absolute-time="1262.4182714669448"/> - <timepoint timepoint-id="TLI_680" absolute-time="1267.0899387793395"/> - <timepoint timepoint-id="TLI_681" absolute-time="1268.5399349383435"/> - <timepoint timepoint-id="TLI_682" absolute-time="1271.218345812064"/> - <timepoint timepoint-id="TLI_683" absolute-time="1272.8523916610618"/> - <timepoint timepoint-id="TLI_684" absolute-time="1274.711383043341"/> - <timepoint timepoint-id="TLI_685" absolute-time="1277.3243709303206"/> - <timepoint timepoint-id="TLI_686" absolute-time="1279.2433245541379"/> - <timepoint timepoint-id="TLI_687" absolute-time="1280.1149042765994"/> - <timepoint timepoint-id="TLI_688" absolute-time="1280.5649030845661"/> - <timepoint timepoint-id="TLI_689" absolute-time="1282.789897190624"/> - <timepoint timepoint-id="TLI_690" absolute-time="1285.0933090577055"/> - <timepoint timepoint-id="TLI_691" absolute-time="1287.168303561108"/> - <timepoint timepoint-id="TLI_692" absolute-time="1291.0648752704572"/> - <timepoint timepoint-id="TLI_693" absolute-time="1292.3148719592537"/> - <timepoint timepoint-id="TLI_694" absolute-time="1295.6152861391777"/> - <timepoint timepoint-id="TLI_695" absolute-time="1297.2532785459407"/> - <timepoint timepoint-id="TLI_696" absolute-time="1299.060270169275"/> - <timepoint timepoint-id="TLI_697" absolute-time="1301.6732580562546"/> - <timepoint timepoint-id="TLI_698" absolute-time="1303.6182599856704"/> - <timepoint timepoint-id="TLI_699" absolute-time="1304.1648405690448"/> - <timepoint timepoint-id="TLI_700" absolute-time="1304.539839575684"/> - <timepoint timepoint-id="TLI_701" absolute-time="1306.7648336817417"/> - <timepoint timepoint-id="TLI_702" absolute-time="1308.9183436021588"/> - <timepoint timepoint-id="TLI_703" absolute-time="1310.7183388340259"/> - <timepoint timepoint-id="TLI_704" absolute-time="1311.2148218938573"/> - <timepoint timepoint-id="TLI_705" absolute-time="1312.2898190462224"/> - <timepoint timepoint-id="TLI_706" absolute-time="1314.5433287017433"/> - <timepoint timepoint-id="TLI_707" absolute-time="1316.2461905005537"/> - <timepoint timepoint-id="TLI_708" absolute-time="1318.0271822444151"/> - <timepoint timepoint-id="TLI_709" absolute-time="1320.6661700108673"/> - <timepoint timepoint-id="TLI_710" absolute-time="1322.568307443817"/> - <timepoint timepoint-id="TLI_711" absolute-time="1323.4933049935266"/> - <timepoint timepoint-id="TLI_712" absolute-time="1326.048145061661"/> - <timepoint timepoint-id="TLI_713" absolute-time="1327.7641371068416"/> - <timepoint timepoint-id="TLI_714" absolute-time="1328.7261326473217"/> - <timepoint timepoint-id="TLI_715" absolute-time="1330.7411233064354"/> - <timepoint timepoint-id="TLI_716" absolute-time="1331.8932827422393"/> - <timepoint timepoint-id="TLI_717" absolute-time="1332.6432807555173"/> - <timepoint timepoint-id="TLI_718" absolute-time="1335.642100586989"/> - <timepoint timepoint-id="TLI_719" absolute-time="1338.523402165555"/> - <timepoint timepoint-id="TLI_720" absolute-time="1341.143258239334"/> - <timepoint timepoint-id="TLI_721" absolute-time="1342.0397402395802"/> - <timepoint timepoint-id="TLI_722" absolute-time="1343.1647372594969"/> - <timepoint timepoint-id="TLI_723" absolute-time="1345.4183445710096"/> - <timepoint timepoint-id="TLI_724" absolute-time="1348.7683356969842"/> - <timepoint timepoint-id="TLI_725" absolute-time="1349.3397209021518"/> - <timepoint timepoint-id="TLI_726" absolute-time="1350.389718120741"/> - <timepoint timepoint-id="TLI_727" absolute-time="1352.9933245051163"/> - <timepoint timepoint-id="TLI_728" absolute-time="1355.1683187436224"/> - <timepoint timepoint-id="TLI_729" absolute-time="1355.3897048759272"/> - <timepoint timepoint-id="TLI_730" absolute-time="1356.589701697172"/> - <timepoint timepoint-id="TLI_731" absolute-time="1360.5433045054474"/> - <timepoint timepoint-id="TLI_732" absolute-time="1363.513971381438"/> - <timepoint timepoint-id="TLI_733" absolute-time="1366.9459554717992"/> - <timepoint timepoint-id="TLI_734" absolute-time="1369.8319420932391"/> - <timepoint timepoint-id="TLI_735" absolute-time="1372.4682993197277"/> - <timepoint timepoint-id="TLI_736" absolute-time="1373.8682692080188"/> - <timepoint timepoint-id="TLI_737" absolute-time="1375.7599146129542"/> - <timepoint timepoint-id="TLI_738" absolute-time="1376.83890961106"/> - <timepoint timepoint-id="TLI_739" absolute-time="1378.0479040065281"/> - <timepoint timepoint-id="TLI_740" absolute-time="1380.6682511950717"/> - <timepoint timepoint-id="TLI_741" absolute-time="1383.1896312347626"/> - <timepoint timepoint-id="TLI_742" absolute-time="1386.3146229567537"/> - <timepoint timepoint-id="TLI_743" absolute-time="1386.9396213011519"/> - <timepoint timepoint-id="TLI_744" absolute-time="1389.6646140827283"/> - <timepoint timepoint-id="TLI_745" absolute-time="1389.9646132880396"/> - <timepoint timepoint-id="TLI_746" absolute-time="1392.6396062020642"/> - <timepoint timepoint-id="TLI_747" absolute-time="1393.5896036855495"/> - <timepoint timepoint-id="TLI_748" absolute-time="1394.9738255430825"/> - <timepoint timepoint-id="TLI_749" absolute-time="1396.4895960035576"/> - <timepoint timepoint-id="TLI_750" absolute-time="1399.7145874606526"/> - <timepoint timepoint-id="TLI_751" absolute-time="1401.6645822951753"/> - <timepoint timepoint-id="TLI_752" absolute-time="1405.3282536045688"/> - <timepoint timepoint-id="TLI_753" absolute-time="1406.504772089107"/> - <timepoint timepoint-id="TLI_754" absolute-time="1408.74836682063"/> - <timepoint timepoint-id="TLI_755" absolute-time="1409.7705414590089"/> - <timepoint timepoint-id="TLI_756" absolute-time="1410.263660254289"/> - <timepoint timepoint-id="TLI_757" absolute-time="1411.5305193139002"/> - <timepoint timepoint-id="TLI_758" absolute-time="1414.6682923325372"/> - <timepoint timepoint-id="TLI_759" absolute-time="1416.6282676709388"/> - <timepoint timepoint-id="TLI_760" absolute-time="1419.4104201642085"/> - <timepoint timepoint-id="TLI_761" absolute-time="1420.4504070784626"/> - <timepoint timepoint-id="TLI_762" absolute-time="1421.6103924828228"/> - <timepoint timepoint-id="TLI_763" absolute-time="1424.3536893469325"/> - <timepoint timepoint-id="TLI_764" absolute-time="1425.8903386299446"/> - <timepoint timepoint-id="TLI_765" absolute-time="1426.150335358508"/> - <timepoint timepoint-id="TLI_766" absolute-time="1428.11031069691"/> - <timepoint timepoint-id="TLI_767" absolute-time="1430.1502850287156"/> - <timepoint timepoint-id="TLI_768" absolute-time="1430.5829358348408"/> - <timepoint timepoint-id="TLI_769" absolute-time="1432.9192495462119"/> - <timepoint timepoint-id="TLI_770" absolute-time="1433.8302387253066"/> - <timepoint timepoint-id="TLI_771" absolute-time="1436.9283247433093"/> - <timepoint timepoint-id="TLI_772" absolute-time="1438.4846238402004"/> - <timepoint timepoint-id="TLI_773" absolute-time="1440.5082796981449"/> - <timepoint timepoint-id="TLI_774" absolute-time="1441.190146118488"/> - <timepoint timepoint-id="TLI_775" absolute-time="1441.750139072317"/> - <timepoint timepoint-id="TLI_776" absolute-time="1444.9682235804264"/> - <timepoint timepoint-id="TLI_777" absolute-time="1446.752585512434"/> - <timepoint timepoint-id="TLI_778" absolute-time="1448.9235754483825"/> - <timepoint timepoint-id="TLI_779" absolute-time="1451.9882914996742"/> - <timepoint timepoint-id="TLI_780" absolute-time="1453.2299946258124"/> - <timepoint timepoint-id="TLI_781" absolute-time="1454.9758326351493"/> - </timeline> - - <greeting> - <topic id="bz_2"> - <contribution speaker-reference="W" start-reference="TLI_5" end-reference="TLI_14" parse-level="2"> - guten tag und herzlich willkommen - <pause duration="micro"/> - <time timepoint-reference="TLI_6"/> - sie sprechen hier mit dem prototypen - <time timepoint-reference="TLI_7"/> - eines computerprogramms - <pause duration="micro"/> - <time timepoint-reference="TLI_8"/> - dieses soll nutzer - <time timepoint-reference="TLI_9"/> - in der bewältigung von alltagsaufgaben unterstützen - <pause duration="micro"/> - <time timepoint-reference="TLI_10"/> - das besondere an diesem neuen computerprogramm ist - <pause duration="micro"/> - <time timepoint-reference="TLI_11"/> - dass es sich individuell an seinen nutzer anpasst - <pause duration="micro"/> - <time timepoint-reference="TLI_12"/> - zu diesem zweck werden im verlauf dieser sitzung - <time timepoint-reference="TLI_13"/> - einige aufgaben und testsituationen durchlaufen - </contribution> - <contribution speaker-reference="W" start-reference="TLI_14" end-reference="TLI_15" parse-level="2"> - <pause duration="1.26"/> - </contribution> - </topic> - </greeting> - - <experiment> - <initial-narrative> - <topic id="i_1"> - <contribution speaker-reference="W" start-reference="TLI_15" end-reference="TLI_16" parse-level="2"> - bitte nennen und buchstabieren sie zunächst ihren vor und zunamen - </contribution> - <contribution start-reference="TLI_16" end-reference="TLI_17" parse-level="2"> - <pause duration="medium"/> - </contribution> - <contribution speaker-reference="P" start-reference="TLI_17" end-reference="TLI_24" parse-level="2"> - <pause duration="0.85"/> - <time timepoint-reference="TLI_19"/> - john smith - <time timepoint-reference="TLI_20"/> - <pause duration="medium"/> - <time timepoint-reference="TLI_21"/> - jot - <pause duration="micro"/> - oh - <pause duration="micro"/> - ha - <pause duration="micro"/> - en - <pause duration="micro"/> - es - <pause duration="micro"/> - em - <time timepoint-reference="TLI_22"/> - <pause duration="1.08"/> - <time timepoint-reference="TLI_23"/> - ie - <pause duration="short"/> - te - <pause duration="micro"/> - ha - </contribution> - <contribution start-reference="TLI_24" end-reference="TLI_25" parse-level="2"> - <pause duration="4.54"/> - </contribution> - </topic> - </initial-narrative> - <last-minute> - <phase id="1"> - <!-- FIXME --> - </phase> - <phase id="2"> - <!-- FIXME --> - </phase> - <phase id="3"> - <!-- FIXME --> - </phase> - <phase id="4"/> - <phase id="5"> - <!-- FIXME --> - </phase> - <phase id="6"> - <!-- FIXME --> - </phase> - </last-minute> - </experiment> - - <farewell> - <topic id="v_1"> - <contribution speaker-reference="W" start-reference="TLI_776" end-reference="TLI_779" parse-level="2"> - mit abschluss dieser aufgabe - <time timepoint-reference="TLI_777"/> - wurde das ende der sitzung erreicht - <pause duration="micro"/> - <time timepoint-reference="TLI_778"/> - vielen dank für ihre mitarbeit und auf wiedersehen - </contribution> - <contribution start-reference="TLI_779" end-reference="TLI_780" parse-level="2"> - <pause duration="1.24"/> - </contribution> - <contribution speaker-reference="P" start-reference="TLI_780" end-reference="TLI_781" parse-level="2"> - tschüss - </contribution> - </topic> - </farewell> -</session> diff --git a/lib/experiment-reader/tests/unit-tests.c b/lib/experiment-reader/tests/unit-tests.c deleted file mode 100644 index 78c45a4..0000000 --- a/lib/experiment-reader/tests/unit-tests.c +++ /dev/null @@ -1,104 +0,0 @@ -/** - * @file - * libexperiment-reader unit tests using GTester - */ - -/* - * Copyright (C) 2012-2013 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 - -#include <inttypes.h> - -#include <glib.h> -#include <glib/gprintf.h> - -#include <experiment-reader.h> - -#define TEST_EXPERIMENT_VALID "test-experiment-valid.xml" -/* #define TEST_EXPERIMENT_INVALID "test-experiment-invalid.xml" */ - -static void -test_new_valid(void) -{ - ExperimentReader *reader; - - reader = experiment_reader_new(TEST_EXPERIMENT_VALID); - g_assert(reader != NULL); - - g_object_unref(reader); -} - -static void -test_foreach_greeting_topic_values_cb(ExperimentReader *reader, - const gchar *topic_id, - gint64 start_time, - gint64 end_time, - gpointer data) -{ - gint *i = (gint *)data; - - g_assert(reader != NULL); - g_assert(data != NULL); - - switch (*i) { - case 0: - g_assert_cmpstr(topic_id, ==, "bz_2"); - g_assert_cmpint(start_time, ==, 13648); - g_assert_cmpint(end_time, ==, 36908); - break; - default: - g_assert_not_reached(); - } - - ++*i; -} - -static void -test_foreach_greeting_topic_values(void) -{ - ExperimentReader *reader; - gint cb_iter = 0; - - reader = experiment_reader_new(TEST_EXPERIMENT_VALID); - g_assert(reader != NULL); - - experiment_reader_foreach_greeting_topic(reader, - test_foreach_greeting_topic_values_cb, - &cb_iter); - - g_object_unref(reader); -} - -/** @private */ -int -main(int argc, char **argv) -{ - g_type_init(); - g_test_init(&argc, &argv, NULL); - - g_test_add_func("/api/new/test_valid", test_new_valid); - - g_test_add_func("/api/foreach_greeting_topic/test_values", - test_foreach_greeting_topic_values); - - g_test_run_suite(g_test_get_root()); - - return 0; -} diff --git a/lib/gtk-experiment-widgets/Makefile.am b/lib/gtk-experiment-widgets/Makefile.am deleted file mode 100644 index 57390db..0000000 --- a/lib/gtk-experiment-widgets/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -AM_CFLAGS = -Wall - -BUILT_SOURCES = cclosure-marshallers.c cclosure-marshallers.h - -noinst_LTLIBRARIES = libgtk-experiment-transcript.la -libgtk_experiment_transcript_la_SOURCES = gtk-experiment-transcript.h \ - gtk-experiment-transcript-private.h \ - gtk-experiment-transcript.c \ - gtk-experiment-transcript-formats.c - -libgtk_experiment_transcript_la_CFLAGS = $(AM_CFLAGS) \ - @LIBGTK_CFLAGS@ -libgtk_experiment_transcript_la_CPPFLAGS = -I@top_srcdir@/lib/experiment-reader - -lib_LTLIBRARIES = libgtk-experiment-widgets.la -libgtk_experiment_widgets_la_SOURCES = gtk-experiment-navigator.h \ - gtk-experiment-navigator.c -nodist_libgtk_experiment_widgets_la_SOURCES = $(BUILT_SOURCES) - -libgtk_experiment_widgets_la_CFLAGS = $(AM_CFLAGS) -libgtk_experiment_widgets_la_CPPFLAGS = -libgtk_experiment_widgets_la_LDFLAGS = -no-undefined -shared -bindir @bindir@ \ - -avoid-version -libgtk_experiment_widgets_la_LIBADD = libgtk-experiment-transcript.la - -libgtk_experiment_widgets_la_CFLAGS += @LIBGTK_CFLAGS@ -libgtk_experiment_widgets_la_LIBADD += @LIBGTK_LIBS@ - -libgtk_experiment_widgets_la_CPPFLAGS += -I@top_srcdir@/lib/experiment-reader -libgtk_experiment_widgets_la_LIBADD += @top_srcdir@/lib/experiment-reader/libexperiment-reader.la - -include_HEADERS = gtk-experiment-navigator.h \ - gtk-experiment-transcript.h - -dist_gtk_experiment_widgets_catalogs_DATA = gtk-experiment-widgets-catalog.xml - -dist_noinst_DATA = cclosure-marshallers.list -CLEANFILES = $(BUILT_SOURCES) - -MARSHAL_PREFIX = gtk_experiment_widgets_marshal - -cclosure-marshallers.c : cclosure-marshallers.list - @GLIB_GENMARSHAL@ --prefix $(MARSHAL_PREFIX) --body $< >$@ - -cclosure-marshallers.h : cclosure-marshallers.list - @GLIB_GENMARSHAL@ --prefix $(MARSHAL_PREFIX) --header $< >$@ diff --git a/lib/gtk-experiment-widgets/cclosure-marshallers.list b/lib/gtk-experiment-widgets/cclosure-marshallers.list deleted file mode 100644 index 539e1a4..0000000 --- a/lib/gtk-experiment-widgets/cclosure-marshallers.list +++ /dev/null @@ -1,5 +0,0 @@ -# Standard marshallers for "time-selected" signal callbacks -VOID:INT64 - -# Standard marshallers for "section-activated" signal callbacks -VOID:INT64,INT64 diff --git a/lib/gtk-experiment-widgets/gtk-experiment-navigator.c b/lib/gtk-experiment-widgets/gtk-experiment-navigator.c deleted file mode 100644 index 23b380e..0000000 --- a/lib/gtk-experiment-widgets/gtk-experiment-navigator.c +++ /dev/null @@ -1,638 +0,0 @@ -/** - * @file - * GTK widget, extending a \e GtkTreeView, for displaying an experiment's - * structure for navigational purposes. - */ - -/* - * Copyright (C) 2012-2013 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 - -#include <assert.h> - -#include <glib.h> -#include <glib/gprintf.h> - -#include <gtk/gtk.h> -#include <experiment-reader.h> - -#include "cclosure-marshallers.h" -#include "gtk-experiment-navigator.h" - -static void gtk_experiment_navigator_class_init(GtkExperimentNavigatorClass *klass); -static void gtk_experiment_navigator_init(GtkExperimentNavigator *klass); - -static void gtk_experiment_navigator_dispose(GObject *gobject); -static void gtk_experiment_navigator_finalize(GObject *gobject); - -static void gtk_experiment_navigator_row_activated(GtkTreeView *tree_view, - GtkTreePath *path, - GtkTreeViewColumn *column); -static void gtk_experiment_navigator_cursor_changed(GtkTreeView *tree_view); - -static void time_cell_data_cb(GtkTreeViewColumn *col, - GtkCellRenderer *renderer, - GtkTreeModel *model, GtkTreeIter *iter, - gpointer user_data); - -static inline void select_time(GtkExperimentNavigator *navi, - gint64 selected_time); -static inline void activate_section(GtkExperimentNavigator *navi, - gint64 start, gint64 end); - -static void topic_row_callback(ExperimentReader *reader, - const gchar *topic_id, - gint64 start_time, - gint64 end_time, - gpointer data); - -/** - * @private - * Unreference object given by variable, but only once. - * Use it in \ref gtk_experiment_navigator_dispose to unreference object - * references in public or private instance attributes. - * - * @sa gtk_experiment_navigator_dispose - * - * @param VAR Variable to unreference - */ -#define GOBJECT_UNREF_SAFE(VAR) G_STMT_START { \ - if ((VAR) != NULL) { \ - g_object_unref(VAR); \ - VAR = NULL; \ - } \ -} G_STMT_END - -/** @private */ -#define GTK_EXPERIMENT_NAVIGATOR_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE((obj), GTK_TYPE_EXPERIMENT_NAVIGATOR, GtkExperimentNavigatorPrivate)) - -/** - * @private - * Private instance attribute structure. - * You can access these attributes using \c klass->priv->attribute. - */ -struct _GtkExperimentNavigatorPrivate { - gint dummy; /**< unused dummy attribute, may be deleted when other attributes are added */ - - /** - * @todo - * Add necessary \b private instance attributes. They must be - * initialized in the instance initializer function. - */ -}; - -struct TopicCallbackData { - GtkTreeIter iter; - GtkTreeStore *store; - gint64 start_time; - gint64 end_time; -}; - -/** @private */ -enum { - TIME_SELECTED_SIGNAL, - SECTION_ACTIVATED_SIGNAL, - LAST_SIGNAL -}; -static guint gtk_experiment_navigator_signals[LAST_SIGNAL] = {0, 0}; - -/** - * @private - * Enumeration of tree store columns that serve as Ids when manipulating - * the store. - */ -enum { - COL_NAME, /**< Name of the section, subsection or topic (\c G_TYPE_STRING) */ - COL_START_TIME, /**< Start time of the entity (\c G_TYPE_INT64 in milliseconds) */ - COL_END_TIME, /**< End time of the entity (\c G_TYPE_INT64 in milliseconds) */ - NUM_COLS /**< Number of columns */ - - /** @todo Add additional tree store columns as necessary */ -}; - -/** - * @private - * Will create \e gtk_experiment_navigator_get_type and set - * \e gtk_experiment_navigator_parent_class - */ -G_DEFINE_TYPE(GtkExperimentNavigator, gtk_experiment_navigator, GTK_TYPE_TREE_VIEW); - -static void -gtk_experiment_navigator_class_init(GtkExperimentNavigatorClass *klass) -{ - GObjectClass *gobject_class = G_OBJECT_CLASS(klass); - GtkTreeViewClass *treeview_class = GTK_TREE_VIEW_CLASS(klass); - - gobject_class->dispose = gtk_experiment_navigator_dispose; - gobject_class->finalize = gtk_experiment_navigator_finalize; - - treeview_class->row_activated = gtk_experiment_navigator_row_activated; - treeview_class->cursor_changed = gtk_experiment_navigator_cursor_changed; - - gtk_experiment_navigator_signals[TIME_SELECTED_SIGNAL] = - g_signal_new("time-selected", - G_TYPE_FROM_CLASS(klass), - G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, - G_STRUCT_OFFSET(GtkExperimentNavigatorClass, time_selected), - NULL, NULL, - gtk_experiment_widgets_marshal_VOID__INT64, - G_TYPE_NONE, 1, G_TYPE_INT64); - - gtk_experiment_navigator_signals[SECTION_ACTIVATED_SIGNAL] = - g_signal_new("section-activated", - G_TYPE_FROM_CLASS(klass), - G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, - G_STRUCT_OFFSET(GtkExperimentNavigatorClass, section_activated), - NULL, NULL, - gtk_experiment_widgets_marshal_VOID__INT64_INT64, - G_TYPE_NONE, 2, G_TYPE_INT64, G_TYPE_INT64); - - g_type_class_add_private(klass, sizeof(GtkExperimentNavigatorPrivate)); -} - -/** - * @brief Instance initializer function for the \e GtkExperimentNavigator widget - * - * It has to create the \e GtkTreeStore (MVC model), add and configure - * view columns and add cell renderers to the view columns. - * It should connect the necessary signals to respond to row activations - * (double click) in order to emit the "time-selected" signal. - * It should also initialize all used \b public and \b private attributes. - * - * @param klass Newly constructed \e GtkExperimentNavigator instance - */ -static void -gtk_experiment_navigator_init(GtkExperimentNavigator *klass) -{ - GtkTreeView *view = GTK_TREE_VIEW(klass); - GtkTreeViewColumn *col; - GtkCellRenderer *renderer; - - GtkTreeStore *store; - - klass->priv = GTK_EXPERIMENT_NAVIGATOR_GET_PRIVATE(klass); - /* - * Create tree store (and model) - * NOTE: GtkTreeStore is directly derived from GObject and has a - * reference count of 1 after creation. - */ - store = gtk_tree_store_new(NUM_COLS, G_TYPE_STRING, - G_TYPE_INT64, G_TYPE_INT64); - - /* - * Create TreeView column corresponding to the - * TreeStore column \e COL_NAME - */ - col = gtk_tree_view_column_new(); - gtk_tree_view_column_set_title(col, "Name"); - gtk_tree_view_column_set_expand(col, TRUE); - gtk_tree_view_append_column(view, col); - - renderer = gtk_cell_renderer_text_new(); - gtk_tree_view_column_pack_start(col, renderer, TRUE); - gtk_tree_view_column_add_attribute(col, renderer, "text", COL_NAME); - /** - * @todo - * Perhaps an icon should be rendered in front of the name to - * indicate the entity's type (section, subsection, topic...) - */ - - /* - * Create TreeView column corresponding to the - * TreeStore column \c COL_START_TIME - */ - col = gtk_tree_view_column_new(); - gtk_tree_view_column_set_title(col, "Start"); - gtk_tree_view_append_column(view, col); - - renderer = gtk_cell_renderer_text_new(); - gtk_tree_view_column_pack_start(col, renderer, TRUE); - /* Cell data function for custom formatting */ - gtk_tree_view_column_set_cell_data_func(col, renderer, - time_cell_data_cb, - GINT_TO_POINTER(COL_START_TIME), - NULL); - - /* - * Create TreeView column corresponding to the - * TreeStore column \c COL_END_TIME - */ - col = gtk_tree_view_column_new(); - gtk_tree_view_column_set_title(col, "End"); - gtk_tree_view_append_column(view, col); - - renderer = gtk_cell_renderer_text_new(); - gtk_tree_view_column_pack_start(col, renderer, TRUE); - /* Cell data function for custom formatting */ - gtk_tree_view_column_set_cell_data_func(col, renderer, - time_cell_data_cb, - GINT_TO_POINTER(COL_END_TIME), - NULL); - - /* - * Set TreeView model to store's model - */ - gtk_tree_view_set_model(view, GTK_TREE_MODEL(store)); - /* destroy store/model automatically with view */ - g_object_unref(store); - - /** @todo better \e TreeViewColumn formatting */ - /** - * @todo - * Initialize necessary \b public and \b private attributes. - * When using object references, they must be unreferenced in - * \ref gtk_experiment_navigator_dispose. - * Keep in mind that when using objects derived from \e GtkObject, - * they will not be reference-counted like ordinary \e GObjects (you - * will not own an ordinary reference after object creation that can - * be unreferenced). - * In order to get an ordinary reference, use \e g_object_ref_sink - * on the object after creation. - */ -} - -/** - * @brief Instance disposal function - * - * Its purpose is to unreference \e GObjects - * the instance keeps references to (object pointers saved in the - * instance attributes). - * Keep in mind that this function may be called more than once, so - * you must guard against unreferencing an object more than once (since you - * will only own a single reference). - * Also keep in mind that instance methods may be invoked \b after the instance - * disposal function was executed but \b before instance finalization. This - * case has to be handled gracefully in the instance methods. - * - * @sa GOBJECT_UNREF_SAFE - * @sa gtk_experiment_navigator_finalize - * @sa gtk_experiment_navigator_init - * - * @param gobject \e GObject to dispose - */ -static void -gtk_experiment_navigator_dispose(GObject *gobject) -{ - //GtkExperimentNavigator *navi = GTK_EXPERIMENT_NAVIGATOR(gobject); - - /* - * destroy might be called more than once, but we have only one - * reference for each object - */ - /** - * @todo - * Unreference all \e GObject references kept in public or - * private attributes. Use \ref GOBJECT_UNREF_SAFE. - * For example, to unreference private object \c widget: - * @code - * GOBJECT_UNREF_SAFE(navi->priv->widget); - * @endcode - */ - - /* Chain up to the parent class */ - G_OBJECT_CLASS(gtk_experiment_navigator_parent_class)->dispose(gobject); -} - -/** - * @brief Instance finalization function - * - * Its purpose is to free all remaining allocated memory referenced - * in public and private instance attributes (e.g. a string). - * For freeing (unreferencing) objects, - * use \ref gtk_experiment_navigator_dispose. - * - * @sa gtk_experiment_navigator_dispose - * @sa gtk_experiment_navigator_init - * - * @param gobject \e GObject to finalize - */ -static void -gtk_experiment_navigator_finalize(GObject *gobject) -{ - //GtkExperimentNavigator *navi = GTK_EXPERIMENT_NAVIGATOR(gobject); - - /** @todo Free all memory referenced in public and private attributes */ - - /* Chain up to the parent class */ - G_OBJECT_CLASS(gtk_experiment_navigator_parent_class)->finalize(gobject); -} - -/** - * Send time-selected Signal when a row is double-clicked - * - * @param tree_view the object on which the signal is emitted - * @param path the GtkTreePath for the activated row - * @param column the GtkTreeViewColumn in which the activation occurred - */ -static void -gtk_experiment_navigator_row_activated(GtkTreeView *tree_view, - GtkTreePath *path, - GtkTreeViewColumn *column __attribute__((unused))) -{ - GtkTreeModel *treemodel = gtk_tree_view_get_model(tree_view); - gint64 start_time; - GtkTreeIter treeiter; - - gtk_tree_model_get_iter(treemodel, &treeiter, path); - gtk_tree_model_get(treemodel, &treeiter, - COL_START_TIME, &start_time, - -1); - - select_time(GTK_EXPERIMENT_NAVIGATOR(tree_view), start_time); -} - -/** - * Send cursor-changed when the cursor has changed - * - * @param tree_view the object on which the signal is emitted - */ -static void -gtk_experiment_navigator_cursor_changed(GtkTreeView *tree_view) -{ - GtkTreeModel *treemodel = gtk_tree_view_get_model(tree_view); - GtkTreePath *treepath; - GtkTreeIter treeiter; - gint64 start_time; - gint64 end_time; - - gtk_tree_view_get_cursor(tree_view, &treepath, NULL); - gtk_tree_model_get_iter(treemodel, &treeiter, treepath); - gtk_tree_path_free(treepath); - - gtk_tree_model_get(treemodel, &treeiter, - COL_START_TIME, &start_time, - COL_END_TIME, &end_time, - -1); - - activate_section(GTK_EXPERIMENT_NAVIGATOR(tree_view), start_time, end_time); -} - -/** - * @brief Cell data function to invoke when rendering the "Start" and - * "End" columns. - * - * @param col \e GtkTreeViewColumn to render for - * @param renderer Cell renderer to use for rendering - * @param model \e GtkTreeModel associated with the view - * @param iter Row identifier - * @param user_data Callback user data - */ -static void -time_cell_data_cb(GtkTreeViewColumn *col __attribute__((unused)), - GtkCellRenderer *renderer, - GtkTreeModel *model, GtkTreeIter *iter, - gpointer user_data) -{ - gint column = GPOINTER_TO_INT(user_data); - - gint64 time_val; - gchar buf[20]; - - gtk_tree_model_get(model, iter, - column, &time_val, -1); - - g_snprintf(buf, sizeof(buf), "%" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT , - time_val /1000/60, time_val/1000 % 60); - - g_object_set(renderer, "text", buf, NULL); -} - -/** - * @brief Emit "time-selected" signal on a \e GtkExperimentNavigator instance. - * - * It should be emitted when a row entry was selected (double-clicked). - * - * @sa GtkExperimentNavigatorClass::time_selected - * - * @param navi Widget to emit the signal on - * @param selected_time Selected time in milliseconds - */ -static inline void -select_time(GtkExperimentNavigator *navi, gint64 selected_time) -{ - g_signal_emit(navi, gtk_experiment_navigator_signals[TIME_SELECTED_SIGNAL], 0, - selected_time); -} - -/** - * @brief Emit "section-activated" signal on a \e GtkExperimentNavigator instance. - * - * It should be emitted when a row entry was activated (e.g. single-clicked) - * - * @sa GtkExperimentNavigatorClass::section_activated - * - * @param navi Widget to emit the signal on - * @param start Start time of section in milliseconds - * @param end End time of section in milliseconds - */ -static inline void -activate_section(GtkExperimentNavigator *navi, gint64 start, gint64 end) -{ - g_signal_emit(navi, gtk_experiment_navigator_signals[SECTION_ACTIVATED_SIGNAL], 0, - start, end); -} - -/** - * Callback function insert new row in GtkTreeStore - * initialised colomb name and start time out of userdata - * - * @param reader \e ExperimentReader the information refers to - * @param topic_id Symbolic identifier of experiment \b topic - * @param start_time Beginning of first \b contribution in \e topic (milliseconds) - * @param end_time End of last \b contribution in \e topic (milliseconds) - * @param data Callback user data - */ -static void -topic_row_callback(ExperimentReader *reader, - const gchar *topic_id, - gint64 start_time, - gint64 end_time, - gpointer data) -{ - struct TopicCallbackData *tcb = (struct TopicCallbackData *) data; - GtkTreeIter topic; - - if (tcb->start_time < 0) - tcb->start_time = start_time; - tcb->end_time = end_time; - - gtk_tree_store_append(tcb->store, &topic, &tcb->iter); - gtk_tree_store_set(tcb->store, &topic, - COL_NAME, topic_id, - COL_START_TIME, start_time, - COL_END_TIME, end_time, - -1); -} - -/* - * API - */ - -/** - * @brief Construct new \e GtkExperimentNavigator widget instance. - * - * @return New \e GtkExperimentNavigator widget instance - */ -GtkWidget * -gtk_experiment_navigator_new(void) -{ - return GTK_WIDGET(g_object_new(GTK_TYPE_EXPERIMENT_NAVIGATOR, NULL)); -} - -/** - * Fills the \e GtkExperimentNavigator widget with the structure specified - * in an experiment-XML file (see session.dtd). - * Any existing contents should be cleared. - * - * @param navi Object instance to display the structure in - * @param exp \e ExperimentReader instance of opened XML-file - * @return \c TRUE on success, else \c FALSE - */ -gboolean -gtk_experiment_navigator_load(GtkExperimentNavigator *navi, - ExperimentReader *exp) -{ - struct TopicCallbackData tcd; - GtkTreeIter experiment_level; - GtkTreeIter last_minute_level; - - tcd.store = GTK_TREE_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(navi))); - gtk_tree_store_clear(tcd.store); - - /* greeting */ - gtk_tree_store_append(tcd.store, &tcd.iter, NULL); - - tcd.start_time = -1; - experiment_reader_foreach_greeting_topic(exp, topic_row_callback, &tcd); - - gtk_tree_store_set(tcd.store, &tcd.iter, - COL_NAME, "greeting", - COL_START_TIME, tcd.start_time, - COL_END_TIME, tcd.end_time, - -1); - - /* experiment */ - gtk_tree_store_append(tcd.store, &experiment_level, NULL); - gtk_tree_store_set(tcd.store, &experiment_level, - COL_NAME, "experiment", - -1); - - gtk_tree_store_append(tcd.store, &tcd.iter, &experiment_level); - - tcd.start_time = -1; - experiment_reader_foreach_exp_initial_narrative_topic(exp, - topic_row_callback, - &tcd); - - gtk_tree_store_set(tcd.store, &tcd.iter, - COL_NAME, "initial-narrative", - COL_START_TIME, tcd.start_time < 0 ? tcd.end_time - : tcd.start_time, - COL_END_TIME, tcd.end_time, - -1); - - gtk_tree_store_set(tcd.store, &experiment_level, - COL_START_TIME, tcd.start_time < 0 ? tcd.end_time - : tcd.start_time, - -1); - - gtk_tree_store_append(tcd.store, &last_minute_level, &experiment_level); - gtk_tree_store_set(tcd.store, &last_minute_level, - COL_NAME, "last minute", - -1); - - for (gint i = 1; i <= 6; i++) { - gchar phasename[8]; - - g_snprintf(phasename, sizeof(phasename), "phase %d", i); - gtk_tree_store_append(tcd.store, - &tcd.iter, - &last_minute_level); - - tcd.start_time = -1; - experiment_reader_foreach_exp_last_minute_phase_topic(exp, i, topic_row_callback, &tcd); - - gtk_tree_store_set(tcd.store, &tcd.iter, - COL_NAME, phasename, - COL_START_TIME, tcd.start_time < 0 ? tcd.end_time - : tcd.start_time, - COL_END_TIME, tcd.end_time, - -1); - - if (i == 1) { - gtk_tree_store_set(tcd.store, &last_minute_level, - COL_START_TIME, - tcd.start_time < 0 ? tcd.end_time - : tcd.start_time, - -1); - } - } - - gtk_tree_store_set(tcd.store, &last_minute_level, - COL_END_TIME, tcd.end_time, - -1); - - gtk_tree_store_set(tcd.store, &experiment_level, - COL_END_TIME, tcd.end_time, - -1); - - /* farewell */ - gtk_tree_store_append(tcd.store, &tcd.iter, NULL); - - tcd.start_time = -1; - experiment_reader_foreach_farewell_topic(exp, topic_row_callback, &tcd); - - gtk_tree_store_set(tcd.store, &tcd.iter, - COL_NAME, "farewell", - COL_START_TIME, tcd.start_time, - COL_END_TIME, tcd.end_time, - -1); - - return TRUE; -} - -/** - * Fills the \e GtkExperimentNavigator widget with the structure specified - * in an experiment-XML file (see session.dtd). - * It accepts an XML filename and is otherwise identical to - * \ref gtk_experiment_navigator_load. - * - * @sa gtk_experiment_navigator_load - * - * @param navi Object instance to display the structure in - * @param exp Filename of XML-file to open and use for configuring \e navi - * @return \c TRUE on success, else \c FALSE - */ -gboolean -gtk_experiment_navigator_load_filename(GtkExperimentNavigator *navi, - const gchar *exp) -{ - gboolean returnvalue; - ExperimentReader *expread = experiment_reader_new(exp); - - if (expread == NULL) - return FALSE; - returnvalue = gtk_experiment_navigator_load(navi, expread); - - g_object_unref(expread); - - return returnvalue; -} diff --git a/lib/gtk-experiment-widgets/gtk-experiment-navigator.h b/lib/gtk-experiment-widgets/gtk-experiment-navigator.h deleted file mode 100644 index d1be33c..0000000 --- a/lib/gtk-experiment-widgets/gtk-experiment-navigator.h +++ /dev/null @@ -1,114 +0,0 @@ -/** - * @file - * Header file necessary to include when using the \e GtkExperimentNavigator - * widget. - */ - -/* - * Copyright (C) 2012-2013 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 __GTK_EXPERIMENT_NAVIGATOR_H -#define __GTK_EXPERIMENT_NAVIGATOR_H - -#include <glib-object.h> -#include <gtk/gtk.h> - -#include <experiment-reader.h> - -G_BEGIN_DECLS - -#define GTK_TYPE_EXPERIMENT_NAVIGATOR \ - (gtk_experiment_navigator_get_type()) -/** - * Cast instance pointer to \e GtkExperimentNavigator - * - * @param obj Object to cast to \e GtkExperimentNavigator - * @return \e obj casted to \e GtkExperimentNavigator - */ -#define GTK_EXPERIMENT_NAVIGATOR(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_EXPERIMENT_NAVIGATOR, GtkExperimentNavigator)) -#define GTK_EXPERIMENT_NAVIGATOR_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_EXPERIMENT_NAVIGATOR, GtkExperimentNavigatorClass)) -#define GTK_IS_EXPERIMENT_NAVIGATOR(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_EXPERIMENT_NAVIGATOR)) -#define GTK_IS_EXPERIMENT_NAVIGATOR_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE((klass), GTK_TYPE_EXPERIMENT_NAVIGATOR)) -#define GTK_EXPERIMENT_NAVIGATOR_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_EXPERIMENT_NAVIGATOR, GtkExperimentNavigatorClass)) - -/** @private */ -typedef struct _GtkExperimentNavigatorPrivate GtkExperimentNavigatorPrivate; - -/** - * \e GtkExperimentNavigator instance structure - */ -typedef struct _GtkExperimentNavigator { - GtkTreeView parent_instance; /**< Parent instance structure */ - - /** - * @todo - * Add necessary \b public instance attributes. They must be - * initialized in the instance initializer function. - */ - - GtkExperimentNavigatorPrivate *priv; /**< @private Pointer to \b private instance attributes */ -} GtkExperimentNavigator; - -/** - * \e GtkExperimentNavigator class structure - */ -typedef struct _GtkExperimentNavigatorClass { - GtkTreeViewClass parent_class; /**< Parent class structure */ - - /** - * Callback function to invoke when emitting the "time-selected" - * signal. - * - * @param self \e GtkExperimentNavigator the event was emitted on. - * @param selected_time Time selected by the navigator in milliseconds - */ - void (*time_selected)(GtkExperimentNavigator *self, - gint64 selected_time); - - /** - * Callback function to invoke when emitting the "section-activated" - * signal. - * - * @param self \e GtkExperimentNavigator the event was emitted on. - * @param start Start time of section in milliseconds - * @param end End time of section in milliseconds - */ - void (*section_activated)(GtkExperimentNavigator *self, - gint64 start, gint64 end); -} GtkExperimentNavigatorClass; - -/** @private */ -GType gtk_experiment_navigator_get_type(void); - -/* - * API - */ -GtkWidget *gtk_experiment_navigator_new(void); - -gboolean gtk_experiment_navigator_load(GtkExperimentNavigator *navi, - ExperimentReader *exp); -gboolean gtk_experiment_navigator_load_filename(GtkExperimentNavigator *navi, - const gchar *exp); - -G_END_DECLS - -#endif diff --git a/lib/gtk-experiment-widgets/gtk-experiment-transcript-formats.c b/lib/gtk-experiment-widgets/gtk-experiment-transcript-formats.c deleted file mode 100644 index d81d6b9..0000000 --- a/lib/gtk-experiment-widgets/gtk-experiment-transcript-formats.c +++ /dev/null @@ -1,417 +0,0 @@ -/** - * @file - * "Format" expression-related functions of the \e GtkExperimentTranscript - * widget - */ - -/* - * Copyright (C) 2012-2013 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 - -#include <stdio.h> -#include <string.h> -#include <assert.h> -#include <errno.h> - -#include <glib.h> -#include <glib/gprintf.h> -#include <glib/gstdio.h> - -#include <gtk/gtk.h> - -#include "gtk-experiment-transcript.h" -#include "gtk-experiment-transcript-private.h" - -static inline gint attr_list_get_length(PangoAttrList *list); -static gboolean gtk_experiment_transcript_parse_format(GtkExperimentTranscriptFormat *fmt, - const gchar *str, - GError **error); - -#define FORMAT_REGEX_COMPILE_FLAGS (G_REGEX_CASELESS) -#define FORMAT_REGEX_MATCH_FLAGS (0) - -static inline gint -attr_list_get_length(PangoAttrList *list) -{ - PangoAttrIterator *iter = pango_attr_list_get_iterator(list); - gint length = 0; - - do - length++; - while (pango_attr_iterator_next(iter)); - pango_attr_iterator_destroy(iter); - - return length; -} - -static gboolean -gtk_experiment_transcript_parse_format(GtkExperimentTranscriptFormat *fmt, - const gchar *str, - GError **error) -{ - PangoAttrIterator *iter; - - gchar *pattern, *pattern_captures, *p; - gint capture_count = 0; - - g_return_val_if_fail(error == NULL || *error == NULL, FALSE); - - if (!pango_parse_markup(str, -1, 0, &fmt->attribs, &pattern, - NULL, error)) - return FALSE; - - p = pattern_captures = g_malloc(strlen(pattern) + 1 + - 2*attr_list_get_length(fmt->attribs)); - iter = pango_attr_list_get_iterator(fmt->attribs); - do { - gint start, end; - - pango_attr_iterator_range(iter, &start, &end); - if (end == G_MAXINT) - end = strlen(pattern); - - if (end - start > 0) { - *p++ = '('; - strncpy(p, pattern + start, end - start); - p += end - start; - *p++ = ')'; - - capture_count++; - } - } while (pango_attr_iterator_next(iter)); - pango_attr_iterator_destroy(iter); - *p = '\0'; - g_free(pattern); - - fmt->regexp = g_regex_new(pattern_captures, - FORMAT_REGEX_COMPILE_FLAGS, 0, error); - g_free(pattern_captures); - if (fmt->regexp == NULL) { - gtk_experiment_transcript_free_format(fmt); - fmt->attribs = NULL; - - return FALSE; - } - - if (g_regex_get_capture_count(fmt->regexp) != capture_count) { - g_set_error(error, - GTK_EXPERIMENT_TRANSCRIPT_ERROR, - GTK_EXPERIMENT_TRANSCRIPT_ERROR_REGEXCAPTURES, - "Additional regular expression captures not allowed"); - - gtk_experiment_transcript_free_format(fmt); - fmt->regexp = NULL; - fmt->attribs = NULL; - - return FALSE; - } - - return TRUE; -} - -/** @private */ -G_GNUC_INTERNAL void -gtk_experiment_transcript_apply_format(GtkExperimentTranscriptFormat *fmt, - const gchar *text, - PangoAttrList *attrib_list) -{ - GMatchInfo *match_info; - - if (fmt->regexp == NULL || fmt->attribs == NULL) - return; - - g_regex_match(fmt->regexp, text, FORMAT_REGEX_MATCH_FLAGS, &match_info); - - while (g_match_info_matches(match_info)) { - PangoAttrIterator *iter; - gint match_num = 0; - - iter = pango_attr_list_get_iterator(fmt->attribs); - do { - gint start, end; - GSList *attribs; - - pango_attr_iterator_range(iter, &start, &end); - if (end == G_MAXINT) - end = strlen(g_regex_get_pattern(fmt->regexp)); - - if (end - start == 0) - continue; - - start = end = -1; - g_match_info_fetch_pos(match_info, ++match_num, - &start, &end); - if (start < 0 || end < 0) - continue; - - attribs = pango_attr_iterator_get_attrs(iter); - for (GSList *cur = attribs; cur != NULL; cur = cur->next) { - PangoAttribute *attrib; - - attrib = pango_attribute_copy((PangoAttribute *)cur->data); - attrib->start_index = (guint)start; - attrib->end_index = (guint)end; - pango_attr_list_change(attrib_list, attrib); - } - g_slist_free(attribs); - } while (pango_attr_iterator_next(iter)); - pango_attr_iterator_destroy(iter); - - g_match_info_next(match_info, NULL); - } - - g_match_info_free(match_info); -} - -/** @private */ -G_GNUC_INTERNAL void -gtk_experiment_transcript_free_formats(GSList *formats) -{ - for (GSList *cur = formats; cur != NULL; cur = cur->next) { - GtkExperimentTranscriptFormat *fmt = - (GtkExperimentTranscriptFormat *)cur->data; - - gtk_experiment_transcript_free_format(fmt); - g_free(fmt); - } - - g_slist_free(formats); -} - -/* - * API - */ - -/** - * @brief Load a format file to use with the transcript widget - * - * Loading a format file applies additional formattings (highlighting) to the - * transcript's contributions according to the rules specified in the file. - * For information about the format file syntax and semantics, refer to the - * "Experiment Player" manual. - * - * The format file is parsed and and compiled to an internal representation. - * - * @param trans Widget instance - * @param filename File name of format file to load (\c NULL or empty string - * resets any formattings of a previously loaded file) - * @param error GError to set on failure, or \c NULL - * @return \c TRUE on success, else \c FALSE - */ -gboolean -gtk_experiment_transcript_load_formats(GtkExperimentTranscript *trans, - const gchar *filename, - GError **error) -{ - FILE *file; - gchar buf[1024]; - gint cur_line = 0; - - gboolean res = FALSE; - - g_return_val_if_fail(error == NULL || *error == NULL, FALSE); - - gtk_experiment_transcript_free_formats(trans->priv->formats); - trans->priv->formats = NULL; - - if (filename == NULL || !*filename) { - res = TRUE; - goto redraw; - } - - if ((file = g_fopen(filename, "r")) == NULL) { - g_set_error(error, - GTK_EXPERIMENT_TRANSCRIPT_ERROR, - GTK_EXPERIMENT_TRANSCRIPT_ERROR_FILEOPEN, - "Failed to open format file \"%s\":\n%s", - filename, g_strerror(errno)); - - goto redraw; - } - - while (fgets((char *)buf, sizeof(buf), file) != NULL) { - GtkExperimentTranscriptFormat *fmt; - - cur_line++; - - if (!feof(file) && !is_newline(buf[strlen(buf) - 1])) { - g_set_error(error, - GTK_EXPERIMENT_TRANSCRIPT_ERROR, - GTK_EXPERIMENT_TRANSCRIPT_ERROR_LINELENGTH, - "Line %d in file \"%s\" is too long. " - "It must be less than %d characters.", - cur_line, filename, (int)sizeof(buf)); - - fclose(file); - gtk_experiment_transcript_free_formats(trans->priv->formats); - trans->priv->formats = NULL; - - goto redraw; - } - - g_strchug(buf); - - /* strip new line chars from end of `buf' */ - for (gchar *p = buf + strlen(buf) - 1; - p >= buf && is_newline(*p); - p--) - *p = '\0'; - - if (*buf == '#' || *buf == '\0') - continue; - - fmt = g_new(GtkExperimentTranscriptFormat, 1); - - if (!gtk_experiment_transcript_parse_format(fmt, buf, error)) { - g_prefix_error(error, - "Error parsing \"%s\" on line %d:\n", - filename, cur_line); - - g_free(fmt); - fclose(file); - gtk_experiment_transcript_free_formats(trans->priv->formats); - trans->priv->formats = NULL; - - goto redraw; - } - - trans->priv->formats = g_slist_prepend(trans->priv->formats, fmt); - } - trans->priv->formats = g_slist_reverse(trans->priv->formats); - - fclose(file); - res = TRUE; - -redraw: - gtk_experiment_transcript_text_layer_redraw(trans); - return res; -} - -/** - * @brief Specify an interactive format string for a transcript widget - * - * Associates a single format rule with a transcript widget. The formatting - * changes are cumulatively applied after any changes introduced by a format - * file loaded into the widget. The interactive format rule is independant of - * any format file rules, that is it is not reset when format file rules are - * reset. - * A rule may also be given without Pango markup (plain regular expression), - * applying default formattings for that regular expression. Default formattings - * may be configured via public instance attributes of the widget. - * For information about the format rule syntax and semantics, refer to the - * "Experiment Player" manual. - * - * @sa gtk_experiment_transcript_load_formats - * - * @param trans Widget instance - * @param format_str Format rule string (with or without markup) - * @param with_markup Must be \c TRUE if the format_str contains Pango markup, - * else \c FALSE - * @param error GError to set on failure, or \c NULL - * @return \c TRUE on success, else \c FALSE - */ -gboolean -gtk_experiment_transcript_set_interactive_format(GtkExperimentTranscript *trans, - const gchar *format_str, - gboolean with_markup, - GError **error) -{ - GtkExperimentTranscriptFormat *fmt = &trans->priv->interactive_format; - - gchar *pattern; - PangoAttribute *attrib; - - gboolean res = FALSE; - - g_return_val_if_fail(error == NULL || *error == NULL, FALSE); - - gtk_experiment_transcript_free_format(fmt); - fmt->regexp = NULL; - fmt->attribs = NULL; - - if (format_str == NULL || !*format_str) { - res = TRUE; - goto redraw; - } - - if (with_markup) { - res = gtk_experiment_transcript_parse_format(fmt, format_str, - error); - goto redraw; - } - /* else if (!with_markup) */ - - fmt->attribs = pango_attr_list_new(); - g_warn_if_fail(fmt->attribs != NULL); - if (fmt->attribs == NULL) - goto redraw; - - if (trans->interactive_format.default_font != NULL) { - attrib = pango_attr_font_desc_new(trans->interactive_format.default_font); - attrib->end_index = 1; - pango_attr_list_insert(fmt->attribs, attrib); - } - if (trans->interactive_format.default_text_color != NULL) { - GdkColor *color = trans->interactive_format.default_text_color; - - attrib = pango_attr_foreground_new(color->red, - color->green, - color->blue); - attrib->end_index = 1; - pango_attr_list_insert(fmt->attribs, attrib); - } - if (trans->interactive_format.default_bg_color != NULL) { - GdkColor *color = trans->interactive_format.default_bg_color; - - attrib = pango_attr_background_new(color->red, - color->green, - color->blue); - attrib->end_index = 1; - pango_attr_list_insert(fmt->attribs, attrib); - } - - pattern = g_strconcat("(", format_str, ")", NULL); - fmt->regexp = g_regex_new(pattern, FORMAT_REGEX_COMPILE_FLAGS, 0, error); - g_free(pattern); - if (fmt->regexp == NULL) { - gtk_experiment_transcript_free_format(fmt); - fmt->attribs = NULL; - - goto redraw; - } - - if (g_regex_get_capture_count(fmt->regexp) != 1) { - g_set_error(error, - GTK_EXPERIMENT_TRANSCRIPT_ERROR, - GTK_EXPERIMENT_TRANSCRIPT_ERROR_REGEXCAPTURES, - "Additional regular expression captures not allowed"); - - gtk_experiment_transcript_free_format(fmt); - fmt->regexp = NULL; - fmt->attribs = NULL; - - goto redraw; - } - res = TRUE; - -redraw: - gtk_experiment_transcript_text_layer_redraw(trans); - return res; -} diff --git a/lib/gtk-experiment-widgets/gtk-experiment-transcript-private.h b/lib/gtk-experiment-widgets/gtk-experiment-transcript-private.h deleted file mode 100644 index 8281b0d..0000000 --- a/lib/gtk-experiment-widgets/gtk-experiment-transcript-private.h +++ /dev/null @@ -1,140 +0,0 @@ -/** - * @file - * Private header for the \e GtkExperimentTranscript widget - */ - -/* - * Copyright (C) 2012-2013 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 __GTK_EXPERIMENT_TRANSCRIPT_PRIVATE_H -#define __GTK_EXPERIMENT_TRANSCRIPT_PRIVATE_H - -#include <glib.h> - -#include <gdk/gdk.h> -#include <gtk/gtk.h> - -#include <experiment-reader.h> - -#include "gtk-experiment-transcript.h" - -/** @private */ -#define GTK_EXPERIMENT_TRANSCRIPT_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE((obj), GTK_TYPE_EXPERIMENT_TRANSCRIPT, GtkExperimentTranscriptPrivate)) - -/** @private */ -typedef struct _GtkExperimentTranscriptFormat { - GRegex *regexp; - PangoAttrList *attribs; -} GtkExperimentTranscriptFormat; - -/** @private */ -typedef enum { - GTK_EXPERIMENT_TRANSCRIPT_REVERSE_MASK = 1 << 0, - GTK_EXPERIMENT_TRANSCRIPT_USE_BACKDROP_MASK = 1 << 1 -} GtkExperimentTranscriptFlagMask; - -/** - * @private - * Private instance attribute structure. - * You can access these attributes using \c klass->priv->attribute. - */ -struct _GtkExperimentTranscriptPrivate { - gint flag_mask; - - GtkObject *time_adjustment; - gulong time_adj_on_value_changed_id; - - GdkPixmap *layer_text; - PangoLayout *layer_text_layout; - - struct _GtkExperimentTranscriptBackdropArea { - gint64 start; - gint64 end; - } backdrop; - - GList *contribs; - GSList *formats; - GtkExperimentTranscriptFormat interactive_format; - - GtkWidget *menu; /**< Drop-down menu, doesn't have to be unreferenced manually */ - GSList *alignment_group; /**< GtkRadioMenuItem group for Alignment settings (owned by GTK) */ - GtkWidget *menu_reverse_item; -}; - -/** @private */ -typedef gboolean (*GtkExperimentTranscriptContribRenderer) - (GtkExperimentTranscript *, ExperimentReaderContrib *, - gint64, gint64, gint *); - -/** @todo scale should be configurable */ -#define PX_PER_SECOND 15 -#define TIME_TO_PX(TIME) ((TIME)/(1000/PX_PER_SECOND)) -#define PX_TO_TIME(PX) (((PX)*1000)/PX_PER_SECOND) - -#define BACKDROP_VALUE \ - ((G_MAXUINT16*GTK_EXPERIMENT_TRANSCRIPT_BACKDROP)/100) - -/** - * @private - * Unreference object given by variable, but only once. - * Use it in \ref gtk_experiment_transcript_dispose to unreference object - * references in public or private instance attributes. - * - * @sa gtk_experiment_transcript_dispose - * - * @param VAR Variable to unreference - */ -#define GOBJECT_UNREF_SAFE(VAR) G_STMT_START { \ - if ((VAR) != NULL) { \ - g_object_unref(VAR); \ - VAR = NULL; \ - } \ -} G_STMT_END - -/** @private */ -G_GNUC_INTERNAL -void gtk_experiment_transcript_text_layer_redraw(GtkExperimentTranscript *trans); - -/** @private */ -G_GNUC_INTERNAL -void gtk_experiment_transcript_apply_format(GtkExperimentTranscriptFormat *fmt, - const gchar *text, - PangoAttrList *attrib_list); - -/** @private */ -static inline void -gtk_experiment_transcript_free_format(GtkExperimentTranscriptFormat *format) -{ - if (format->regexp != NULL) - g_regex_unref(format->regexp); - if (format->attribs != NULL) - pango_attr_list_unref(format->attribs); -} - -/** @private */ -G_GNUC_INTERNAL -void gtk_experiment_transcript_free_formats(GSList *formats); - -/** @private */ -static inline gboolean -is_newline(gchar c) -{ - return c == '\r' || c == '\n'; -} - -#endif diff --git a/lib/gtk-experiment-widgets/gtk-experiment-transcript.c b/lib/gtk-experiment-widgets/gtk-experiment-transcript.c deleted file mode 100644 index 093b608..0000000 --- a/lib/gtk-experiment-widgets/gtk-experiment-transcript.c +++ /dev/null @@ -1,1082 +0,0 @@ -/** - * @file - * GTK widget, extending a \e GtkWidget, for displaying an experiment's - * transcript. - */ - -/* - * Copyright (C) 2012-2013 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 - -#include <assert.h> - -#include <glib.h> -#include <glib/gprintf.h> - -#include <gdk/gdk.h> -#include <gtk/gtk.h> - -#include <experiment-reader.h> - -#include "gtk-experiment-transcript.h" -#include "gtk-experiment-transcript-private.h" - -static void gtk_experiment_transcript_class_init(GtkExperimentTranscriptClass *klass); -static void gtk_experiment_transcript_init(GtkExperimentTranscript *klass); - -static void gtk_experiment_transcript_realize(GtkWidget *widget); -static void gtk_experiment_transcript_size_allocate(GtkWidget *widget, - GtkAllocation *allocation); -static gboolean gtk_experiment_transcript_expose(GtkWidget *widget, - GdkEventExpose *event); - -static void gtk_experiment_transcript_dispose(GObject *gobject); -static void gtk_experiment_transcript_finalize(GObject *gobject); - -static void time_adj_on_value_changed(GtkAdjustment *adj, gpointer user_data); - -static void gtk_experiment_transcript_reconfigure(GtkExperimentTranscript *trans); - -static gboolean configure_text_layout(GtkExperimentTranscript *trans, - ExperimentReaderContrib *contrib, - gint64 current_time, - gint y, gint last_contrib_y, - int *logical_height); -static gboolean render_contribution_bottomup(GtkExperimentTranscript *trans, - ExperimentReaderContrib *contrib, - gint64 current_time, gint64 current_time_px, - gint *last_contrib_y); -static gboolean render_contribution_topdown(GtkExperimentTranscript *trans, - ExperimentReaderContrib *contrib, - gint64 current_time, gint64 current_time_px, - gint *last_contrib_y); -static inline void render_backdrop_area(GtkExperimentTranscript *trans, - gint64 current_time_px); - -static void state_changed(GtkWidget *widget, GtkStateType state); -static gboolean button_pressed(GtkWidget *widget, GdkEventButton *event); -static gboolean scrolled(GtkWidget *widget, GdkEventScroll *event); - -static void choose_font_activated(GtkWidget *widget, gpointer data); -static void choose_text_color_activated(GtkWidget *widget, gpointer data); -static void choose_bg_color_activated(GtkWidget *widget, gpointer data); -static void text_alignment_activated(GtkWidget *widget, gpointer data); - -static void reverse_activated(GtkWidget *widget, gpointer data); - -/** @private */ -GQuark -gtk_experiment_transcript_error_quark(void) -{ - return g_quark_from_static_string("gtk-experiment-transcript-error-quark"); -} - -/** - * @private - * Will create \e gtk_experiment_transcript_get_type and set - * \e gtk_experiment_transcript_parent_class - */ -G_DEFINE_TYPE(GtkExperimentTranscript, gtk_experiment_transcript, GTK_TYPE_WIDGET); - -static void -gtk_experiment_transcript_class_init(GtkExperimentTranscriptClass *klass) -{ - GObjectClass *gobject_class = G_OBJECT_CLASS(klass); - GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass); - - gobject_class->dispose = gtk_experiment_transcript_dispose; - gobject_class->finalize = gtk_experiment_transcript_finalize; - - widget_class->realize = gtk_experiment_transcript_realize; - widget_class->expose_event = gtk_experiment_transcript_expose; - widget_class->size_allocate = gtk_experiment_transcript_size_allocate; - - widget_class->state_changed = state_changed; - widget_class->button_press_event = button_pressed; - widget_class->scroll_event = scrolled; - - g_type_class_add_private(klass, sizeof(GtkExperimentTranscriptPrivate)); -} - -/** - * @brief Instance initializer function for the \e GtkExperimentTranscript widget - * - * @param klass Newly constructed \e GtkExperimentTranscript instance - */ -static void -gtk_experiment_transcript_init(GtkExperimentTranscript *klass) -{ - GtkWidget *item, *submenu, *image; - - klass->priv = GTK_EXPERIMENT_TRANSCRIPT_GET_PRIVATE(klass); - - klass->speaker = NULL; - - klass->interactive_format.default_font = NULL; - klass->interactive_format.default_text_color = NULL; - klass->interactive_format.default_bg_color = NULL; - - klass->priv->flag_mask = 0; - - klass->priv->time_adjustment = gtk_adjustment_new(0., 0., 0., - 0., 0., 0.); - g_object_ref_sink(klass->priv->time_adjustment); - klass->priv->time_adj_on_value_changed_id = - g_signal_connect(G_OBJECT(klass->priv->time_adjustment), - "value-changed", - G_CALLBACK(time_adj_on_value_changed), klass); - - klass->priv->layer_text = NULL; - klass->priv->layer_text_layout = - gtk_widget_create_pango_layout(GTK_WIDGET(klass), NULL); - pango_layout_set_wrap(klass->priv->layer_text_layout, PANGO_WRAP_WORD_CHAR); - pango_layout_set_ellipsize(klass->priv->layer_text_layout, PANGO_ELLIPSIZE_END); - - klass->priv->backdrop.start = 0; - klass->priv->backdrop.end = 0; - - klass->priv->contribs = NULL; - klass->priv->formats = NULL; - klass->priv->interactive_format.regexp = NULL; - klass->priv->interactive_format.attribs = NULL; - - /** @todo It should be possible to reset font and colors (to widget defaults) */ - klass->priv->menu = gtk_menu_new(); - gtk_menu_attach_to_widget(GTK_MENU(klass->priv->menu), - GTK_WIDGET(klass), NULL); - - item = gtk_image_menu_item_new_with_mnemonic("Choose _Font..."); - image = gtk_image_new_from_stock(GTK_STOCK_SELECT_FONT, - GTK_ICON_SIZE_MENU); - gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), image); - g_signal_connect(item, "activate", - G_CALLBACK(choose_font_activated), klass); - gtk_menu_shell_append(GTK_MENU_SHELL(klass->priv->menu), item); - gtk_widget_show(item); - - item = gtk_image_menu_item_new_with_mnemonic("Choose _Text Color..."); - image = gtk_image_new_from_stock(GTK_STOCK_SELECT_COLOR, - GTK_ICON_SIZE_MENU); - gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), image); - g_signal_connect(item, "activate", - G_CALLBACK(choose_text_color_activated), klass); - gtk_menu_shell_append(GTK_MENU_SHELL(klass->priv->menu), item); - gtk_widget_show(item); - - item = gtk_image_menu_item_new_with_mnemonic("Choose _Background Color..."); - image = gtk_image_new_from_stock(GTK_STOCK_SELECT_COLOR, - GTK_ICON_SIZE_MENU); - gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), image); - g_signal_connect(item, "activate", - G_CALLBACK(choose_bg_color_activated), klass); - gtk_menu_shell_append(GTK_MENU_SHELL(klass->priv->menu), item); - gtk_widget_show(item); - - submenu = gtk_menu_new(); - item = gtk_menu_item_new_with_label("Text Alignment"); - gtk_menu_item_set_submenu(GTK_MENU_ITEM(item), submenu); - gtk_menu_shell_append(GTK_MENU_SHELL(klass->priv->menu), item); - gtk_widget_show(item); - - /* - * position in alignment_group list corresponds with PangoAlignment - * (PANGO_ALIGN_RIGHT, PANGO_ALIGN_CENTER, PANGO_ALIGN_LEFT) - */ - item = gtk_radio_menu_item_new_with_mnemonic(NULL, "_Left"); - klass->priv->alignment_group = - gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(item)); - g_signal_connect(item, "activate", - G_CALLBACK(text_alignment_activated), klass); - gtk_menu_shell_append(GTK_MENU_SHELL(submenu), item); - - item = gtk_radio_menu_item_new_with_mnemonic(klass->priv->alignment_group, - "_Center"); - klass->priv->alignment_group = - gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(item)); - g_signal_connect(item, "activate", - G_CALLBACK(text_alignment_activated), klass); - gtk_menu_shell_append(GTK_MENU_SHELL(submenu), item); - - item = gtk_radio_menu_item_new_with_mnemonic(klass->priv->alignment_group, - "_Right"); - klass->priv->alignment_group = - gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(item)); - g_signal_connect(item, "activate", - G_CALLBACK(text_alignment_activated), klass); - gtk_menu_shell_append(GTK_MENU_SHELL(submenu), item); - - gtk_widget_show_all(submenu); - gtk_experiment_transcript_set_alignment(klass, PANGO_ALIGN_LEFT); - - item = gtk_separator_menu_item_new(); - gtk_menu_shell_append(GTK_MENU_SHELL(klass->priv->menu), item); - gtk_widget_show(item); - - klass->priv->menu_reverse_item = - gtk_check_menu_item_new_with_mnemonic("_Reverse"); - g_signal_connect(klass->priv->menu_reverse_item, "activate", - G_CALLBACK(reverse_activated), klass); - gtk_menu_shell_append(GTK_MENU_SHELL(klass->priv->menu), - klass->priv->menu_reverse_item); - gtk_widget_show(klass->priv->menu_reverse_item); - - gtk_widget_set_can_focus(GTK_WIDGET(klass), TRUE); -} - -/** - * @brief Instance disposal function - * - * Its purpose is to unreference \e GObjects - * the instance keeps references to (object pointers saved in the - * instance attributes). - * Keep in mind that this function may be called more than once, so - * you must guard against unreferencing an object more than once (since you - * will only own a single reference). - * Also keep in mind that instance methods may be invoked \b after the instance - * disposal function was executed but \b before instance finalization. This - * case has to be handled gracefully in the instance methods. - * - * @sa GOBJECT_UNREF_SAFE - * @sa gtk_experiment_transcript_finalize - * @sa gtk_experiment_transcript_init - * - * @param gobject \e GObject to dispose - */ -static void -gtk_experiment_transcript_dispose(GObject *gobject) -{ - GtkExperimentTranscript *trans = GTK_EXPERIMENT_TRANSCRIPT(gobject); - - /* - * destroy might be called more than once, but we have only one - * reference for each object - */ - if (trans->priv->time_adjustment != NULL) { - g_signal_handler_disconnect(G_OBJECT(trans->priv->time_adjustment), - trans->priv->time_adj_on_value_changed_id); - g_object_unref(trans->priv->time_adjustment); - trans->priv->time_adjustment = NULL; - } - GOBJECT_UNREF_SAFE(trans->priv->layer_text); - GOBJECT_UNREF_SAFE(trans->priv->layer_text_layout); - - /* Chain up to the parent class */ - G_OBJECT_CLASS(gtk_experiment_transcript_parent_class)->dispose(gobject); -} - -/** - * @brief Instance finalization function - * - * Its purpose is to free all remaining allocated memory referenced - * in public and private instance attributes (e.g. a string). - * For freeing (unreferencing) objects, - * use \ref gtk_experiment_transcript_dispose. - * - * @sa gtk_experiment_transcript_dispose - * @sa gtk_experiment_transcript_init - * - * @param gobject \e GObject to finalize - */ -static void -gtk_experiment_transcript_finalize(GObject *gobject) -{ - GtkExperimentTranscript *trans = GTK_EXPERIMENT_TRANSCRIPT(gobject); - - g_free(trans->speaker); - - if (trans->interactive_format.default_font != NULL) - pango_font_description_free(trans->interactive_format.default_font); - if (trans->interactive_format.default_text_color != NULL) - gdk_color_free(trans->interactive_format.default_text_color); - if (trans->interactive_format.default_bg_color != NULL) - gdk_color_free(trans->interactive_format.default_bg_color); - - experiment_reader_free_contributions(trans->priv->contribs); - gtk_experiment_transcript_free_formats(trans->priv->formats); - gtk_experiment_transcript_free_format(&trans->priv->interactive_format); - - /* Chain up to the parent class */ - G_OBJECT_CLASS(gtk_experiment_transcript_parent_class)->finalize(gobject); -} - -static void -gtk_experiment_transcript_realize(GtkWidget *widget) -{ - GdkWindowAttr attributes; - gint attributes_mask; - - gtk_widget_set_realized(widget, TRUE); - - attributes.x = widget->allocation.x; - attributes.y = widget->allocation.y; - attributes.width = widget->allocation.width; - attributes.height = widget->allocation.height; - attributes.wclass = GDK_INPUT_OUTPUT; - attributes.window_type = GDK_WINDOW_CHILD; - attributes.event_mask = gtk_widget_get_events(widget) - | GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK; - attributes.visual = gtk_widget_get_visual(widget); - attributes.colormap = gtk_widget_get_colormap(widget); - - gtk_widget_set_has_window(widget, TRUE); - - attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP; - widget->window = gdk_window_new(gtk_widget_get_parent_window(widget), - &attributes, attributes_mask); - - widget->style = gtk_style_attach(widget->style, widget->window); - - gdk_window_set_user_data(widget->window, widget); - - gtk_style_set_background(widget->style, widget->window, GTK_STATE_ACTIVE); - - gtk_experiment_transcript_reconfigure(GTK_EXPERIMENT_TRANSCRIPT(widget)); -} - -static void -gtk_experiment_transcript_size_allocate(GtkWidget *widget, - GtkAllocation *allocation) -{ - GtkExperimentTranscript *trans = GTK_EXPERIMENT_TRANSCRIPT(widget); - gboolean sizeChanged = widget->allocation.width != allocation->width || - widget->allocation.height != allocation->height; - - gtk_widget_set_allocation(widget, allocation); - - if (gtk_widget_get_realized(widget)) { - gdk_window_move_resize(gtk_widget_get_window(widget), - allocation->x, allocation->y, - allocation->width, allocation->height); - - if (sizeChanged || trans->priv->layer_text == NULL) - gtk_experiment_transcript_reconfigure(trans); - } -} - -static gboolean -gtk_experiment_transcript_expose(GtkWidget *widget, GdkEventExpose *event) -{ - GtkExperimentTranscript *trans = GTK_EXPERIMENT_TRANSCRIPT(widget); - - gdk_draw_drawable(GDK_DRAWABLE(gtk_widget_get_window(widget)), - widget->style->fg_gc[gtk_widget_get_state(widget)], - GDK_DRAWABLE(trans->priv->layer_text), - event->area.x, event->area.y, - event->area.x, event->area.y, - event->area.width, event->area.height); - - return FALSE; -} - -static void -time_adj_on_value_changed(GtkAdjustment *adj, gpointer user_data) -{ - GtkExperimentTranscript *trans = GTK_EXPERIMENT_TRANSCRIPT(user_data); - - /** - * @todo - * heuristic to improve performance in the common case of advancing - * time in small steps - */ - gtk_experiment_transcript_text_layer_redraw(trans); -} - -static void -gtk_experiment_transcript_reconfigure(GtkExperimentTranscript *trans) -{ - GtkWidget *widget = GTK_WIDGET(trans); - - gtk_adjustment_set_page_size(GTK_ADJUSTMENT(trans->priv->time_adjustment), - (gdouble)PX_TO_TIME(widget->allocation.height)); - - GOBJECT_UNREF_SAFE(trans->priv->layer_text); - trans->priv->layer_text = gdk_pixmap_new(gtk_widget_get_window(widget), - widget->allocation.width, - widget->allocation.height, - -1); - pango_layout_set_width(trans->priv->layer_text_layout, - widget->allocation.width*PANGO_SCALE); - - gtk_experiment_transcript_text_layer_redraw(trans); -} - -static gboolean -configure_text_layout(GtkExperimentTranscript *trans, - ExperimentReaderContrib *contrib, - gint64 current_time, - gint y, gint last_contrib_y, - int *logical_height) -{ - PangoAttrList *attrib_list; - - if (contrib->start_time > current_time) - return FALSE; - - attrib_list = pango_attr_list_new(); - - for (GSList *cur = trans->priv->formats; cur != NULL; cur = cur->next) { - GtkExperimentTranscriptFormat *fmt = - (GtkExperimentTranscriptFormat *)cur->data; - - gtk_experiment_transcript_apply_format(fmt, contrib->text, - attrib_list); - } - gtk_experiment_transcript_apply_format(&trans->priv->interactive_format, - contrib->text, attrib_list); - - pango_layout_set_attributes(trans->priv->layer_text_layout, - attrib_list); - pango_attr_list_unref(attrib_list); - - pango_layout_set_text(trans->priv->layer_text_layout, - contrib->text, -1); - - pango_layout_set_height(trans->priv->layer_text_layout, - last_contrib_y == -1 - ? G_MAXINT - : ABS(last_contrib_y - y)*PANGO_SCALE); - - pango_layout_get_pixel_size(trans->priv->layer_text_layout, - NULL, logical_height); - - return TRUE; -} - -static gboolean -render_contribution_bottomup(GtkExperimentTranscript *trans, - ExperimentReaderContrib *contrib, - gint64 current_time, gint64 current_time_px, - gint *last_contrib_y) -{ - GtkWidget *widget = GTK_WIDGET(trans); - - gint old_last_contrib_y = *last_contrib_y; - int logical_height; - - *last_contrib_y = widget->allocation.height - - (current_time_px - TIME_TO_PX(contrib->start_time)); - - if (!configure_text_layout(trans, contrib, current_time, - *last_contrib_y, old_last_contrib_y, - &logical_height)) - return TRUE; - - if (*last_contrib_y + logical_height < 0) - return FALSE; - - gdk_draw_layout(GDK_DRAWABLE(trans->priv->layer_text), - widget->style->text_gc[gtk_widget_get_state(widget)], - 0, *last_contrib_y, - trans->priv->layer_text_layout); - - return *last_contrib_y > 0; -} - -static gboolean -render_contribution_topdown(GtkExperimentTranscript *trans, - ExperimentReaderContrib *contrib, - gint64 current_time, gint64 current_time_px, - gint *last_contrib_y) -{ - GtkWidget *widget = GTK_WIDGET(trans); - - gint old_last_contrib_y = *last_contrib_y; - int logical_height; - - *last_contrib_y = current_time_px - TIME_TO_PX(contrib->start_time); - - if (!configure_text_layout(trans, contrib, current_time, - *last_contrib_y, old_last_contrib_y, - &logical_height)) - return TRUE; - - if (*last_contrib_y - logical_height > widget->allocation.height) - return FALSE; - - gdk_draw_layout(GDK_DRAWABLE(trans->priv->layer_text), - widget->style->text_gc[gtk_widget_get_state(widget)], - 0, *last_contrib_y - logical_height, - trans->priv->layer_text_layout); - - return *last_contrib_y < widget->allocation.height; -} - -static inline void -render_backdrop_area(GtkExperimentTranscript *trans, gint64 current_time_px) -{ - GtkWidget *widget = GTK_WIDGET(trans); - - gint y_start, y_end; - GdkColor color; - GdkColor *bg = &widget->style->bg[gtk_widget_get_state(widget)]; - - if (!gtk_experiment_transcript_get_use_backdrop_area(trans)) - return; - - if (gtk_experiment_transcript_get_reverse_mode(trans)) { - y_end = current_time_px - TIME_TO_PX(trans->priv->backdrop.start); - y_start = current_time_px - TIME_TO_PX(trans->priv->backdrop.end); - } else { - y_start = widget->allocation.height - - (current_time_px - TIME_TO_PX(trans->priv->backdrop.start)); - y_end = widget->allocation.height - - (current_time_px - TIME_TO_PX(trans->priv->backdrop.end)); - } - - if ((y_start < 0 && y_end < 0) || - (y_start > widget->allocation.height && - y_end > widget->allocation.height)) - return; - - y_start = CLAMP(y_start, 0, widget->allocation.height); - y_end = CLAMP(y_end, 0, widget->allocation.height); - - color.pixel = 0; - color.red = MAX((gint)bg->red - BACKDROP_VALUE, 0); - color.blue = MAX((gint)bg->blue - BACKDROP_VALUE, 0); - color.green = MAX((gint)bg->green - BACKDROP_VALUE, 0); - if (!color.red && !color.blue && !color.green) { - color.red = MIN((gint)bg->red + BACKDROP_VALUE, G_MAXUINT16); - color.blue = MIN((gint)bg->blue + BACKDROP_VALUE, G_MAXUINT16); - color.green = MIN((gint)bg->green + BACKDROP_VALUE, G_MAXUINT16); - } - gtk_widget_modify_fg(widget, gtk_widget_get_state(widget), &color); - - gdk_draw_rectangle(GDK_DRAWABLE(trans->priv->layer_text), - widget->style->fg_gc[gtk_widget_get_state(widget)], - TRUE, - 0, y_start, - widget->allocation.width, y_end - y_start); -} - -/** @private */ -G_GNUC_INTERNAL void -gtk_experiment_transcript_text_layer_redraw(GtkExperimentTranscript *trans) -{ - GtkWidget *widget = GTK_WIDGET(trans); - - gint64 current_time = 0, current_time_px; - gint last_contrib_y = -1; - - GtkExperimentTranscriptContribRenderer renderer; - - if (trans->priv->time_adjustment != NULL) { - GtkAdjustment *adj = - GTK_ADJUSTMENT(trans->priv->time_adjustment); - current_time = (gint64)gtk_adjustment_get_value(adj); - } - current_time_px = TIME_TO_PX(current_time); - - gdk_draw_rectangle(GDK_DRAWABLE(trans->priv->layer_text), - widget->style->bg_gc[gtk_widget_get_state(widget)], - TRUE, - 0, 0, - widget->allocation.width, - widget->allocation.height); - - render_backdrop_area(trans, current_time_px); - - gtk_widget_queue_draw_area(widget, 0, 0, - widget->allocation.width, - widget->allocation.height); - - if (trans->priv->contribs == NULL) - return; - - renderer = gtk_experiment_transcript_get_reverse_mode(trans) - ? render_contribution_topdown - : render_contribution_bottomup; - - for (GList *cur = experiment_reader_get_contribution_by_time( - trans->priv->contribs, - current_time); - cur != NULL; - cur = cur->prev) { - ExperimentReaderContrib *contrib = (ExperimentReaderContrib *) - cur->data; - - if (!renderer(trans, contrib, current_time, current_time_px, - &last_contrib_y)) - break; - } -} - -static void -state_changed(GtkWidget *widget, GtkStateType state __attribute__((unused))) -{ - GtkExperimentTranscript *trans = GTK_EXPERIMENT_TRANSCRIPT(widget); - - if (gtk_widget_get_realized(widget) && - trans->priv->layer_text != NULL) - gtk_experiment_transcript_text_layer_redraw(trans); -} - -static gboolean -button_pressed(GtkWidget *widget, GdkEventButton *event) -{ - GtkExperimentTranscript *trans = GTK_EXPERIMENT_TRANSCRIPT(widget); - - gtk_widget_grab_focus(widget); - - /* Ignore double-clicks and triple-clicks */ - if (event->button != 3 || event->type != GDK_BUTTON_PRESS) - return FALSE; - - gtk_menu_popup(GTK_MENU(trans->priv->menu), NULL, NULL, NULL, NULL, - event->button, event->time); - return TRUE; -} - -static gboolean -scrolled(GtkWidget *widget, GdkEventScroll *event) -{ - GtkExperimentTranscript *trans = GTK_EXPERIMENT_TRANSCRIPT(widget); - - GtkAdjustment *adj; - gdouble value, real_upper; - - if (trans->priv->time_adjustment == NULL) - return FALSE; - - adj = GTK_ADJUSTMENT(trans->priv->time_adjustment); - value = gtk_adjustment_get_value(adj); - real_upper = gtk_adjustment_get_upper(adj) - - gtk_adjustment_get_page_size(adj); - - switch (event->direction) { - case GDK_SCROLL_UP: - value -= gtk_adjustment_get_step_increment(adj); - break; - case GDK_SCROLL_DOWN: - value += gtk_adjustment_get_step_increment(adj); - default: - break; - } - - gtk_adjustment_set_value(adj, MIN(value, real_upper)); - - return TRUE; -} - -static void -choose_font_activated(GtkWidget *widget __attribute__((unused)), - gpointer data) -{ - GtkExperimentTranscript *trans = GTK_EXPERIMENT_TRANSCRIPT(data); - - GtkWidget *dialog; - gchar *font_name; - - dialog = gtk_font_selection_dialog_new("Choose Font..."); - - font_name = pango_font_description_to_string(GTK_WIDGET(trans)->style->font_desc); - gtk_font_selection_dialog_set_font_name(GTK_FONT_SELECTION_DIALOG(dialog), - font_name); - g_free(font_name); - - if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK) { - PangoFontDescription *font_desc; - - font_name = gtk_font_selection_dialog_get_font_name(GTK_FONT_SELECTION_DIALOG(dialog)); - font_desc = pango_font_description_from_string(font_name); - - gtk_widget_modify_font(GTK_WIDGET(trans), font_desc); - - pango_font_description_free(font_desc); - g_free(font_name); - - gtk_experiment_transcript_text_layer_redraw(trans); - } - - gtk_widget_destroy(dialog); -} - -static void -choose_text_color_activated(GtkWidget *widget __attribute__((unused)), - gpointer data) -{ - GtkExperimentTranscript *trans = GTK_EXPERIMENT_TRANSCRIPT(data); - - GtkWidget *dialog, *colorsel; - - dialog = gtk_color_selection_dialog_new("Choose Text Color..."); - colorsel = gtk_color_selection_dialog_get_color_selection(GTK_COLOR_SELECTION_DIALOG(dialog)); - - gtk_color_selection_set_current_color(GTK_COLOR_SELECTION(colorsel), - >K_WIDGET(trans)->style->text[GTK_STATE_NORMAL]); - - if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK) { - GdkColor color; - - gtk_color_selection_get_current_color(GTK_COLOR_SELECTION(colorsel), - &color); - gtk_widget_modify_text(GTK_WIDGET(trans), - GTK_STATE_NORMAL, &color); - - gtk_experiment_transcript_text_layer_redraw(trans); - } - - gtk_widget_destroy(dialog); -} - -static void -choose_bg_color_activated(GtkWidget *widget __attribute__((unused)), - gpointer data) -{ - GtkExperimentTranscript *trans = GTK_EXPERIMENT_TRANSCRIPT(data); - - GtkWidget *dialog, *colorsel; - - dialog = gtk_color_selection_dialog_new("Choose Background Color..."); - colorsel = gtk_color_selection_dialog_get_color_selection(GTK_COLOR_SELECTION_DIALOG(dialog)); - - gtk_color_selection_set_current_color(GTK_COLOR_SELECTION(colorsel), - >K_WIDGET(trans)->style->bg[GTK_STATE_NORMAL]); - - if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK) { - GdkColor color; - - gtk_color_selection_get_current_color(GTK_COLOR_SELECTION(colorsel), - &color); - gtk_widget_modify_bg(GTK_WIDGET(trans), - GTK_STATE_NORMAL, &color); - - gtk_experiment_transcript_text_layer_redraw(trans); - } - - gtk_widget_destroy(dialog); -} - -static void -text_alignment_activated(GtkWidget *widget __attribute__((unused)), - gpointer data) -{ - GtkExperimentTranscript *trans = GTK_EXPERIMENT_TRANSCRIPT(data); - PangoAlignment alignment; - - if (trans->priv->layer_text_layout == NULL) - return; - - alignment = PANGO_ALIGN_RIGHT; - for (GSList *cur = trans->priv->alignment_group; - cur != NULL; - cur = cur->next, alignment--) { - if (!gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(cur->data))) - continue; - - pango_layout_set_alignment(trans->priv->layer_text_layout, - alignment); - - if (gtk_widget_get_realized(GTK_WIDGET(trans)) && - trans->priv->layer_text != NULL) - gtk_experiment_transcript_text_layer_redraw(trans); - - break; - } -} - -static void -reverse_activated(GtkWidget *widget, gpointer data) -{ - GtkExperimentTranscript *trans = GTK_EXPERIMENT_TRANSCRIPT(data); - - trans->priv->flag_mask &= ~GTK_EXPERIMENT_TRANSCRIPT_REVERSE_MASK; - if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))) - trans->priv->flag_mask |= GTK_EXPERIMENT_TRANSCRIPT_REVERSE_MASK; - - if (gtk_widget_get_realized(GTK_WIDGET(trans)) && - trans->priv->layer_text != NULL) - gtk_experiment_transcript_text_layer_redraw(trans); -} - -/* - * API - */ - -/** - * @brief Construct new \e GtkExperimentTranscript widget instance. - * - * @param speaker Name of speaker whose contributions are displayed - * @return New \e GtkExperimentTranscript widget instance - */ -GtkWidget * -gtk_experiment_transcript_new(const gchar *speaker) -{ - GtkExperimentTranscript *trans; - - trans = GTK_EXPERIMENT_TRANSCRIPT(g_object_new(GTK_TYPE_EXPERIMENT_TRANSCRIPT, NULL)); - trans->speaker = g_strdup(speaker); - if (trans->speaker == NULL) { - gtk_widget_destroy(GTK_WIDGET(trans)); - return NULL; - } - - return GTK_WIDGET(trans); -} - -/** - * @brief Load contributions from an experiment transcript file. - * - * The transcript file is given as an \e ExperimentReader object instance. - * Only contributions (every text fragment identified by a timepoint) of the - * configured speaker are used. - * - * @param trans Widget instance - * @param exp \e ExperimentReader instance - * @return \c TRUE on success, else \c FALSE - */ -gboolean -gtk_experiment_transcript_load(GtkExperimentTranscript *trans, - ExperimentReader *exp) -{ - experiment_reader_free_contributions(trans->priv->contribs); - trans->priv->contribs = - experiment_reader_get_contributions_by_speaker(exp, trans->speaker); - - gtk_experiment_transcript_text_layer_redraw(trans); - - return trans->priv->contribs != NULL; -} - -/** - * @brief Load contributions from an experiment transcript file. - * - * The transcript file is given as a file name. - * Only contributions (every text fragment identified by a timepoint) of the - * configured speaker are used. - * - * @sa gtk_experiment_transcript_load - * - * @param trans Widget instance - * @param filename \e ExperimentReader instance - * @return \c TRUE on success, else \c FALSE - */ -gboolean -gtk_experiment_transcript_load_filename(GtkExperimentTranscript *trans, - const gchar *filename) -{ - gboolean res = FALSE; - ExperimentReader *exp = experiment_reader_new(filename); - - if (exp != NULL) { - res = gtk_experiment_transcript_load(trans, exp); - g_object_unref(exp); - } - - return res; -} - -/** - * @brief Enable or disable drawing a backdrop area - * - * @param trans Widget instance - * @param use Whether to enable (\c TRUE) or disable (\c FALSE) the backdrop - * area - */ -void -gtk_experiment_transcript_set_use_backdrop_area(GtkExperimentTranscript *trans, - gboolean use) -{ - trans->priv->flag_mask &= ~GTK_EXPERIMENT_TRANSCRIPT_USE_BACKDROP_MASK; - trans->priv->flag_mask |= - use ? GTK_EXPERIMENT_TRANSCRIPT_USE_BACKDROP_MASK : 0; - - if (gtk_widget_get_realized(GTK_WIDGET(trans)) && - trans->priv->layer_text != NULL) - gtk_experiment_transcript_text_layer_redraw(trans); -} - -/** - * @brief Retrieve whether a backdrop area is drawn or not - * - * @param trans Widget instance - * @return \c TRUE if it is, else \c FALSE - */ -gboolean -gtk_experiment_transcript_get_use_backdrop_area(GtkExperimentTranscript *trans) -{ - return trans->priv->flag_mask & - GTK_EXPERIMENT_TRANSCRIPT_USE_BACKDROP_MASK; -} - -/** - * @brief Configure transcript's backdrop area - * - * Set a highlighted area of the transcript by specifying start - * and end timepoints. The highlighted area is drawn with a 16% lighter or - * darker background color than the widgets current background color. - * It is ownly drawn when the backdrop area is enabled. - * - * @sa gtk_experiment_transcript_set_use_backdrop_area - * - * @param trans Widget instance - * @param start Start time in milliseconds - * @param end End time in milliseconds - */ -void -gtk_experiment_transcript_set_backdrop_area(GtkExperimentTranscript *trans, - gint64 start, gint64 end) -{ - start = MAX(start, 0); - end = MAX(end, 0); - - if (start <= end) { - trans->priv->backdrop.start = start; - trans->priv->backdrop.end = end; - } else { - trans->priv->backdrop.end = start; - trans->priv->backdrop.start = end; - } - - if (!gtk_experiment_transcript_get_use_backdrop_area(trans)) - return; - - if (gtk_widget_get_realized(GTK_WIDGET(trans)) && - trans->priv->layer_text != NULL) - gtk_experiment_transcript_text_layer_redraw(trans); -} - -/** - * @brief Set or unset reverse (top-down) render mode - * - * The render mode defaults to bottom-up mode for new widget instances. - * - * @param trans Widget instance - * @param reverse Activate reverse-mode (\c TRUE), or deactivate (\c FALSE) - */ -void -gtk_experiment_transcript_set_reverse_mode(GtkExperimentTranscript *trans, - gboolean reverse) -{ - GtkCheckMenuItem *item = - GTK_CHECK_MENU_ITEM(trans->priv->menu_reverse_item); - - gtk_check_menu_item_set_active(item, reverse); -} - -/** - * @brief Get current reverse (top-down) render mode state - * - * @sa gtk_experiment_transcript_set_reverse_mode - * - * @param trans Widget instance - * @return \c TRUE if reverse-mode is active, else \c FALSE - */ -gboolean -gtk_experiment_transcript_get_reverse_mode(GtkExperimentTranscript *trans) -{ - return trans->priv->flag_mask & GTK_EXPERIMENT_TRANSCRIPT_REVERSE_MASK; -} - -/** - * @brief Set alignment (justification) of text blocks in a transcript widget - * - * The alignment defaults to \c PANGO_ALIGN_LEFT for new widget instances. - * - * @param trans Widget instance - * @param alignment New text alignment - */ -void -gtk_experiment_transcript_set_alignment(GtkExperimentTranscript *trans, - PangoAlignment alignment) -{ - PangoAlignment cur_alignment = PANGO_ALIGN_RIGHT; - - for (GSList *cur = trans->priv->alignment_group; - cur != NULL; - cur = cur->next, cur_alignment--) - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(cur->data), - cur_alignment == alignment); -} - -/** - * @brief Get alignment (justification) of text blocks in a transcript widget - * - * @sa gtk_experiment_transcript_set_alignment - * - * @param trans Widget instance - * @return Current text alignment - */ -PangoAlignment -gtk_experiment_transcript_get_alignment(GtkExperimentTranscript *trans) -{ - if (trans->priv->layer_text_layout == NULL) - return PANGO_ALIGN_LEFT; - - return pango_layout_get_alignment(trans->priv->layer_text_layout); -} - -/** - * @brief Get time-adjustment currently used by a transcript widget - * - * The time-adjustment is the only way to control the portion of the transcript - * displayed by the widget. - * The adjustment's value is in milliseconds. - * The widget will initialize one on construction, so there \e should always be - * an adjustment to get. - * - * @param trans Widget instance - * @return Currently used time-adjustment - */ - -GtkAdjustment * -gtk_experiment_transcript_get_time_adjustment(GtkExperimentTranscript *trans) -{ - return trans->priv->time_adjustment != NULL - ? GTK_ADJUSTMENT(trans->priv->time_adjustment) - : NULL; -} - -/** - * @brief Change time-adjustment used by \e GtkExperimentTranscript - * - * The old adjustment will be - * unreferenced (and possibly destroyed) and a reference to the new - * adjustment will be fetched. - * - * @sa gtk_experiment_transcript_get_time_adjustment - * - * @param trans Widget instance - * @param adj New \e GtkAdjustment to use as time-adjustment. - */ -void -gtk_experiment_transcript_set_time_adjustment(GtkExperimentTranscript *trans, - GtkAdjustment *adj) -{ - GtkWidget *widget = GTK_WIDGET(trans); - - if (trans->priv->time_adjustment == NULL) - return; - - g_signal_handler_disconnect(G_OBJECT(trans->priv->time_adjustment), - trans->priv->time_adj_on_value_changed_id); - - g_object_unref(trans->priv->time_adjustment); - trans->priv->time_adjustment = GTK_OBJECT(adj); - g_object_ref_sink(trans->priv->time_adjustment); - - gtk_adjustment_set_page_size(GTK_ADJUSTMENT(trans->priv->time_adjustment), - (gdouble)PX_TO_TIME(widget->allocation.height)); - - trans->priv->time_adj_on_value_changed_id = - g_signal_connect(G_OBJECT(trans->priv->time_adjustment), - "value-changed", - G_CALLBACK(time_adj_on_value_changed), trans); -} diff --git a/lib/gtk-experiment-widgets/gtk-experiment-transcript.h b/lib/gtk-experiment-widgets/gtk-experiment-transcript.h deleted file mode 100644 index e537e48..0000000 --- a/lib/gtk-experiment-widgets/gtk-experiment-transcript.h +++ /dev/null @@ -1,144 +0,0 @@ -/** - * @file - * Header file necessary to include when using the \e GtkExperimentTranscript - * widget. - */ - -/* - * Copyright (C) 2012-2013 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 __GTK_EXPERIMENT_TRANSCRIPT_H -#define __GTK_EXPERIMENT_TRANSCRIPT_H - -#include <glib-object.h> -#include <glib.h> -#include <gdk/gdk.h> - -#include <gtk/gtk.h> - -#include <experiment-reader.h> - -G_BEGIN_DECLS - -/** \e GtkExperimentTranscript error domain */ -#define GTK_EXPERIMENT_TRANSCRIPT_ERROR \ - (gtk_experiment_transcript_error_quark()) - -/** \e GtkExperimentTranscript error codes */ -typedef enum { - GTK_EXPERIMENT_TRANSCRIPT_ERROR_FILEOPEN, /**< Error opening file */ - GTK_EXPERIMENT_TRANSCRIPT_ERROR_REGEXCAPTURES, /**< Additional regular expression captures used */ - GTK_EXPERIMENT_TRANSCRIPT_ERROR_LINELENGTH /**< Line read is too long */ -} GtkExperimentTranscriptError; - -/** \e GtkExperimentTranscript type */ -#define GTK_TYPE_EXPERIMENT_TRANSCRIPT \ - (gtk_experiment_transcript_get_type()) -/** - * Cast instance pointer to \e GtkExperimentTranscript - * - * @param obj Object to cast to \e GtkExperimentTranscript - * @return \e obj casted to \e GtkExperimentTranscript - */ -#define GTK_EXPERIMENT_TRANSCRIPT(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_EXPERIMENT_TRANSCRIPT, GtkExperimentTranscript)) -#define GTK_EXPERIMENT_TRANSCRIPT_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_EXPERIMENT_TRANSCRIPT, GtkExperimentTranscriptClass)) -#define GTK_IS_EXPERIMENT_TRANSCRIPT(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_EXPERIMENT_TRANSCRIPT)) -#define GTK_IS_EXPERIMENT_TRANSCRIPT_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE((klass), GTK_TYPE_EXPERIMENT_TRANSCRIPT)) -#define GTK_EXPERIMENT_TRANSCRIPT_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_EXPERIMENT_TRANSCRIPT, GtkExperimentTranscriptClass)) - -/** @private */ -typedef struct _GtkExperimentTranscriptPrivate GtkExperimentTranscriptPrivate; - -/** - * \e GtkExperimentTranscript instance structure - */ -typedef struct _GtkExperimentTranscript { - GtkWidget parent_instance; /**< Parent instance structure */ - - gchar *speaker; /**< Name of speaker whose contributions are displayed (\b read-only) */ - - /** - * Default formattings to apply for interactive for interactive format - * rules if no Pango markup is specified. - * A \c NULL pointer means that the correspondig text property will not - * be changed. After widget instantiation all fields are \c NULL. - */ - struct _GtkExperimentTranscriptInteractiveFormat { - PangoFontDescription *default_font; /**< Default interactive format font */ - GdkColor *default_text_color; /**< Default interactive format text color */ - GdkColor *default_bg_color; /**< Default interactive format background color */ - } interactive_format; - - GtkExperimentTranscriptPrivate *priv; /**< @private Pointer to \b private instance attributes */ -} GtkExperimentTranscript; - -/** - * \e GtkExperimentTranscript class structure - */ -typedef struct _GtkExperimentTranscriptClass { - GtkWidgetClass parent_class; /**< Parent class structure */ -} GtkExperimentTranscriptClass; - -/** @private */ -GQuark gtk_experiment_transcript_error_quark(void); -/** @private */ -GType gtk_experiment_transcript_get_type(void); - -/* - * API - */ -GtkWidget *gtk_experiment_transcript_new(const gchar *speaker); - -gboolean gtk_experiment_transcript_load(GtkExperimentTranscript *trans, - ExperimentReader *exp); -gboolean gtk_experiment_transcript_load_filename(GtkExperimentTranscript *trans, - const gchar *filename); - -void gtk_experiment_transcript_set_use_backdrop_area(GtkExperimentTranscript *trans, - gboolean use); -gboolean gtk_experiment_transcript_get_use_backdrop_area(GtkExperimentTranscript *trans); -void gtk_experiment_transcript_set_backdrop_area(GtkExperimentTranscript *trans, - gint64 start, gint64 end); - -void gtk_experiment_transcript_set_reverse_mode(GtkExperimentTranscript *trans, - gboolean reverse); -gboolean gtk_experiment_transcript_get_reverse_mode(GtkExperimentTranscript *trans); - -void gtk_experiment_transcript_set_alignment(GtkExperimentTranscript *trans, - PangoAlignment alignment); -PangoAlignment gtk_experiment_transcript_get_alignment(GtkExperimentTranscript *trans); - -gboolean gtk_experiment_transcript_load_formats(GtkExperimentTranscript *trans, - const gchar *filename, - GError **error); -gboolean gtk_experiment_transcript_set_interactive_format(GtkExperimentTranscript *trans, - const gchar *format_str, - gboolean with_markup, - GError **error); - -GtkAdjustment *gtk_experiment_transcript_get_time_adjustment(GtkExperimentTranscript *trans); -void gtk_experiment_transcript_set_time_adjustment(GtkExperimentTranscript *trans, - GtkAdjustment *adj); - -G_END_DECLS - -#endif diff --git a/lib/gtk-experiment-widgets/gtk-experiment-widgets-catalog.xml b/lib/gtk-experiment-widgets/gtk-experiment-widgets-catalog.xml deleted file mode 100644 index 73a1ec9..0000000 --- a/lib/gtk-experiment-widgets/gtk-experiment-widgets-catalog.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!-- - Install into $GLADE_CATALOG_PATH (default: /usr/share/glade3/catalogs) ---> - -<glade-catalog name="gtk-experiment-widgets" - library="gtk-experiment-widgets" depends="gtk+"> - <glade-widget-classes> - <glade-widget-class name="GtkExperimentNavigator" - generic-name="gtk-experiment-navigator" - title="Experiment Navigator"/> - <glade-widget-class name="GtkExperimentTranscript" - generic-name="gtk-experiment-transcript" - title="Experiment Transcript"/> - </glade-widget-classes> - - <glade-widget-group name="gtk-experiment-widgets" - title="Experiment Widgets"> - <glade-widget-class-ref name="GtkExperimentNavigator"/> - <glade-widget-class-ref name="GtkExperimentTranscript"/> - </glade-widget-group> -</glade-catalog> diff --git a/makemake_mingw_dev.sh b/makemake_mingw_dev.sh deleted file mode 100755 index 214374b..0000000 --- a/makemake_mingw_dev.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -autoreconf -i -./configure --prefix=/mingw \ - --enable-console \ - --enable-doxygen-doc \ - --enable-doxygen-extract-private \ - CFLAGS="-g -O0" diff --git a/src/Makefile.am b/src/Makefile.am index 6dd424b..9e09695 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -14,7 +14,7 @@ libgtk_vlc_player_la_LDFLAGS = -no-undefined -shared -bindir @bindir@ \ include_HEADERS = gtk-vlc-player.h -dist_gtk_vlc_player_catalogs_DATA = gtk-vlc-player-catalog.xml +dist_catalogs_DATA = gtk-vlc-player-catalog.xml dist_noinst_DATA = cclosure-marshallers.list CLEANFILES = $(BUILT_SOURCES) -- cgit v1.2.3