summaryrefslogblamecommitdiffstats
path: root/examples/icc-profile-atoms
blob: e6bf96d2c68ef6d187ac10d77de931a19fe41124 (plain) (tree)
1
2
3
4
5
6
7

                
                                           


                                               
                                                                      




















                                                                                
# -*- python -*-

# This example demonstrates how to read and
# use the _ICC_PROFILE(_n) atoms for X screens.


# Copyright © 2014, 2015, 2016, 2017  Mattias Andrée (m@maandree.se)
# 
# 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)