|
||||
File indexing completed on 2025-01-30 10:26:37
0001 /* 0002 0003 Copyright 1994, 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 #ifndef _XMU_DISPLAYQUE_H_ 0028 #define _XMU_DISPLAYQUE_H_ 0029 0030 #include <X11/Xmu/CloseHook.h> 0031 #include <X11/Xfuncproto.h> 0032 0033 /* 0034 * Public Entry Points 0035 * 0036 * 0037 * XmuDisplayQueue *XmuDQCreate (closefunc, freefunc, data) 0038 * XmuCloseDisplayQueueProc closefunc; 0039 * XmuFreeDisplayQueueProc freefunc; 0040 * XPointer data; 0041 * 0042 * Creates and returns a queue into which displays may be placed. When 0043 * the display is closed, the closefunc (if non-NULL) is upcalled with 0044 * as follows: 0045 * 0046 * (*closefunc) (queue, entry) 0047 * 0048 * The freeproc, if non-NULL, is called whenever the last display is 0049 * closed, notifying the creator that display queue may be released 0050 * using XmuDQDestroy. 0051 * 0052 * 0053 * Bool XmuDQDestroy (q, docallbacks) 0054 * XmuDisplayQueue *q; 0055 * Bool docallbacks; 0056 * 0057 * Releases all memory for the indicated display queue. If docallbacks 0058 * is true, then the closefunc (if non-NULL) is called for each 0059 * display. 0060 * 0061 * 0062 * XmuDisplayQueueEntry *XmuDQLookupDisplay (q, dpy) 0063 * XmuDisplayQueue *q; 0064 * Display *dpy; 0065 * 0066 * Returns the queue entry for the specified display or NULL if the 0067 * display is not in the queue. 0068 * 0069 * 0070 * XmuDisplayQueueEntry *XmuDQAddDisplay (q, dpy, data) 0071 * XmuDisplayQueue *q; 0072 * Display *dpy; 0073 * XPointer data; 0074 * 0075 * Adds the indicated display to the end of the queue or NULL if it 0076 * is unable to allocate memory. The data field may be used by the 0077 * caller to attach arbitrary data to this display in this queue. The 0078 * caller should use XmuDQLookupDisplay to make sure that the display 0079 * hasn't already been added. 0080 * 0081 * 0082 * Bool XmuDQRemoveDisplay (q, dpy) 0083 * XmuDisplayQueue *q; 0084 * Display *dpy; 0085 * 0086 * Removes the specified display from the given queue. If the 0087 * indicated display is not found on this queue, False is returned, 0088 * otherwise True is returned. 0089 */ 0090 0091 typedef struct _XmuDisplayQueue XmuDisplayQueue; 0092 typedef struct _XmuDisplayQueueEntry XmuDisplayQueueEntry; 0093 0094 typedef int (*XmuCloseDisplayQueueProc)(XmuDisplayQueue *queue, 0095 XmuDisplayQueueEntry *entry); 0096 0097 typedef int (*XmuFreeDisplayQueueProc)(XmuDisplayQueue *queue); 0098 0099 struct _XmuDisplayQueueEntry { 0100 struct _XmuDisplayQueueEntry *prev, *next; 0101 Display *display; 0102 CloseHook closehook; 0103 XPointer data; 0104 }; 0105 0106 struct _XmuDisplayQueue { 0107 int nentries; 0108 XmuDisplayQueueEntry *head, *tail; 0109 XmuCloseDisplayQueueProc closefunc; 0110 XmuFreeDisplayQueueProc freefunc; 0111 XPointer data; 0112 }; 0113 0114 _XFUNCPROTOBEGIN 0115 0116 XmuDisplayQueue *XmuDQCreate 0117 ( 0118 XmuCloseDisplayQueueProc closefunc, 0119 XmuFreeDisplayQueueProc freefunc, 0120 XPointer data 0121 ); 0122 0123 Bool XmuDQDestroy 0124 ( 0125 XmuDisplayQueue *q, 0126 Bool docallbacks 0127 ); 0128 0129 XmuDisplayQueueEntry *XmuDQLookupDisplay 0130 ( 0131 XmuDisplayQueue *q, 0132 Display *dpy 0133 ); 0134 0135 XmuDisplayQueueEntry *XmuDQAddDisplay 0136 ( 0137 XmuDisplayQueue *q, 0138 Display *dpy, 0139 XPointer data 0140 ); 0141 0142 Bool XmuDQRemoveDisplay 0143 ( 0144 XmuDisplayQueue *q, 0145 Display *dpy 0146 ); 0147 0148 _XFUNCPROTOEND 0149 0150 #define XmuDQNDisplays(q) ((q)->nentries) 0151 0152 #endif /* _XMU_DISPLAYQUE_H_ */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |