From 90fb674a9b7f0c175550cccde512017e0080f5c6 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sat, 18 Mar 2000 12:52:51 +0000 Subject: Remove gui_timeout_add/remove, gui_input_add/remove and lib-nongui, use Glib instead. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@151 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/common.h | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'src/common.h') diff --git a/src/common.h b/src/common.h index 2c8b83d6..282bc5f0 100644 --- a/src/common.h +++ b/src/common.h @@ -70,23 +70,19 @@ IPADDR; #include "lib-config/irssi-config.h" #include "common-setup.h" -/* GUI library must provide these functions: */ - typedef enum { - GUI_INPUT_READ = 1 << 0, - GUI_INPUT_WRITE = 1 << 1, - GUI_INPUT_EXCEPTION = 1 << 2 -} GUIInputCondition; + G_INPUT_READ = 1 << 0, + G_INPUT_WRITE = 1 << 1, + G_INPUT_EXCEPTION = 1 << 2 +} GInputCondition; -typedef void (*GUIInputFunction) (gpointer data, gint handle, GUIInputCondition condition); -typedef gint (*GUITimeoutFunction) (gpointer data); +typedef void (*GInputFunction) (gpointer data, int source, + GInputCondition condition); -gint gui_input_add(gint handle, GUIInputCondition condition, - GUIInputFunction function, gpointer data); -void gui_input_remove(gint tag); +int g_input_add(int source, GInputCondition condition, + GInputFunction function, gpointer data); -guint gui_timeout_add(guint32 interval, GUITimeoutFunction function, gpointer data); -void gui_timeout_remove(gint tag); +#define MAX_INT_STRLEN ((sizeof(int) * CHAR_BIT + 2) / 3 + 1) #endif -- cgit v1.2.3