summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authordscho <dscho>2003-02-09 17:20:15 +0000
committerdscho <dscho>2003-02-09 17:20:15 +0000
commitfd96c5e835cfb64e454e189e4b481b0a7292f5e3 (patch)
treec7ce92b7dc92e719493b050899327654e99b3eea /include
parent75484911df0bf1f92d36e4ac2c45d5585100483b (diff)
downloadlibvncserver-fd96c5e835cfb64e454e189e4b481b0a7292f5e3.zip
libvncserver-fd96c5e835cfb64e454e189e4b481b0a7292f5e3.tar.gz
renamed sraRegion to rfbregion and put it in include/; will be installed now
Diffstat (limited to 'include')
-rwxr-xr-xinclude/rfbregion.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/include/rfbregion.h b/include/rfbregion.h
new file mode 100755
index 0000000..1bbedf6
--- /dev/null
+++ b/include/rfbregion.h
@@ -0,0 +1,60 @@
+#ifndef SRAREGION_H
+#define SRAREGION_H
+
+/* -=- SRA - Simple Region Algorithm
+ * A simple rectangular region implementation.
+ * Copyright (c) 2001 James "Wez" Weatherall, Johannes E. Schindelin
+ */
+
+/* -=- sraRect */
+
+typedef struct _rect {
+ int x1;
+ int y1;
+ int x2;
+ int y2;
+} sraRect;
+
+typedef struct sraRegion sraRegion;
+
+/* -=- Region manipulation functions */
+
+extern sraRegion *sraRgnCreate();
+extern sraRegion *sraRgnCreateRect(int x1, int y1, int x2, int y2);
+extern sraRegion *sraRgnCreateRgn(const sraRegion *src);
+
+extern void sraRgnDestroy(sraRegion *rgn);
+extern void sraRgnMakeEmpty(sraRegion *rgn);
+extern Bool sraRgnAnd(sraRegion *dst, const sraRegion *src);
+extern void sraRgnOr(sraRegion *dst, const sraRegion *src);
+extern Bool sraRgnSubtract(sraRegion *dst, const sraRegion *src);
+
+extern void sraRgnOffset(sraRegion *dst, int dx, int dy);
+
+extern Bool sraRgnPopRect(sraRegion *region, sraRect *rect,
+ unsigned long flags);
+
+extern unsigned long sraRgnCountRects(const sraRegion *rgn);
+extern Bool sraRgnEmpty(const sraRegion *rgn);
+
+/* -=- rectangle iterator */
+
+typedef struct sraRectangleIterator {
+ Bool reverseX,reverseY;
+ int ptrSize,ptrPos;
+ struct sraSpan** sPtrs;
+} sraRectangleIterator;
+
+extern sraRectangleIterator *sraRgnGetIterator(sraRegion *s);
+extern sraRectangleIterator *sraRgnGetReverseIterator(sraRegion *s,Bool reverseX,Bool reverseY);
+extern Bool sraRgnIteratorNext(sraRectangleIterator *i,sraRect *r);
+extern void sraRgnReleaseIterator(sraRectangleIterator *i);
+
+void sraRgnPrint(const sraRegion *s);
+
+/* -=- Rectangle clipper (for speed) */
+
+extern Bool sraClipRect(int *x, int *y, int *w, int *h,
+ int cx, int cy, int cw, int ch);
+
+#endif
OpenPOWER on IntegriCloud