a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync/***********************************************************
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncCopyright 1987, 1998 The Open Group
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncPermission to use, copy, modify, distribute, and sell this software and its
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncdocumentation for any purpose is hereby granted without fee, provided that
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncthe above copyright notice appear in all copies and that both that
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynccopyright notice and this permission notice appear in supporting
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncdocumentation.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncThe above copyright notice and this permission notice shall be included in
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncall copies or substantial portions of the Software.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncExcept as contained in this notice, the name of The Open Group shall not be
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncused in advertising or otherwise to promote the sale, use or other dealings
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncin this Software without prior written authorization from The Open Group.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncCopyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync All Rights Reserved
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncPermission to use, copy, modify, and distribute this software and its
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncdocumentation for any purpose and without fee is hereby granted,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncprovided that the above copyright notice appear in all copies and that
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncboth that copyright notice and this permission notice appear in
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncsupporting documentation, and that the name of Digital not be
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncused in advertising or publicity pertaining to distribution of the
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncsoftware without specific, written prior permission.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncDIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncSOFTWARE.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync******************************************************************/
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#ifndef CALLBACK_H
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#define CALLBACK_H
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#include <X11/X.h> /* for GContext, Mask */
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#include <X11/Xdefs.h> /* for Bool */
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#include <X11/Xproto.h>
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#include <X11/Xfuncproto.h>
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync/*
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * callback manager stuff
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync */
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#ifndef _XTYPEDEF_CALLBACKLISTPTR
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef struct _CallbackList *CallbackListPtr; /* also in misc.h */
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#define _XTYPEDEF_CALLBACKLISTPTR
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#endif
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef void (*CallbackProcPtr) (CallbackListPtr *, pointer, pointer);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern _X_EXPORT Bool AddCallback(CallbackListPtr * /*pcbl */ ,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync CallbackProcPtr /*callback */ ,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync pointer /*data */ );
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern _X_EXPORT Bool DeleteCallback(CallbackListPtr * /*pcbl */ ,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync CallbackProcPtr /*callback */ ,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync pointer /*data */ );
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern _X_EXPORT void _CallCallbacks(CallbackListPtr * /*pcbl */ ,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync pointer /*call_data */ );
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncstatic inline void
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncCallCallbacks(CallbackListPtr *pcbl, pointer call_data)
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync{
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync if (!pcbl || !*pcbl)
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync return;
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync _CallCallbacks(pcbl, call_data);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync}
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern _X_EXPORT void DeleteCallbackList(CallbackListPtr * /*pcbl */ );
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern _X_EXPORT void InitCallbackManager(void);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#endif /* CALLBACK_H */