Support for GStreamer 1.0
[projects/chimara/chimara.git] / libchimara / gestalt.c
index 13193fcc6c485742903595e89038c9ea23a98980..195733bd9c73d150168d7964b51cd2f8bc306215 100644 (file)
@@ -1,11 +1,12 @@
 #include <stddef.h> /* Surprisingly, the only symbol needed is NULL */
 #include <config.h>
 #include "glk.h"
+#include "input.h"
 
 /* Version of the Glk specification implemented by this library */
 #define MAJOR_VERSION 0
 #define MINOR_VERSION 7
-#define SUB_VERSION   2
+#define SUB_VERSION   4
 
 /**
  * glk_gestalt:
@@ -108,6 +109,10 @@ glk_gestalt_ext(glui32 sel, glui32 val, glui32 *arr, glui32 arrlen)
                case gestalt_DrawImage:
                        return val == wintype_Graphics || val == wintype_TextBuffer;
 
+               /* Which keycodes can be used as line terminators */
+               case gestalt_LineTerminatorKey:
+                       return is_valid_line_terminator(val)? 1 : 0;
+
                /* Capabilities that are simply supported */
                case gestalt_Unicode:
                case gestalt_Timer:
@@ -116,23 +121,26 @@ glk_gestalt_ext(glui32 sel, glui32 val, glui32 *arr, glui32 arrlen)
                case gestalt_GraphicsTransparency:
                case gestalt_DateTime:
                case gestalt_UnicodeNorm:
+               case gestalt_LineInputEcho:
+               case gestalt_LineTerminators:
+               case gestalt_ResourceStream:
                        return 1;
 
-               /* Capabilities supported if compiled with GStreamer */
+               /* Capabilities supported if compiled with sound support */
                case gestalt_Sound:
                case gestalt_SoundVolume:
                case gestalt_SoundNotify:
                case gestalt_SoundMusic:
-#ifdef GSTREAMER_SOUND
+               case gestalt_Sound2:
+#ifdef HAVE_SOUND
                        return 1;
 #else
                        return 0;
 #endif
                        
                /* Unsupported capabilities */
-               case gestalt_LineInputEcho:
-               case gestalt_LineTerminatorKey:
-               case gestalt_LineTerminators:
+                       /* None! */
+
                /* Selector not supported */    
                default:
                        return 0;