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