1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | import pygame import sys from multiprocessing import Process, Value import multiprocessing import webview import time import ctypes def hide_show(window, is_exit): window.hide() time.sleep( 5 ) # window.toggle_fullscreen() window.show() is_exit.value = True def test2(is_exit): window = webview.create_window( 'Full-screen window' , 'https://www.ifeng.com/' , fullscreen = True ) # window.on_top = True webview.start(hide_show, (window, is_exit), gui = 'cef' ) if __name__ = = '__main__' : is_exit = multiprocessing.Manager().Value(ctypes.c_bool, False ) pygame.init() # screen = pygame.display.set_mode((600, 400)) screen = pygame.display.set_mode(( 0 , 0 ), flags = pygame.FULLSCREEN) pygame.display.set_caption( "loading..." ) p = Process(target = test2, args = (is_exit,)) p.start() while not is_exit.value: for event in pygame.event.get(): if event. type = = pygame.QUIT: pygame.quit() sys.exit() pygame.display.update() pygame.quit() sys.exit() |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 地球OL攻略 —— 某应届生求职总结
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· 提示词工程——AI应用必不可少的技术
· .NET周刊【3月第1期 2025-03-02】