o
    tVg                  
   @   s  d Z ddlZddlZddlmZ ddlmZ dd Zej	
ej	ed Ze  ejdZej ZdZe  eej e  ertej D ]ZejejksaejejkrdejejkrddZqLejejkrejejkre d	 e! D ][Z"ee"Z#e#re$e#d
kre de" de$e# d ne#du re de" d ne de" de#%dd d de"v re"
dd Z&e&dv ree#Z'ej()e'de& Z*e+e*d qxqLejejkrejej,kre d e-ej.d qLejejkr(ejej/kr(e d e! Z0e e0 e$e0dkr'e de0d  de1e0d   e de1d qLejejkrZejej2krZe d  eej e3ej	4ed!d"d#Z5e56 Z7e-d$e7 e58  qLejejej9fv rge  qLej:  e;d% esGe<  dS )&a8   pygame.examples.scrap_clipboard

Demonstrates the clipboard capabilities of pygame.

Copy/paste!


Keyboard Controls
-----------------

g - get and print types in clipboard. If, image blit to screen.
p - place some text into clipboard
a - print types available in the clipboard
i - put image into the clipboard
    N)BytesIOc                   C   s$   t d t d t d t d d S )Nz:Press the 'g' key to get all of the current clipboard dataz4Press the 'p' key to put a string into the clipboardz@Press the 'a' key to get a list of the currently available typesz4Press the 'i' key to put an image into the clipboard)print r   r   S/home/ubuntu/.local/lib/python3.10/site-packages/pygame/examples/scrap_clipboard.pyusage   s   r   )   r   TFz&Getting the different clipboard data..i  zType z
 : (large z byte buffer)z : Nonez : 'asciiignore'image/   )bmppngjpg.)r   r   zPlacing clipboard text.s$   Hello. This is a message from scrap.z/Getting the available types from the clipboard.z	Contains z: zContains _INVALID_: 	_INVALID_z!Putting image into the clipboard.dataz
liquid.bmprbz	image/bmp(   )=__doc__ospygamepgpygame.scrapscrapior   r   pathsplitabspath__file__main_dirinitdisplayset_modescreentimeClockcgoingSCRAP_CLIPBOARDeventgetetypeQUITKEYDOWNkeyK_ESCAPEK_gr   	get_typestrlendecodenamehintfr   loadloaded_surfblitK_pput
SCRAP_TEXTK_atypescontainsK_iopenjoinfpreadbufcloseMOUSEBUTTONDOWNfliptickquitr   r   r   r   <module>   sx   
$
"


1