def glutDestroyMenu( cls, menu ): """Destroy (cleanup) the given menu Deregister's the interal pointer to the menu callback returns None """ result = simple.glutDestroyMenu( menu ) contextdata.delValue( ('menucallback',menu) ) return result
def deregister( value ): try: function( value ) finally: for item in callbacks: if item.function is deregister: callbacks.remove( item ) item.function = None break if not callbacks: contextdata.delValue( self.CONTEXT_DATA_KEY )