summaryrefslogtreecommitdiff
path: root/src/gui/gui-keyboard.h
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2006-05-07 11:40:19 +0000
committerSebastien Helleu <flashcode@flashtux.org>2006-05-07 11:40:19 +0000
commitb7ba64c744b052836a832598ce1348c0b0194244 (patch)
tree42ee6a59a1b44c994b6c9316ec7637531db0d5d1 /src/gui/gui-keyboard.h
parent7d944ceca40df34e7df383a184912521c4e571d2 (diff)
downloadweechat-b7ba64c744b052836a832598ce1348c0b0194244.zip
Added some panel structures and functions
Diffstat (limited to 'src/gui/gui-keyboard.h')
-rw-r--r--src/gui/gui-keyboard.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/src/gui/gui-keyboard.h b/src/gui/gui-keyboard.h
new file mode 100644
index 000000000..20e78bf7b
--- /dev/null
+++ b/src/gui/gui-keyboard.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2003-2006 by FlashCode <flashcode@flashtux.org>
+ * See README for License detail, AUTHORS for developers list.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+
+#ifndef __WEECHAT_GUI_KEY_H
+#define __WEECHAT_GUI_KEY_H 1
+
+#define KEY_SHOW_MODE_DISPLAY 1
+#define KEY_SHOW_MODE_BIND 2
+
+/* key structures */
+
+typedef struct t_gui_key t_gui_key;
+
+struct t_gui_key
+{
+ char *key; /* key combo (ex: a, ^W, ^W^C, meta-a) */
+ char *command; /* associated command (may be NULL) */
+ void (*function)(t_gui_window *);
+ /* associated function (if cmd is NULL) */
+ t_gui_key *prev_key; /* link to previous key */
+ t_gui_key *next_key; /* link to next key */
+};
+
+typedef struct t_gui_key_function t_gui_key_function;
+
+struct t_gui_key_function
+{
+ char *function_name; /* name of function */
+ void (*function)(); /* associated function */
+ char *description; /* description of function */
+};
+
+/* key variables */
+
+extern t_gui_key *gui_keys;
+extern t_gui_key *last_gui_key;
+extern t_gui_key_function gui_key_functions[];
+extern char gui_key_buffer[128];
+extern int gui_key_grab;
+extern int gui_key_grab_count;
+
+#endif /* gui-key.h */