fboverlay.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /*
  2. *
  3. * Copyright © 2000 SuSE, Inc.
  4. *
  5. * Permission to use, copy, modify, distribute, and sell this software and its
  6. * documentation for any purpose is hereby granted without fee, provided that
  7. * the above copyright notice appear in all copies and that both that
  8. * copyright notice and this permission notice appear in supporting
  9. * documentation, and that the name of SuSE not be used in advertising or
  10. * publicity pertaining to distribution of the software without specific,
  11. * written prior permission. SuSE makes no representations about the
  12. * suitability of this software for any purpose. It is provided "as is"
  13. * without express or implied warranty.
  14. *
  15. * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
  16. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
  17. * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  18. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  19. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  20. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  21. *
  22. * Author: Keith Packard, SuSE, Inc.
  23. */
  24. #ifndef _FBOVERLAY_H_
  25. #define _FBOVERLAY_H_
  26. extern int fbOverlayGeneration;
  27. extern int fbOverlayGetScreenPrivateIndex(void);
  28. #ifndef FB_OVERLAY_MAX
  29. #define FB_OVERLAY_MAX 2
  30. #endif
  31. typedef void (*fbOverlayPaintKeyProc) (DrawablePtr, RegionPtr, CARD32, int);
  32. typedef struct _fbOverlayLayer {
  33. union {
  34. struct {
  35. pointer pbits;
  36. int width;
  37. int depth;
  38. } init;
  39. struct {
  40. PixmapPtr pixmap;
  41. RegionRec region;
  42. } run;
  43. } u;
  44. CARD32 key; /* special pixel value */
  45. } FbOverlayLayer;
  46. typedef struct _fbOverlayScrPriv {
  47. int nlayers;
  48. fbOverlayPaintKeyProc PaintKey;
  49. fbCopyProc CopyWindow;
  50. FbOverlayLayer layer[FB_OVERLAY_MAX];
  51. } FbOverlayScrPrivRec, *FbOverlayScrPrivPtr;
  52. #define fbOverlayGetScrPriv(s) \
  53. ((fbOverlayGetScreenPrivateIndex() != -1) ? \
  54. (s)->devPrivates[fbOverlayGetScreenPrivateIndex()].ptr : NULL)
  55. Bool
  56. fbOverlayCreateWindow(WindowPtr pWin);
  57. Bool
  58. fbOverlayCloseScreen(int iScreen, ScreenPtr pScreen);
  59. int
  60. fbOverlayWindowLayer(WindowPtr pWin);
  61. Bool
  62. fbOverlayCreateScreenResources(ScreenPtr pScreen);
  63. void
  64. fbOverlayPaintKey(DrawablePtr pDrawable,
  65. RegionPtr pRegion, CARD32 pixel, int layer);
  66. void
  67. fbOverlayUpdateLayerRegion(ScreenPtr pScreen, int layer, RegionPtr prgn);
  68. void
  69. fbOverlayCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
  70. void
  71. fbOverlayWindowExposures(WindowPtr pWin,
  72. RegionPtr prgn, RegionPtr other_exposed);
  73. void
  74. fbOverlayPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what);
  75. Bool
  76. fbOverlaySetupScreen(ScreenPtr pScreen,
  77. pointer pbits1,
  78. pointer pbits2,
  79. int xsize,
  80. int ysize,
  81. int dpix,
  82. int dpiy, int width1, int width2, int bpp1, int bpp2);
  83. Bool
  84. fbOverlayFinishScreenInit(ScreenPtr pScreen,
  85. pointer pbits1,
  86. pointer pbits2,
  87. int xsize,
  88. int ysize,
  89. int dpix,
  90. int dpiy,
  91. int width1,
  92. int width2,
  93. int bpp1, int bpp2, int depth1, int depth2);
  94. #endif /* _FBOVERLAY_H_ */