<s> """<STR_LIT>""" <EOL> from __future__ import division <EOL> from . . base import ( BaseApplicationBackend , BaseCanvasBackend , <EOL> BaseTimerBackend ) <EOL> from ... util import keys <EOL> from ... import config <EOL> USE_EGL = config [ '<STR_LIT>' ] . lower ( ) . startswith ( '<STR_LIT>' ) <EOL> KEYMAP = { <EOL> - <NUM_LIT:1> : keys . SHIFT , <EOL> - <NUM_LIT:2> : keys . CONTROL , <EOL> - <NUM_LIT:3> : keys . ALT , <EOL> - <NUM_LIT:4> : keys . META , <EOL> - <NUM_LIT:5> : keys . LEFT , <EOL> - <NUM_LIT:6> : keys . UP , <EOL> - <NUM_LIT:7> : keys . RIGHT , <EOL> - <NUM_LIT:8> : keys . DOWN , <EOL> - <NUM_LIT:9> : keys . PAGEUP , <EOL> - <NUM_LIT:10> : keys . PAGEDOWN , <EOL> - <NUM_LIT:11> : keys . INSERT , <EOL> - <NUM_LIT:12> : keys . DELETE , <EOL> - <NUM_LIT> : keys . HOME , <EOL> - <NUM_LIT> : keys . END , <EOL> - <NUM_LIT:15> : keys . ESCAPE , <EOL> - <NUM_LIT:16> : keys . BACKSPACE , <EOL> - <NUM_LIT> : keys . SPACE , <EOL> - <NUM_LIT> : keys . ENTER , <EOL> - <NUM_LIT> : keys . TAB , <EOL> - <NUM_LIT:20> : keys . F1 , <EOL> - <NUM_LIT> : keys . F2 , <EOL> - <NUM_LIT> : keys . F3 , <EOL> - <NUM_LIT> : keys . F4 , <EOL> - <NUM_LIT> : keys . F5 , <EOL> - <NUM_LIT> : keys . F6 , <EOL> - <NUM_LIT> : keys . F7 , <EOL> - <NUM_LIT> : keys . F8 , <EOL> - <NUM_LIT> : keys . F9 , <EOL> - <NUM_LIT> : keys . F10 , <EOL> - <NUM_LIT:30> : keys . F11 , <EOL> - <NUM_LIT> : keys . F12 , <EOL> } <EOL> capability = dict ( <EOL> title = False , <EOL> size = False , <EOL> position = False , <EOL> show = False , <EOL> vsync = False , <EOL> resizable = False , <EOL> decorate = False , <EOL> fullscreen = False , <EOL> context = False , <EOL> multi_window = False , <EOL> scroll = False , <EOL> parent = False , <EOL> always_on_top = False , <EOL> ) <EOL> def _set_config ( c ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> class ApplicationBackend ( BaseApplicationBackend ) : <EOL> def __init__ ( self ) : <EOL> BaseApplicationBackend . __init__ ( self ) <EOL> def _vispy_get_backend_name ( self ) : <EOL> return '<STR_LIT>' <EOL> def _vispy_process_events ( self ) : <EOL> raise NotImplementedError ( ) <EOL> def _vispy_run ( self ) : <EOL> raise NotImplementedError ( ) <EOL> def _vispy_quit ( self ) : <EOL> raise NotImplementedError ( ) <EOL> def _vispy_get_native_app ( self ) : <EOL> raise NotImplementedError ( ) <EOL> class CanvasBackend ( BaseCanvasBackend ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , * args , ** kwargs ) : <EOL> BaseCanvasBackend . __init__ ( self , * args ) <EOL> p = self . _process_backend_kwargs ( kwargs ) <EOL> p . context . shared . add_ref ( '<STR_LIT>' , self ) <EOL> if p . context . shared . ref is self : <EOL> self . _native_context = None <EOL> else : <EOL> self . _native_context = p . context . shared . ref . _native_context <EOL> def _vispy_set_current ( self ) : <EOL> raise NotImplementedError ( ) <EOL> def _vispy_swap_buffers ( self ) : <EOL> raise NotImplementedError ( ) <EOL> def _vispy_set_title ( self , title ) : <EOL> raise NotImplementedError ( ) <EOL> def _vispy_set_size ( self , w , h ) : <EOL> raise NotImplementedError ( ) <EOL> def _vispy_set_position ( self , x , y ) : <EOL> raise NotImplementedError ( ) <EOL> def _vispy_set_visible ( self , visible ) : <EOL> raise NotImplementedError ( ) <EOL> def _vispy_set_fullscreen ( self , fullscreen ) : <EOL> raise NotImplementedError ( ) <EOL> def _vispy_update ( self ) : <EOL> raise NotImplementedError ( ) <EOL> def _vispy_close ( self ) : <EOL> raise NotImplementedError ( ) <EOL> def _vispy_get_size ( self ) : <EOL> raise NotImplementedError ( ) <EOL> def _vispy_get_position ( self ) : <EOL> raise NotImplementedError ( ) <EOL> def _vispy_get_fullscreen ( self ) : <EOL> raise NotImplementedError ( ) <EOL> def _vispy_get_native_canvas ( self ) : <EOL> return self <EOL> class TimerBackend ( BaseTimerBackend ) : <EOL> def __init__ ( self , vispy_timer ) : <EOL> BaseTimerBackend . __init__ ( self , vispy_timer ) <EOL> def _vispy_start ( self , interval ) : <EOL> raise NotImplementedError ( ) <EOL> def _vispy_stop ( self ) : <EOL> raise NotImplementedError ( ) <EOL> def _vispy_timeout ( self ) : <EOL> raise NotImplementedError ( ) <EOL> def _vispy_get_native_timer ( self ) : <EOL> return self </s>
