Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:14:25

0001 /*
0002 
0003 Copyright 1989, 1998  The Open Group
0004 
0005 Permission to use, copy, modify, distribute, and sell this software and its
0006 documentation for any purpose is hereby granted without fee, provided that
0007 the above copyright notice appear in all copies and that both that
0008 copyright notice and this permission notice appear in supporting
0009 documentation.
0010 
0011 The above copyright notice and this permission notice shall be included in
0012 all copies or substantial portions of the Software.
0013 
0014 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0015 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0016 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
0017 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
0018 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
0019 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
0020 
0021 Except as contained in this notice, the name of The Open Group shall not be
0022 used in advertising or otherwise to promote the sale, use or other dealings
0023 in this Software without prior written authorization from The Open Group.
0024 
0025 */
0026 
0027 /*
0028  * Author: Chris D. Peterson
0029  *         MIT X Consortium
0030  *         kit@expo.lcs.mit.edu
0031  *
0032  * Date:   January 12, 1989
0033  *
0034  */
0035 
0036 #ifndef _XawToggleP_h
0037 #define _XawToggleP_h
0038 
0039 #include <X11/Xaw/Toggle.h>
0040 #include <X11/Xaw/CommandP.h>
0041 
0042 /*
0043  * Toggle Widget Private Data
0044  */
0045 #define streq(a, b) (strcmp((a), (b)) == 0)
0046 
0047 typedef struct _RadioGroup {
0048     struct _RadioGroup *prev, *next; /* Pointers to other elements in group  */
0049     Widget widget;           /* Widget corrosponding to this element */
0050 } RadioGroup;
0051 
0052 /* New fields for the Toggle widget class */
0053 typedef struct _ToggleClass  {
0054     XtActionProc Set;
0055     XtActionProc Unset;
0056     XtPointer extension;
0057 } ToggleClassPart;
0058 
0059 /* class record declaration */
0060 typedef struct _ToggleClassRec {
0061     CoreClassPart   core_class;
0062     SimpleClassPart simple_class;
0063     LabelClassPart  label_class;
0064     CommandClassPart    command_class;
0065     ToggleClassPart toggle_class;
0066 } ToggleClassRec;
0067 
0068 extern ToggleClassRec toggleClassRec;
0069 
0070 /* New fields for the Toggle widget */
0071 typedef struct {
0072     /* resources */
0073     Widget widget;
0074     XtPointer radio_data;
0075 
0076     /* private */
0077     RadioGroup *radio_group;
0078 #ifndef OLDXAW
0079     XtPointer pad[4];   /* for future use and keep binary compatibility */
0080 #endif
0081 } TogglePart;
0082 
0083 /* Full widget declaration */
0084 typedef struct _ToggleRec {
0085     CorePart    core;
0086     SimplePart  simple;
0087     LabelPart   label;
0088     CommandPart command;
0089     TogglePart  toggle;
0090 } ToggleRec;
0091 
0092 #endif /* _XawToggleP_h */