PageRenderTime 36ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/include/window.h

https://github.com/dmitriy103/androix-xserver
C Header | 269 lines | 168 code | 49 blank | 52 comment | 0 complexity | 1e5e6d85d164cb9af6e1cf0431bff383 MD5 | raw file
  1. /***********************************************************
  2. Copyright 1987, 1998 The Open Group
  3. Permission to use, copy, modify, distribute, and sell this software and its
  4. documentation for any purpose is hereby granted without fee, provided that
  5. the above copyright notice appear in all copies and that both that
  6. copyright notice and this permission notice appear in supporting
  7. documentation.
  8. The above copyright notice and this permission notice shall be included in
  9. all copies or substantial portions of the Software.
  10. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  11. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  12. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  13. OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  14. AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  15. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  16. Except as contained in this notice, the name of The Open Group shall not be
  17. used in advertising or otherwise to promote the sale, use or other dealings
  18. in this Software without prior written authorization from The Open Group.
  19. Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
  20. All Rights Reserved
  21. Permission to use, copy, modify, and distribute this software and its
  22. documentation for any purpose and without fee is hereby granted,
  23. provided that the above copyright notice appear in all copies and that
  24. both that copyright notice and this permission notice appear in
  25. supporting documentation, and that the name of Digital not be
  26. used in advertising or publicity pertaining to distribution of the
  27. software without specific, written prior permission.
  28. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  29. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  30. DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  31. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  32. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  33. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  34. SOFTWARE.
  35. ******************************************************************/
  36. #ifndef WINDOW_H
  37. #define WINDOW_H
  38. #include "misc.h"
  39. #include "region.h"
  40. #include "screenint.h"
  41. #include <X11/Xproto.h>
  42. #define TOTALLY_OBSCURED 0
  43. #define UNOBSCURED 1
  44. #define OBSCURED 2
  45. #define VisibilityNotViewable 3
  46. /* return values for tree-walking callback procedures */
  47. #define WT_STOPWALKING 0
  48. #define WT_WALKCHILDREN 1
  49. #define WT_DONTWALKCHILDREN 2
  50. #define WT_NOMATCH 3
  51. #define NullWindow ((WindowPtr) 0)
  52. /* Forward declaration, we can't include input.h here */
  53. struct _DeviceIntRec;
  54. struct _Cursor;
  55. typedef struct _BackingStore *BackingStorePtr;
  56. typedef struct _Window *WindowPtr;
  57. typedef int (*VisitWindowProcPtr)(
  58. WindowPtr /*pWin*/,
  59. pointer /*data*/);
  60. extern _X_EXPORT int TraverseTree(
  61. WindowPtr /*pWin*/,
  62. VisitWindowProcPtr /*func*/,
  63. pointer /*data*/);
  64. extern _X_EXPORT int WalkTree(
  65. ScreenPtr /*pScreen*/,
  66. VisitWindowProcPtr /*func*/,
  67. pointer /*data*/);
  68. extern _X_EXPORT Bool CreateRootWindow(
  69. ScreenPtr /*pScreen*/);
  70. extern _X_EXPORT void InitRootWindow(
  71. WindowPtr /*pWin*/);
  72. typedef WindowPtr (* RealChildHeadProc) (WindowPtr pWin);
  73. extern _X_EXPORT void RegisterRealChildHeadProc (RealChildHeadProc proc);
  74. extern _X_EXPORT WindowPtr RealChildHead(
  75. WindowPtr /*pWin*/);
  76. extern _X_EXPORT WindowPtr CreateWindow(
  77. Window /*wid*/,
  78. WindowPtr /*pParent*/,
  79. int /*x*/,
  80. int /*y*/,
  81. unsigned int /*w*/,
  82. unsigned int /*h*/,
  83. unsigned int /*bw*/,
  84. unsigned int /*class*/,
  85. Mask /*vmask*/,
  86. XID* /*vlist*/,
  87. int /*depth*/,
  88. ClientPtr /*client*/,
  89. VisualID /*visual*/,
  90. int* /*error*/);
  91. extern _X_EXPORT int DeleteWindow(
  92. pointer /*pWin*/,
  93. XID /*wid*/);
  94. extern _X_EXPORT int DestroySubwindows(
  95. WindowPtr /*pWin*/,
  96. ClientPtr /*client*/);
  97. /* Quartz support on Mac OS X uses the HIToolbox
  98. framework whose ChangeWindowAttributes function conflicts here. */
  99. #ifdef __APPLE__
  100. #define ChangeWindowAttributes Darwin_X_ChangeWindowAttributes
  101. #endif
  102. extern _X_EXPORT int ChangeWindowAttributes(
  103. WindowPtr /*pWin*/,
  104. Mask /*vmask*/,
  105. XID* /*vlist*/,
  106. ClientPtr /*client*/);
  107. extern _X_EXPORT int ChangeWindowDeviceCursor(
  108. WindowPtr /*pWin*/,
  109. struct _DeviceIntRec* /*pDev*/,
  110. struct _Cursor* /*pCursor*/);
  111. extern _X_EXPORT struct _Cursor* WindowGetDeviceCursor(
  112. WindowPtr /*pWin*/,
  113. struct _DeviceIntRec* /*pDev*/);
  114. /* Quartz support on Mac OS X uses the HIToolbox
  115. framework whose GetWindowAttributes function conflicts here. */
  116. #ifdef __APPLE__
  117. #define GetWindowAttributes(w,c,x) Darwin_X_GetWindowAttributes(w,c,x)
  118. extern void Darwin_X_GetWindowAttributes(
  119. #else
  120. extern _X_EXPORT void GetWindowAttributes(
  121. #endif
  122. WindowPtr /*pWin*/,
  123. ClientPtr /*client*/,
  124. xGetWindowAttributesReply* /* wa */);
  125. extern _X_EXPORT void GravityTranslate(
  126. int /*x*/,
  127. int /*y*/,
  128. int /*oldx*/,
  129. int /*oldy*/,
  130. int /*dw*/,
  131. int /*dh*/,
  132. unsigned /*gravity*/,
  133. int* /*destx*/,
  134. int* /*desty*/);
  135. extern _X_EXPORT int ConfigureWindow(
  136. WindowPtr /*pWin*/,
  137. Mask /*mask*/,
  138. XID* /*vlist*/,
  139. ClientPtr /*client*/);
  140. extern _X_EXPORT int CirculateWindow(
  141. WindowPtr /*pParent*/,
  142. int /*direction*/,
  143. ClientPtr /*client*/);
  144. extern _X_EXPORT int ReparentWindow(
  145. WindowPtr /*pWin*/,
  146. WindowPtr /*pParent*/,
  147. int /*x*/,
  148. int /*y*/,
  149. ClientPtr /*client*/);
  150. extern _X_EXPORT int MapWindow(
  151. WindowPtr /*pWin*/,
  152. ClientPtr /*client*/);
  153. extern _X_EXPORT void MapSubwindows(
  154. WindowPtr /*pParent*/,
  155. ClientPtr /*client*/);
  156. extern _X_EXPORT int UnmapWindow(
  157. WindowPtr /*pWin*/,
  158. Bool /*fromConfigure*/);
  159. extern _X_EXPORT void UnmapSubwindows(
  160. WindowPtr /*pWin*/);
  161. extern _X_EXPORT void HandleSaveSet(
  162. ClientPtr /*client*/);
  163. extern _X_EXPORT Bool PointInWindowIsVisible(
  164. WindowPtr /*pWin*/,
  165. int /*x*/,
  166. int /*y*/);
  167. extern _X_EXPORT RegionPtr NotClippedByChildren(
  168. WindowPtr /*pWin*/);
  169. extern _X_EXPORT void SendVisibilityNotify(
  170. WindowPtr /*pWin*/);
  171. extern _X_EXPORT int dixSaveScreens(
  172. ClientPtr client,
  173. int on,
  174. int mode);
  175. extern _X_EXPORT int SaveScreens(
  176. int on,
  177. int mode);
  178. extern _X_EXPORT WindowPtr FindWindowWithOptional(
  179. WindowPtr /*w*/);
  180. extern _X_EXPORT void CheckWindowOptionalNeed(
  181. WindowPtr /*w*/);
  182. extern _X_EXPORT Bool MakeWindowOptional(
  183. WindowPtr /*pWin*/);
  184. extern _X_EXPORT WindowPtr MoveWindowInStack(
  185. WindowPtr /*pWin*/,
  186. WindowPtr /*pNextSib*/);
  187. extern _X_EXPORT void SetWinSize(
  188. WindowPtr /*pWin*/);
  189. extern _X_EXPORT void SetBorderSize(
  190. WindowPtr /*pWin*/);
  191. extern _X_EXPORT void ResizeChildrenWinSize(
  192. WindowPtr /*pWin*/,
  193. int /*dx*/,
  194. int /*dy*/,
  195. int /*dw*/,
  196. int /*dh*/);
  197. extern _X_EXPORT void ShapeExtensionInit(void);
  198. extern _X_EXPORT void SendShapeNotify(
  199. WindowPtr /* pWin */,
  200. int /* which */ );
  201. extern _X_EXPORT RegionPtr CreateBoundingShape(
  202. WindowPtr /* pWin */ );
  203. extern _X_EXPORT RegionPtr CreateClipShape(
  204. WindowPtr /* pWin */ );
  205. extern _X_EXPORT void DisableMapUnmapEvents(
  206. WindowPtr /* pWin */ );
  207. extern _X_EXPORT void EnableMapUnmapEvents(
  208. WindowPtr /* pWin */ );
  209. #endif /* WINDOW_H */