summaryrefslogtreecommitdiffstats
path: root/krfb/libvncserver/sraRegion.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitbcb704366cb5e333a626c18c308c7e0448a8e69f (patch)
treef0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /krfb/libvncserver/sraRegion.h
downloadtdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.tar.gz
tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'krfb/libvncserver/sraRegion.h')
-rw-r--r--krfb/libvncserver/sraRegion.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/krfb/libvncserver/sraRegion.h b/krfb/libvncserver/sraRegion.h
new file mode 100644
index 00000000..9526ac37
--- /dev/null
+++ b/krfb/libvncserver/sraRegion.h
@@ -0,0 +1,65 @@
+#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);
+
+extern sraRegion *sraRgnBBox(const sraRegion *src);
+
+/* -=- 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);
+
+extern Bool sraClipRect2(int *x, int *y, int *x2, int *y2,
+ int cx, int cy, int cx2, int cy2);
+
+#endif