closestr.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. /*
  2. Copyright 1991, 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
  9. in all copies or substantial portions of the Software.
  10. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  11. OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  12. MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  13. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
  14. OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  15. ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  16. OTHER DEALINGS IN THE SOFTWARE.
  17. Except as contained in this notice, the name of The Open Group shall
  18. not be used in advertising or otherwise to promote the sale, use or
  19. other dealings in this Software without prior written authorization
  20. from The Open Group.
  21. */
  22. #ifndef CLOSESTR_H
  23. #define CLOSESTR_H
  24. #include <X11/Xproto.h>
  25. #include "closure.h"
  26. #include "dix.h"
  27. #include "misc.h"
  28. #include "gcstruct.h"
  29. /* closure structures */
  30. /* OpenFont */
  31. typedef struct _OFclosure {
  32. ClientPtr client;
  33. short current_fpe;
  34. short num_fpes;
  35. FontPathElementPtr *fpe_list;
  36. Mask flags;
  37. Bool slept;
  38. /* XXX -- get these from request buffer instead? */
  39. char *origFontName;
  40. int origFontNameLen;
  41. XID fontid;
  42. char *fontname;
  43. int fnamelen;
  44. FontPtr non_cachable_font;
  45. } OFclosureRec;
  46. /* ListFontsWithInfo */
  47. #define XLFDMAXFONTNAMELEN 256
  48. typedef struct _LFWIstate {
  49. char pattern[XLFDMAXFONTNAMELEN];
  50. int patlen;
  51. int current_fpe;
  52. int max_names;
  53. Bool list_started;
  54. pointer private;
  55. } LFWIstateRec, *LFWIstatePtr;
  56. typedef struct _LFWIclosure {
  57. ClientPtr client;
  58. int num_fpes;
  59. FontPathElementPtr *fpe_list;
  60. xListFontsWithInfoReply *reply;
  61. int length;
  62. LFWIstateRec current;
  63. LFWIstateRec saved;
  64. int savedNumFonts;
  65. Bool haveSaved;
  66. Bool slept;
  67. char *savedName;
  68. } LFWIclosureRec;
  69. /* ListFonts */
  70. typedef struct _LFclosure {
  71. ClientPtr client;
  72. int num_fpes;
  73. FontPathElementPtr *fpe_list;
  74. FontNamesPtr names;
  75. LFWIstateRec current;
  76. LFWIstateRec saved;
  77. Bool haveSaved;
  78. Bool slept;
  79. char *savedName;
  80. int savedNameLen;
  81. } LFclosureRec;
  82. /* PolyText */
  83. typedef
  84. int (* PolyTextPtr)(
  85. DrawablePtr /* pDraw */,
  86. GCPtr /* pGC */,
  87. int /* x */,
  88. int /* y */,
  89. int /* count */,
  90. void * /* chars or shorts */
  91. );
  92. typedef struct _PTclosure {
  93. ClientPtr client;
  94. DrawablePtr pDraw;
  95. GC *pGC;
  96. unsigned char *pElt;
  97. unsigned char *endReq;
  98. unsigned char *data;
  99. int xorg;
  100. int yorg;
  101. CARD8 reqType;
  102. PolyTextPtr polyText;
  103. int itemSize;
  104. XID did;
  105. int err;
  106. Bool slept;
  107. } PTclosureRec;
  108. /* ImageText */
  109. typedef
  110. void (* ImageTextPtr)(
  111. DrawablePtr /* pDraw */,
  112. GCPtr /* pGC */,
  113. int /* x */,
  114. int /* y */,
  115. int /* count */,
  116. void * /* chars or shorts */
  117. );
  118. typedef struct _ITclosure {
  119. ClientPtr client;
  120. DrawablePtr pDraw;
  121. GC *pGC;
  122. BYTE nChars;
  123. unsigned char *data;
  124. int xorg;
  125. int yorg;
  126. CARD8 reqType;
  127. ImageTextPtr imageText;
  128. int itemSize;
  129. XID did;
  130. Bool slept;
  131. } ITclosureRec;
  132. #endif /* CLOSESTR_H */