annotate lwlib/xlwmenu.h @ 5518:3cc7470ea71c

gnuclient: if TMPDIR was set and connect failed, try again with /tmp 2011-06-03 Aidan Kehoe <kehoea@parhasard.net> * gnuslib.c (connect_to_unix_server): Retry with /tmp as a directory in which to search for Unix sockets if an attempt to connect with some other directory failed (which may be because gnuclient and gnuserv don't share an environment value for TMPDIR, or because gnuserv was compiled with USE_TMPDIR turned off).
author Aidan Kehoe <kehoea@parhasard.net>
date Fri, 03 Jun 2011 18:40:57 +0100
parents ade4c7e2c6cb
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5422
ade4c7e2c6cb Migrate lwlib/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 442
diff changeset
1 /* Implements a lightweight menubar widget.
ade4c7e2c6cb Migrate lwlib/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 442
diff changeset
2 Copyright (C) 1992, 1993, 1994 Lucid, Inc.
ade4c7e2c6cb Migrate lwlib/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 442
diff changeset
3 Copyright (C) 1995 Tinker Systems and INS Engineering Corp.
ade4c7e2c6cb Migrate lwlib/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 442
diff changeset
4
ade4c7e2c6cb Migrate lwlib/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 442
diff changeset
5 This file is part of the Lucid Widget Library.
ade4c7e2c6cb Migrate lwlib/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 442
diff changeset
6
ade4c7e2c6cb Migrate lwlib/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 442
diff changeset
7 The Lucid Widget Library is free software: you can redistribute it
ade4c7e2c6cb Migrate lwlib/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 442
diff changeset
8 and/or modify it under the terms of the GNU General Public License as
ade4c7e2c6cb Migrate lwlib/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 442
diff changeset
9 published by the Free Software Foundation, either version 3 of the
ade4c7e2c6cb Migrate lwlib/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 442
diff changeset
10 License, or (at your option) any later version.
ade4c7e2c6cb Migrate lwlib/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 442
diff changeset
11
ade4c7e2c6cb Migrate lwlib/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 442
diff changeset
12 The Lucid Widget Library is distributed in the hope that it will be
ade4c7e2c6cb Migrate lwlib/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 442
diff changeset
13 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
ade4c7e2c6cb Migrate lwlib/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 442
diff changeset
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
ade4c7e2c6cb Migrate lwlib/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 442
diff changeset
15 General Public License for more details.
ade4c7e2c6cb Migrate lwlib/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 442
diff changeset
16
ade4c7e2c6cb Migrate lwlib/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 442
diff changeset
17 You should have received a copy of the GNU General Public License
ade4c7e2c6cb Migrate lwlib/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 442
diff changeset
18 along with the Lucid Widget Library. If not, see
ade4c7e2c6cb Migrate lwlib/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 442
diff changeset
19 <http://www.gnu.org/licenses/>. */
ade4c7e2c6cb Migrate lwlib/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 442
diff changeset
20
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
21 #ifndef INCLUDED_xlwmenu_h_
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
22 #define INCLUDED_xlwmenu_h_
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24 /***********************************************************************
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 *
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 * XlwMenu Widget
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 *
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 ***********************************************************************/
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 #include "lwlib.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 /* Resource names used by the XlwMenu widget */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33 #define XtNbuttonForeground "buttonForeground"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 #define XtCButtonForeground "ButtonForeground"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 #define XtNhighlightForeground "highlightForeground"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36 #define XtCHighlightForeground "HighlightForeground"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 #define XtNtitleForeground "titleForeground"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38 #define XtCTitleForeground "TitleForeground"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39 #define XtNmargin "margin"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 #define XtNhorizontalSpacing "horizontalSpacing"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 #define XtNverticalSpacing "verticalSpacing"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 #define XtNarrowSpacing "arrowSpacing"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 #define XtNmenu "menu"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 #define XtCMenu "Menu"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 #define XtNopen "open"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 #define XtNselect "select"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 #define XtNmenuBorderWidth "menuBorderWidth"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 #define XtNhorizontal "horizontal"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 #define XtCHorizontal "Horizontal"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 #ifndef XtNcursor
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 #define XtNcursor "cursor"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 #ifndef XtCCursor
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54 #define XtCCursor "Cursor"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56 #ifndef XtNuseBackingStore
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57 #define XtNuseBackingStore "useBackingStore"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 #ifndef XtCUseBackingStore
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60 #define XtCUseBackingStore "UseBackingStore"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 #define XtNbounceDown "bounceDown"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 #define XtCBounceDown "BounceDown"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 #define XtNresourceLabels "resourceLabels"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 #define XtCResourceLabels "ResourceLabels"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67 /* Motif-compatible resource names */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 #ifndef XmNshadowThickness
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 # define XmNshadowThickness "shadowThickness"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70 # define XmCShadowThickness "ShadowThickness"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 # define XmNtopShadowColor "topShadowColor"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 # define XmCTopShadowColor "TopShadowColor"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 # define XmNbottomShadowColor "bottomShadowColor"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 # define XmCBottomShadowColor "BottomShadowColor"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75 # define XmNtopShadowPixmap "topShadowPixmap"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76 # define XmCTopShadowPixmap "TopShadowPixmap"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 # define XmNbottomShadowPixmap "bottomShadowPixmap"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 # define XmCBottomShadowPixmap "BottomShadowPixmap"
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
79 # define XmUNSPECIFIED_PIXMAP 2
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 # define XmRHorizontalDimension "HorizontalDimension"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 # define XmNspacing "spacing"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 # define XmCSpacing "Spacing"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83 # define XmNindicatorSize "indicatorSize"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 # define XmCIndicatorSize "IndicatorSize"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85 # define XmNselectColor "selectColor"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86 # define XmCSelectColor "SelectColor"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87 # define XmNmarginHeight "marginHeight"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 # define XmCMarginHeight "MarginHeight"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 # define XmNmarginWidth "marginWidth"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 # define XmCMarginWidth "MarginWidth"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91 # define XmRVerticalDimension "VerticalDimension"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 typedef struct _XlwMenuRec *XlwMenuWidget;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 typedef struct _XlwMenuClassRec *XlwMenuWidgetClass;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 extern WidgetClass xlwMenuWidgetClass;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 void
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 xlw_pop_up_menu (XlwMenuWidget mw, XButtonPressedEvent* event);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 /* menu accelerator */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 void xlw_set_menu (Widget w, widget_value *val);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105 void xlw_push_menu (widget_value *val);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106 int xlw_pop_menu (void);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107 void xlw_set_item (widget_value *val);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 void xlw_map_menu (Time t);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109 void xlw_display_menu (Time t);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
110 void xlw_kill_menus (widget_value *val);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111 widget_value *xlw_get_entries (int allp);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112 int xlw_menu_level (void);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
114 #endif /* INCLUDED_xlwmenu_h_ */