diff options
author | Timo Sirainen <cras@irssi.org> | 2000-06-17 11:53:45 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-06-17 11:53:45 +0000 |
commit | 234e95ef94804493a3c75f957dbc6bf8af58c5b3 (patch) | |
tree | 9b9558cf355424bbeef2e31ecd71265bf88366eb /src/fe-common/core | |
parent | bc8848f96545b6e074fedfdccf125b896261287b (diff) | |
download | irssi-234e95ef94804493a3c75f957dbc6bf8af58c5b3.zip |
Rewrite Tab-completion to work with signals - now it should be easy to
add completion to whatever command.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@356 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/core')
-rw-r--r-- | src/fe-common/core/Makefile.am | 2 | ||||
-rw-r--r-- | src/fe-common/core/completion.h | 14 | ||||
-rw-r--r-- | src/fe-common/core/fe-common-core.c | 3 |
3 files changed, 19 insertions, 0 deletions
diff --git a/src/fe-common/core/Makefile.am b/src/fe-common/core/Makefile.am index c8e24dad..093334ed 100644 --- a/src/fe-common/core/Makefile.am +++ b/src/fe-common/core/Makefile.am @@ -9,6 +9,7 @@ INCLUDES = \ libfe_common_core_la_SOURCES = \ autorun.c \ command-history.c \ + completion.c \ fe-common-core.c \ fe-core-commands.c \ fe-log.c \ @@ -27,6 +28,7 @@ libfe_common_core_la_SOURCES = \ noinst_HEADERS = \ command-history.h \ + completion.h \ fe-common-core.h \ hilight-text.h \ keyboard.h \ diff --git a/src/fe-common/core/completion.h b/src/fe-common/core/completion.h new file mode 100644 index 00000000..45ac1563 --- /dev/null +++ b/src/fe-common/core/completion.h @@ -0,0 +1,14 @@ +#ifndef __COMPLETION_H +#define __COMPLETION_H + +#include "window-items.h" + +/* automatic word completion - called when space/enter is pressed */ +char *auto_word_complete(const char *line, int *pos); +/* manual word completion - called when TAB is pressed */ +char *word_complete(WINDOW_REC *window, const char *line, int *pos); + +void completion_init(void); +void completion_deinit(void); + +#endif diff --git a/src/fe-common/core/fe-common-core.c b/src/fe-common/core/fe-common-core.c index 1fc1fbaf..a402e6ae 100644 --- a/src/fe-common/core/fe-common-core.c +++ b/src/fe-common/core/fe-common-core.c @@ -24,6 +24,7 @@ #include "hilight-text.h" #include "command-history.h" +#include "completion.h" #include "keyboard.h" #include "printtext.h" #include "themes.h" @@ -82,6 +83,7 @@ void fe_common_core_init(void) autorun_init(); hilight_text_init(); command_history_init(); + completion_init(); keyboard_init(); printtext_init(); fe_log_init(); @@ -100,6 +102,7 @@ void fe_common_core_deinit(void) autorun_deinit(); hilight_text_deinit(); command_history_deinit(); + completion_deinit(); keyboard_deinit(); printtext_deinit(); fe_log_deinit(); |