PageRenderTime 43ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/nx-3.5.0/nx-X11/programs/Xserver/Xext/panoramiX.h

#
C Header | 115 lines | 63 code | 18 blank | 34 comment | 12 complexity | 8b761a3993152648cf396896b2c07223 MD5 | raw file
Possible License(s): BSD-3-Clause, GPL-2.0, LGPL-2.0
  1. /* $TOG: panoramiX.h /main/4 1998/03/17 06:51:02 kaleb $ */
  2. /* $XdotOrg: xc/programs/Xserver/Xext/panoramiX.h,v 1.5 2005/07/03 07:01:04 daniels Exp $ */
  3. /*****************************************************************
  4. Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
  5. Permission is hereby granted, free of charge, to any person obtaining a copy
  6. of this software and associated documentation files (the "Software"), to deal
  7. in the Software without restriction, including without limitation the rights
  8. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  9. copies of the Software.
  10. The above copyright notice and this permission notice shall be included in
  11. all copies or substantial portions of the Software.
  12. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  13. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  14. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  15. DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
  16. BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
  17. WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
  18. IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  19. Except as contained in this notice, the name of Digital Equipment Corporation
  20. shall not be used in advertising or otherwise to promote the sale, use or other
  21. dealings in this Software without prior written authorization from Digital
  22. Equipment Corporation.
  23. ******************************************************************/
  24. /* $XFree86: xc/programs/Xserver/Xext/panoramiX.h,v 1.5 2001/01/03 02:54:17 keithp Exp $ */
  25. /* THIS IS NOT AN X PROJECT TEAM SPECIFICATION */
  26. /*
  27. * PanoramiX definitions
  28. */
  29. #ifdef HAVE_DIX_CONFIG_H
  30. #include <dix-config.h>
  31. #endif
  32. #ifndef _PANORAMIX_H_
  33. #define _PANORAMIX_H_
  34. #include <X11/extensions/panoramiXext.h>
  35. #include "gcstruct.h"
  36. typedef struct _PanoramiXData {
  37. int x;
  38. int y;
  39. int width;
  40. int height;
  41. } PanoramiXData;
  42. typedef struct _PanoramiXInfo {
  43. XID id ;
  44. } PanoramiXInfo;
  45. typedef struct {
  46. PanoramiXInfo info[MAXSCREENS];
  47. RESTYPE type;
  48. union {
  49. struct {
  50. char visibility;
  51. char class;
  52. char root;
  53. } win;
  54. struct {
  55. Bool shared;
  56. } pix;
  57. #ifdef RENDER
  58. struct {
  59. Bool root;
  60. } pict;
  61. #endif
  62. char raw_data[4];
  63. } u;
  64. } PanoramiXRes;
  65. #define FOR_NSCREENS_FORWARD(j) for(j = 0; j < PanoramiXNumScreens; j++)
  66. #define FOR_NSCREENS_BACKWARD(j) for(j = PanoramiXNumScreens - 1; j >= 0; j--)
  67. #define FOR_NSCREENS(j) FOR_NSCREENS_FORWARD(j)
  68. #define BREAK_IF(a) if ((a)) break
  69. #define IF_RETURN(a,b) if ((a)) return (b)
  70. #define FORCE_ROOT(a) { \
  71. int _j; \
  72. for (_j = PanoramiXNumScreens - 1; _j; _j--) \
  73. if ((a).root == WindowTable[_j]->drawable.id) \
  74. break; \
  75. (a).rootX += panoramiXdataPtr[_j].x; \
  76. (a).rootY += panoramiXdataPtr[_j].y; \
  77. (a).root = WindowTable[0]->drawable.id; \
  78. }
  79. #define FORCE_WIN(a) { \
  80. if ((win = PanoramiXFindIDOnAnyScreen(XRT_WINDOW, a))) { \
  81. (a) = win->info[0].id; /* Real ID */ \
  82. } \
  83. }
  84. #define FORCE_CMAP(a) { \
  85. if ((win = PanoramiXFindIDOnAnyScreen(XRT_COLORMAP, a))) { \
  86. (a) = win->info[0].id; /* Real ID */ \
  87. } \
  88. }
  89. #define IS_SHARED_PIXMAP(r) (((r)->type == XRT_PIXMAP) && (r)->u.pix.shared)
  90. #define SKIP_FAKE_WINDOW(a) if(!LookupIDByType(a, XRT_WINDOW)) return
  91. #endif /* _PANORAMIX_H_ */