mi.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589
  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 MI_H
  37. #define MI_H
  38. #include <X11/X.h>
  39. #include "region.h"
  40. #include "validate.h"
  41. #include "window.h"
  42. #include "gc.h"
  43. #include <X11/fonts/font.h>
  44. #include "input.h"
  45. #include "cursor.h"
  46. #define MiBits CARD32
  47. typedef struct _miDash *miDashPtr;
  48. #define EVEN_DASH 0
  49. #define ODD_DASH ~0
  50. /* miarc.c */
  51. extern void miPolyArc(
  52. DrawablePtr /*pDraw*/,
  53. GCPtr /*pGC*/,
  54. int /*narcs*/,
  55. xArc * /*parcs*/
  56. );
  57. /* mibitblt.c */
  58. extern RegionPtr miCopyArea(
  59. DrawablePtr /*pSrcDrawable*/,
  60. DrawablePtr /*pDstDrawable*/,
  61. GCPtr /*pGC*/,
  62. int /*xIn*/,
  63. int /*yIn*/,
  64. int /*widthSrc*/,
  65. int /*heightSrc*/,
  66. int /*xOut*/,
  67. int /*yOut*/
  68. );
  69. extern void miOpqStipDrawable(
  70. DrawablePtr /*pDraw*/,
  71. GCPtr /*pGC*/,
  72. RegionPtr /*prgnSrc*/,
  73. MiBits * /*pbits*/,
  74. int /*srcx*/,
  75. int /*w*/,
  76. int /*h*/,
  77. int /*dstx*/,
  78. int /*dsty*/
  79. );
  80. extern RegionPtr miCopyPlane(
  81. DrawablePtr /*pSrcDrawable*/,
  82. DrawablePtr /*pDstDrawable*/,
  83. GCPtr /*pGC*/,
  84. int /*srcx*/,
  85. int /*srcy*/,
  86. int /*width*/,
  87. int /*height*/,
  88. int /*dstx*/,
  89. int /*dsty*/,
  90. unsigned long /*bitPlane*/
  91. );
  92. extern void miGetImage(
  93. DrawablePtr /*pDraw*/,
  94. int /*sx*/,
  95. int /*sy*/,
  96. int /*w*/,
  97. int /*h*/,
  98. unsigned int /*format*/,
  99. unsigned long /*planeMask*/,
  100. char * /*pdstLine*/
  101. );
  102. extern void miPutImage(
  103. DrawablePtr /*pDraw*/,
  104. GCPtr /*pGC*/,
  105. int /*depth*/,
  106. int /*x*/,
  107. int /*y*/,
  108. int /*w*/,
  109. int /*h*/,
  110. int /*leftPad*/,
  111. int /*format*/,
  112. char * /*pImage*/
  113. );
  114. /* micursor.c */
  115. extern void miRecolorCursor(
  116. ScreenPtr /*pScr*/,
  117. CursorPtr /*pCurs*/,
  118. Bool /*displayed*/
  119. );
  120. /* midash.c */
  121. extern miDashPtr miDashLine(
  122. int /*npt*/,
  123. DDXPointPtr /*ppt*/,
  124. unsigned int /*nDash*/,
  125. unsigned char * /*pDash*/,
  126. unsigned int /*offset*/,
  127. int * /*pnseg*/
  128. );
  129. extern void miStepDash(
  130. int /*dist*/,
  131. int * /*pDashIndex*/,
  132. unsigned char * /*pDash*/,
  133. int /*numInDashList*/,
  134. int * /*pDashOffset*/
  135. );
  136. /* mieq.c */
  137. #ifndef INPUT_H
  138. typedef struct _DeviceRec *DevicePtr;
  139. #endif
  140. extern Bool mieqInit(
  141. DevicePtr /*pKbd*/,
  142. DevicePtr /*pPtr*/
  143. );
  144. extern void mieqEnqueue(
  145. xEventPtr /*e*/
  146. );
  147. extern void mieqSwitchScreen(
  148. ScreenPtr /*pScreen*/,
  149. Bool /*fromDIX*/
  150. );
  151. extern void mieqProcessInputEvents(
  152. void
  153. );
  154. /* miexpose.c */
  155. extern RegionPtr miHandleExposures(
  156. DrawablePtr /*pSrcDrawable*/,
  157. DrawablePtr /*pDstDrawable*/,
  158. GCPtr /*pGC*/,
  159. int /*srcx*/,
  160. int /*srcy*/,
  161. int /*width*/,
  162. int /*height*/,
  163. int /*dstx*/,
  164. int /*dsty*/,
  165. unsigned long /*plane*/
  166. );
  167. extern void miSendGraphicsExpose(
  168. ClientPtr /*client*/,
  169. RegionPtr /*pRgn*/,
  170. XID /*drawable*/,
  171. int /*major*/,
  172. int /*minor*/
  173. );
  174. extern void miSendExposures(
  175. WindowPtr /*pWin*/,
  176. RegionPtr /*pRgn*/,
  177. int /*dx*/,
  178. int /*dy*/
  179. );
  180. extern void miWindowExposures(
  181. WindowPtr /*pWin*/,
  182. RegionPtr /*prgn*/,
  183. RegionPtr /*other_exposed*/
  184. );
  185. extern void miClearDrawable(
  186. DrawablePtr /*pDraw*/,
  187. GCPtr /*pGC*/
  188. );
  189. /* mifillrct.c */
  190. extern void miPolyFillRect(
  191. DrawablePtr /*pDrawable*/,
  192. GCPtr /*pGC*/,
  193. int /*nrectFill*/,
  194. xRectangle * /*prectInit*/
  195. );
  196. /* miglblt.c */
  197. extern void miPolyGlyphBlt(
  198. DrawablePtr /*pDrawable*/,
  199. GCPtr /*pGC*/,
  200. int /*x*/,
  201. int /*y*/,
  202. unsigned int /*nglyph*/,
  203. CharInfoPtr * /*ppci*/,
  204. pointer /*pglyphBase*/
  205. );
  206. extern void miImageGlyphBlt(
  207. DrawablePtr /*pDrawable*/,
  208. GCPtr /*pGC*/,
  209. int /*x*/,
  210. int /*y*/,
  211. unsigned int /*nglyph*/,
  212. CharInfoPtr * /*ppci*/,
  213. pointer /*pglyphBase*/
  214. );
  215. /* mipoly.c */
  216. extern void miFillPolygon(
  217. DrawablePtr /*dst*/,
  218. GCPtr /*pgc*/,
  219. int /*shape*/,
  220. int /*mode*/,
  221. int /*count*/,
  222. DDXPointPtr /*pPts*/
  223. );
  224. /* mipolycon.c */
  225. extern Bool miFillConvexPoly(
  226. DrawablePtr /*dst*/,
  227. GCPtr /*pgc*/,
  228. int /*count*/,
  229. DDXPointPtr /*ptsIn*/
  230. );
  231. /* mipolygen.c */
  232. extern Bool miFillGeneralPoly(
  233. DrawablePtr /*dst*/,
  234. GCPtr /*pgc*/,
  235. int /*count*/,
  236. DDXPointPtr /*ptsIn*/
  237. );
  238. /* mipolypnt.c */
  239. extern void miPolyPoint(
  240. DrawablePtr /*pDrawable*/,
  241. GCPtr /*pGC*/,
  242. int /*mode*/,
  243. int /*npt*/,
  244. xPoint * /*pptInit*/
  245. );
  246. /* mipolyrect.c */
  247. extern void miPolyRectangle(
  248. DrawablePtr /*pDraw*/,
  249. GCPtr /*pGC*/,
  250. int /*nrects*/,
  251. xRectangle * /*pRects*/
  252. );
  253. /* mipolyseg.c */
  254. extern void miPolySegment(
  255. DrawablePtr /*pDraw*/,
  256. GCPtr /*pGC*/,
  257. int /*nseg*/,
  258. xSegment * /*pSegs*/
  259. );
  260. /* mipolytext.c */
  261. extern int miPolyText8(
  262. DrawablePtr /*pDraw*/,
  263. GCPtr /*pGC*/,
  264. int /*x*/,
  265. int /*y*/,
  266. int /*count*/,
  267. char * /*chars*/
  268. );
  269. extern int miPolyText16(
  270. DrawablePtr /*pDraw*/,
  271. GCPtr /*pGC*/,
  272. int /*x*/,
  273. int /*y*/,
  274. int /*count*/,
  275. unsigned short * /*chars*/
  276. );
  277. extern void miImageText8(
  278. DrawablePtr /*pDraw*/,
  279. GCPtr /*pGC*/,
  280. int /*x*/,
  281. int /*y*/,
  282. int /*count*/,
  283. char * /*chars*/
  284. );
  285. extern void miImageText16(
  286. DrawablePtr /*pDraw*/,
  287. GCPtr /*pGC*/,
  288. int /*x*/,
  289. int /*y*/,
  290. int /*count*/,
  291. unsigned short * /*chars*/
  292. );
  293. /* mipushpxl.c */
  294. extern void miPushPixels(
  295. GCPtr /*pGC*/,
  296. PixmapPtr /*pBitMap*/,
  297. DrawablePtr /*pDrawable*/,
  298. int /*dx*/,
  299. int /*dy*/,
  300. int /*xOrg*/,
  301. int /*yOrg*/
  302. );
  303. /* miregion.c */
  304. /* see also region.h */
  305. extern Bool miRectAlloc(
  306. RegionPtr /*pRgn*/,
  307. int /*n*/
  308. );
  309. extern void miSetExtents(
  310. RegionPtr /*pReg*/
  311. );
  312. #ifdef DEBUG
  313. extern Bool miValidRegion(
  314. RegionPtr /*prgn*/
  315. );
  316. #endif
  317. /* miscrinit.c */
  318. extern Bool miModifyPixmapHeader(
  319. PixmapPtr /*pPixmap*/,
  320. int /*width*/,
  321. int /*height*/,
  322. int /*depth*/,
  323. int /*bitsPerPixel*/,
  324. int /*devKind*/,
  325. pointer /*pPixData*/
  326. );
  327. extern Bool miCloseScreen(
  328. int /*index*/,
  329. ScreenPtr /*pScreen*/
  330. );
  331. extern Bool miCreateScreenResources(
  332. ScreenPtr /*pScreen*/
  333. );
  334. extern Bool miScreenDevPrivateInit(
  335. ScreenPtr /*pScreen*/,
  336. int /*width*/,
  337. pointer /*pbits*/
  338. );
  339. extern Bool miScreenInit(
  340. ScreenPtr /*pScreen*/,
  341. pointer /*pbits*/,
  342. int /*xsize*/,
  343. int /*ysize*/,
  344. int /*dpix*/,
  345. int /*dpiy*/,
  346. int /*width*/,
  347. int /*rootDepth*/,
  348. int /*numDepths*/,
  349. DepthPtr /*depths*/,
  350. VisualID /*rootVisual*/,
  351. int /*numVisuals*/,
  352. VisualPtr /*visuals*/
  353. );
  354. extern int miAllocateGCPrivateIndex(
  355. void
  356. );
  357. extern PixmapPtr miGetScreenPixmap(
  358. ScreenPtr pScreen
  359. );
  360. extern void miSetScreenPixmap(
  361. PixmapPtr pPix
  362. );
  363. /* mivaltree.c */
  364. extern int miShapedWindowIn(
  365. ScreenPtr /*pScreen*/,
  366. RegionPtr /*universe*/,
  367. RegionPtr /*bounding*/,
  368. BoxPtr /*rect*/,
  369. int /*x*/,
  370. int /*y*/
  371. );
  372. typedef void
  373. (*SetRedirectBorderClipProcPtr) (WindowPtr pWindow, RegionPtr pRegion);
  374. typedef RegionPtr
  375. (*GetRedirectBorderClipProcPtr) (WindowPtr pWindow);
  376. extern int miValidateTree(
  377. WindowPtr /*pParent*/,
  378. WindowPtr /*pChild*/,
  379. VTKind /*kind*/
  380. );
  381. extern void miWideLine(
  382. DrawablePtr /*pDrawable*/,
  383. GCPtr /*pGC*/,
  384. int /*mode*/,
  385. int /*npt*/,
  386. DDXPointPtr /*pPts*/
  387. );
  388. extern void miWideDash(
  389. DrawablePtr /*pDrawable*/,
  390. GCPtr /*pGC*/,
  391. int /*mode*/,
  392. int /*npt*/,
  393. DDXPointPtr /*pPts*/
  394. );
  395. /* miwindow.c */
  396. extern void miClearToBackground(
  397. WindowPtr /*pWin*/,
  398. int /*x*/,
  399. int /*y*/,
  400. int /*w*/,
  401. int /*h*/,
  402. Bool /*generateExposures*/
  403. );
  404. extern Bool miChangeSaveUnder(
  405. WindowPtr /*pWin*/,
  406. WindowPtr /*first*/
  407. );
  408. extern void miPostChangeSaveUnder(
  409. WindowPtr /*pWin*/,
  410. WindowPtr /*pFirst*/
  411. );
  412. extern void miMarkWindow(
  413. WindowPtr /*pWin*/
  414. );
  415. extern Bool miMarkOverlappedWindows(
  416. WindowPtr /*pWin*/,
  417. WindowPtr /*pFirst*/,
  418. WindowPtr * /*ppLayerWin*/
  419. );
  420. extern void miHandleValidateExposures(
  421. WindowPtr /*pWin*/
  422. );
  423. extern void miMoveWindow(
  424. WindowPtr /*pWin*/,
  425. int /*x*/,
  426. int /*y*/,
  427. WindowPtr /*pNextSib*/,
  428. VTKind /*kind*/
  429. );
  430. extern void miSlideAndSizeWindow(
  431. WindowPtr /*pWin*/,
  432. int /*x*/,
  433. int /*y*/,
  434. unsigned int /*w*/,
  435. unsigned int /*h*/,
  436. WindowPtr /*pSib*/
  437. );
  438. extern WindowPtr miGetLayerWindow(
  439. WindowPtr /*pWin*/
  440. );
  441. extern void miSetShape(
  442. WindowPtr /*pWin*/
  443. );
  444. extern void miChangeBorderWidth(
  445. WindowPtr /*pWin*/,
  446. unsigned int /*width*/
  447. );
  448. extern void miMarkUnrealizedWindow(
  449. WindowPtr /*pChild*/,
  450. WindowPtr /*pWin*/,
  451. Bool /*fromConfigure*/
  452. );
  453. extern void miSegregateChildren(WindowPtr pWin, RegionPtr pReg, int depth);
  454. /* mizerarc.c */
  455. extern void miZeroPolyArc(
  456. DrawablePtr /*pDraw*/,
  457. GCPtr /*pGC*/,
  458. int /*narcs*/,
  459. xArc * /*parcs*/
  460. );
  461. /* mizerline.c */
  462. extern void miZeroLine(
  463. DrawablePtr /*dst*/,
  464. GCPtr /*pgc*/,
  465. int /*mode*/,
  466. int /*nptInit*/,
  467. DDXPointRec * /*pptInit*/
  468. );
  469. extern void miZeroDashLine(
  470. DrawablePtr /*dst*/,
  471. GCPtr /*pgc*/,
  472. int /*mode*/,
  473. int /*nptInit*/,
  474. DDXPointRec * /*pptInit*/
  475. );
  476. extern void miPolyFillArc(
  477. DrawablePtr /*pDraw*/,
  478. GCPtr /*pGC*/,
  479. int /*narcs*/,
  480. xArc * /*parcs*/
  481. );
  482. #endif /* MI_H */