projects
/
projects
/
chimara
/
chimara.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Redone textgrid resize logic. Fixes #8
[projects/chimara/chimara.git]
/
libchimara
/
gestalt.c
diff --git
a/libchimara/gestalt.c
b/libchimara/gestalt.c
index e2eceefdfced743b2e965560aa85d6bfcf348f96..1dad9d94bf8c173b62f6ff906691f159e565ee70 100644
(file)
--- a/
libchimara/gestalt.c
+++ b/
libchimara/gestalt.c
@@
-1,11
+1,12
@@
#include <stddef.h> /* Surprisingly, the only symbol needed is NULL */
#include <config.h>
#include "glk.h"
#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
/* 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:
/**
* glk_gestalt:
@@
-96,18
+97,6
@@
glk_gestalt_ext(glui32 sel, glui32 val, glui32 *arr, glui32 arrlen)
return gestalt_CharOutput_CannotPrint;
/* Can print all other characters */
return gestalt_CharOutput_ExactPrint;
return gestalt_CharOutput_CannotPrint;
/* Can print all other characters */
return gestalt_CharOutput_ExactPrint;
-
- /* Unicode capabilities present */
- case gestalt_Unicode:
- return 1;
-
- /* Timer capabilities present */
- case gestalt_Timer:
- return 1;
-
- /* Hyperlink capabilities present */
- case gestalt_Hyperlinks:
- return 1;
/* Hyperlinks supported on textbuffers and textgrids */
case gestalt_HyperlinkInput:
/* Hyperlinks supported on textbuffers and textgrids */
case gestalt_HyperlinkInput:
@@
-117,16
+106,24
@@
glk_gestalt_ext(glui32 sel, glui32 val, glui32 *arr, glui32 arrlen)
case gestalt_MouseInput:
return val == wintype_TextGrid;
case gestalt_MouseInput:
return val == wintype_TextGrid;
- case gestalt_Graphics:
- return 1;
-
case gestalt_DrawImage:
return val == wintype_Graphics || val == wintype_TextBuffer;
case gestalt_DrawImage:
return val == wintype_Graphics || val == wintype_TextBuffer;
- case gestalt_GraphicsTransparency:
- return 1;
+ /* 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:
+ case gestalt_Hyperlinks:
+ case gestalt_Graphics:
+ case gestalt_GraphicsTransparency:
case gestalt_DateTime:
case gestalt_DateTime:
+ case gestalt_UnicodeNorm:
+ case gestalt_LineInputEcho:
+ case gestalt_LineTerminators:
+ case gestalt_ResourceStream:
return 1;
/* Capabilities supported if compiled with GStreamer */
return 1;
/* Capabilities supported if compiled with GStreamer */
@@
-134,6
+131,7
@@
glk_gestalt_ext(glui32 sel, glui32 val, glui32 *arr, glui32 arrlen)
case gestalt_SoundVolume:
case gestalt_SoundNotify:
case gestalt_SoundMusic:
case gestalt_SoundVolume:
case gestalt_SoundNotify:
case gestalt_SoundMusic:
+ case gestalt_Sound2:
#ifdef GSTREAMER_SOUND
return 1;
#else
#ifdef GSTREAMER_SOUND
return 1;
#else
@@
-141,10
+139,8
@@
glk_gestalt_ext(glui32 sel, glui32 val, glui32 *arr, glui32 arrlen)
#endif
/* Unsupported capabilities */
#endif
/* Unsupported capabilities */
- case gestalt_LineInputEcho:
- case gestalt_LineTerminatorKey:
- case gestalt_LineTerminators:
- case gestalt_UnicodeNorm:
+ /* None! */
+
/* Selector not supported */
default:
return 0;
/* Selector not supported */
default:
return 0;