File indexing completed on 2025-01-18 10:15:31
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 #ifndef _LIST_H
0026 #define _LIST_H
0027
0028 #if defined(VMS) || defined (__VMS)
0029 #include <X11/apienvset.h>
0030 #endif
0031
0032 #include <Xm/Xm.h>
0033 #include <Xm/Ext.h>
0034
0035 #ifdef __cplusplus
0036 extern "C" {
0037 #endif
0038
0039
0040
0041
0042
0043
0044
0045 typedef struct _XmStackRec {
0046 int top, alloc;
0047
0048 XtPointer * elems;
0049 } XmStackRec, *XmStack;
0050
0051
0052
0053
0054
0055
0056
0057 XmStack _XmStackInit(void);
0058 void _XmStackFree(XmStack), _XmStackPush(XmStack, XtPointer);
0059 XtPointer _XmStackPop(XmStack);
0060
0061
0062
0063
0064
0065
0066
0067 typedef struct __XmQElem {
0068 struct __XmQElem *next, *prev;
0069 XtPointer data;
0070 Boolean alloced;
0071 } _XmQElem;
0072
0073 typedef struct _XmQueueRec {
0074 _XmQElem *first, *last;
0075 _XmQElem *free_elems;
0076 } XmQueueRec, *XmQueue;
0077
0078
0079
0080
0081
0082
0083
0084 XmQueue _XmQueueInit(void);
0085 void _XmQueueFree(XmQueue), _XmQueuePush(XmQueue, XtPointer);
0086 XtPointer _XmQueuePop(XmQueue);
0087 int _XmQueueCount(XmQueue);
0088
0089
0090
0091
0092
0093 void _Xm_AddQueue(XmQueue, _XmQElem *, _XmQElem *);
0094 _XmQElem * _Xm_RemQueue(_XmQElem **);
0095 _XmQElem * _Xm_GetNewElement(XmQueue);
0096
0097
0098
0099
0100
0101
0102
0103 typedef _XmQElem XmListElem;
0104 typedef XmQueueRec *XmList;
0105 typedef Boolean (*XmListFunc)(XmListElem *, XtPointer);
0106
0107
0108
0109
0110
0111
0112
0113 #define XmListElemNext(elem) (elem)->next
0114 #define XmListElemPrev(elem) (elem)->prev
0115 #define XmListElemData(elem) (elem)->data
0116
0117 #define XmListFirst(list) (list)->first
0118 #define XmListLast(list) (list)->last
0119
0120
0121
0122
0123
0124
0125
0126 void _XmListFree(XmList), _XmListRemove(XmList, XmListElem *);
0127
0128 XmListElem * _XmListAddAfter(XmList, XmListElem *, XtPointer);
0129 XmListElem * _XmListAddBefore(XmList, XmListElem *, XtPointer);
0130
0131 XmList _XmListInit(void);
0132
0133 int _XmListCount(XmList);
0134
0135 XmListElem *_XmListExec(XmList, XmListElem *, XmListElem *, XmListFunc, XtPointer);
0136
0137 #ifdef __cplusplus
0138 }
0139 #endif
0140
0141 #if defined(VMS) || defined (__VMS)
0142 #include <X11/apienvrst.h>
0143 #endif
0144
0145
0146
0147
0148
0149 #ifdef USE_OLD_NAMES
0150
0151 #define ListAddAfter _XmListAddAfter
0152 #define ListAddBefore _XmListAddBefore
0153 #define ListCount _XmListCount
0154 #define ListExec _XmListExec
0155 #define ListFree _XmListFree
0156 #define ListInit _XmListInit
0157 #define ListRemove _XmListRemove
0158 #define QueueCount _XmQueueCount
0159 #define QueueFree _XmQueueFree
0160 #define QueueInit _XmQueueInit
0161 #define QueuePop _XmQueuePop
0162 #define QueuePush _XmQueuePush
0163 #define StackFree _XmStackFree
0164 #define StackInit _XmStackInit
0165 #define StackPop _XmStackPop
0166 #define StackPush _XmStackPush
0167 #define _AddQueue _Xm_AddQueue
0168 #define _GetNewElement _Xm_GetNewElement
0169 #define _RemQueue _Xm_RemQueue
0170
0171 #define Stack XmStack
0172 #define StackRec XmStackRec
0173 #define QElem _XmQElem
0174 #define QueueRec XmQueueRec
0175 #define Queue XmQueue
0176 #define ListElem XmListElem
0177 #define List XmList
0178 #define ListFunc XmListFunc
0179
0180 #define ListElemNext XmListElemNext
0181 #define ListElemPrev XmListElemPrev
0182 #define ListElemData XmListElemData
0183 #define ListFirst XmListFirst
0184 #define ListLast XmListLast
0185
0186 #endif
0187
0188 #endif