summaryrefslogtreecommitdiffstats
path: root/examples/icc-profile-atoms
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-03-21 08:55:55 +0100
committerMattias Andrée <maandree@operamail.com>2014-03-21 08:55:55 +0100
commit048c0870d3fead86db41891abe82283b9f16651d (patch)
treecac8584b7925ba98e5dbc4cb9f39bd835076aaaa /examples/icc-profile-atoms
parentFix _ICC_PROFILE support (diff)
downloadblueshift-048c0870d3fead86db41891abe82283b9f16651d.tar.gz
blueshift-048c0870d3fead86db41891abe82283b9f16651d.tar.bz2
blueshift-048c0870d3fead86db41891abe82283b9f16651d.tar.xz
demo _ICC_PROFILE
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--examples/icc-profile-atoms28
1 files changed, 28 insertions, 0 deletions
diff --git a/examples/icc-profile-atoms b/examples/icc-profile-atoms
new file mode 100644
index 0000000..a5f5a13
--- /dev/null
+++ b/examples/icc-profile-atoms
@@ -0,0 +1,28 @@
+# -*- python -*-
+
+# This example demonstrates how to use read and
+# use the _ICC_PROFILE(_n) atoms for X screens.
+
+
+# Copyright © 2014 Mattias Andrée (maandree@member.fsf.org)
+#
+# Permission is granted to copy, distribute and/or modify this document
+# under the terms of the GNU Free Documentation License, Version 1.3
+# or any later version published by the Free Software Foundation;
+# with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+# You should have received a copy of the GNU General Public License
+# along with this software package. If not, see <http://www.gnu.org/licenses/>.
+
+
+for screen, crtc, profile in get_current_icc():
+ start_over()
+ profile()
+ randr(crtc, screen = screen)
+
+# Or equivalently:
+#
+#for screen, crtc, profile in get_current_icc_raw():
+# start_over()
+# parse_icc(profile)()
+# randr(crtc, screen = screen)
+