1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: SWIG interface for wx poser events and functions
7 // Created: 28-May-2006
9 // Copyright: (c) 2006 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
15 //---------------------------------------------------------------------------
25 #ifndef wxHAS_POWER_EVENTS
26 // Dummy class and other definitions for platforms that don't have them
28 class wxPowerEvent : public wxEvent
31 wxPowerEvent(wxEventType evtType) : wxEvent(wxID_NONE, evtType) {}
33 bool IsVetoed() const { return false; }
35 virtual wxEvent *Clone() const { return new wxPowerEvent(*this); }
39 wxEVT_POWER_SUSPENDING,
40 wxEVT_POWER_SUSPENDED,
41 wxEVT_POWER_SUSPEND_CANCEL,
45 wxPowerType wxGetPowerType() { return wxPOWER_UNKNOWN; }
46 wxBatteryState wxGetBatteryState() { return wxBATTERY_UNKNOWN_STATE; }
62 wxBATTERY_NORMAL_STATE, // system is fully usable
63 wxBATTERY_LOW_STATE, // start to worry
64 wxBATTERY_CRITICAL_STATE, // save quickly
65 wxBATTERY_SHUTDOWN_STATE, // too late
66 wxBATTERY_UNKNOWN_STATE
71 "wx.PowerEvent is generated when the system online status changes.
72 Currently this is only implemented for Windows.",
74 class wxPowerEvent : public wxEvent
77 wxPowerEvent(wxEventType evtType);
79 // Veto the operation (only makes sense with EVT_POWER_SUSPENDING)
81 bool IsVetoed() const;
85 %constant wxEventType wxEVT_POWER_SUSPENDING;
86 %constant wxEventType wxEVT_POWER_SUSPENDED;
87 %constant wxEventType wxEVT_POWER_SUSPEND_CANCEL;
88 %constant wxEventType wxEVT_POWER_RESUME;
91 EVT_POWER_SUSPENDING = wx.PyEventBinder( wxEVT_POWER_SUSPENDING , 1 )
92 EVT_POWER_SUSPENDED = wx.PyEventBinder( wxEVT_POWER_SUSPENDED , 1 )
93 EVT_POWER_SUSPEND_CANCEL = wx.PyEventBinder( wxEVT_POWER_SUSPEND_CANCEL , 1 )
94 EVT_POWER_RESUME = wx.PyEventBinder( wxEVT_POWER_RESUME , 1 )
99 wxPowerType , wxGetPowerType(),
100 "return the current system power state: online or offline", "");
104 wxBatteryState , wxGetBatteryState(),
105 "return approximate battery state", "");
108 //---------------------------------------------------------------------------