s - LjddlmZmZmZmZddlmZddlmZddl m Z ee edZ Gdde Z dS) )DictListOptionalTuple) XephyrDisplay) XvfbDisplay) XvncDisplay)xvfbxvncxephyrceZdZdZdddddddgdf d eed ed eeefd ed ededede edefdZ ddZ ddZ dZ dZdefdZedefdZedefdZedefdZdeeeffdZdS)Displaya Proxy class :param color_depth: [8, 16, 24, 32] :param size: screen size (width,height) :param bgcolor: background color ['black' or 'white'] :param visible: True -> Xephyr, False -> Xvfb :param backend: 'xvfb', 'xvnc' or 'xephyr', ignores ``visible`` :param xauth: If a Xauthority file should be created. :param manage_global_env: if True then $DISPLAY is set in os.environ which is not thread-safe. Use False to make it thread-safe. NF)iiblack Tbackendvisiblesize color_depthbgcolor use_xauthretries extra_argsmanage_global_envc ||_||_||_||_||_|js|jrd|_nd|_t |j} | std|jz| d||||||| d| |_dS)Nr r zunknown backend: %s)rrrrrrr) _color_depth_size_bgcolor_visible_backend _class_mapget ValueError_obj) selfrrrrrrrrrkwargsclss /srv/buildsys-work-dir/castor/build_node/builder-2/WGSG1/unpkd_srcs/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/pyvirtualdisplay/display.py__init__zDisplay.__init__s(    } '} ' ( & nnT]++ D2T]BCC CC  #!/       returnc8|j|S)z5 start display :rtype: self )r%startr&s r)r.z Display.startBs  r+c8|j|S)z4 stop display :rtype: self )r%stopr/s r)r1z Display.stopKs  r+c.||S)%used by the :keyword:`with` statement)r.r/s r) __enter__zDisplay.__enter__Ts  r+c.|dS)r3N)r1)r&exc_infos r)__exit__zDisplay.__exit__Ys r+c4|jS)N)r%is_aliver/s r)r9zDisplay.is_alive]sy!!###r+c|jjS)zI PID (:attr:`subprocess.Popen.pid`) :rtype: int )r%pidr/s r)r;z Display.piddsy}r+c|jjS)z=The new $DISPLAY variable as int. Example 1 if $DISPLAY=':1')r%displayr/s r)r=zDisplay.displaymsy  r+c|jjS)z#The new $DISPLAY variable like ':1')r%new_display_varr/s r)r?zDisplay.new_display_varrsy((r+c4|jS)zrPs............111111------------!;- P P o o o o o fo o o o o r+