1""" 2 File: 3 JetStatusEvent.py 4 5 Contents and purpose: 6 Creates an event for postevent callbacks 7 8 Copyright (c) 2008 Android Open Source Project 9 10 Licensed under the Apache License, Version 2.0 (the "License"); 11 you may not use this file except in compliance with the License. 12 You may obtain a copy of the License at 13 14 http://www.apache.org/licenses/LICENSE-2.0 15 16 Unless required by applicable law or agreed to in writing, software 17 distributed under the License is distributed on an "AS IS" BASIS, 18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 See the License for the specific language governing permissions and 20 limitations under the License. 21""" 22 23import wx 24 25EVT_JET_STATUS_ID = wx.NewId() 26 27def EVT_JET_STATUS(win, func): 28 win.Connect(-1, -1, EVT_JET_STATUS_ID, func) 29 30class JetStatusEvent(wx.PyEvent): 31 """Used for posting events out of play thread back to UI""" 32 def __init__(self, mode, data): 33 wx.PyEvent.__init__(self) 34 self.SetEventType(EVT_JET_STATUS_ID) 35 self.mode = mode 36 self.data = data 37 38 39