]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/htmlctrl/webkit/webkit.mm
fixing dangling includes
[wxWidgets.git] / src / html / htmlctrl / webkit / webkit.mm
index 7e28d801ed57625ddf7c017c74d5d98c48a8d50d..b953a9eabbbb92bde11489fbbed0f85b9084a818 100644 (file)
@@ -288,37 +288,46 @@ DEFINE_ONE_SHOT_HANDLER_GETTER( wxWebKitCtrlEventHandler )
 
 IMPLEMENT_DYNAMIC_CLASS( wxWebKitStateChangedEvent, wxCommandEvent )
 
-DEFINE_EVENT_TYPE( wxEVT_WEBKIT_STATE_CHANGED )
+wxDEFINE_EVENT( wxEVT_WEBKIT_STATE_CHANGED, wxWebKitStateChangedEvent )
 
 wxWebKitStateChangedEvent::wxWebKitStateChangedEvent( wxWindow* win )
 {
     SetEventType( wxEVT_WEBKIT_STATE_CHANGED);
-    SetEventObject( win );
-    SetId(win->GetId());
+    if ( win )
+    {
+        SetEventObject( win );
+        SetId(win->GetId());
+    }
 }
 
 IMPLEMENT_DYNAMIC_CLASS( wxWebKitBeforeLoadEvent, wxCommandEvent )
 
-DEFINE_EVENT_TYPE( wxEVT_WEBKIT_BEFORE_LOAD )
+wxDEFINE_EVENT( wxEVT_WEBKIT_BEFORE_LOAD, wxWebKitBeforeLoadEvent )
 
 wxWebKitBeforeLoadEvent::wxWebKitBeforeLoadEvent( wxWindow* win )
 {
     m_cancelled = false;
     SetEventType( wxEVT_WEBKIT_BEFORE_LOAD);
-    SetEventObject( win );
-    SetId(win->GetId());
+    if ( win )
+    {
+        SetEventObject( win );
+        SetId(win->GetId());
+    }
 }
 
 
 IMPLEMENT_DYNAMIC_CLASS( wxWebKitNewWindowEvent, wxCommandEvent )
 
-DEFINE_EVENT_TYPE( wxEVT_WEBKIT_NEW_WINDOW )
+wxDEFINE_EVENT( wxEVT_WEBKIT_NEW_WINDOW, wxWebKitNewWindowEvent )
 
 wxWebKitNewWindowEvent::wxWebKitNewWindowEvent( wxWindow* win )
 {
     SetEventType( wxEVT_WEBKIT_NEW_WINDOW);
-    SetEventObject( win );
-    SetId(win->GetId());
+    if ( win )
+    {
+        SetEventObject( win );
+        SetId(win->GetId());
+    }
 }