ó
ì[Jc           @   sÏ   d  d l  Td  d l Td  d l Z d  d l Z d  d l Z d  d l m Z m Z m	 Z	 m
 Z
 d  d l m Z d  d l m Z e d ƒ Z d Z d „  Z d	 „  Z d
 „  Z d „  Z d „  Z d „  Z d „  Z d S(   iÿÿÿÿ(   t   *N(   t
   SCRAP_TEXTt	   SCRAP_BMPt   SCRAP_SELECTIONt   SCRAP_CLIPBOARD(   t   StringIO(   t   unicode_s   org.pygame.scrapsO   Only text has been implemented for scrap on mac. See lib/mac_scrap.py to debug.c           C   s   d S(   Ni   (    (    (    (    s=   c:\mingw\msys\1.0\newbuild\install\python\pygame\mac_scrap.pyt   init   s    c         C   s5   t  j ƒ  } |  t k r% | j t ƒ St t ƒ ‚ d  S(   N(   t   NSPasteboardt   generalPasteboardR   t   stringForType_t   NSStringPboardTypet   NotImplementedErrort   err(   t
   scrap_typet   board(    (    s=   c:\mingw\msys\1.0\newbuild\install\python\pygame\mac_scrap.pyt   get   s    c         C   sŽ   t  j ƒ  } |  t k r~ | j t t g d  ƒ t | t ƒ rF | } n t | d ƒ } | j	 | t ƒ | j	 t
 d ƒ t ƒ n t t ƒ ‚ d  S(   Ns   utf-8t    (   R   R	   R   t   declareTypes_owner_R   t   ScrapPboardTypet   Nonet
   isinstancet   unicodet   setString_forType_R   R   R   (   R   t   thingR   t
   text_thing(    (    s=   c:\mingw\msys\1.0\newbuild\install\python\pygame\mac_scrap.pyt   put=   s    	c         C   s%   |  t  t g k r! t d ƒ ‚ n  d  S(   Ns   invalid clipboard mode(   R   R   t
   ValueError(   t   mode(    (    s=   c:\mingw\msys\1.0\newbuild\install\python\pygame\mac_scrap.pyt   set_modez   s    c         C   s   |  t  j ƒ  j ƒ  k S(   N(   R   R	   t   types(   R   (    (    s=   c:\mingw\msys\1.0\newbuild\install\python\pygame\mac_scrap.pyt   contains   s    c          C   s:   g  }  t  j ƒ  j ƒ  } x | D] } |  j | ƒ q W|  S(   N(   R   R	   R   t   append(   t   typelistR   t   t(    (    s=   c:\mingw\msys\1.0\newbuild\install\python\pygame\mac_scrap.pyt	   get_types‚   s
    c          C   s   t  j ƒ  }  |  j t g ƒ S(   N(   R   R	   t   availableTypeFromArray_R   (   R   (    (    s=   c:\mingw\msys\1.0\newbuild\install\python\pygame\mac_scrap.pyt   lost‰   s    (   t   AppKitt
   Foundationt   syst   tempfilet   pygame.imaget   pygamet   pygame.localsR   R   R   R   t	   cStringIOR   t   pygame.compatR   R   R   R   R   R   R   R   R#   R%   (    (    (    s=   c:\mingw\msys\1.0\newbuild\install\python\pygame\mac_scrap.pyt   <module>   s    

"		%	=			