Exemplo n.º 1
0
    def main():
        proto = Proto()
        proto.load_xml("xproto")
        core = Core(Connection(proto))
        core.init_keymap()
        ksyms = Keysyms()
        ksyms.load_default()

        if options.action == "keysyms":
            list_keysyms(options, xcore=core, keysyms=ksyms)
Exemplo n.º 2
0
    def main():
        nonlocal retcode
        proto = Proto()
        proto.load_xml('xproto')
        proto.load_xml('randr')
        proto.load_xml('xinerama')
        core = Core(Connection(proto))
        core.randr._proto.requests['GetScreenInfo'].reply.items['rates'].code \
            = compile('0', 'XPROTO', 'eval')

        if options.disable is not None:
            disable_output(core, options.disable)
        elif options.action == 'help':
            val = core.randr._proto.requests['SetCrtcConfig'].read_from(
                b"\226\25\10\0"
                b"@\0\0\0"  #crtc
                b"\0\0\0\0"  # timestamp
                b"mi&\6"  #cfg timestamp
                b"\200\7"  # x
                b"\0\0"  # y
                b"\270\0\0\0"  # mode
                b"\1\0"  # rotation
                b"\0\0"  # padding
                b"D\0\0\0"  # output
                ,
                4)
            print_help(ap)
        elif options.action == 'all':
            print_screen(core)
            print_screen_size_range(core)
            print_crtc(core)
            print_output(core)
            print_xinerama(core)
        elif options.action == 'screen':
            print_screen(core)
        elif options.action == 'screen_size_range':
            print_screen_size_range(core)
        elif options.action == 'crtc':
            print_crtc(core)
        elif options.action == 'crtc_extra':
            print_crtc_extra(core)
        elif options.action == 'output':
            print_output(core)
        elif options.action == 'output_properties':
            print_output_properties(core)
        elif options.action == 'xinerama':
            print_xinerama(core)
        elif options.action == 'providers':
            print_providers(core)
        elif options.action == 'autoconfig':
            configure_outputs(core, options.ppm)
        elif options.action == 'check':
            retcode = check_screens(core)
Exemplo n.º 3
0
    def main():
        nonlocal retcode
        proto = Proto()
        proto.load_xml('xproto')
        proto.load_xml('randr')
        proto.load_xml('xinerama')
        core = Core(Connection(proto))
        core.randr._proto.requests['GetScreenInfo'].reply.items['rates'].code \
            = compile('0', 'XPROTO', 'eval')

        if options.disable is not None:
            disable_output(core, options.disable)
        elif options.action == 'help':
            val = core.randr._proto.requests['SetCrtcConfig'].read_from(
                b"\226\25\10\0"
                b"@\0\0\0" #crtc
                b"\0\0\0\0" # timestamp
                b"mi&\6" #cfg timestamp
                b"\200\7" # x
                b"\0\0" # y
                b"\270\0\0\0" # mode
                b"\1\0" # rotation
                b"\0\0" # padding
                b"D\0\0\0" # output
                , 4)
            print_help(ap)
        elif options.action == 'all':
            print_screen(core)
            print_screen_size_range(core)
            print_crtc(core)
            print_output(core)
            print_xinerama(core)
        elif options.action == 'screen':
            print_screen(core)
        elif options.action == 'screen_size_range':
            print_screen_size_range(core)
        elif options.action == 'crtc':
            print_crtc(core)
        elif options.action == 'crtc_extra':
            print_crtc_extra(core)
        elif options.action == 'output':
            print_output(core)
        elif options.action == 'output_properties':
            print_output_properties(core)
        elif options.action == 'xinerama':
            print_xinerama(core)
        elif options.action == 'providers':
            print_providers(core)
        elif options.action == 'autoconfig':
            configure_outputs(core, options.ppm)
        elif options.action == 'check':
            retcode = check_screens(core)
Exemplo n.º 4
0
 def real_test():
     pr = Proto()
     for i in protos:
         pr.load_xml(i)
     conn = Connection(pr)
     fun(self, conn)
Exemplo n.º 5
0
 def real_test():
     pr = Proto()
     for i in protos:
         pr.load_xml(i)
     conn = Connection(pr)
     fun(self, conn)