summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryce Harrington <bryce@canonical.com>2011-12-01 16:35:27 -0800
committerBryce Harrington <bryce@canonical.com>2012-01-06 12:34:54 -0800
commit01e1ba3ee08e6e63209298d2f0f49d19e7e6d856 (patch)
treeea09cbe04d9e53af2f1cac1409e691c2b971455e
parent4c819b778118943f1cba573b8fa3eb40f4dd05d3 (diff)
Copy a few basic structs and enums from xrandr.c into header.
Adopt header style and struct naming scheme from libXrandr's Xrandr.h. In particular, rename enums from foobar_t to XRUFoobar. Signed-off-by: Bryce Harrington <bryce@canonical.com>
-rw-r--r--include/X11/extensions/XrandrUtils.h47
-rw-r--r--man/XrandrUtils.man21
2 files changed, 67 insertions, 1 deletions
diff --git a/include/X11/extensions/XrandrUtils.h b/include/X11/extensions/XrandrUtils.h
index e69de29..7542713 100644
--- a/include/X11/extensions/XrandrUtils.h
+++ b/include/X11/extensions/XrandrUtils.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright © 2002 Hewlett Packard Company, Inc.
+ * Copyright © 2006 Intel Corporation
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting documentation, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no representations
+ * about the suitability of this software for any purpose. It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ * Thanks to Jim Gettys who wrote most of the client side code,
+ * and part of the server code for randr.
+ */
+
+#ifndef _XRANDR_UTILS_H_
+#define _XRANDR_UTILS_H_
+
+typedef enum {
+ relation_left_of,
+ relation_right_of,
+ relation_above,
+ relation_below,
+ relation_same_as,
+} XRURelation;
+
+typedef struct {
+ int x1, y1, x2, y2;
+} XRUBox;
+
+typedef struct {
+ int x, y;
+} XRUPoint;
+
+#endif /* _XRANDR_UTILS_H_ */
diff --git a/man/XrandrUtils.man b/man/XrandrUtils.man
index 1258b81..bea2776 100644
--- a/man/XrandrUtils.man
+++ b/man/XrandrUtils.man
@@ -14,8 +14,27 @@
.SH DATATYPES
+.PP
+.B Relations and Geometries
+.PP
+.nf
+typedef enum {
+ relation_left_of,
+ relation_right_of,
+ relation_above,
+ relation_below,
+ relation_same_as,
+} XRURelation;
+
typedef struct {
-};
+ int x1, y1, x2, y2;
+} XRUBox;
+
+typedef struct {
+ int x, y;
+} XRUPoint;
+.sp
+.fi
.SH DESCRIPTION
.B XrandrUtils