dmxextension.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. /*
  2. * Copyright 2003-2004 Red Hat Inc., Durham, North Carolina.
  3. *
  4. * All Rights Reserved.
  5. *
  6. * Permission is hereby granted, free of charge, to any person obtaining
  7. * a copy of this software and associated documentation files (the
  8. * "Software"), to deal in the Software without restriction, including
  9. * without limitation on the rights to use, copy, modify, merge,
  10. * publish, distribute, sublicense, and/or sell copies of the Software,
  11. * and to permit persons to whom the Software is furnished to do so,
  12. * subject to the following conditions:
  13. *
  14. * The above copyright notice and this permission notice (including the
  15. * next paragraph) shall be included in all copies or substantial
  16. * portions of the Software.
  17. *
  18. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  19. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  20. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  21. * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
  22. * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  23. * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  24. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  25. * SOFTWARE.
  26. */
  27. /*
  28. * Author:
  29. * Rickard E. (Rik) Faith <faith@redhat.com>
  30. * Kevin E. Martin <kem@redhat.com>
  31. *
  32. */
  33. /** \file
  34. * Interface for DMX extension support. These routines are called by
  35. * function in Xserver/Xext/dmx.c. \see dmxextension.c */
  36. #ifndef _DMXEXTENSION_H_
  37. #define _DMXEXTENSION_H_
  38. /** Screen attributes. Used by #ProcDMXGetScreenAttributes and
  39. * \a ProcDMXChangeScreensAttributes. */
  40. typedef struct {
  41. const char *displayName;
  42. int logicalScreen;
  43. unsigned int screenWindowWidth; /* displayName's coordinate system */
  44. unsigned int screenWindowHeight; /* displayName's coordinate system */
  45. int screenWindowXoffset; /* displayName's coordinate system */
  46. int screenWindowYoffset; /* displayName's coordinate system */
  47. unsigned int rootWindowWidth; /* screenWindow's coordinate system */
  48. unsigned int rootWindowHeight; /* screenWindow's coordinate system */
  49. int rootWindowXoffset; /* screenWindow's coordinate system */
  50. int rootWindowYoffset; /* screenWindow's coordinate system */
  51. int rootWindowXorigin; /* global coordinate system */
  52. int rootWindowYorigin; /* global coordinate system */
  53. } DMXScreenAttributesRec, *DMXScreenAttributesPtr;
  54. /** Window attributes. Used by #ProcDMXGetWindowAttributes. */
  55. typedef struct {
  56. int screen;
  57. Window window;
  58. xRectangle pos;
  59. xRectangle vis;
  60. } DMXWindowAttributesRec, *DMXWindowAttributesPtr;
  61. /** Desktop attributes. Used by #ProcDMXGetDesktopAttributes and
  62. * #ProcDMXChangeDesktopAttributes. */
  63. typedef struct {
  64. int width;
  65. int height;
  66. int shiftX;
  67. int shiftY;
  68. } DMXDesktopAttributesRec, *DMXDesktopAttributesPtr;
  69. /** Input attributes. Used by #ProcDMXGetInputAttributes. */
  70. typedef struct {
  71. const char *name;
  72. int inputType;
  73. int physicalScreen;
  74. int physicalId;
  75. int isCore;
  76. int sendsCore;
  77. int detached;
  78. } DMXInputAttributesRec, *DMXInputAttributesPtr;
  79. extern unsigned long dmxGetNumScreens(void);
  80. extern void dmxForceWindowCreation(WindowPtr pWindow);
  81. extern void dmxFlushPendingSyncs(void);
  82. extern Bool dmxGetScreenAttributes(int physical, DMXScreenAttributesPtr attr);
  83. extern Bool dmxGetWindowAttributes(WindowPtr pWindow,
  84. DMXWindowAttributesPtr attr);
  85. extern void dmxGetDesktopAttributes(DMXDesktopAttributesPtr attr);
  86. extern int dmxGetInputCount(void);
  87. extern int dmxGetInputAttributes(int deviceId, DMXInputAttributesPtr attr);
  88. extern int dmxAddInput(DMXInputAttributesPtr attr, int *deviceId);
  89. extern int dmxRemoveInput(int deviceId);
  90. extern int dmxConfigureScreenWindows(int nscreens,
  91. CARD32 *screens,
  92. DMXScreenAttributesPtr attribs,
  93. int *errorScreen);
  94. extern int dmxConfigureDesktop(DMXDesktopAttributesPtr attribs);
  95. /* dmxUpdateScreenResources exposed for dmxCreateWindow in dmxwindow.c */
  96. extern void dmxUpdateScreenResources(ScreenPtr pScreen,
  97. int x, int y, int w, int h);
  98. extern int dmxAttachScreen(int idx, DMXScreenAttributesPtr attr);
  99. extern int dmxDetachScreen(int idx);
  100. #endif