예제 #1
0
파일: gui.py 프로젝트: rudresh2319/Xpra
def get_icc_info():
    #maybe we shouldn't return anything if there's more than one display?
    info = {}
    try:
        did = CG.CGMainDisplayID()
        info = get_colorspace_info(CG.CGDisplayCopyColorSpace(did))
    except Exception as e:
        log("failed to query colorspace for main display: %s", e)
    return info
예제 #2
0
파일: gui.py 프로젝트: rudresh2319/Xpra
def get_display_icc_info():
    info = {}
    try:
        err, active_displays, no = CG.CGGetActiveDisplayList(99, None, None)
        if err == 0 and no > 0:
            for i, adid in enumerate(active_displays):
                info[i] = get_colorspace_info(CG.CGDisplayCopyColorSpace(adid))
    except Exception as e:
        log("failed to query colorspace for active displays: %s", e)
    return info
예제 #3
0
파일: gui.py 프로젝트: rudresh2319/Xpra
def get_icc_info():
    #maybe we shouldn't return anything if there's more than one display?
    info = {}
    try:
        from Quartz import CoreGraphics as CG  #@UnresolvedImport
        did = CG.CGMainDisplayID()
        info = get_colorspace_info(CG.CGDisplayCopyColorSpace(did))
    except Exception as e:
        log("failed to query colorspace for main display: %s", e)
    return info