3 /* Version of the Glk specification implemented by this library */
4 #define MAJOR_VERSION 0
5 #define MINOR_VERSION 7
10 * @sel: A selector, representing which capability to request information
12 * @val: Extra information, depending on the value of @sel.
14 * Calls the gestalt system to request information about selector @sel, without
15 * passing an array to store extra information in (see glk_gestalt_ext()).
17 * Returns: an integer, depending on what selector was called.
20 glk_gestalt(glui32 sel, glui32 val)
22 return glk_gestalt_ext(sel, val, NULL, 0);
27 * @sel: A selector, representing which capability to request information
29 * @val: Extra information, depending on the value of @sel.
30 * @arr: Location of an array to store extra information in, or #NULL.
31 * @arrlen: Length of @arr, or 0 if @arr is #NULL.
33 * Calls the gestalt system to request information about selector @sel,
34 * possibly returning information in @arr.
36 * Returns: an integer, depending on what selector was called.
39 glk_gestalt_ext(glui32 sel, glui32 val, glui32 *arr, glui32 arrlen)
45 return (MAJOR_VERSION << 16) + (MINOR_VERSION << 8) + SUB_VERSION;
47 /* Which characters can we print? */
48 case gestalt_CharOutput:
49 /* All characters are printed as one character, in any case */
52 /* Cannot print control chars except \n, or chars > 255 */
53 if( (val < 32 && val != 10) || (val >= 127 && val <= 159) || (val > 255) )
54 return gestalt_CharOutput_CannotPrint;
55 /* Can print all other Latin-1 characters */
56 return gestalt_CharOutput_ExactPrint;
58 /* Selector not supported */