CHAR_INPUT,
LINE_INPUT,
TEXT_BUFFER_OUTPUT,
+ ILIAD_SCREEN_UPDATE,
LAST_SIGNAL
};
/* Default signal handler */
}
+static void
+chimara_glk_iliad_screen_update(ChimaraGlk *self, gboolean typing)
+{
+ /* Default signal handler */
+}
+
/* COMPAT: G_PARAM_STATIC_STRINGS only appeared in GTK 2.13.0 */
#ifndef G_PARAM_STATIC_STRINGS
klass->char_input = chimara_glk_char_input;
klass->line_input = chimara_glk_line_input;
klass->text_buffer_output = chimara_glk_text_buffer_output;
+ klass->iliad_screen_update = chimara_glk_iliad_screen_update;
+
/**
* ChimaraGlk::stopped:
* @glk: The widget that received the signal
G_STRUCT_OFFSET(ChimaraGlkClass, text_buffer_output), NULL, NULL,
_chimara_marshal_VOID__UINT_STRING,
G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_STRING);
+ /**
+ * ChimaraGlk::iliad-update-screen:
+ * @self: The widget that received the signal
+ * @typing: Whether to perform a typing or full screen update
+ *
+ * Iliad specific signal which is emitted whenever the screen needs to be updated.
+ * Since iliad screen updates are very slow, updating should only be done when
+ * necessary.
+ */
+ chimara_glk_signals[ILIAD_SCREEN_UPDATE] = g_signal_new("iliad-screen-update",
+ G_OBJECT_CLASS_TYPE(klass), 0,
+ G_STRUCT_OFFSET(ChimaraGlkClass, iliad_screen_update), NULL, NULL,
+ _chimara_marshal_VOID__BOOLEAN,
+ G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
/* Properties */
/**
void(* char_input) (ChimaraGlk *self, guint32 window_rock, guint keysym);
void(* line_input) (ChimaraGlk *self, guint32 window_rock, gchar *text);
void(* text_buffer_output) (ChimaraGlk *self, guint32 window_rock, gchar *text);
+ void(* iliad_screen_update) (ChimaraGlk *self, gboolean typing);
} ChimaraGlkClass;
/**
#include <liberipc/eripcviewer.h>
#include <liberipc/eripctoolbar.h>
#include <liberipc/eripcbusyd.h>
+/*#include "xepdmgrclient.h"*/
+
/* Global pointers to widgets */
GtkWidget *window = NULL;
GtkWidget *glk = NULL;
+/* Display manager */
+/* sEpd *epd = NULL;*/
+
static erClientChannel_t erbusyChannel;
static erClientChannel_t ertoolbarChannel;
chimara_glk_feed_line_input( CHIMARA_GLK(glk), "save" );
}
+gboolean
+update_screen(gpointer data)
+{
+ printf("Update screen from idle handler\n");
+ dmDisplay(dmCmdPriorNormal, dmQFull);
+
+ return FALSE;
+}
+
+static void
+on_iliad_screen_update(ChimaraGlk *glk, gboolean typing)
+{
+ printf("Update screen\n");
+ g_idle_add_full(G_PRIORITY_DEFAULT_IDLE+100, update_screen, NULL, NULL);
+}
+
+
static void
create_window(void)
{
"border-width", 6,
"spacing", 6,
"ignore-errors", TRUE,
+ "style-sheet", "style.css",
NULL);
- chimara_glk_set_default_font_string(CHIMARA_GLK(glk), "Serif 12");
- chimara_glk_set_monospace_font_string(CHIMARA_GLK(glk), "Monospace 12");
+
g_signal_connect(glk, "started", G_CALLBACK(on_started), NULL);
g_signal_connect(glk, "stopped", G_CALLBACK(on_stopped), NULL);
+ g_signal_connect(glk, "iliad-screen-update", G_CALLBACK(on_iliad_screen_update), NULL);
GtkWidget *vbox = gtk_vbox_new(FALSE, 0);
GtkWidget *toolbar = gtk_toolbar_new();
textdomain(GETTEXT_PACKAGE);
#endif
+ /* Setup connection to display manager deamon */
+ /*
+ if( (epd = EpdInit(NULL)) == NULL ) {
+ g_critical("Could not connect to xepdmgr server\n");
+ return 1;
+ }
+ EpdRefreshAuto(epd, 0);
+ */
+
if( !g_thread_supported() )
g_thread_init(NULL);
gdk_threads_init();