home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / lib / Xt / CallbackI.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-29  |  2.7 KB  |  85 lines

  1. /* $XConsortium: CallbackI.h,v 1.13 90/12/29 12:12:48 rws Exp $ */
  2. /***********************************************************
  3. Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
  4. and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
  5.  
  6.                         All Rights Reserved
  7.  
  8. Permission to use, copy, modify, and distribute this software and its 
  9. documentation for any purpose and without fee is hereby granted, 
  10. provided that the above copyright notice appear in all copies and that
  11. both that copyright notice and this permission notice appear in 
  12. supporting documentation, and that the names of Digital or MIT not be
  13. used in advertising or publicity pertaining to distribution of the
  14. software without specific, written prior permission.  
  15.  
  16. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  17. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  18. DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  19. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  20. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  21. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  22. SOFTWARE.
  23.  
  24. ******************************************************************/
  25.  
  26. /****************************************************************
  27.  *
  28.  * Callbacks
  29.  *
  30.  ****************************************************************/
  31.  
  32. typedef XrmResource **CallbackTable;
  33.  
  34. #define _XtCBCalling 1
  35. #define _XtCBFreeAfterCalling 2
  36.  
  37. typedef struct internalCallbackRec {
  38.     unsigned short count;
  39.     char       is_padded;    /* contains NULL padding for external form */
  40.     char       call_state;  /* combination of _XtCB{FreeAfter}Calling */
  41.     /* XtCallbackList */
  42. } InternalCallbackRec, *InternalCallbackList;
  43.  
  44. extern void _XtAddCallback(
  45. #if NeedFunctionPrototypes
  46.     InternalCallbackList*    /* callbacks */,
  47.     XtCallbackProc        /* callback */,
  48.     XtPointer             /* closure */
  49. #endif
  50. );
  51.  
  52. extern void _XtAddCallbackOnce(
  53. #if NeedFunctionPrototypes
  54.     InternalCallbackList*    /* callbacks */,
  55.     XtCallbackProc        /* callback */,
  56.     XtPointer             /* closure */
  57. #endif
  58. );
  59.  
  60. extern InternalCallbackList _XtCompileCallbackList(
  61. #if NeedFunctionPrototypes
  62.     XtCallbackList        /* xtcallbacks */
  63. #endif
  64. );
  65.  
  66. extern XtCallbackList _XtGetCallbackList(
  67. #if NeedFunctionPrototypes
  68.     InternalCallbackList*    /* callbacks */
  69. #endif
  70. );
  71.  
  72. extern void _XtRemoveAllCallbacks(
  73. #if NeedFunctionPrototypes
  74.     InternalCallbackList*    /* callbacks */
  75. #endif
  76. );
  77.  
  78. extern void _XtRemoveCallback(
  79. #if NeedFunctionPrototypes
  80.     InternalCallbackList*    /* callbacks */,
  81.     XtCallbackProc        /* callback */,
  82.     XtPointer            /* closure */
  83. #endif
  84. );
  85.