PageRenderTime 49ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/recipes/xorg-lib/xorg-headers-native/X11/IntrinsicP.h

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