ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/menubar.h
(Generate patch)

Comparing rxvt-unicode/src/menubar.h (file contents):
Revision 1.1 by pcg, Mon Nov 24 17:28:08 2003 UTC vs.
Revision 1.6 by root, Tue Jan 3 02:43:33 2006 UTC

1/*
2 * $Id: menubar.h,v 1.1 2003/11/24 17:28:08 pcg Exp $
3 */
4
5#ifndef _MENUBAR_H_ 1#ifndef MENUBAR_H_
6#define _MENUBAR_H_ 2#define MENUBAR_H_
7 3
8typedef struct { 4typedef struct {
9 short type; /* must not be changed; first element */ 5 short type; /* must not be changed; first element */
10 short len; /* strlen (str) */ 6 short len; /* strlen (str) */
11 unsigned char *str; /* action to take */ 7 unsigned char *str; /* action to take */
22 char *name; /* character string displayed */ 18 char *name; /* character string displayed */
23 char *name2; /* character string displayed (right) */ 19 char *name2; /* character string displayed (right) */
24 short len; /* strlen (name) */ 20 short len; /* strlen (name) */
25 short len2; /* strlen (name) */ 21 short len2; /* strlen (name) */
26 union { 22 union {
27 short type; /* must not be changed; first element */ 23 short type; /* must not be changed; first element */
28 action_t action; 24 action_t action;
29 submenu_t submenu; 25 submenu_t submenu;
30 } entry; 26 } entry;
31} menuitem_t; 27} menuitem_t;
32 28
33enum menuitem_t_action { 29enum menuitem_t_action {
34 MenuLabel, 30 MenuLabel,
46 menuitem_t *item; /* current item */ 42 menuitem_t *item; /* current item */
47 char *name; /* menu name */ 43 char *name; /* menu name */
48 short len; /* strlen (name) */ 44 short len; /* strlen (name) */
49 short width; /* maximum menu width [chars] */ 45 short width; /* maximum menu width [chars] */
50 Window win; /* window of the menu */ 46 Window win; /* window of the menu */
47 struct rxvt_drawable *drawable;
51 short x; /* x location [pixels] (chars if parent == NULL) */ 48 short x; /* x location [pixels] (chars if parent == NULL) */
52 short y; /* y location [pixels] */ 49 short y; /* y location [pixels] */
53 short w, h; /* window width, height [pixels] */ 50 short w, h; /* window width, height [pixels] */
54} menu_t; 51} menu_t;
55 52
69/* #define DEBUG_MENU_LAYOUT */ 66/* #define DEBUG_MENU_LAYOUT */
70/* #define DEBUG_MENUBAR_STACKING */ 67/* #define DEBUG_MENUBAR_STACKING */
71 68
72#define HSPACE 1 /* one space */ 69#define HSPACE 1 /* one space */
73#define isSeparator(name) ((name)[0] == '\0') 70#define isSeparator(name) ((name)[0] == '\0')
74#define HEIGHT_SEPARATOR (SHADOW + 1) 71#define HEIGHT_SEPARATOR (MENU_SHADOW + 1)
75#define HEIGHT_TEXT (Height2Pixel(1) + 2) 72#define HEIGHT_TEXT (Height2Pixel(1) + 2)
76 73
77#define MENU_DELAY_USEC 250000 /* 1/4 sec */ 74#define MENU_DELAY_USEC 0 /* no delay */
78
79 75
80#define SEPARATOR_NAME "-" 76#define SEPARATOR_NAME "-"
81#define MENUITEM_BEG '{' 77#define MENUITEM_BEG '{'
82#define MENUITEM_END '}' 78#define MENUITEM_END '}'
83#define COMMENT_CHAR '#' 79#define COMMENT_CHAR '#'

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines