Merge remote-tracking branch 'origin/master' into for-steve
[sxemacs] / src / ui / lwlib / xlwradioP.h
1 /* Radio Widget for SXEmacs.
2    Copyright (C) 1999 Edward A. Falk
3
4 This file is part of SXEmacs.
5
6 SXEmacs is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 SXEmacs is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program.  If not, see <http://www.gnu.org/licenses/>. */
18
19 /*
20  * RadioP.h - Private definitions for Radio widget
21  *
22  * Author: Edward A. Falk
23  *         falk@falconer.vip.best.com
24  *
25  * Date:   June 30, 1997
26  *
27  */
28
29 #ifndef _XawRadioP_h
30 #define _XawRadioP_h
31
32 #include "xlwradio.h"
33 #include ATHENA_ToggleP_h_
34
35 /***********************************************************************
36  *
37  * Radio Widget Private Data
38  *
39  ***********************************************************************/
40
41 /* Already in Xaw/ToggleP.h, and not used by us.
42   #define streq(a, b) ( strcmp((a), (b)) == 0 )
43 */
44
45 typedef void (*XawDiamondProc) (Widget);
46
47 void RadioSet(Widget w, XEvent * event, String * params,        /* unused */
48               Cardinal * num_params);   /* unused */
49
50 void RadioUnset(Widget w, XEvent * event, String * params,      /* unused */
51                 Cardinal * num_params); /* unused */
52
53 /************************************
54  *
55  *  Class structure
56  *
57  ***********************************/
58
59    /* New fields for the Radio widget class record */
60 typedef struct _RadioClass {
61         Dimension dsize;        /* diamond size */
62         XawDiamondProc drawDiamond;
63         /* TODO: 3-d and xaw-xpm features? */
64         XtPointer extension;
65 } RadioClassPart;
66
67 #define XtInheritDrawDiamond    ((XawDiamondProc)_XtInherit)
68
69    /* Full class record declaration */
70 typedef struct _RadioClassRec {
71         CoreClassPart core_class;
72         SimpleClassPart simple_class;
73 #ifdef  _ThreeDP_h
74         ThreeDClassPart threeD_class;
75 #endif
76         LabelClassPart label_class;
77         CommandClassPart command_class;
78         ToggleClassPart toggle_class;
79         RadioClassPart radio_class;
80 } RadioClassRec;
81
82 extern RadioClassRec radioClassRec;
83
84 /***************************************
85  *
86  *  Instance (widget) structure
87  *
88  **************************************/
89
90     /* New fields for the Radio widget record */
91 typedef struct {
92         /* resources */
93         /* TODO: 3-d and xaw-xpm features? */
94
95         /* private data */
96         XtPointer extension;
97 } RadioPart;
98
99    /* Full widget declaration */
100 typedef struct _RadioRec {
101         CorePart core;
102         SimplePart simple;
103 #ifdef  _ThreeDP_h
104         ThreeDPart threeD;
105 #endif
106         LabelPart label;
107         CommandPart command;
108         TogglePart toggle;
109         RadioPart radio;
110 } RadioRec;
111
112 #endif                          /* _XawRadioP_h */