home *** CD-ROM | disk | FTP | other *** search
/ IRIS Development Option 6.2 / IRIS_Development_Option_6.2_814-0478-001.iso / dist / dev.idb / usr / include / abi / X11 / IntrinsicP.h.z / IntrinsicP.h
C/C++ Source or Header  |  1996-03-14  |  8KB  |  292 lines

  1. /* $XConsortium: IntrinsicP.h,v 1.57 91/06/26 19:33:20 converse Exp $ */
  2.  
  3. /***********************************************************
  4. Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
  5. and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
  6.  
  7.                         All Rights Reserved
  8.  
  9. Permission to use, copy, modify, and distribute this software and its 
  10. documentation for any purpose and without fee is hereby granted, 
  11. provided that the above copyright notice appear in all copies and that
  12. both that copyright notice and this permission notice appear in 
  13. supporting documentation, and that the names of Digital or MIT not be
  14. used in advertising or publicity pertaining to distribution of the
  15. software without specific, written prior permission.  
  16.  
  17. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  18. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  19. DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  20. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  21. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  22. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  23. SOFTWARE.
  24.  
  25. ******************************************************************/
  26.  
  27. #ifndef _XtintrinsicP_h
  28. #define _XtintrinsicP_h
  29.  
  30. #include <X11/Intrinsic.h>
  31.  
  32. typedef struct {
  33.     XrmQuark    xrm_name;      /* Resource name quark        */
  34.     XrmQuark    xrm_class;      /* Resource class quark        */
  35.     XrmQuark    xrm_type;      /* Resource representation type quark */
  36.     Cardinal    xrm_size;      /* Size in bytes of representation    */
  37.     long int    xrm_offset;      /* -offset-1                */
  38.     XrmQuark    xrm_default_type; /* Default representation type quark    */
  39.     XtPointer    xrm_default_addr; /* Default resource address        */
  40. } XrmResource, *XrmResourceList;
  41.  
  42. typedef unsigned long XtVersionType;
  43.  
  44. #define XT_VERSION 11
  45. #ifndef XT_REVISION
  46. #define XT_REVISION 5
  47. #endif
  48. #define XtVersion (XT_VERSION * 1000 + XT_REVISION)
  49. #define XtVersionDontCheck 0
  50.  
  51. typedef void (*XtProc)(
  52. #if NeedFunctionPrototypes
  53.     void
  54. #endif
  55. );
  56.  
  57. typedef void (*XtWidgetClassProc)(
  58. #if NeedFunctionPrototypes
  59.     WidgetClass /* class */
  60. #endif
  61. );
  62.  
  63. typedef void (*XtWidgetProc)(
  64. #if NeedFunctionPrototypes
  65.     Widget    /* widget */
  66. #endif
  67. );
  68.  
  69. typedef Boolean (*XtAcceptFocusProc)(
  70. #if NeedFunctionPrototypes
  71.     Widget    /* widget */,
  72.     Time*    /* time */
  73. #endif
  74. );
  75.  
  76. typedef void (*XtArgsProc)(
  77. #if NeedFunctionPrototypes
  78.     Widget    /* widget */,
  79.     ArgList    /* args */,
  80.     Cardinal*    /* num_args */
  81. #endif
  82. );
  83.  
  84. typedef void (*XtInitProc)(
  85. #if NeedFunctionPrototypes
  86.     Widget    /* request */,
  87.     Widget    /* new */,
  88.     ArgList    /* args */,
  89.     Cardinal*    /* num_args */
  90. #endif
  91. );
  92.  
  93. typedef Boolean (*XtSetValuesFunc)(
  94. #if NeedFunctionPrototypes
  95.     Widget     /* old */,
  96.     Widget     /* request */,
  97.     Widget     /* new */,
  98.     ArgList     /* args */,
  99.     Cardinal*    /* num_args */
  100. #endif
  101. );
  102.  
  103. typedef Boolean (*XtArgsFunc)(
  104. #if NeedFunctionPrototypes
  105.     Widget    /* widget */,
  106.     ArgList    /* args */,
  107.     Cardinal*    /* num_args */
  108. #endif
  109. );
  110.  
  111. typedef void (*XtAlmostProc)(
  112. #if NeedFunctionPrototypes
  113.     Widget        /* old */,
  114.     Widget        /* new */,
  115.     XtWidgetGeometry*    /* request */,
  116.     XtWidgetGeometry*    /* reply */
  117. #endif
  118. );
  119.  
  120. typedef void (*XtExposeProc)(
  121. #if NeedFunctionPrototypes
  122.     Widget    /* widget */,
  123.     XEvent*    /* event */,
  124.     Region    /* region */
  125. #endif
  126. );
  127.  
  128. /* compress_exposure options*/
  129. #define XtExposeNoCompress        ((XtEnum)False)
  130. #define XtExposeCompressSeries        ((XtEnum)True)
  131. #define XtExposeCompressMultiple    2
  132. #define XtExposeCompressMaximal        3
  133.  
  134. /* modifiers */
  135. #define XtExposeGraphicsExpose          0x10
  136. #define XtExposeGraphicsExposeMerged    0x20
  137. #define XtExposeNoExpose          0x40
  138.  
  139.  
  140. typedef void (*XtRealizeProc)(
  141. #if NeedFunctionPrototypes
  142.     Widget           /* widget */,
  143.     XtValueMask*       /* mask */,
  144.     XSetWindowAttributes* /* attributes */
  145. #endif
  146. );
  147.  
  148. typedef XtGeometryResult (*XtGeometryHandler)(
  149. #if NeedFunctionPrototypes
  150.     Widget        /* widget */,
  151.     XtWidgetGeometry*    /* request */,
  152.     XtWidgetGeometry*    /* reply */
  153. #endif
  154. );
  155.  
  156. typedef void (*XtStringProc)(
  157. #if NeedFunctionPrototypes
  158.     Widget    /* widget */,
  159.     String    /* str */
  160. #endif
  161. );
  162.  
  163. typedef struct _XtTMRec {
  164.     XtTranslations  translations;    /* private to Translation Manager    */
  165.     XtBoundActions  proc_table;        /* procedure bindings for actions    */
  166.     struct _XtStateRec *current_state;  /* Translation Manager state ptr     */
  167.     unsigned long   lastEventTime;
  168. } XtTMRec, *XtTM;
  169.  
  170. #include <X11/CoreP.h>
  171. #include <X11/CompositeP.h>
  172. #include <X11/ConstrainP.h>
  173. #include <X11/ObjectP.h>
  174. #include <X11/RectObjP.h>
  175.  
  176. #define XtDisplay(widget)    DisplayOfScreen((widget)->core.screen)
  177. #define XtScreen(widget)    ((widget)->core.screen)
  178. #define XtWindow(widget)    ((widget)->core.window)
  179.  
  180. #define XtClass(widget)        ((widget)->core.widget_class)
  181. #define XtSuperclass(widget)    (XtClass(widget)->core_class.superclass)
  182. #define XtIsRealized(object)    (XtWindowOfObject(object) != None)
  183. #define XtParent(widget)    ((widget)->core.parent)
  184.  
  185. #undef XtIsRectObj
  186. #define XtIsRectObj(obj) \
  187.     (((Object)(obj))->object.widget_class->core_class.class_inited & 0x02)
  188.  
  189. #undef XtIsWidget
  190. #define XtIsWidget(obj) \
  191.     (((Object)(obj))->object.widget_class->core_class.class_inited & 0x04)
  192.  
  193. #undef XtIsComposite
  194. #define XtIsComposite(obj) \
  195.     (((Object)(obj))->object.widget_class->core_class.class_inited & 0x08)
  196.  
  197. #undef XtIsConstraint
  198. #define XtIsConstraint(obj) \
  199.     (((Object)(obj))->object.widget_class->core_class.class_inited & 0x10)
  200.  
  201. #undef XtIsShell
  202. #define XtIsShell(obj) \
  203.     (((Object)(obj))->object.widget_class->core_class.class_inited & 0x20)
  204.  
  205. #undef XtIsWMShell
  206. #define XtIsWMShell(obj) \
  207.     (((Object)(obj))->object.widget_class->core_class.class_inited & 0x40)
  208.  
  209. #undef XtIsTopLevelShell
  210. #define XtIsTopLevelShell(obj) \
  211.     (((Object)(obj))->object.widget_class->core_class.class_inited & 0x80)
  212.  
  213. #ifdef DEBUG
  214. #define XtCheckSubclass(w, widget_class_ptr, message)    \
  215.     if (!XtIsSubclass(((Widget)(w)), (widget_class_ptr))) {    \
  216.         String params[3];                \
  217.         Cardinal num_params = 3;            \
  218.         params[0] = ((Widget)(w))->core.widget_class->core_class.class_name;\
  219.         params[1] = (widget_class_ptr)->core_class.class_name;         \
  220.         params[2] = (message);                         \
  221.         XtAppErrorMsg(XtWidgetToApplicationContext((Widget)(w)),         \
  222.             "subclassMismatch", "xtCheckSubclass", "XtToolkitError", \
  223.             "Widget class %s found when subclass of %s expected: %s",\
  224.             params, &num_params);        \
  225.     }
  226. #else
  227. #define XtCheckSubclass(w, widget_class, message)    /* nothing */
  228. #endif
  229.  
  230. _XFUNCPROTOBEGIN
  231.  
  232. extern Widget _XtWindowedAncestor( /* internal; implementation-dependent */
  233. #if NeedFunctionPrototypes
  234.     Widget         /* object */
  235. #endif
  236. );
  237.  
  238. extern void _XtInherit(
  239. #if NeedFunctionPrototypes
  240.     void
  241. #endif
  242. );
  243.  
  244. extern void XtCreateWindow(
  245. #if NeedFunctionPrototypes
  246.     Widget         /* widget */,
  247.     unsigned int     /* window_class */,
  248.     Visual*        /* visual */,
  249.     XtValueMask        /* value_mask */,
  250.     XSetWindowAttributes* /* attributes */
  251. #endif
  252. );
  253.  
  254. extern void XtResizeWidget(
  255. #if NeedFunctionPrototypes
  256.     Widget         /* widget */,
  257.     _XtDimension    /* width */,
  258.     _XtDimension    /* height */,
  259.     _XtDimension    /* border_width */
  260. #endif
  261. );
  262.  
  263. extern void XtMoveWidget(
  264. #if NeedFunctionPrototypes
  265.     Widget         /* widget */,
  266.     _XtPosition        /* x */,
  267.     _XtPosition        /* y */
  268. #endif
  269. );
  270.  
  271. extern void XtConfigureWidget(
  272. #if NeedFunctionPrototypes
  273.     Widget         /* widget */,
  274.     _XtPosition        /* x */,
  275.     _XtPosition        /* y */,
  276.     _XtDimension    /* width */,
  277.     _XtDimension    /* height */,
  278.     _XtDimension    /* border_width */
  279. #endif
  280. );
  281.  
  282. extern void XtResizeWindow(
  283. #if NeedFunctionPrototypes
  284.     Widget         /* widget */
  285. #endif
  286. );
  287.  
  288. _XFUNCPROTOEND
  289.  
  290. #endif /* _XtIntrinsicP_h */
  291. /* DON'T ADD STUFF AFTER THIS #endif */
  292.