- Removed mouse pointer from fig11.png.
* On Linux systems, this is a file with a name like
* <filename>plugin.so</filename>. For portability, you can use libtool and
* automake:
* On Linux systems, this is a file with a name like
* <filename>plugin.so</filename>. For portability, you can use libtool and
* automake:
- * <informalexample><programlisting>
* pkglib_LTLIBRARIES = plugin.la
* plugin_la_SOURCES = plugin.c foo.c bar.c
* plugin_la_LDFLAGS = -module -shared -avoid-version -export-symbols-regex "^glk_main$$"
* pkglib_LTLIBRARIES = plugin.la
* plugin_la_SOURCES = plugin.c foo.c bar.c
* plugin_la_LDFLAGS = -module -shared -avoid-version -export-symbols-regex "^glk_main$$"
- * </programlisting></informalexample>
* This will produce <filename>plugin.la</filename> which is a text file
* containing the correct plugin file to open (see the relevant section of the
* <ulink
* This will produce <filename>plugin.la</filename> which is a text file
* containing the correct plugin file to open (see the relevant section of the
* <ulink
* <para>
* For each class of opaque objects, there is an iterate function, which you can
* use to obtain a list of all existing objects of that class. It takes the form
* <para>
* For each class of opaque objects, there is an iterate function, which you can
* use to obtain a list of all existing objects of that class. It takes the form
- * <informalexample><programlisting>
* <replaceable>CLASS</replaceable>id_t glk_<replaceable>CLASS</replaceable>_iterate(<replaceable>CLASS</replaceable>id_t <parameter>obj</parameter>, #glui32 *<parameter>rockptr</parameter>);
* <replaceable>CLASS</replaceable>id_t glk_<replaceable>CLASS</replaceable>_iterate(<replaceable>CLASS</replaceable>id_t <parameter>obj</parameter>, #glui32 *<parameter>rockptr</parameter>);
- * </programlisting></informalexample>
* ...where <code><replaceable>CLASS</replaceable></code> represents one of the
* opaque object classes.
* </para>
* ...where <code><replaceable>CLASS</replaceable></code> represents one of the
* opaque object classes.
* </para>
* </para>
* <para>
* You usually use this as follows:
* </para>
* <para>
* You usually use this as follows:
- * <informalexample><programlisting>
* obj = glk_<replaceable>CLASS</replaceable>_iterate(NULL, NULL);
* while (obj) {
* /* ...do something with obj... *<!-- -->/
* obj = glk_<replaceable>CLASS</replaceable>_iterate(obj, NULL);
* }
* obj = glk_<replaceable>CLASS</replaceable>_iterate(NULL, NULL);
* while (obj) {
* /* ...do something with obj... *<!-- -->/
* obj = glk_<replaceable>CLASS</replaceable>_iterate(obj, NULL);
* }
- * </programlisting></informalexample>
* </para>
* <para>
* If you create or destroy objects inside this loop, obviously, the results are
* </para>
* <para>
* If you create or destroy objects inside this loop, obviously, the results are
*
* For an example of the gestalt mechanism, consider the selector
* #gestalt_Version. If you do
*
* For an example of the gestalt mechanism, consider the selector
* #gestalt_Version. If you do
- * <informalexample><programlisting>
* #glui32 res;
* res = #glk_gestalt(#gestalt_Version, 0);
* #glui32 res;
* res = #glk_gestalt(#gestalt_Version, 0);
- * </programlisting></informalexample>
* <code>res</code> will be set to a 32-bit number which encodes the version of
* the Glk spec which the library implements. The upper 16 bits stores the major
* version number; the next 8 bits stores the minor version number; the low 8
* <code>res</code> will be set to a 32-bit number which encodes the version of
* the Glk spec which the library implements. The upper 16 bits stores the major
* version number; the next 8 bits stores the minor version number; the low 8
* The current Glk specification version is 0.7.0, so this selector will return
* 0x00000700.
*
* The current Glk specification version is 0.7.0, so this selector will return
* 0x00000700.
*
- * <informalexample><programlisting>
* #glui32 res;
* res = #glk_gestalt_ext(#gestalt_Version, 0, NULL, 0);
* #glui32 res;
* res = #glk_gestalt_ext(#gestalt_Version, 0, NULL, 0);
- * </programlisting></informalexample>
* does exactly the same thing. Note that, in either case, the second argument
* is not used; so you should always pass 0 to avoid future surprises.
*/
* does exactly the same thing. Note that, in either case, the second argument
* is not used; so you should always pass 0 to avoid future surprises.
*/
*
* If you set <code>ch</code> to a character code, or a special code (from
* 0xFFFFFFFF down), and call
*
* If you set <code>ch</code> to a character code, or a special code (from
* 0xFFFFFFFF down), and call
- * <informalexample><programlisting>
* #glui32 res;
* res = #glk_gestalt(#gestalt_CharInput, ch);
* #glui32 res;
* res = #glk_gestalt(#gestalt_CharInput, ch);
- * </programlisting></informalexample>
* then <code>res</code> will be %TRUE (1) if that character can be typed by
* the player in character input, and %FALSE (0) if not. See <link
* linkend="chimara-Character-Input">Character Input</link>.
* then <code>res</code> will be %TRUE (1) if that character can be typed by
* the player in character input, and %FALSE (0) if not. See <link
* linkend="chimara-Character-Input">Character Input</link>.
* gestalt_LineInput:
*
* If you set <code>ch</code> to a character code, and call
* gestalt_LineInput:
*
* If you set <code>ch</code> to a character code, and call
- * <informalexample><programlisting>
* #glui32 res;
* res = #glk_gestalt(#gestalt_LineInput, ch);
* #glui32 res;
* res = #glk_gestalt(#gestalt_LineInput, ch);
- * </programlisting></informalexample>
* then <code>res</code> will be %TRUE (1) if that character can be typed by the
* player in line input, and %FALSE (0) if not. Note that if <code>ch</code> is
* a nonprintable Latin-1 character (0 to 31, 127 to 159), then this is
* then <code>res</code> will be %TRUE (1) if that character can be typed by the
* player in line input, and %FALSE (0) if not. Note that if <code>ch</code> is
* a nonprintable Latin-1 character (0 to 31, 127 to 159), then this is
* gestalt_CharOutput:
*
* If you set <code>ch</code> to a character code (Latin-1 or higher), and call
* gestalt_CharOutput:
*
* If you set <code>ch</code> to a character code (Latin-1 or higher), and call
- * <informalexample><programlisting>
* #glui32 res, len;
* res = #glk_gestalt_ext(#gestalt_CharOutput, ch, &len, 1);
* #glui32 res, len;
* res = #glk_gestalt_ext(#gestalt_CharOutput, ch, &len, 1);
- * </programlisting></informalexample>
* then <code>res</code> will be one of #gestalt_CharOutput_CannotPrint,
* #gestalt_CharOutput_ExactPrint, or #gestalt_CharOutput_ApproxPrint (see
* below.)
* then <code>res</code> will be one of #gestalt_CharOutput_CannotPrint,
* #gestalt_CharOutput_ExactPrint, or #gestalt_CharOutput_ApproxPrint (see
* below.)
* Make sure you do not get confused by signed byte values. If you set a
* <quote><type>char</type></quote> variable <code>ch</code> to 0xFE, the
* small-thorn character (þ), and then call
* Make sure you do not get confused by signed byte values. If you set a
* <quote><type>char</type></quote> variable <code>ch</code> to 0xFE, the
* small-thorn character (þ), and then call
- * <informalexample><programlisting>
- * res = #glk_gestalt(#gestalt_CharOutput, ch);
- * </programlisting></informalexample>
+ * |[ res = #glk_gestalt(#gestalt_CharOutput, ch); ]|
* then (by the definition of C/C++) <code>ch</code> will be sign-extended to
* 0xFFFFFFFE, which is not a legitimate character, even in Unicode. You
* should write
* then (by the definition of C/C++) <code>ch</code> will be sign-extended to
* 0xFFFFFFFE, which is not a legitimate character, even in Unicode. You
* should write
- * <informalexample><programlisting>
- * res = #glk_gestalt(#gestalt_CharOutput, (unsigned char)ch);
- * </programlisting></informalexample>
+ * |[ res = #glk_gestalt(#gestalt_CharOutput, (unsigned char)ch); ]|
* instead.
* </para></note>
* <note><para>
* instead.
* </para></note>
* <note><para>
* The basic text functions will be available in every Glk library. The Unicode
* functions may or may not be available. Before calling them, you should use
* the following gestalt selector:
* The basic text functions will be available in every Glk library. The Unicode
* functions may or may not be available. Before calling them, you should use
* the following gestalt selector:
- * <informalexample><programlisting>
* glui32 res;
* res = #glk_gestalt(#gestalt_Unicode, 0);
* glui32 res;
* res = #glk_gestalt(#gestalt_Unicode, 0);
- * </programlisting></informalexample>
*
* This returns 1 if the Unicode functions are available. If it returns 0, you
* should not try to call them. They may print nothing, print gibberish, or
*
* This returns 1 if the Unicode functions are available. If it returns 0, you
* should not try to call them. They may print nothing, print gibberish, or
g_object_unref( G_OBJECT(builder) );
g_object_unref( G_OBJECT(builder) );
- if( !chimara_glk_run(CHIMARA_GLK(glk), ".libs/splittest.so", &error) ) {
+ if( !chimara_glk_run(CHIMARA_GLK(glk), ".libs/first.so", &error) ) {
error_dialog(GTK_WINDOW(window), error, "Error starting Glk library: ");
return 1;
}
error_dialog(GTK_WINDOW(window), error, "Error starting Glk library: ");
return 1;
}
*
* Prints a null-terminated string to the current stream. It is exactly
* equivalent to
*
* Prints a null-terminated string to the current stream. It is exactly
* equivalent to
- * <informalexample><programlisting>
* for (ptr = @s; *ptr; ptr++)
* #glk_put_char(*ptr);
* for (ptr = @s; *ptr; ptr++)
* #glk_put_char(*ptr);
- * </programlisting></informalexample>
* However, it may be more efficient.
*/
void
* However, it may be more efficient.
*/
void
*
* Prints a block of characters to the current stream. It is exactly equivalent
* to:
*
* Prints a block of characters to the current stream. It is exactly equivalent
* to:
- * <informalexample><programlisting>
* for (i = 0; i < @len; i++)
* #glk_put_char(@buf[i]);
* for (i = 0; i < @len; i++)
* #glk_put_char(@buf[i]);
- * </programlisting></informalexample>
* However, it may be more efficient.
*/
void
* However, it may be more efficient.
*/
void
*
* So to create a text buffer window which takes the top 40% of the original
* window's space, you would execute
*
* So to create a text buffer window which takes the top 40% of the original
* window's space, you would execute
- * <informalexample><programlisting>
- * newwin = #glk_window_open(win, #winmethod_Above | #winmethod_Proportional, 40, #wintype_TextBuffer, 0);
- * </programlisting></informalexample>
+ * |[ newwin = #glk_window_open(win, #winmethod_Above | #winmethod_Proportional, 40, #wintype_TextBuffer, 0); ]|
*
* To create a text grid which is always five lines high, at the bottom of the
* original window, you would do
*
* To create a text grid which is always five lines high, at the bottom of the
* original window, you would do
- * <informalexample><programlisting>
- * newwin = #glk_window_open(win, #winmethod_Below | #winmethod_Fixed, 5, #wintype_TextGrid, 0);
- * </programlisting></informalexample>
+ * |[ newwin = #glk_window_open(win, #winmethod_Below | #winmethod_Fixed, 5, #wintype_TextGrid, 0); ]|
*
* Note that the meaning of the @size argument depends on the @method argument.
* If the method is #winmethod_Fixed, it also depends on the @wintype argument.
*
* Note that the meaning of the @size argument depends on the @method argument.
* If the method is #winmethod_Fixed, it also depends on the @wintype argument.
/* Set the window as a child of the Glk widget */
gtk_widget_set_parent(win->frame, GTK_WIDGET(glk_data->self));
gtk_widget_queue_resize(GTK_WIDGET(glk_data->self));
/* Set the window as a child of the Glk widget */
gtk_widget_set_parent(win->frame, GTK_WIDGET(glk_data->self));
gtk_widget_queue_resize(GTK_WIDGET(glk_data->self));
- gdk_window_process_all_updates();