Esempio n. 1
0
def big_loop():
    global sound_patch

    title_bar = TitleBar()
    title_bar.Init(screen)
    foot_bar = FootBar()
    foot_bar.Init(screen)

    main_screen = MainScreen()
    main_screen._HWND = screen
    main_screen._TitleBar = title_bar
    main_screen._FootBar = foot_bar
    main_screen.Init()
    main_screen.ReadTheDirIntoPages("../Menu", 0, None)
    main_screen.FartherPages()

    sound_patch = SoundPatch()
    sound_patch._Parent = main_screen
    sound_patch.Init()
    #pp(main_screen._Pages[0],True,6)

    screen.fill(bg_color)
    main_screen.Draw()
    main_screen.SwapAndShow()

    #gobject.timeout_add(DT,gobject_pygame_event_timer,main_screen)
    gobject.timeout_add(DT, gobject_pygame_event_poll_timer, main_screen)
    gobject.timeout_add(3000, title_bar.GObjectRoundRobin)

    gobject_loop()
Esempio n. 2
0
def big_loop():
    global sound_patch, gobject_flash_led1

    title_bar = TitleBar()
    title_bar.Init(screen)
    foot_bar = FootBar()
    foot_bar.Init(screen)

    main_screen = MainScreen()
    main_screen._HWND = screen
    main_screen._TitleBar = title_bar
    main_screen._FootBar = foot_bar
    main_screen.Init()

    main_screen.ReadTheDirIntoPages("../Menu", 0, None)
    main_screen.ReadTheDirIntoPages(
        "/home/cpi/apps/Menu", 1,
        main_screen._Pages[len(main_screen._Pages) - 1])
    main_screen.ReunionPagesIcons()

    main_screen.FartherPages()

    title_bar._SkinManager = main_screen._SkinManager
    foot_bar._SkinManager = main_screen._SkinManager

    sound_patch = SoundPatch()
    sound_patch._Parent = main_screen
    sound_patch.Init()
    #pp(main_screen._Pages[0],True,6)

    screen.fill(MySkinManager.GiveColor("White"))
    main_screen.Draw()
    main_screen.SwapAndShow()

    #gobject.timeout_add(DT,gobject_pygame_event_timer,main_screen)
    gobject_flash_led1 = gobject.timeout_add(200, GobjectFlashLed1,
                                             main_screen)

    gobject.timeout_add(DT, gobject_pygame_event_poll_timer, main_screen)
    gobject.timeout_add(3000, title_bar.GObjectRoundRobin)

    socket_thread(main_screen)
    aria2_ws(main_screen)

    gobject_loop()