## Process this file with automake to produce Makefile.in
## Created by Anjuta
+if TARGET_ILIAD
+SUBDIRS = libchimara interpreters player po
+else
SUBDIRS = libchimara interpreters player tests docs po
+endif
chimaradocdir = $(datadir)/doc/chimara
dist_chimaradoc_DATA = \
AC_SUBST(LT_VERSION_INFO)
### REQUIREMENTS ##############################################################
-GTK_REQUIRED_VERSION=2.12
-GLIB_REQUIRED_VERSION=2.16
+GTK_REQUIRED_VERSION=2.6
+GLIB_REQUIRED_VERSION=2.6
GTK_DOC_REQUIRED_VERSION=1.9
AC_SUBST(GTK_REQUIRED_VERSION)
AC_SUBST(GLIB_REQUIRED_VERSION)
object.c process.c quetzal.c random.c redirect.c sound.c stream.c table.c \
text.c variable.c glkscreen.c glkmisc.c frotz.h glkfrotz.h glkio.h setup.h
frotz_la_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/libchimara
-frotz_la_CFLAGS = -Wno-pointer-sign $(AM_CFLAGS)
+
+if TARGET_ILIAD
+no_pointer_sign =
+else
+no_pointer_sign = -Wno-pointer-sign
+endif
+
+frotz_la_CFLAGS = $(no_pointer_sign) $(AM_CFLAGS)
+
frotz_la_LDFLAGS = -module $(PLUGIN_LIBTOOL_FLAGS)
frotzdocdir = $(datadir)/doc/$(PACKAGE)/frotz
lib_LTLIBRARIES = libchimara.la
+if TARGET_ILIAD
+ plugindir = "../interpreters"
+else
+ plugindir = $(pkglibdir)
+endif
+
libchimara_la_SOURCES = \
abort.c abort.h \
case.c \
libchimara_la_CPPFLAGS = \
-DG_LOG_DOMAIN=\"Chimara\" \
-DLOCALEDIR=\""$(datadir)/locale"\" \
- -DPLUGINDIR=\""$(pkglibdir)"\" \
+ -DPLUGINDIR=\""$(plugindir)"\" \
-DPLUGINSOURCEDIR=\""$(abs_builddir)/../interpreters"\" \
-I$(top_srcdir)
libchimara_la_CFLAGS = @CHIMARA_CFLAGS@ $(AM_CFLAGS)
/* Empty the event queue */
g_mutex_lock(glk_data->event_lock);
g_queue_foreach(glk_data->event_queue, (GFunc)g_free, NULL);
- g_queue_clear(glk_data->event_queue);
+
+ /* COMPAT: g_queue_clear could be used here, but only appeared in 2.14 */
+ // g_queue_clear(glk_data->event_queue);
+ g_list_free(glk_data->event_queue->head);
+ glk_data->event_queue->head = glk_data->event_queue->tail = NULL;
+ glk_data->event_queue->length = 0;
+
g_mutex_unlock(glk_data->event_lock);
/* Reset the abort signaling mechanism */
/* Default signal handler */
}
-/* G_PARAM_STATIC_STRINGS only appeared in GTK 2.13.0 */
+/* COMPAT: G_PARAM_STATIC_STRINGS only appeared in GTK 2.13.0 */
#ifndef G_PARAM_STATIC_STRINGS
+
+/* COMPAT: G_PARAM_STATIC_NAME and friends only appeared in GTK 2.8 */
+#if GTK_CHECK_VERSION(2,8,0)
#define G_PARAM_STATIC_STRINGS (G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)
+#else
+#define G_PARAM_STATIC_STRINGS (0)
+#endif
+
#endif
static void
/* Run main function */
glk_main_t glk_main = startup->glk_main;
- g_slice_free(struct StartupData, startup);
+
+ /* COMPAT: avoid usage of slices */
+ g_free(startup);
g_signal_emit_by_name(startup->glk_data->self, "started");
glk_main();
glk_exit(); /* Run shutdown code in glk_exit() even if glk_main() returns normally */
}
ChimaraGlkPrivate *priv = CHIMARA_GLK_PRIVATE(glk);
- struct StartupData *startup = g_slice_new0(struct StartupData);
+
+ /* COMPAT: avoid usage of slices */
+ struct StartupData *startup = g_new0(struct StartupData,1);
/* Open the module to run */
g_assert( g_module_supported() );
/* Default signal handler */
}
-/* G_PARAM_STATIC_STRINGS only appeared in GTK 2.13.0 */
+/* COMPAT: G_PARAM_STATIC_STRINGS only appeared in GTK 2.13.0 */
#ifndef G_PARAM_STATIC_STRINGS
+
+/* COMPAT: G_PARAM_STATIC_NAME and friends only appeared in GTK 2.8 */
+#if GTK_CHECK_VERSION(2,8,0)
#define G_PARAM_STATIC_STRINGS (G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)
+#else
+#define G_PARAM_STATIC_STRINGS (0)
+#endif
+
#endif
static void
GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
NULL);
gtk_file_chooser_set_action(GTK_FILE_CHOOSER(chooser), GTK_FILE_CHOOSER_ACTION_SAVE);
+
+ /* COMPAT: */
+#if GTK_CHECK_VERSION(2,8,0)
gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(chooser), TRUE);
+#endif
break;
case filemode_ReadWrite:
case filemode_WriteAppend:
/* Make the entry as small as possible to fit with the text */
gtk_entry_set_has_frame(GTK_ENTRY(win->input_entry), FALSE);
GtkBorder border = { 0, 0, 0, 0 };
+
+ /* COMPAT: */
+#if GTK_CHECK_VERSION(2,10,0)
gtk_entry_set_inner_border(GTK_ENTRY(win->input_entry), &border);
+#endif
gtk_entry_set_max_length(GTK_ENTRY(win->input_entry), win->input_length);
gtk_entry_set_width_chars(GTK_ENTRY(win->input_entry), win->input_length);
if(scroll_distance > view_height) {
start_paging(win);
/* Seriously... */
+ /* COMPAT: */
+#if GTK_CHECK_VERSION(2,14,0)
gdk_window_invalidate_rect(gtk_widget_get_window(win->widget), NULL, TRUE);
+#else
+ gdk_window_invalidate_rect(win->widget->window, NULL, TRUE);
+#endif
}
else if(scroll_distance > 0) {
GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(win->widget));
#include <libchimara/chimara-glk.h>
#include <libchimara/chimara-if.h>
+/* Iliad includes */
+#include <liberdm/erdm.h>
+#include <liberipc/eripcviewer.h>
+#include <liberipc/eripctoolbar.h>
+#include <liberipc/eripcbusyd.h>
+
/* Global pointers to widgets */
GtkWidget *window = NULL;
GtkWidget *glk = NULL;
+static erClientChannel_t erbusyChannel;
+static erClientChannel_t ertoolbarChannel;
+
static void
on_started(ChimaraGlk *glk)
{
gtk_container_add( GTK_CONTAINER(window), vbox );
}
+static void
+iliad_popup_keyboard()
+{
+ erIpcStartClient(ER_TOOLBAR_CHANNEL, &ertoolbarChannel);
+ tbSelectIconSet(ertoolbarChannel, ER_PDF_VIEWER_UA_ID);
+ tbClearIconSet(ertoolbarChannel, ER_PDF_VIEWER_UA_ID);
+
+ // Turn off trashcan
+ tbAppendPlatformIcon( ertoolbarChannel, ER_PDF_VIEWER_UA_ID, iconID_trashcan, -1);
+ tbSetStatePlatformIcon(ertoolbarChannel, ER_PDF_VIEWER_UA_ID, iconID_trashcan, iconState_grey );
+
+ // Enable then pop up keyboard
+ tbAppendPlatformIcon( ertoolbarChannel, ER_PDF_VIEWER_UA_ID, iconID_keyboard, -1);
+ tbSetStatePlatformIcon(ertoolbarChannel, ER_PDF_VIEWER_UA_ID, iconID_keyboard, iconState_selected);
+}
+
int
main(int argc, char *argv[])
{
return 1;
}
//chimara_glk_run( CHIMARA_GLK(glk), ".libs/multiwin.so", argc, argv, NULL);
-
+
+ iliad_popup_keyboard();
gdk_threads_enter();
gtk_main();
assert(buffer);
glk_put_string("Welcome to the style test\n");
-
+ glk_put_string("int finish_text_grid_line_input(winid_t win, gboolean\n 11 static void cancel_old_input_request(winid_t win);\n 12 \n 13 /* Internal function: code common to both flavors of char ev\n 14 void\n 15 request_char_event_common(winid_t win, gboolean unicode)\n 16 {\n 17 VALID_WINDOW(win, return);\n 18 g_return_if_fail(win->type != wintype_TextBuffer || win-\n 19 \n 20 cancel_old_input_request(win);\n 21 \n 22 flush_window_buffer(win);\n 23 \n 24 ChimaraGlkPrivate *glk_data = g_private_get(glk_data_key\n 25 \n 26 win->input_request_type = unicode? INPUT_REQUEST_CHARACT\n 27 g_signal_handler_unblock( win->widget, win->char_input_k\n 28 \n 29 gdk_threads_enter();\n 30 \n 31 /*\n 32 if(win->type == wintype_TextBuffer)\n 33 {\n 34 GtkTextBuffer *buffer = gtk_text_view_get_buffer( GT\n 35 GtkTextIter iter;\n 36 gtk_text_buffer_get_end_iter(buffer, &iter);\n 37 gtk_text_buffer_place_cursor(buffer, &iter);\n 38 gtk_text_view_scroll_mark_onscreen(GTK_TEXT_VIEW(win\n 39 // Why doesn't this always work?? \n 40 } */\n 41 \n 42 gtk_widget_grab_focus( GTK_WIDGET(win->widget) );\n 43 gdk_threads_leave();\n 44 \n 47 }\n 48 \n 49 /**\n 50 * glk_request_char_event:\n 51 * @win: A window to request char events from.\n 52 *\n 53 * Request input of a Latin-1 character or special key. A wi\n 54 * requests for both character and line input at the same ti\n 55 * requests for character input of both types (Latin-1 and U\n 56 * illegal to call glk_request_char_event() if the window al\n 57 * request for either character or\n");
glk_request_line_event(mainwin, buffer, 255, 0);
while(strncmp(buffer, "quit", 4))
{