#NEWLINE# def post_event( self , dispatcher , event , * args ) : #NEWLINE# #INDENT# self . _post_event_queue . put ( ( dispatcher , event , args ) ) #NEWLINE# if ( not self . _running ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# event_class = POST_EVENT_CLASS #NEWLINE# event_kind = POST_EVENT_KIND #NEWLINE# event_ref = ctypes . c_void_p ( ) #NEWLINE# _oscheck ( carbon . CreateEvent ( None , event_class , event_kind , 0 , kEventAttributeUserEvent , ctypes . byref ( event_ref ) ) ) #NEWLINE# _oscheck ( carbon . SetEventParameter ( self , kEventParamPostTarget , typeEventTargetRef , ctypes . sizeof ( ctypes . c_void_p ) , ctypes . byref ( self . _post_event_target ) ) ) #NEWLINE# _oscheck ( carbon . PostEventToQueue ( self . _event_queue , event_ref , kEventPriorityStandard ) ) #NEWLINE# carbon . ReleaseEvent ( event_ref )