๓
าฒXc           @` sย  d  d l  m Z m Z m Z d  d l Z d  d l Z d e f d     YZ d   Z g  Z	 g  Z
 d   Z d   Z d   Z d	   Z d  d
 l Td  d l m Z d  d l m Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l j Z e d  e d  e d  e d  e d  e d  e d  e d  e d  e d  e d  d   Z d  d
 l Td   Z d   Z  d   Z! e j" j# Z# e$ Z% d S(   i    (   t   divisiont   print_functiont   absolute_importNt   MissingModulec           B` s   e  Z d    Z d   Z RS(   c         C` s   | |  _  | |  _ d  S(   N(   t   __name__t   reason(   t   selft   nameR   (    (    sA   c:\mingw\msys\1.0\newbuild\install\python\pygame_sdl2\__init__.pyt   __init__   s    	c         C` s   t  |  j   d  S(   N(   t   NotImplementedErrorR   (   R   t   attr(    (    sA   c:\mingw\msys\1.0\newbuild\install\python\pygame_sdl2\__init__.pyt   __getattr__   s    (   R   t
   __module__R   R   (    (    (    sA   c:\mingw\msys\1.0\newbuild\install\python\pygame_sdl2\__init__.pyR      s   	c         C` sx   d |  } y t  j |  } Wn: t t f k
 rY } t | d j | t |    } n X| t   |  <| t j	 | <d  S(   Ns   pygame_sdl2.s   Could not import {}: {}(
   t	   importlibt   import_modulet   IOErrort   ImportErrorR   t   formatt   strt   globalst   syst   modules(   R   t	   full_namet   modulet   e(    (    sA   c:\mingw\msys\1.0\newbuild\install\python\pygame_sdl2\__init__.pyt
   try_import"   s    
%c         C` s   t  j |   |  S(   N(   t   init_functionst   append(   t   fn(    (    sA   c:\mingw\msys\1.0\newbuild\install\python\pygame_sdl2\__init__.pyt   register_init1   s    c         C` s   t  j |   |  S(   N(   t   quit_functionsR   (   R   (    (    sA   c:\mingw\msys\1.0\newbuild\install\python\pygame_sdl2\__init__.pyt   register_quit5   s    c          C` sP   d }  d } x7 t  D]/ } y |   |  d 7}  Wq | d 7} q Xq W|  | f S(   Ni    i   (   R   (   t   numpasst   numfailt   i(    (    sA   c:\mingw\msys\1.0\newbuild\install\python\pygame_sdl2\__init__.pyt   init9   s    c          C` s*   x# t  D] }  y |    Wq q Xq Wd  S(   N(   R   (   R"   (    (    sA   c:\mingw\msys\1.0\newbuild\install\python\pygame_sdl2\__init__.pyt   quitF   s
    (   t   *(   t   Surface(   t   Rectt
   controllert   drawt   fontt   imaget   joystickt   mixert   mouset	   transformt   scrapt   spritet   sysfontc          C` sฌ   d d  l  }  d d  l }  d d  l }  d d  l }  d d  l }  d d  l }  d d  l }  d d  l }  d d  l }  d d  l	 }  d d  l
 }  d d  l }  d d  l }  d d  l }  d  S(   Ni    (   t   pygame_sdl2.compatt   pygame_sdl2.controllert   pygame_sdl2.rwobjectt   pygame_sdl2.gfxdrawt   pygame_sdl2.drawt   pygame_sdl2.fontt   pygame_sdl2.imaget   pygame_sdl2.joystickt   pygame_sdl2.mixert   pygame_sdl2.mouset   pygame_sdl2.transformt   pygame_sdl2.scrapt   pygame_sdl2.spritet   pygame_sdl2.sysfont(   t   pygame_sdl2(    (    sA   c:\mingw\msys\1.0\newbuild\install\python\pygame_sdl2\__init__.pyt   _optional_importsl   s    c          C` sา   d d l  }  d d l } d |  j k r+ d Sd t j k rP | j d d d n  xn t t j j    D]W \ } } | j d  } | d d	 k r qf n  d | d <d j	 |  } | t j | <qf Wt
 t j d
 <d S(   s   
    Imports pygame_sdl2 as pygame, so that running the 'import pygame.whatever'
    statement will import pygame_sdl2.whatever instead.
    i    Nt   PYGAME_SDL2_USE_PYGAMEt   pygames@   Pygame has already been imported, import_as_pygame may not work.t
   stackleveli   t   .RA   s   pygame.constants(   t   ost   warningst   environR   R   t   warnt   listt   itemst   splitt   joint	   constants(   RG   RH   R   t   mod(    (    sA   c:\mingw\msys\1.0\newbuild\install\python\pygame_sdl2\__init__.pyt   import_as_pygame   s    "
c           C` s   t  S(   N(   t	   BYTEORDER(    (    (    sA   c:\mingw\msys\1.0\newbuild\install\python\pygame_sdl2\__init__.pyt   get_sdl_byteorder   s    c           C` s   t  S(   N(   t   SDL_VERSION_TUPLE(    (    (    sA   c:\mingw\msys\1.0\newbuild\install\python\pygame_sdl2\__init__.pyt   get_sdl_version   s    (&   t
   __future__R    R   R   R   R   t   objectR   R   R   R   R   R   R#   R$   t   pygame_sdl2.errort   pygame_sdl2.surfaceR&   t   pygame_sdl2.rectR'   t   pygame_sdl2.colorRA   t   pygame_sdl2.displayt   pygame_sdl2.eventt   pygame_sdl2.keyt   pygame_sdl2.localst   pygame_sdl2.timet   pygame_sdl2.versiont   localsRO   RB   RQ   RS   RU   t   displayt   get_platformt   Falset   HAVE_NEWBUF(    (    (    sA   c:\mingw\msys\1.0\newbuild\install\python\pygame_sdl2\__init__.pyt   <module>   sN   							











	
			