diff options
author | Timo Sirainen <cras@irssi.org> | 2000-03-18 12:52:51 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-03-18 12:52:51 +0000 |
commit | 90fb674a9b7f0c175550cccde512017e0080f5c6 (patch) | |
tree | 1a89d6384fe7399b1f4a5f8ab5e75e4b134230dd | |
parent | 3d690fd378b2b945e1b168d32bd0a291d23dd45a (diff) | |
download | irssi-90fb674a9b7f0c175550cccde512017e0080f5c6.zip |
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
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/common.h | 22 |
2 files changed, 10 insertions, 14 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 8558338a..90006689 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -17,4 +17,4 @@ noinst_HEADERS = \ irssi-plugin.h \ irssi-plugin-gui.h -SUBDIRS = irc-base irc-extra ui-common lib-config lib-nongui lib-popt settings $(GNOMEUI) $(TEXTUI) $(BOTUI) +SUBDIRS = irc-base irc-extra ui-common lib-config lib-popt settings $(GNOMEUI) $(TEXTUI) $(BOTUI) 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 |