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 //---------------------------------------------------------------------------
19 #ifndef wxHAS_POWER_EVENTS
20 // Dummy class and other definitions for platforms that don't have them
22 class wxPowerEvent : public wxEvent
25 wxPowerEvent(wxEventType evtType) : wxEvent(wxID_NONE, evtType) {}
27 bool IsVetoed() const { return false; }
29 virtual wxEvent *Clone() const { return new wxPowerEvent(*this); }
33 wxEVT_POWER_SUSPENDING,
34 wxEVT_POWER_SUSPENDED,
35 wxEVT_POWER_SUSPEND_CANCEL,
39 wxPowerType wxGetPowerType() { return wxPOWER_UNKNOWN; }
40 wxBatteryState wxGetBatteryState() { return wxBATTERY_UNKNOWN_STATE; }
56 wxBATTERY_NORMAL_STATE, // system is fully usable
57 wxBATTERY_LOW_STATE, // start to worry
58 wxBATTERY_CRITICAL_STATE, // save quickly
59 wxBATTERY_SHUTDOWN_STATE, // too late
60 wxBATTERY_UNKNOWN_STATE
65 "wx.PowerEvent is generated when the system online status changes.
66 Currently this is only implemented for Windows.",
68 class wxPowerEvent : public wxEvent
71 wxPowerEvent(wxEventType evtType);
73 // Veto the operation (only makes sense with EVT_POWER_SUSPENDING)
75 bool IsVetoed() const;
79 %constant wxEventType wxEVT_POWER_SUSPENDING;
80 %constant wxEventType wxEVT_POWER_SUSPENDED;
81 %constant wxEventType wxEVT_POWER_SUSPEND_CANCEL;
82 %constant wxEventType wxEVT_POWER_RESUME;
85 EVT_POWER_SUSPENDING = wx.PyEventBinder( wxEVT_POWER_SUSPENDING , 1 )
86 EVT_POWER_SUSPENDED = wx.PyEventBinder( wxEVT_POWER_SUSPENDED , 1 )
87 EVT_POWER_SUSPEND_CANCEL = wx.PyEventBinder( wxEVT_POWER_SUSPEND_CANCEL , 1 )
88 EVT_POWER_RESUME = wx.PyEventBinder( wxEVT_POWER_RESUME , 1 )
93 wxPowerType , wxGetPowerType(),
94 "return the current system power state: online or offline", "");
98 wxBatteryState , wxGetBatteryState(),
99 "return approximate battery state", "");
102 //---------------------------------------------------------------------------