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 //---------------------------------------------------------------------------
 
  20 #ifndef wxHAS_POWER_EVENTS
 
  21 // Dummy class and other definitions for platforms that don't have them
 
  23 // See wxPython_int.h for wxPowerEvent
 
  26     wxEVT_POWER_SUSPENDING,
 
  27     wxEVT_POWER_SUSPENDED,
 
  28     wxEVT_POWER_SUSPEND_CANCEL,
 
  32 wxPowerType wxGetPowerType()       { return wxPOWER_UNKNOWN; }
 
  33 wxBatteryState wxGetBatteryState() { return wxBATTERY_UNKNOWN_STATE; }
 
  49     wxBATTERY_NORMAL_STATE,    // system is fully usable
 
  50     wxBATTERY_LOW_STATE,       // start to worry
 
  51     wxBATTERY_CRITICAL_STATE,  // save quickly
 
  52     wxBATTERY_SHUTDOWN_STATE,  // too late
 
  53     wxBATTERY_UNKNOWN_STATE
 
  58 "wx.PowerEvent is generated when the system online status changes.
 
  59 Currently this is only implemented for Windows.",
 
  61 class wxPowerEvent : public wxEvent
 
  64     wxPowerEvent(wxEventType evtType);
 
  66     // Veto the operation (only makes sense with EVT_POWER_SUSPENDING)
 
  68     bool IsVetoed() const;
 
  72 %constant wxEventType wxEVT_POWER_SUSPENDING;
 
  73 %constant wxEventType wxEVT_POWER_SUSPENDED;
 
  74 %constant wxEventType wxEVT_POWER_SUSPEND_CANCEL;
 
  75 %constant wxEventType wxEVT_POWER_RESUME;
 
  78 EVT_POWER_SUSPENDING       = wx.PyEventBinder( wxEVT_POWER_SUSPENDING , 1 )
 
  79 EVT_POWER_SUSPENDED        = wx.PyEventBinder( wxEVT_POWER_SUSPENDED , 1 )
 
  80 EVT_POWER_SUSPEND_CANCEL   = wx.PyEventBinder( wxEVT_POWER_SUSPEND_CANCEL , 1 )
 
  81 EVT_POWER_RESUME           = wx.PyEventBinder( wxEVT_POWER_RESUME , 1 )
 
  86     wxPowerType , wxGetPowerType(),
 
  87     "return the current system power state: online or offline", "");
 
  91     wxBatteryState , wxGetBatteryState(),
 
  92     "return approximate battery state", "");
 
  95 //---------------------------------------------------------------------------