]> git.saurik.com Git - wxWidgets.git/commitdiff
Casting fix for events. Needs check by ARM eVC4 users.
authorWłodzimierz Skiba <abx@abx.art.pl>
Tue, 8 Mar 2005 20:53:16 +0000 (20:53 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Tue, 8 Mar 2005 20:53:16 +0000 (20:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32686 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/calctrl.h
include/wx/event.h
include/wx/listbase.h
include/wx/listbook.h
include/wx/notebook.h
include/wx/socket.h
include/wx/spinbutt.h
include/wx/taskbar.h
include/wx/timer.h
include/wx/treebase.h
include/wx/wizard.h

index 2fd259e4250ca7b2d51ed541b8d8251df3e5d68b..99d0ef6034fc0e44fb763b9afe8e62bbc1ed180b 100644 (file)
@@ -214,7 +214,7 @@ END_DECLARE_EVENT_TYPES()
 typedef void (wxEvtHandler::*wxCalendarEventFunction)(wxCalendarEvent&);
 
 #define wxCalendarEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxCalendarEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCalendarEventFunction, &func)
 
 #define wx__DECLARE_CALEVT(evt, id, fn) \
     wx__DECLARE_EVT1(wxEVT_CALENDAR_ ## evt, id, wxCalendarEventHandler(fn))
index 0165b960e39cc75ebd31b63e352f279625f0dbb3..d056318fa75f2a1b78c8f0b92f7d5e976aed4e41 100644 (file)
@@ -2522,76 +2522,76 @@ typedef void (wxEvtHandler::*wxMouseCaptureChangedEventFunction)(wxMouseCaptureC
 
 
 #define wxCommandEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxCommandEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCommandEventFunction, &func)
 #define wxScrollEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxScrollEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxScrollEventFunction, &func)
 #define wxScrollWinEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxScrollWinEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxScrollWinEventFunction, &func)
 #define wxSizeEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxSizeEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxSizeEventFunction, &func)
 #define wxMoveEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxMoveEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxMoveEventFunction, &func)
 #define wxPaintEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxPaintEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxPaintEventFunction, &func)
 #define wxNcPaintEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxNcPaintEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxNcPaintEventFunction, &func)
 #define wxEraseEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxEraseEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxEraseEventFunction, &func)
 #define wxMouseEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxMouseEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxMouseEventFunction, &func)
 #define wxCharEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxCharEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCharEventFunction, &func)
 #define wxKeyEventHandler(func) wxCharEventHandler(func)
 #define wxFocusEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxFocusEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxFocusEventFunction, &func)
 #define wxChildFocusEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxChildFocusEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxChildFocusEventFunction, &func)
 #define wxActivateEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxActivateEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxActivateEventFunction, &func)
 #define wxMenuEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxMenuEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxMenuEventFunction, &func)
 #define wxJoystickEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxJoystickEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxJoystickEventFunction, &func)
 #define wxDropFilesEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxDropFilesEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxDropFilesEventFunction, &func)
 #define wxInitDialogEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxInitDialogEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxInitDialogEventFunction, &func)
 #define wxSysColourChangedEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxSysColourChangedEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxSysColourChangedEventFunction, &func)
 #define wxDisplayChangedEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxDisplayChangedEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxDisplayChangedEventFunction, &func)
 #define wxUpdateUIEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxUpdateUIEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxUpdateUIEventFunction, &func)
 #define wxIdleEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxIdleEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxIdleEventFunction, &func)
 #define wxCloseEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxCloseEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCloseEventFunction, &func)
 #define wxShowEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxShowEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxShowEventFunction, &func)
 #define wxIconizeEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxIconizeEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxIconizeEventFunction, &func)
 #define wxMaximizeEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxMaximizeEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxMaximizeEventFunction, &func)
 #define wxNavigationKeyEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxNavigationKeyEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxNavigationKeyEventFunction, &func)
 #define wxPaletteChangedEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxPaletteChangedEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxPaletteChangedEventFunction, &func)
 #define wxQueryNewPaletteEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxQueryNewPaletteEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxQueryNewPaletteEventFunction, &func)
 #define wxWindowCreateEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxWindowCreateEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxWindowCreateEventFunction, &func)
 #define wxWindowDestroyEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxWindowDestroyEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxWindowDestroyEventFunction, &func)
 #define wxSetCursorEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxSetCursorEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxSetCursorEventFunction, &func)
 #define wxNotifyEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxNotifyEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxNotifyEventFunction, &func)
 #define wxHelpEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxHelpEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxHelpEventFunction, &func)
 #define wxContextMenuEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxContextMenuEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxContextMenuEventFunction, &func)
 #define wxMouseCaptureChangedEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxMouseCaptureChangedEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxMouseCaptureChangedEventFunction, &func)
 
 #endif // wxUSE_GUI
 
index ef640effcbcf39a5d9c71558eb167697f50261e5..97a3555fae745ef34a79c0348774490de9b44bb3 100644 (file)
@@ -444,7 +444,7 @@ END_DECLARE_EVENT_TYPES()
 typedef void (wxEvtHandler::*wxListEventFunction)(wxListEvent&);
 
 #define wxListEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxListEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxListEventFunction, &func)
 
 #define wx__DECLARE_LISTEVT(evt, id, fn) \
     wx__DECLARE_EVT1(wxEVT_COMMAND_LIST_ ## evt, id, wxListEventHandler(fn))
index 1b292be68657af993fd4d70ec3092ec6999657eb..9414943190298dc7520727a00127f5ba16641992 100644 (file)
@@ -147,23 +147,14 @@ extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING;
 
 typedef void (wxEvtHandler::*wxListbookEventFunction)(wxListbookEvent&);
 
-#define EVT_LISTBOOK_PAGE_CHANGED(id, fn)                                   \
-  DECLARE_EVENT_TABLE_ENTRY(                                                \
-    wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED,                                    \
-    id,                                                                     \
-    wxID_ANY,                                                               \
-    (wxObjectEventFunction)(wxEventFunction) wxStaticCastEvent( wxListbookEventFunction, &fn ),  \
-    NULL                                                                    \
-  ),
-
-#define EVT_LISTBOOK_PAGE_CHANGING(id, fn)                                  \
-  DECLARE_EVENT_TABLE_ENTRY(                                                \
-    wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING,                                   \
-    id,                                                                     \
-    wxID_ANY,                                                               \
-    (wxObjectEventFunction)(wxEventFunction) wxStaticCastEvent( wxListbookEventFunction, &fn ),  \
-    NULL                                                                    \
-  ),
+#define wxListbookEventHandler(func) \
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxListbookEventFunction, &func)
+
+#define EVT_LISTBOOK_PAGE_CHANGED(winid, fn) \
+    wx__DECLARE_EVT1(wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED, winid, wxListbookEventHandler(fn))
+
+#define EVT_LISTBOOK_PAGE_CHANGING(winid, fn) \
+    wx__DECLARE_EVT1(wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING, winid, wxListbookEventHandler(fn))
 
 #endif // wxUSE_LISTBOOK
 
index c1a04385bf2080ac83e5d49fdf250fdf2c15ff5a..02f4a116756bbc3bff3d97788bc0440d8de6c948 100644 (file)
@@ -123,7 +123,7 @@ END_DECLARE_EVENT_TYPES()
 typedef void (wxEvtHandler::*wxNotebookEventFunction)(wxNotebookEvent&);
 
 #define wxNotebookEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxNotebookEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxNotebookEventFunction, &func)
 
 #define EVT_NOTEBOOK_PAGE_CHANGED(winid, fn) \
     wx__DECLARE_EVT1(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, winid, wxNotebookEventHandler(fn))
index 2cd5df584ad4538ba4d10eaa214470458ab26efd..15a718b4fd90a1b1fa395f7cb5e653fdeec5a857 100644 (file)
@@ -321,7 +321,7 @@ public:
 typedef void (wxEvtHandler::*wxSocketEventFunction)(wxSocketEvent&);
 
 #define wxSocketEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxSocketEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxSocketEventFunction, &func)
 
 #define EVT_SOCKET(id, func) \
     wx__DECLARE_EVT1(wxEVT_SOCKET, id, wxSocketEventHandler(func))
index cf7fab4421ff5f7d646a3ea3d152cc9197d60350..7f7edb9e5be612a10a83e889c02b60537d0b9886 100644 (file)
@@ -111,7 +111,7 @@ private:
 typedef void (wxEvtHandler::*wxSpinEventFunction)(wxSpinEvent&);
 
 #define wxSpinEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxSpinEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxSpinEventFunction, &func)
 
 // macros for handling spin events
 #define EVT_SPIN_UP(winid, func) \
index 202aae6f78830fc1326596e230ea11ab06fdc042..2a03b0f0c11b1d88c633e9d6c4b1c8c712d45368 100644 (file)
@@ -85,7 +85,7 @@ BEGIN_DECLARE_EVENT_TYPES()
 END_DECLARE_EVENT_TYPES()
 
 #define wxTaskBarIconEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxTaskBarIconEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxTaskBarIconEventFunction, &func)
 
 #define wx__DECLARE_TASKBAREVT(evt, fn) \
     wx__DECLARE_EVT0(wxEVT_TASKBAR_ ## evt, wxTaskBarIconEventHandler(fn))
index 409f88dc5301bb68e7de5cc4e52a6755ed6d29ef..2ee202c10662660e815a9c33cdac5e79a284089e 100644 (file)
@@ -190,7 +190,7 @@ private:
 typedef void (wxEvtHandler::*wxTimerEventFunction)(wxTimerEvent&);
 
 #define wxTimerEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxTimerEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxTimerEventFunction, &func)
 
 #define EVT_TIMER(timerid, func) \
     wx__DECLARE_EVT1(wxEVT_TIMER, timerid, wxTimerEventHandler(func))
index 065432bc694ab21a5f59a8867418ea2163816d85..51c4249027979916bc2bd6a5ab18ceda3b42064b 100644 (file)
@@ -284,7 +284,7 @@ public:
         // Set the tooltip for the item (for EVT\_TREE\_ITEM\_GETTOOLTIP events)
     void SetToolTip(const wxString& toolTip) { m_label = toolTip; }
     wxString GetToolTip() { return m_label; }
-    
+
 #if WXWIN_COMPATIBILITY_2_2
     // for compatibility only, don't use
     wxDEPRECATED( int GetCode() const);
@@ -336,7 +336,7 @@ BEGIN_DECLARE_EVENT_TYPES()
 END_DECLARE_EVENT_TYPES()
 
 #define wxTreeEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxTreeEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxTreeEventFunction, &func)
 
 #define wx__DECLARE_TREEEVT(evt, id, fn) \
     wx__DECLARE_EVT1(wxEVT_COMMAND_TREE_ ## evt, id, wxTreeEventHandler(fn))
index 3fe354b377f4da172802e124ab55c3643170232f..712ea4f7a1599d7c1cc95b2b70bb53ab38958ddb 100644 (file)
@@ -297,7 +297,7 @@ END_DECLARE_EVENT_TYPES()
 typedef void (wxEvtHandler::*wxWizardEventFunction)(wxWizardEvent&);
 
 #define wxWizardEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxWizardEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxWizardEventFunction, &func)
 
 #define wx__DECLARE_WIZARDEVT(evt, id, fn) \
     wx__DECLARE_EVT1(wxEVT_WIZARD_ ## evt, id, wxWizardEventHandler(fn))