]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/power.h
Rebake from clean wx tree.
[wxWidgets.git] / include / wx / power.h
index f1a23b9fe27cae0e1b9e887411a6207a325e5056..bae6406482068e507b99a98fb7d3f01a756e34ce 100644 (file)
@@ -49,6 +49,9 @@ enum wxBatteryState
 class WXDLLIMPEXP_BASE wxPowerEvent : public wxEvent
 {
 public:
+    wxPowerEvent()            // just for use by wxRTTI
+        : m_veto(false) { }
+
     wxPowerEvent(wxEventType evtType) : wxEvent(wxID_NONE, evtType)
     {
         m_veto = false;
@@ -67,19 +70,18 @@ public:
 private:
     bool m_veto;
 
-    DECLARE_ABSTRACT_CLASS(wxPowerEvent)
+    DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxPowerEvent)
 };
 
-extern WXDLLIMPEXP_BASE const wxEventType wxEVT_POWER_SUSPENDING;
-extern WXDLLIMPEXP_BASE const wxEventType wxEVT_POWER_SUSPENDED;
-extern WXDLLIMPEXP_BASE const wxEventType wxEVT_POWER_SUSPEND_CANCEL;
-extern WXDLLIMPEXP_BASE const wxEventType wxEVT_POWER_RESUME;
+wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_BASE, wxEVT_POWER_SUSPENDING, wxPowerEvent );
+wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_BASE, wxEVT_POWER_SUSPENDED, wxPowerEvent );
+wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_BASE, wxEVT_POWER_SUSPEND_CANCEL, wxPowerEvent );
+wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_BASE, wxEVT_POWER_RESUME, wxPowerEvent );
 
 typedef void (wxEvtHandler::*wxPowerEventFunction)(wxPowerEvent&);
 
 #define wxPowerEventHandler(func) \
-    (wxObjectEventFunction)(wxEventFunction) \
-        wxStaticCastEvent(wxPowerEventFunction, &func)
+    wxEVENT_HANDLER_CAST(wxPowerEventFunction, func)
 
 #define EVT_POWER_SUSPENDING(func) \
     wx__DECLARE_EVT0(wxEVT_POWER_SUSPENDING, wxPowerEventHandler(func))