1 /*
2  * Motif
3  *
4  * Copyright (c) 1987-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these librararies and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  *
23  */
24 /*
25  * HISTORY
26  */
27 /* $XConsortium: XmTabListI.h /main/5 1995/07/13 18:28:19 drk $ */
28 #ifndef _XmTabListI_h
29 #define _XmTabListI_h
30 
31 #include <Xm/XmP.h>
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
37 #define TAB_OPTIMIZED_BITS	1
38 #define TAB_MARK_BITS		TAB_OPTIMIZED_BITS
39 #define TAB_REFCOUNT_BITS	(16 - TAB_OPTIMIZED_BITS)
40 
41 typedef struct __XmTabRec
42 {
43   unsigned int		mark : TAB_MARK_BITS;
44   unsigned int		ref_count : TAB_REFCOUNT_BITS;
45   float			value;
46   unsigned char		units;
47   XmOffsetModel		offsetModel;
48   unsigned char		alignment;
49   char			*decimal;
50   XmTab			next, prev;
51 } _XmTabRec, *_XmTab;
52 
53 typedef struct __XmTabListRec
54 {
55   unsigned int	count;
56   XmTab		start;
57 } _XmTabListRec, *_XmTabList;
58 
59 
60 /*
61  * Macros for tab data structure access
62  */
63 
64 #define _XmTabMark(tab)		((_XmTab)(tab))->mark
65 #define _XmTabValue(tab)	((_XmTab)(tab))->value
66 #define _XmTabUnits(tab)	((_XmTab)(tab))->units
67 #define _XmTabPrev(tab)		((_XmTab)(tab))->prev
68 #define _XmTabNext(tab)		((_XmTab)(tab))->next
69 #define _XmTabModel(tab)	((_XmTab)(tab))->offsetModel
70 #define _XmTabAlign(tab)	((_XmTab)(tab))->alignment
71 #define _XmTabDecimal(tab)	((_XmTab)(tab))->decimal
72 
73 #define _XmTabLStart(tl)	((_XmTabList)(tl))->start
74 #define _XmTabLCount(tl)	((_XmTabList)(tl))->count
75 
76 
77 
78 /********    Private Function Declarations for XmTabList.c    ********/
79 
80 extern XmTab _XmTabCopy(XmTab tab);
81 extern Widget _XmCreateTabList(Widget parent,
82                                String name,
83                                ArgList arglist,
84                                Cardinal argcount);
85 extern Widget _XmCreateTab(Widget parent,
86 			   String name,
87 			   ArgList arglist,
88 			   Cardinal argcount);
89 extern Position _XmTabListGetPosition(
90 				     Screen * screen,
91 				     XmTabList tab_list,
92                                      unsigned char unit_type,
93 				     Cardinal tab_position);
94 
95 
96 /********    End Private Function Declarations    ********/
97 
98 #ifdef __cplusplus
99 }  /* Close scope of 'extern "C"' declaration which encloses file. */
100 #endif
101 
102 #endif /* _XmTabListI_h */
103 /* DON'T ADD ANYTHING AFTER THIS #endif */
104