aboutsummaryrefslogtreecommitdiffstats
path: root/menu.h
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@vega.ocn.ne.jp>2011-05-04 07:05:14 +0000
committerTatsuya Kinoshita <tats@vega.ocn.ne.jp>2011-05-04 07:05:14 +0000
commit72f72d64a422d6628c4796f5c0bf2e508f134214 (patch)
tree0c9ea90cc53310832c977265521fb44db24a515e /menu.h
parentAdding upstream version 0.3 (diff)
downloadw3m-72f72d64a422d6628c4796f5c0bf2e508f134214.tar.gz
w3m-72f72d64a422d6628c4796f5c0bf2e508f134214.zip
Adding upstream version 0.5.1upstream/0.5.1
Diffstat (limited to 'menu.h')
-rw-r--r--menu.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/menu.h b/menu.h
new file mode 100644
index 0000000..b32ad58
--- /dev/null
+++ b/menu.h
@@ -0,0 +1,54 @@
+/* $Id: menu.h,v 1.2 2001/11/20 17:49:23 ukai Exp $ */
+/*
+ * w3m menu.h
+ */
+
+#ifndef MENU_H
+#define MENU_H
+
+#define MENU_END 0
+#define MENU_NOP 1
+#define MENU_VALUE 2
+#define MENU_FUNC 4
+#define MENU_POPUP 8
+
+#define MENU_NOTHING -1
+#define MENU_CANCEL -2
+#define MENU_CLOSE -3
+
+typedef struct _MenuItem {
+ int type;
+ char *label;
+ int *variable;
+ int value;
+ void (*func) ();
+ struct _Menu *popup;
+ char *keys;
+ char *data;
+} MenuItem;
+
+typedef struct _Menu {
+ struct _Menu *parent;
+ int cursorX;
+ int cursorY;
+ int x;
+ int y;
+ int width;
+ int height;
+ int nitem;
+ MenuItem *item;
+ int initial;
+ int select;
+ int offset;
+ int active;
+ int (*keymap[128]) (char c);
+ int keyselect[128];
+} Menu;
+
+typedef struct _MenuList {
+ char *id;
+ Menu *menu;
+ MenuItem *item;
+} MenuList;
+
+#endif /* not MENU_H */