Philip Chimento [Sat, 26 Oct 2013 05:24:28 +0000 (22:24 -0700)]
Print more informative assert message
ASSERT_EQUAL() is for int-like types that will print with %d.
Philip Chimento [Wed, 25 Sep 2013 06:14:46 +0000 (23:14 -0700)]
Add Glk unit test framework
This is the beginning of a unit test framework for Glk. Currently it has
only one test. But the potential is infinite! It could be used to test
how well other Glk implementations conform too.
Philip Chimento [Wed, 25 Sep 2013 05:59:21 +0000 (22:59 -0700)]
Update POTFILES.in so that 'make check' passes
Intltool has some intelligent checks for source files that look like
they contain translatable strings.
Philip Chimento [Sat, 21 Sep 2013 17:41:40 +0000 (10:41 -0700)]
Do not internationalize plugin-loader
There are no user-facing strings, so this is not necessary.
Philip Chimento [Sat, 21 Sep 2013 17:40:44 +0000 (10:40 -0700)]
Plugin-loader handles .la files
Instead of passing .libs/plugin.so to plugin-loader, you can now
pass plugin.la and the correct file will be loaded.
Philip Chimento [Fri, 13 Sep 2013 21:58:52 +0000 (14:58 -0700)]
Port date/time functions to GDateTime
These are supposedly portable to more platforms than POSIX, effectively
putting the burden of checking whether a platform supports it onto GLib,
instead of having Chimara shoulder it.
Philip Chimento [Sun, 1 Sep 2013 00:14:17 +0000 (17:14 -0700)]
Render pager using Cairo instead of GDK
This was not yet ported on the GTK 3 branch because the pager was
completely replaced by a GtkOverlay.
Philip Chimento [Sat, 31 Aug 2013 22:46:33 +0000 (15:46 -0700)]
No need to include empty default signal handlers
Philip Chimento [Sat, 31 Aug 2013 22:28:27 +0000 (15:28 -0700)]
Remove support for older GLib and GTK versions
The iLiad Reader was holding us back to GTK 2.6, but that product
is discontinued and the company is bankrupt.
Philip Chimento [Sat, 31 Aug 2013 22:04:59 +0000 (15:04 -0700)]
Don't use g_thread_init() anymore
g_thread_init() is called automatically when the library loads.
Philip Chimento [Sat, 31 Aug 2013 21:48:37 +0000 (14:48 -0700)]
Use statically-allocated thread private data
Dynamically allocating GPrivate is discouraged, and g_private_new()
is deprecated since GLib 2.32.
Philip Chimento [Sat, 31 Aug 2013 21:07:08 +0000 (14:07 -0700)]
Use g_thread_try_new() instead of g_thread_create()
g_thread_create() was deprecated in GLib 2.32. We don't use
g_thread_new() because the program should not abort if the thread
could not be created; rather, it should display an error message
and refuse to start the game.
Philip Chimento [Sat, 31 Aug 2013 21:00:15 +0000 (14:00 -0700)]
Use g_cond_wait_until() instead of g_cond_timed_wait()
This bumps the GLib version requirement to 2.32; that is also the
version in which g_cond_timed_wait() was deprecated.
Philip Chimento [Wed, 21 Aug 2013 02:11:06 +0000 (19:11 -0700)]
Use init and clear for GMutex and GCond
- g_mutex_init() replaces g_mutex_new()
- g_mutex_clear() replaces g_mutex_free()
- g_cond_init() replaces g_cond_new()
- g_cond_clear() replaces g_cond_free()
The old functions were deprecated and the new functions were added as
of GLib 2.32.
This requires all structures to use GMutex members instead of GMutex *
pointers; likewise for GCond. Since we cannot set the GMutex * pointers
to NULL anymore when the ChimaraGlk widget is finalized, we add an
after_finalize flag that is set at the beginning of
chimara_glk_finalize().
Philip Chimento [Wed, 21 Aug 2013 01:57:36 +0000 (18:57 -0700)]
No need to initialize private struct members to 0
At the beginning of the class init function, the entire private
struct is filled with 0 bytes.
Philip Chimento [Sat, 31 Aug 2013 19:32:09 +0000 (12:32 -0700)]
Supress warnings in Glulxe
P. F. Chimento [Sat, 20 Apr 2013 15:54:57 +0000 (17:54 +0200)]
Update Andrew Plotkin's unit tests
P. F. Chimento [Sat, 20 Apr 2013 15:42:42 +0000 (17:42 +0200)]
Fix overenthusiastic g_free() of Glk startup data
Philip Chimento [Fri, 28 Sep 2012 13:59:11 +0000 (15:59 +0200)]
[bocfel] Remove debug printf
Philip Chimento [Sun, 16 Sep 2012 20:22:35 +0000 (22:22 +0200)]
Copyright, change log, news file
Update the copyright notice in the license file, add content to the
NEWS and ChangeLog file. We will not use a ChangeLog, because just
referring to the git log does a much better job.
Philip Chimento [Sun, 16 Sep 2012 17:52:38 +0000 (19:52 +0200)]
Keep glkunix startup arg[c,v] alive
Bocfel (for one) relies on the argc and argv that it gets from the
Glk library not being freed during the course of the game. So now
we keep them alive.
Philip Chimento [Sun, 16 Sep 2012 17:52:07 +0000 (19:52 +0200)]
Add Bocfel interpreter
The Bocfel interpreter is now available for playing Z-machine files.
Philip Chimento [Sun, 16 Sep 2012 17:11:36 +0000 (19:11 +0200)]
Fix automatic resource file search
Fixes #21. Don't look for an extra resource file if the game to be
loaded already has a blorb file extension.
Marijn van Vliet [Sun, 16 Sep 2012 16:00:53 +0000 (18:00 +0200)]
Some style cleanup work in glk_window_clear()
Marijn van Vliet [Sun, 16 Sep 2012 15:50:54 +0000 (17:50 +0200)]
Redone textgrid resize logic. Fixes #8
Philip Chimento [Sun, 16 Sep 2012 13:59:01 +0000 (15:59 +0200)]
Fix pager bug #25!
Finally fixed! An extra check to see whether the pager is at the
bottom. Apparently if you click to put the cursor somewhere that's
not the end of the text buffer, then scroll up with your scroll
wheel, then _sometimes_ the pager wouldn't stop paging when you
paged down to the end again, because the GtkAdjustment's "changed"
signal didn't fire. But now that's fixed.
Conflicts:
libchimara/pager.c
Philip Chimento [Sun, 16 Sep 2012 11:04:26 +0000 (13:04 +0200)]
Update interpreters to latest Garglk codebase
Marijn van Vliet [Sun, 16 Sep 2012 11:04:42 +0000 (13:04 +0200)]
Each time a sound is played, a new GioStreamSrc object is created. This fixes #37.
Marijn van Vliet [Sat, 15 Sep 2012 23:05:36 +0000 (01:05 +0200)]
updated comments
Philip Chimento [Sat, 15 Sep 2012 22:40:54 +0000 (00:40 +0200)]
Const return type for static error messages
Marijn van Vliet [Sat, 15 Sep 2012 23:03:37 +0000 (01:03 +0200)]
Make sound/graphics work in Nitfol.
Philip Chimento [Sat, 15 Sep 2012 19:51:33 +0000 (21:51 +0200)]
Remove compatibility checks with old GTK versions
GTK 2.24 is now the supported version on this branch.
Philip Chimento [Sat, 15 Sep 2012 15:46:59 +0000 (17:46 +0200)]
Remove Iliad code from codebase
The iRex Iliad is, unfortunately, obsolete, and the company that
made it is bankrupt. So it is not supported anymore.
Philip Chimento [Sat, 15 Sep 2012 15:38:07 +0000 (17:38 +0200)]
Remove Babel library from codebase
Since we are going to release the library with a minimal player, and
work together with Grotesque to produce a cool player, we are removing
the Babel library for now.
Marijn van Vliet [Tue, 28 Aug 2012 08:56:37 +0000 (10:56 +0200)]
Do not require database dependancies anymore, IFDB test program is irrelevant
now.
Philip Chimento [Sat, 25 Aug 2012 20:46:36 +0000 (22:46 +0200)]
Use cairo for drawing
GDK drawing is discouraged in later GTK 2 versions. We now use cairo for
drawing. This means that the graphics window now corresponds to a
GtkDrawingArea, and we use a cairo surface as a backing store.
Philip Chimento [Sat, 25 Aug 2012 19:06:34 +0000 (21:06 +0200)]
Remove nonexistent function
Apparently gtk_box_pack_end_with_defaults() has been deprecated for a
while and does not exist now in GTK 3.
Philip Chimento [Sat, 25 Aug 2012 18:58:50 +0000 (20:58 +0200)]
Remove deprecated member access
GObject classes aren't supposed to have their members accessed directly
anymore. Instead use accessor functions. In the case of our
gtk_text_tag_copy() function this requires some clever copying of
properties ;-)
Philip Chimento [Sat, 25 Aug 2012 18:55:46 +0000 (20:55 +0200)]
Change GDK_ key constants
In GTK 3 they are GDK_KEY_ constants
Marijn van Vliet [Sat, 15 Sep 2012 16:11:55 +0000 (18:11 +0200)]
Redone flush_buffer logic, fixes #39
Philip Chimento [Sun, 26 Aug 2012 00:21:10 +0000 (02:21 +0200)]
Add missing $(AM_CPPFLAGS) to makefile
Philip Chimento [Sat, 25 Aug 2012 21:00:58 +0000 (23:00 +0200)]
Regularize indentation in player.py
Philip Chimento [Sat, 25 Aug 2012 21:00:32 +0000 (23:00 +0200)]
PEP8 cleanup in player.py
P. F. Chimento [Sun, 3 Jun 2012 21:46:14 +0000 (23:46 +0200)]
Replace deprecated functions
gdk_pixbuf_(un)ref -> g_object_(un)ref
P. F. Chimento [Sat, 5 May 2012 09:29:56 +0000 (11:29 +0200)]
Exit after an error building the player interface
Philip Chimento [Sun, 12 Feb 2012 13:10:21 +0000 (14:10 +0100)]
Update Andrew Plotkin's unit tests
Philip Chimento [Sun, 12 Feb 2012 12:58:18 +0000 (13:58 +0100)]
Merge branch 'glk-074'
Philip Chimento [Sun, 12 Feb 2012 12:55:38 +0000 (13:55 +0100)]
Fixed a bug in creating fileref from fileref
glk_fileref_create_from_fileref() would use the entire pathname of
the old fileref as its basename. Now it uses the original basename.
Philip Chimento [Sun, 12 Feb 2012 12:40:05 +0000 (13:40 +0100)]
Implement new name mangling
The Glk 0.7.4 spec has new recommendations on what characters should
be legal in filenames and how to make sure that files created by
different Glk implementations are interoperable.
Philip Chimento [Sun, 12 Feb 2012 12:39:08 +0000 (13:39 +0100)]
Update ExternalFile unit test
This tests the new name-mangling code in glk_fileref_create_by_name().
Philip Chimento [Sun, 12 Feb 2012 12:11:23 +0000 (13:11 +0100)]
Implement recommended file suffixes in dialog
When creating a file with glk_fileref_create_by_prompt(), there will
be a file filter active for the recommended file extension. For
fileusage_InputRecord and fileusage_Transcript, there will also be a
filter for text/plain files selectable. In any case there is also an
"All files" filter selectable.
Philip Chimento [Sun, 12 Feb 2012 11:36:28 +0000 (12:36 +0100)]
Implement resource streams
Philip Chimento [Sat, 11 Feb 2012 23:57:53 +0000 (00:57 +0100)]
Philip Chimento [Sat, 11 Feb 2012 22:26:03 +0000 (23:26 +0100)]
Add new resource stream unit test
From Andrew Plotkin's glk-dev repository
Philip Chimento [Sat, 11 Feb 2012 21:47:17 +0000 (22:47 +0100)]
Update to Blorb protocol 1.5
Update documentation of new Blorb constants
Philip Chimento [Sat, 11 Feb 2012 23:51:09 +0000 (00:51 +0100)]
Update Dispatch layer
Philip Chimento [Sat, 11 Feb 2012 23:33:39 +0000 (00:33 +0100)]
Update Glulxe to 0.4.7
Philip Chimento [Sat, 11 Feb 2012 14:20:35 +0000 (15:20 +0100)]
Update documentation to match Glk 0.7.4 spec
Philip Chimento [Sat, 11 Feb 2012 10:21:59 +0000 (11:21 +0100)]
Add stub functions for Glk 0.7.4 API
Technically, we implement the spec now by having the gestalt function
claim that the functions do nothing.
Philip Chimento [Sat, 11 Feb 2012 07:45:52 +0000 (08:45 +0100)]
Update header file and spec version number
Philip Chimento [Sun, 5 Feb 2012 16:14:50 +0000 (17:14 +0100)]
Prevent unnecessary regeneration of VAPI
Vapigen doesn't update the timestamp of the VAPI file when the
contents don't change; so when the GIR changes but the VAPI doesn't,
the dependency tracking got confused. This updates the timestamp
properly.
Philip Chimento [Sun, 5 Feb 2012 16:13:29 +0000 (17:13 +0100)]
Gtk-Doc 1.12 required for introspection
Philip Chimento [Sun, 5 Feb 2012 16:13:02 +0000 (17:13 +0100)]
Workaround for recent files bug no longer needed
Philip Chimento [Wed, 1 Feb 2012 22:13:36 +0000 (23:13 +0100)]
Added a Python player!
It crashes half the time because GObject Introspection isn't actually
officially supported with GTK 2. However, it's a simple player that
shows how to use Chimara in Python. We don't even have to write any
language bindings, thanks to the power of GObject Introspection! But
if we want to do anything serious with Python, we will need to port to
GTK 3 first.
It's a straight port of the C player, but it's 300 lines instead
of 1200 ;-)
Philip Chimento [Wed, 1 Feb 2012 22:09:35 +0000 (23:09 +0100)]
Add 'running' property to ChimaraGlk
Read-only property that does the same as chimara_glk_get_running();
properties work nicely in language bindings
Philip Chimento [Wed, 1 Feb 2012 21:06:05 +0000 (22:06 +0100)]
Identified two more entry points
This fixes an obscure bug! If you create your ChimaraGlk object
not with chimara_glk_new() but with g_object_new(), then the library
init function was not called. That caused a crash when trying to
access the thread-private data.
Philip Chimento [Wed, 18 Jan 2012 16:38:24 +0000 (17:38 +0100)]
Automatic generation of VAPI file
The bugs in vapigen seem to have been worked out.
Philip Chimento [Wed, 18 Jan 2012 16:18:51 +0000 (17:18 +0100)]
Bring documentation up to date with API 0.7.3
Philip Chimento [Wed, 18 Jan 2012 13:18:30 +0000 (14:18 +0100)]
Change implemented Glk spec to 0.7.3.
Philip Chimento [Wed, 18 Jan 2012 13:17:34 +0000 (14:17 +0100)]
Fix Gtk-Doc warnings
Philip Chimento [Wed, 18 Jan 2012 12:59:59 +0000 (13:59 +0100)]
Merge branch 'new-sound-api'
Conflicts:
docs/reference/chimara-docs.sgml
Philip Chimento [Sun, 1 Jan 2012 17:32:28 +0000 (18:32 +0100)]
Add API to start plugins using GFile
To complete the API, we should have functions that start a plugin using
GIO's GFile API. It's easier for navigating the filesystem in language
bindings such as Python.
Philip Chimento [Tue, 6 Dec 2011 21:27:44 +0000 (22:27 +0100)]
Make const char * string argument
In chimara_if_run_game(), the game file argument should be const char *.
Philip Chimento [Tue, 29 Nov 2011 22:38:43 +0000 (23:38 +0100)]
Add GIR and typelib to ignore files
Philip Chimento [Tue, 29 Nov 2011 22:35:13 +0000 (23:35 +0100)]
Add introspection glossary to documentation
So that Gtk-Doc doesn't complain about that either, and now the
introspection annotations in the docs have nice hover-over
explanations.
Philip Chimento [Tue, 29 Nov 2011 22:31:55 +0000 (23:31 +0100)]
Added IDs to documentation chapters
At Gtk-Doc's suggestion
Philip Chimento [Tue, 29 Nov 2011 22:20:58 +0000 (23:20 +0100)]
Add silent rule to documentation Makefile
Since newer versions of Gtk-Doc spew much less garbage onto the
terminal, this fixes the rule that generates selectors.xml to be
less verbose as well.
Philip Chimento [Tue, 29 Nov 2011 22:18:16 +0000 (23:18 +0100)]
Add missing symbol to documentation
Marijn van Vliet [Thu, 3 Nov 2011 14:36:37 +0000 (15:36 +0100)]
Fix some memory leakage
Marijn van Vliet [Thu, 3 Nov 2011 14:23:42 +0000 (15:23 +0100)]
fixed get_current_font to actually do something now.
Fixes #35
Marijn van Vliet [Tue, 25 Oct 2011 14:08:56 +0000 (16:08 +0200)]
Fixed some omitted applications of default and glk-input tags
Philip Chimento [Fri, 2 Sep 2011 23:59:17 +0000 (01:59 +0200)]
Add API to unload plugin module
This is a workaround for a very complicated bug. When you have more than
one ChimaraGlk widget opening the same plugin, then g_module_open()
doesn't dlopen() the plugin again; instead, it just adds a reference to
the open module.
This means that all static variables in the module are not reinitialized
when the Glk program starts running in the second ChimaraGlk widget.
This problem needs to be solved either by eliminating the static
variables from the plugins, or making sure that different ChimaraGlk
widgets open their plugins separately.
This commit does the latter, by adding API to unload the plugin module
(chimara_glk_unload_plugin()) so that ChimaraGlk widgets that run the
same program but not at the same time have the option to unload the
plugin in one widget before loading it in the other. Specifically, this
is the use case of Inform 7.
This does not fix the use case where two separate ChimaraGlk widgets
want to run the same program at the same time.
Philip Chimento [Mon, 29 Aug 2011 03:52:27 +0000 (23:52 -0400)]
Clarify documentation
...of chimara_glk_stop() and chimara_glk_wait()
Philip Chimento [Mon, 29 Aug 2011 03:52:03 +0000 (23:52 -0400)]
Testing for Inform 7 bug #731
http://inform7.com/mantis/view.php?id=731
Philip Chimento [Sun, 28 Aug 2011 04:34:10 +0000 (06:34 +0200)]
Fixed crash in VALID_MAGIC with NULL object
Philip Chimento [Sat, 27 Aug 2011 20:54:46 +0000 (16:54 -0400)]
Incorporate fix for NULL memory streams
From latest glk-dev and cheapglk. See the discussion on
http://www.intfiction.org/forum/viewtopic.php?f=38&t=3058
P. F. Chimento [Thu, 4 Aug 2011 18:23:49 +0000 (20:23 +0200)]
Check if image exists before caching it
If a resource load callback returns an invalid file name, for example,
then the image operation should be aborted.
Philip Chimento [Sat, 23 Jul 2011 10:03:17 +0000 (12:03 +0200)]
Fix libraries for indirect linking
Philip Chimento [Sat, 16 Jul 2011 21:51:47 +0000 (23:51 +0200)]
Ported babeltest to libsoup
Philip Chimento [Sat, 16 Jul 2011 21:14:05 +0000 (23:14 +0200)]
Make sure PLUGINDIR is defined
Philip Chimento [Sat, 16 Jul 2011 20:32:30 +0000 (22:32 +0200)]
Remove deprecated usages
But add #define's for compatibility on GTK < 2.18, so that it will still
compile on iLiad
Philip Chimento [Sat, 16 Jul 2011 19:40:43 +0000 (21:40 +0200)]
Now we can claim to implement the whole gestalt_Sound2 suite
Philip Chimento [Sat, 16 Jul 2011 19:37:23 +0000 (21:37 +0200)]
New volume change interrupts old one
Also, add guards for compiling without GStreamer
Philip Chimento [Sat, 16 Jul 2011 19:18:45 +0000 (21:18 +0200)]
Implement volume change notifications
Philip Chimento [Sat, 16 Jul 2011 19:14:14 +0000 (21:14 +0200)]
Re-implement gradual volume change using g_timeout_add()
Still to do: volume change notifications
Philip Chimento [Wed, 13 Jul 2011 22:55:12 +0000 (00:55 +0200)]
Implemented glk_schannel_set_volume_ext() partly
Still need to do:
- Volume change notifications
- What happens when channel is not playing
P. F. Chimento [Tue, 12 Jul 2011 19:24:51 +0000 (21:24 +0200)]
Implemented glk_schannel_play_multi()
Philip Chimento [Fri, 8 Jul 2011 18:49:26 +0000 (20:49 +0200)]
Add tests for new sound API
Run them with plugin-loader .libs/soundtest.so
Philip Chimento [Thu, 7 Jul 2011 22:11:50 +0000 (00:11 +0200)]
Took removed function out of docs
Philip Chimento [Thu, 7 Jul 2011 22:08:51 +0000 (00:08 +0200)]
Added draft docs for new functions and gestalt selectors