#NEWLINE# def __init__( self , size = ( 800 , 600 ) , title = 'Python Graphics' , visible = True , share = None , full_screen = False ) : #NEWLINE# #INDENT# self . app = App . instance #NEWLINE# if full_screen : #NEWLINE# #INDENT# monitor = glfw . get_primary_monitor ( ) #NEWLINE# size = glfw . get_video_mode ( monitor ) [ 0 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# monitor = None #NEWLINE# #UNINDENT# self . size = ( width , height ) = size #NEWLINE# self . aspect = ( float ( width ) / height ) #NEWLINE# glfw . window_hint ( glfw . VISIBLE , visible ) #NEWLINE# share = ( share and share . handle ) #NEWLINE# self . handle = glfw . create_window ( width , height , title , monitor , share ) #NEWLINE# if ( not self . handle ) : #NEWLINE# #INDENT# raise Exception #NEWLINE# #UNINDENT# self . app . add_window ( self ) #NEWLINE# self . cache = Cache ( ) #NEWLINE# self . current_program = None #NEWLINE# self . use ( ) #NEWLINE# self . framebuffer_size = glfw . get_framebuffer_size ( self . handle ) #NEWLINE# self . configure ( ) #NEWLINE# self . exclusive = False #NEWLINE# self . listeners = [ ] #NEWLINE# self . scene_stack = [ ] #NEWLINE# self . set_callbacks ( ) #NEWLINE# self . call ( 'setup' )