示例#1
0
    pygame.event.set_allowed(None)
    pygame.event.set_allowed([
        pygame.KEYDOWN, pygame.KEYUP, GMEVT, RUNEVT, RUNSYS, POWEROPT,
        RESTARTUI
    ])

    pygame.key.set_repeat(DT + DT * 6 + DT / 2, DT + DT * 3 + DT / 2)

    MyIconPool.Init()

    setup_dbus()

    gobject.threads_init()

    gobject_main_loop = gobject.MainLoop()

    #    if pygame.display.get_active() == True:
    #        print("I am actived")

    if pygame.image.get_extended() == False:
        print("This pygame does not support PNG")
        exit()

    PreparationInAdv()

    crt_screen = CreateByScreen()
    crt_screen.Init()
    crt_screen._HWND = screen

    big_loop()
示例#2
0
    pygame.event.set_allowed([
        pygame.KEYDOWN, pygame.KEYUP, RUNEVT, RUNSYS, POWEROPT, RESTARTUI,
        RUNSH
    ])

    pygame.key.set_repeat(DT + DT * 6 + DT / 2, DT + DT * 3 + DT / 2)

    MyIconPool.Init()

    setup_dbus()

    gobject.threads_init()

    gobject_main_loop = gobject.MainLoop()

    #    if pygame.display.get_active() == True:
    #        print("I am actived")

    if pygame.image.get_extended() == False:
        print("This pygame does not support PNG")
        exit()

    config.GlobalCanvas = pygame.Surface((Width, Height), 0, 32)
    config.GlobalCanvas2 = pygame.Surface(SCREEN_SIZE, 0, 32)

    crt_screen = CreateByScreen()
    crt_screen.Init()
    crt_screen._HWND = config.GlobalCanvas

    big_loop(config.GlobalCanvas)